Decompiled source of Aeternal Everwatcher v0.1.0

AeternalEverwatcher.dll

Decompiled 3 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using GlobalEnums;
using GlobalSettings;
using HarmonyLib;
using HutongGames.PlayMaker;
using HutongGames.PlayMaker.Actions;
using Microsoft.CodeAnalysis;
using Silksong.AssetHelper.ManagedAssets;
using Silksong.FsmUtil;
using TeamCherry.Localization;
using UnityEngine;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("AeternalEverwatcher")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyInformationalVersion("0.1.0+928a93b3008d17ed3f5f00876885953e0d5da537")]
[assembly: AssemblyProduct("AeternalEverwatcher")]
[assembly: AssemblyTitle("AeternalEverwatcher")]
[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/astrum-nova/AeternalEverwatcher")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.1.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace BepInEx
{
	[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
	[Conditional("CodeGeneration")]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class BepInAutoPluginAttribute : Attribute
	{
		public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
		{
		}
	}
}
namespace BepInEx.Preloader.Core.Patching
{
	[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
	[Conditional("CodeGeneration")]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class PatcherAutoPluginAttribute : Attribute
	{
		public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
		{
		}
	}
}
namespace Microsoft.CodeAnalysis
{
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace AeternalEverwatcher
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("io.github.astrum-nova.aeternaleverwatcher", "AeternalEverwatcher", "0.1.0")]
	public class AeternalEverwatcherPlugin : BaseUnityPlugin
	{
		[CompilerGenerated]
		private sealed class <Start>d__22 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public AeternalEverwatcherPlugin <>4__this;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <Start>d__22(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0026: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(2f);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					Harmony.CreateAndPatchAll(typeof(BossTitlePatch), (string)null);
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		private static readonly ManualLogSource logger = Logger.CreateLogSource("[Aeternal Everwatcher]");

		public static bool PHASE_2;

		public static bool PHASE_3;

		public static int parryCounter;

		public static PlayMakerFSM controlFsm = null;

		public static HealthManager healthManager = null;

		public static Transform transform = null;

		public static DamageHero damageHeroComponent = null;

		public static bool foundWatcher;

		private static bool didSlashCombo1;

		public static bool fiveSLash;

		private static bool fiveSLashedOnce;

		public static bool pcrSlamming;

		public static bool eigongAirDashing;

		public static bool quadSlashing;

		public static bool tookDamage;

		private static bool sandburstOutSetup;

		public const string Id = "io.github.astrum-nova.aeternaleverwatcher";

		public static AeternalEverwatcherPlugin Instance { get; private set; } = null;


		public static string Name => "AeternalEverwatcher";

		public static string Version => "0.1.0";

		public static void log(string msg)
		{
			logger.LogInfo((object)msg);
		}

		[IteratorStateMachine(typeof(<Start>d__22))]
		public IEnumerator Start()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <Start>d__22(0)
			{
				<>4__this = this
			};
		}

		private void Awake()
		{
			Instance = this;
			((BaseUnityPlugin)this).Logger.LogInfo((object)("Plugin " + Name + " (io.github.astrum-nova.aeternaleverwatcher) has loaded!"));
			Harmony.CreateAndPatchAll(typeof(PatchesLikeFromEldenRing), (string)null);
			Settings.SetupSettings(((BaseUnityPlugin)this).Config);
			SceneManager.sceneLoaded += delegate(Scene scene, LoadSceneMode _)
			{
				foundWatcher = false;
				if (((Scene)(ref scene)).name.Equals("Coral_39"))
				{
					if (Settings.DISABLE_WIND_EFFECTS)
					{
						GameObject.Find("wind_effects").SetActive(false);
					}
					PlayerData.instance.wokeGreyWarrior = false;
					PlayerData.instance.defeatedGreyWarrior = false;
					foreach (PlayMakerFSM item in from fsm in Object.FindObjectsByType<PlayMakerFSM>((FindObjectsSortMode)0)
						where ((Object)fsm).name.Equals("Coral Warrior Grey")
						select fsm)
					{
						string fsmName = item.FsmName;
						string text = fsmName;
						if (!(text == "Stun Control"))
						{
							if (text == "Control")
							{
								controlFsm = item;
								healthManager = ((Component)item).GetComponent<HealthManager>();
								if (!Settings.NORMAL_COMBAT)
								{
									healthManager.TookDamage += delegate
									{
										healthManager.HealToMax();
									};
								}
								else
								{
									healthManager.hp = Settings.NORMAL_HP;
								}
								((Behaviour)healthManager.recoil).enabled = false;
								transform = ((Component)item).gameObject.transform;
								damageHeroComponent = ((Component)transform.Find("Body Damager")).GetComponent<DamageHero>();
								((tk2dBaseSprite)((Component)transform).gameObject.GetComponentInChildren<tk2dSprite>()).renderLayer = 200;
								tk2dSprite[] componentsInChildren = ((Component)HeroController.instance).GetComponentsInChildren<tk2dSprite>();
								foreach (tk2dSprite val in componentsInChildren)
								{
									((tk2dBaseSprite)val).renderLayer = 500;
								}
								foundWatcher = true;
							}
						}
						else
						{
							Object.Destroy((Object)(object)item);
						}
					}
					HeroController.instance.OnTakenDamage += delegate
					{
						tookDamage = true;
						if (Settings.ON_DAMAGE_FREEZE)
						{
							if (Settings.PARRY_TIME_FREEZE >= 0f && Settings.PARRY_TIME_FREEZE <= 0.261f)
							{
								((MonoBehaviour)Instance).StartCoroutine(GameManager.instance.FreezeMoment(0.01f, Settings.PARRY_TIME_FREEZE - 0.11f, 0.1f, 0f, (Action)null));
							}
							else
							{
								GameManager.instance.FreezeMoment((FreezeMomentTypes)3, (Action)null);
							}
						}
					};
					ResetFlags();
					SetupWatcher();
					PHASE_2 = false;
					PHASE_3 = false;
					parryCounter = 0;
					didSlashCombo1 = false;
					fiveSLash = false;
					fiveSLashedOnce = false;
					pcrSlamming = false;
					eigongAirDashing = false;
					quadSlashing = false;
					sandburstOutSetup = false;
					Pools.Clear();
				}
			};
			CustomBehaviour.skProjectile = ManagedAsset<GameObject>.FromNonSceneAsset("Assets/Prefabs/Hornet Enemies/Song Knight Projectile.prefab", "localpoolprefabs_assets_areahangareasong");
			CustomBehaviour.khannUcSpear = ManagedAsset<GameObject>.FromSceneAsset("memory_coral_tower", "Boss Scene/Uppercut Spear");
		}

		public static void ResetFlags()
		{
			didSlashCombo1 = false;
			fiveSLash = false;
			fiveSLashedOnce = false;
			eigongAirDashing = false;
			tookDamage = false;
		}

		private static bool Phase2ConditionParryOnly()
		{
			return parryCounter >= Settings.PHASE_2_QUOTA && !PHASE_2 && Object.op_Implicit((Object)(object)CustomBehaviour.groundWave) && Object.op_Implicit((Object)(object)CustomBehaviour.pcrBurst) && Object.op_Implicit((Object)(object)CustomBehaviour.sandburst) && Object.op_Implicit((Object)(object)CustomBehaviour.sandburstSmall);
		}

		private static bool Phase2ConditionNormal()
		{
			return healthManager.hp <= Settings.NORMAL_PHASE_2_QUOTA && !PHASE_2 && Object.op_Implicit((Object)(object)CustomBehaviour.groundWave) && Object.op_Implicit((Object)(object)CustomBehaviour.pcrBurst) && Object.op_Implicit((Object)(object)CustomBehaviour.sandburst) && Object.op_Implicit((Object)(object)CustomBehaviour.sandburstSmall);
		}

		private static bool Phase3ConditionParryOnly()
		{
			return parryCounter >= Settings.PHASE_3_QUOTA && !PHASE_3 && PHASE_2;
		}

		private static bool Phase3ConditionNormal()
		{
			return healthManager.hp <= Settings.NORMAL_PHASE_3_QUOTA && !PHASE_3 && PHASE_2;
		}

		private static bool PhaseCheck()
		{
			if (fiveSLash || eigongAirDashing || pcrSlamming || quadSlashing)
			{
				return false;
			}
			if (Settings.NORMAL_COMBAT ? Phase2ConditionNormal() : Phase2ConditionParryOnly())
			{
				parryCounter = Settings.PHASE_2_QUOTA;
				ResetFlags();
				PHASE_2 = true;
				controlFsm.SetState("Stun Start");
				Pools.PrewarmTelegraps();
				return true;
			}
			if (Settings.NORMAL_COMBAT ? (!Phase3ConditionNormal()) : (!Phase3ConditionParryOnly()))
			{
				return false;
			}
			parryCounter = Settings.PHASE_3_QUOTA;
			ResetFlags();
			PHASE_3 = true;
			controlFsm.SetState("Stun Start");
			return true;
		}

		private static void SetupWatcher()
		{
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Expected O, but got Unknown
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Expected O, but got Unknown
			FsmUtil.GetFirstActionOfType<CheckHeroPerformanceRegion>(controlFsm, "Sleep").MinReactDelay = FsmFloat.op_Implicit(1f);
			FsmUtil.GetFirstActionOfType<CheckHeroPerformanceRegion>(controlFsm, "Sleep").MaxReactDelay = FsmFloat.op_Implicit(1f);
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Sleep"), (Action<Action>)delegate
			{
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				//IL_000f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_002c: Unknown result type (might be due to invalid IL or missing references)
				Transform obj = transform;
				Vector3 position = transform.position;
				position.x = transform.position.x + 15f;
				obj.position = position;
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Wake Roar 2"), (Action<Action>)delegate
			{
				if (!sandburstOutSetup)
				{
					FsmUtil.RemoveActionsOfType<DisplayBossTitle>(controlFsm, "Wake Roar 2");
					Helpers.SandColorSetup(FsmUtil.GetFirstActionOfType<ActivateGameObject>(controlFsm, "Wake Roar 2").gameObject.GameObject.Value, "sandburstOut");
					sandburstOutSetup = true;
				}
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Wake Antic"), (Action<Action>)delegate
			{
				((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.ArenaBorders(createOrDestroy: true));
				Helpers.ModifyTerrain();
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Stun Recover"), (Action<Action>)delegate
			{
				((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.SpawnGroundWave());
				((Behaviour)damageHeroComponent).enabled = false;
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Stunned"), (Action<Action>)delegate
			{
				((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.StunSpears());
			});
			FsmUtil.GetLastActionOfType<ActivateGameObject>(controlFsm, "Stun Land").activate = FsmBool.op_Implicit(false);
			FsmUtil.AddAction(FsmUtil.GetState(controlFsm, "Stunned"), (FsmStateAction)new ObjectJitter
			{
				gameObject = new FsmOwnerDefault
				{
					ownerOption = (OwnerDefaultOption)0,
					OwnerOption = (OwnerDefaultOption)0,
					gameObject = FsmGameObject.op_Implicit(((Component)transform).gameObject),
					GameObject = FsmGameObject.op_Implicit(((Component)transform).gameObject)
				},
				x = FsmFloat.op_Implicit(0.2f),
				y = FsmFloat.op_Implicit(0.2f),
				z = FsmFloat.op_Implicit(0f),
				allowMovement = FsmBool.op_Implicit(false),
				limitFps = FsmFloat.op_Implicit(30f)
			});
			FsmUtil.GetFirstActionOfType<StartRoarEmitter>(controlFsm, "Wake Roar 2").stunHero = FsmBool.op_Implicit(false);
			FsmUtil.GetFirstActionOfType<Wait>(controlFsm, "Wake Roar 2").time = FsmFloat.op_Implicit(0.5f);
			FsmUtil.GetFirstActionOfType<Wait>(controlFsm, "Emerge Pause").time = FsmFloat.op_Implicit(0f);
			FsmUtil.GetFirstActionOfType<Wait>(controlFsm, "Init Idle").time = FsmFloat.op_Implicit(0.3f);
			FsmUtil.GetFirstActionOfType<Wait>(controlFsm, "Idle").time = FsmFloat.op_Implicit(0f);
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Very Far"), (Action<Action>)delegate
			{
				if (!quadSlashing && !pcrSlamming && !eigongAirDashing && !fiveSLash)
				{
					((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.SpawnGroundWave());
				}
			});
			FsmUtil.GetFirstActionOfType<Wait>(controlFsm, "Range Out Pause").time = FsmFloat.op_Implicit(0f);
			FsmUtil.GetFirstActionOfType<FaceObjectV2>(controlFsm, "Slash Combo Antic Q").everyFrame = true;
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo Antic Q"), (Action<Action>)delegate
			{
				if (!PhaseCheck())
				{
					((MonoBehaviour)Instance).StartCoroutine(Helpers.FinishStateEarly("FINISHED", 0.45f));
					FsmUtil.GetFirstActionOfType<SetVelocityByScale>(controlFsm, "Slash Combo 1").speed = FsmFloat.op_Implicit(fiveSLash ? 0f : (Helpers.GetPosDiffSpeed() * -1f));
				}
			});
			FsmUtil.GetFirstActionOfType<FaceObjectV2>(controlFsm, "Slash Combo Antic").everyFrame = true;
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo Antic"), (Action<Action>)delegate
			{
				if (quadSlashing || !PhaseCheck())
				{
					((MonoBehaviour)Instance).StartCoroutine(Helpers.FinishStateEarly("FINISHED", 0.55f));
					FsmUtil.GetFirstActionOfType<SetVelocityByScale>(controlFsm, "Slash Combo 1").speed = FsmFloat.op_Implicit(fiveSLash ? 0f : (Helpers.GetPosDiffSpeed() * -1f));
				}
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo 1"), (Action<Action>)delegate
			{
				if (PHASE_2 && !fiveSLash && !quadSlashing)
				{
					didSlashCombo1 = true;
				}
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo 3"), (Action<Action>)delegate
			{
				if (PHASE_2 && !eigongAirDashing && !quadSlashing)
				{
					((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.SpawnSkProjectile());
				}
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo 4"), (Action<Action>)delegate
			{
				FsmUtil.GetFirstActionOfType<SetVelocityByScale>(controlFsm, "Slash Combo 5").speed = FsmFloat.op_Implicit(Helpers.GetPosDiffSpeed() * (float)((!fiveSLash) ? 1 : (-1)));
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo 5"), (Action<Action>)delegate
			{
				Extensions.FlipLocalScale(transform, !fiveSLash && !quadSlashing, false, false);
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo 7"), (Action<Action>)delegate
			{
				//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
				//IL_00be: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
				//IL_004b: Unknown result type (might be due to invalid IL or missing references)
				//IL_005f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0076: Unknown result type (might be due to invalid IL or missing references)
				if (PHASE_3 && fiveSLash && !pcrSlamming && !eigongAirDashing)
				{
					if (!fiveSLashedOnce)
					{
						((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.Teleport(HeroController.instance.transform.position.x + 3.5f * transform.localScale.x * -1f, transform.position.y, "Slash Combo Antic Q"));
						fiveSLashedOnce = true;
					}
					else
					{
						((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.Teleport(HeroController.instance.transform.position.x + 5f * transform.localScale.x, transform.position.y, "Slash Combo 8"));
						fiveSLashedOnce = false;
					}
				}
				if (PHASE_2 && !eigongAirDashing && !quadSlashing)
				{
					((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.SpawnSkProjectile());
				}
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Switchup 2"), (Action<Action>)delegate
			{
				FsmUtil.GetFirstActionOfType<SetVelocityByScale>(controlFsm, "Slash Combo 9").speed = FsmFloat.op_Implicit(Helpers.GetPosDiffSpeed() * -0.5f);
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo 7"), (Action<Action>)delegate
			{
				if (didSlashCombo1)
				{
					((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.SandTelegraph("slam"));
				}
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo 11"), (Action<Action>)delegate
			{
				//IL_0059: Unknown result type (might be due to invalid IL or missing references)
				//IL_006f: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)CustomBehaviour.sandburstSmall == (Object)null)
				{
					CustomBehaviour.sandburstSmall = ((Component)transform.Find("Pt SwordSlam")).gameObject;
					Helpers.SandColorSetup(CustomBehaviour.sandburstSmall, "sandburstSmall");
				}
				if (PHASE_2 && didSlashCombo1)
				{
					((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.SpawnSandWave(transform.localScale.x == 1f, transform.localScale.x == -1f));
				}
				ResetFlags();
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo 13"), (Action<Action>)delegate
			{
				controlFsm.SetState("Range Check");
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "F Slash Antic"), (Action<Action>)delegate
			{
				if (quadSlashing || !PhaseCheck())
				{
					FsmUtil.GetFirstActionOfType<SetVelocityByScale>(controlFsm, "F Slash 2").ySpeed = FsmFloat.op_Implicit((float)(eigongAirDashing ? (-50) : 0));
					FsmUtil.GetFirstActionOfType<SetVelocityByScale>(controlFsm, "F Slash 2").speed = FsmFloat.op_Implicit(Helpers.GetPosDiffSpeed() * -0.6f * (eigongAirDashing ? 0.75f : 1f) * (float)((!quadSlashing) ? 1 : 0));
					if (!eigongAirDashing && !quadSlashing && PHASE_2)
					{
						switch (Random.Range(0, 3))
						{
						case 0:
							((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.QuadWindSlash());
							break;
						case 1:
							((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.SpawnGroundWave());
							break;
						}
					}
				}
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "F Slash Recover"), (Action<Action>)delegate
			{
				if (PHASE_2 && !eigongAirDashing && !quadSlashing)
				{
					((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.SpawnSkProjectile());
				}
				else if (PHASE_3 && eigongAirDashing)
				{
					controlFsm.SetState("F Slash Antic");
				}
				if (quadSlashing)
				{
					controlFsm.SetState("Init Idle");
				}
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Dash To Jump"), (Action<Action>)delegate
			{
				controlFsm.SetState("Jump Slash Antic");
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Dash To Antic"), (Action<Action>)delegate
			{
				controlFsm.SetState("Jump Slash Antic");
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Jump Slash Antic"), (Action<Action>)delegate
			{
				if (quadSlashing)
				{
					controlFsm.Fsm.manualUpdate = true;
				}
				else
				{
					controlFsm.SetState("F Slash Antic");
				}
			});
			FsmUtil.GetFirstActionOfType<SetVelocity2d>(controlFsm, "Jump Slash Launch").y = FsmFloat.op_Implicit(3f);
			FsmUtil.GetFirstActionOfType<FloatClamp>(controlFsm, "Dig Pos").minValue = FsmFloat.op_Implicit(0f);
			FsmUtil.GetFirstActionOfType<Wait>(controlFsm, "Dig Out Antic").time = FsmFloat.op_Implicit(0.3f);
			FsmUtil.GetFirstActionOfType<SetVelocityByScale>(controlFsm, "Dig Out Uppercut").speed = FsmFloat.op_Implicit(120f);
			FsmUtil.GetFirstActionOfType<FaceObjectV2>(controlFsm, "Uppercut Antic").everyFrame = true;
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Uppercut Antic Q"), (Action<Action>)delegate
			{
				((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.SandTelegraph(pcrSlamming ? "ground" : "uppercut"));
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Uppercut Antic"), (Action<Action>)delegate
			{
				//IL_0077: Unknown result type (might be due to invalid IL or missing references)
				//IL_0086: Unknown result type (might be due to invalid IL or missing references)
				if (pcrSlamming || !PhaseCheck())
				{
					switch (Random.Range(0, PHASE_3 ? 3 : 4))
					{
					default:
						return;
					case 0:
						if (PHASE_3)
						{
							fiveSLash = true;
							fiveSLashedOnce = false;
							controlFsm.SetState("Slash Combo Antic Q");
							((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.Teleport(transform.position.x, transform.position.y));
							return;
						}
						if (PHASE_3)
						{
							return;
						}
						break;
					case 1:
						controlFsm.SetState("Evade Antic");
						return;
					case 2:
					case 3:
						break;
					}
					if (PHASE_2 && !pcrSlamming)
					{
						((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.SandTelegraph("uppercut"));
					}
				}
			});
			FsmUtil.GetFirstActionOfType<SetVelocityByScale>(controlFsm, "Uppercut 1").speed = FsmFloat.op_Implicit(70f);
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Uppercut 1"), (Action<Action>)delegate
			{
				if (!Object.op_Implicit((Object)(object)CustomBehaviour.sandburst))
				{
					Helpers.InitSandEffects();
				}
				if (PHASE_2)
				{
					((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.SpawnSandWave());
				}
				if (!pcrSlamming && PHASE_3)
				{
					((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.PCRSlams());
				}
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Uppercut End"), (Action<Action>)delegate
			{
				FsmUtil.GetFirstActionOfType<FloatClamp>(controlFsm, "Uppercut Launch").minValue = FsmFloat.op_Implicit(0f);
				controlFsm.SetState("Uppercut Launch");
			});
			FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Die"), (Action<Action>)delegate
			{
				((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.DesperationSpears());
			});
			foreach (FsmState item in new List<FsmState>
			{
				FsmUtil.GetState(controlFsm, "Slash Combo 1"),
				FsmUtil.GetState(controlFsm, "Slash Combo 5"),
				FsmUtil.GetState(controlFsm, "Slash Combo 9"),
				FsmUtil.GetState(controlFsm, "F Slash Antic"),
				FsmUtil.GetState(controlFsm, "Uppercut 1"),
				FsmUtil.GetState(controlFsm, "Uppercut 2"),
				FsmUtil.GetState(controlFsm, "Dig Out Uppercut"),
				FsmUtil.GetState(controlFsm, "Jump Slash Air")
			})
			{
				FsmUtil.AddLambdaMethod(item, (Action<Action>)delegate
				{
					((Behaviour)damageHeroComponent).enabled = true;
				});
			}
			foreach (FsmState item2 in new List<FsmState>
			{
				FsmUtil.GetState(controlFsm, "Slash Combo 4"),
				FsmUtil.GetState(controlFsm, "Slash Combo 8"),
				FsmUtil.GetState(controlFsm, "Slash Combo 12"),
				FsmUtil.GetState(controlFsm, "F Slash Recover"),
				FsmUtil.GetState(controlFsm, "Jump Away Antic"),
				FsmUtil.GetState(controlFsm, "Jump Slash Antic")
			})
			{
				FsmUtil.AddLambdaMethod(item2, (Action<Action>)delegate
				{
					((Behaviour)damageHeroComponent).enabled = false;
				});
			}
			if (Settings.NORMAL_COMBAT)
			{
				FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Stun Start"), (Action<Action>)delegate
				{
					healthManager.invincible = true;
				});
				FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Stun Recover"), (Action<Action>)delegate
				{
					healthManager.invincible = false;
				});
			}
			Helpers.removeEventFromState("Slash Combo Antic", "BLOCKED HIT");
			Helpers.removeEventFromState("Evade Antic", "BLOCKED HIT");
			Helpers.removeEventFromState("Jump Away Antic", "BLOCKED HIT");
			Helpers.removeEventFromState("Jump Slash Antic", "BLOCKED HIT");
			Helpers.removeEventFromState("Dash", "BLOCKED HIT");
			Helpers.removeEventFromState("Uppercut Antic", "BLOCKED HIT");
			Helpers.removeEventFromState("Init Idle", "BLOCKED HIT");
			Helpers.removeEventFromState("Idle", "BLOCKED HIT");
		}
	}
	public static class CustomBehaviour
	{
		[CompilerGenerated]
		private sealed class <ArenaBorders>d__41 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public bool createOrDestroy;

			private SpriteRenderer[] <>s__1;

			private int <>s__2;

			private SpriteRenderer <componentsInChild>5__3;

			private ParticleSystemRenderer[] <>s__4;

			private int <>s__5;

			private ParticleSystemRenderer <componentsInChild>5__6;

			private Transform <spearObjLeft>5__7;

			private Transform <spearObjRight>5__8;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <ArenaBorders>d__41(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>s__1 = null;
				<componentsInChild>5__3 = null;
				<>s__4 = null;
				<componentsInChild>5__6 = null;
				<spearObjLeft>5__7 = null;
				<spearObjRight>5__8 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0477: Unknown result type (might be due to invalid IL or missing references)
				//IL_049b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				//IL_0103: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
				//IL_027e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0283: Unknown result type (might be due to invalid IL or missing references)
				//IL_0290: Unknown result type (might be due to invalid IL or missing references)
				//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
				//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
				//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
				//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
				//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
				//IL_0395: Unknown result type (might be due to invalid IL or missing references)
				//IL_03b9: Unknown result type (might be due to invalid IL or missing references)
				//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					if (!Object.op_Implicit((Object)(object)khannUcSpearSetup))
					{
						<>2__current = ((ManagedAssetBase<GameObject>)(object)khannUcSpear).Load();
						<>1__state = 1;
						return true;
					}
					goto IL_03e5;
				case 1:
				{
					<>1__state = -1;
					khannUcSpearSetup = ManagedAssetExtensions.InstantiateAsset<GameObject>(khannUcSpear);
					<>s__1 = khannUcSpearSetup.GetComponentsInChildren<SpriteRenderer>(true);
					for (<>s__2 = 0; <>s__2 < <>s__1.Length; <>s__2++)
					{
						<componentsInChild>5__3 = <>s__1[<>s__2];
						<componentsInChild>5__3.color = ((((Object)((Component)<componentsInChild>5__3).gameObject.transform.parent).name == "blurred") ? new Color(0.4f, 1f, 1f, 1f) : new Color(0.5f, 1f, 1f, 1f));
						<componentsInChild>5__3 = null;
					}
					<>s__1 = null;
					<>s__4 = khannUcSpearSetup.GetComponentsInChildren<ParticleSystemRenderer>(true);
					for (<>s__5 = 0; <>s__5 < <>s__4.Length; <>s__5++)
					{
						<componentsInChild>5__6 = <>s__4[<>s__5];
						((Renderer)<componentsInChild>5__6).material.SetColor(Helpers.Color1, ((Object)<componentsInChild>5__6).name.StartsWith("coral_spear_shatter_particles") ? new Color(0.5f, 1f, 1f, 1f) : new Color(0.6f, 0.8f, 0.8f, 1f));
						<componentsInChild>5__6 = null;
					}
					<>s__4 = null;
					khannUcSpearSetup.SetActive(false);
					((Object)khannUcSpearSetup).name = "spear";
					left1 = Object.Instantiate<GameObject>(khannUcSpearSetup, AeternalEverwatcherPlugin.transform);
					left2 = Object.Instantiate<GameObject>(khannUcSpearSetup, AeternalEverwatcherPlugin.transform);
					right1 = Object.Instantiate<GameObject>(khannUcSpearSetup, AeternalEverwatcherPlugin.transform);
					right2 = Object.Instantiate<GameObject>(khannUcSpearSetup, AeternalEverwatcherPlugin.transform);
					Transform transform = right1.transform;
					Vector3 localScale = right1.transform.localScale;
					localScale.x = right1.transform.localScale.x * -1f;
					transform.localScale = localScale;
					Transform transform2 = right2.transform;
					localScale = right2.transform.localScale;
					localScale.x = right2.transform.localScale.x * -1f;
					transform2.localScale = localScale;
					left1.SetActive(false);
					left2.SetActive(false);
					right1.SetActive(false);
					right2.SetActive(false);
					((Object)left1).name = "StunLeft1";
					((Object)left2).name = "StunLeft2";
					((Object)right1).name = "StunRight1";
					((Object)right2).name = "StunRight2";
					arenaBorderLeft = Object.Instantiate<GameObject>(khannUcSpearSetup);
					arenaBorderRight = Object.Instantiate<GameObject>(khannUcSpearSetup);
					arenaBorderLeft.transform.localScale = new Vector3(2f, 3f, -1f);
					arenaBorderRight.transform.localScale = new Vector3(2f, 3f, 1f);
					((Object)arenaBorderLeft).name = "ArenaBorderLeft";
					((Object)arenaBorderRight).name = "ArenaBorderRight";
					goto IL_03e5;
				}
				case 2:
					{
						<>1__state = -1;
						arenaBorderLeft.transform.position = new Vector3(23f, 140f, 0f);
						arenaBorderRight.transform.position = new Vector3(168.9436f, 140f, 2f);
						<spearObjLeft>5__7 = arenaBorderLeft.transform.GetChild(0);
						<spearObjRight>5__8 = arenaBorderRight.transform.GetChild(0);
						((Behaviour)((Component)<spearObjLeft>5__7).GetComponent<Animator>()).enabled = false;
						((Behaviour)((Component)<spearObjLeft>5__7).GetComponent<DeactivateAfterDelay>()).enabled = false;
						((Behaviour)((Component)<spearObjRight>5__8).GetComponent<Animator>()).enabled = false;
						((Behaviour)((Component)<spearObjRight>5__8).GetComponent<DeactivateAfterDelay>()).enabled = false;
						((Component)<spearObjLeft>5__7.GetChild(1).GetChild(0)).gameObject.SetActive(false);
						((Component)<spearObjRight>5__8.GetChild(1).GetChild(0)).gameObject.SetActive(false);
						((Component)<spearObjLeft>5__7.GetChild(1).GetChild(1)).gameObject.SetActive(true);
						((Component)<spearObjRight>5__8.GetChild(1).GetChild(1)).gameObject.SetActive(true);
						((Component)<spearObjLeft>5__7.GetChild(1)).gameObject.AddComponent<NonBouncer>();
						((Component)<spearObjRight>5__8.GetChild(1).GetChild(3)).gameObject.AddComponent<NonBouncer>();
						((Component)<spearObjLeft>5__7.GetChild(1).GetChild(3)).gameObject.AddComponent<NonBouncer>();
						<spearObjLeft>5__7 = null;
						<spearObjRight>5__8 = null;
						break;
					}
					IL_03e5:
					if (createOrDestroy)
					{
						arenaBorderLeft.SetActive(true);
						arenaBorderRight.SetActive(true);
						((Component)arenaBorderLeft.transform.GetChild(0)).gameObject.SetActive(true);
						((Component)arenaBorderRight.transform.GetChild(0)).gameObject.SetActive(true);
						<>2__current = _waitForSeconds1;
						<>1__state = 2;
						return true;
					}
					((Behaviour)((Component)arenaBorderLeft.transform.GetChild(0)).GetComponent<Animator>()).enabled = true;
					((Behaviour)((Component)arenaBorderRight.transform.GetChild(0)).GetComponent<Animator>()).enabled = true;
					GameObject.Find("BorderLeftHitbox").SetActive(false);
					GameObject.Find("BorderRightHitbox").SetActive(false);
					break;
				}
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <DesperationSpears>d__38 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			private GameObject <borderLeftHitbox>5__1;

			private GameObject <borderRightHitbox>5__2;

			private int <i>5__3;

			private GameObject <spear>5__4;

			private GameObject <spearLeft>5__5;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <DesperationSpears>d__38(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<borderLeftHitbox>5__1 = null;
				<borderRightHitbox>5__2 = null;
				<spear>5__4 = null;
				<spearLeft>5__5 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0091: Unknown result type (might be due to invalid IL or missing references)
				//IL_0096: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00da: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
				//IL_012d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0132: Unknown result type (might be due to invalid IL or missing references)
				//IL_013f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0154: Unknown result type (might be due to invalid IL or missing references)
				//IL_016f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0174: Unknown result type (might be due to invalid IL or missing references)
				//IL_0181: Unknown result type (might be due to invalid IL or missing references)
				//IL_0196: Unknown result type (might be due to invalid IL or missing references)
				//IL_0206: Unknown result type (might be due to invalid IL or missing references)
				//IL_0237: Unknown result type (might be due to invalid IL or missing references)
				//IL_026e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0273: Unknown result type (might be due to invalid IL or missing references)
				//IL_0280: Unknown result type (might be due to invalid IL or missing references)
				//IL_028f: Unknown result type (might be due to invalid IL or missing references)
				//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
				//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
				//IL_02be: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = _waitForSeconds2;
					<>1__state = 1;
					return true;
				case 1:
				{
					<>1__state = -1;
					<borderLeftHitbox>5__1 = GameObject.Find("BorderLeftHitbox");
					<borderRightHitbox>5__2 = GameObject.Find("BorderRightHitbox");
					Transform transform = <borderLeftHitbox>5__1.transform;
					Vector3 position = <borderLeftHitbox>5__1.transform.position;
					position.x = HeroController.instance.transform.position.x - 55.4f;
					transform.position = position;
					Transform transform2 = <borderRightHitbox>5__2.transform;
					position = <borderRightHitbox>5__2.transform.position;
					position.x = HeroController.instance.transform.position.x + 35f;
					transform2.position = position;
					Pools.PrewarmSpears();
					((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(PauseCorpseFsm());
					Transform transform3 = arenaBorderLeft.transform;
					position = arenaBorderLeft.transform.position;
					position.x = HeroController.instance.transform.position.x + 30f;
					transform3.position = position;
					Transform transform4 = arenaBorderRight.transform;
					position = arenaBorderRight.transform.position;
					position.x = HeroController.instance.transform.position.x - 30f;
					transform4.position = position;
					<i>5__3 = 0;
					goto IL_036e;
				}
				case 2:
					<>1__state = -1;
					<spear>5__4.SetActive(true);
					((Component)<spear>5__4.transform.GetChild(0)).gameObject.SetActive(true);
					<>2__current = _waitForSeconds0_15;
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -1;
					<spearLeft>5__5.SetActive(true);
					((Component)<spearLeft>5__5.transform.GetChild(0)).gameObject.SetActive(true);
					<spear>5__4 = null;
					<spearLeft>5__5 = null;
					<i>5__3++;
					goto IL_036e;
				case 4:
					{
						<>1__state = -1;
						((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(ArenaBorders(createOrDestroy: false));
						return false;
					}
					IL_036e:
					if (<i>5__3 < Settings.DESPERATION_PHASE_LENGTH)
					{
						<spear>5__4 = Pools.GetSpear();
						<spearLeft>5__5 = Pools.GetSpear();
						Extensions.SetRotation2D(<spear>5__4.transform, (float)Random.Range(-30, 30));
						Extensions.SetRotation2D(<spearLeft>5__5.transform, (float)Random.Range(-30, 30));
						Helpers.SetSpearX(<spear>5__4, HeroController.instance.transform.position.x + (float)Random.Range(-10, 10) + 11f);
						Helpers.SetSpearX(<spearLeft>5__5, HeroController.instance.transform.position.x + (float)Random.Range(-10, 10) + 11f);
						Transform transform5 = <spear>5__4.transform;
						Vector3 position = <spear>5__4.transform.position;
						position.y = HeroController.instance.transform.position.y;
						transform5.position = position;
						Transform transform6 = <spearLeft>5__5.transform;
						position = <spearLeft>5__5.transform.position;
						position.y = 5f;
						transform6.position = position;
						<>2__current = _waitForSeconds0_15;
						<>1__state = 2;
						return true;
					}
					<>2__current = _waitForSeconds1;
					<>1__state = 4;
					return true;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <PCRSlams>d__34 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <PCRSlams>d__34(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				//IL_0112: Unknown result type (might be due to invalid IL or missing references)
				//IL_0094: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_0136: Unknown result type (might be due to invalid IL or missing references)
				//IL_015c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0161: Unknown result type (might be due to invalid IL or missing references)
				Vector3 localScale;
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					AeternalEverwatcherPlugin.pcrSlamming = true;
					<>2__current = _waitForSeconds0_8;
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(Teleport(HeroController.instance.transform.position.x + (float)((Random.Range(0, 2) == 0) ? (-7) : 7), HeroController.instance.transform.position.y + 7f, "Uppercut End"));
					localScale = AeternalEverwatcherPlugin.transform.localScale;
					((Vector3)(ref localScale)).Set((float)((!Helpers.ObjLeftOfHornet(((Component)AeternalEverwatcherPlugin.transform).gameObject)) ? 1 : (-1)), 1f, 1f);
					<>2__current = _waitForSeconds0_7;
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(Teleport(HeroController.instance.transform.position.x + (float)((Random.Range(0, 2) == 0) ? (-7) : 7), HeroController.instance.transform.position.y + 7f, "Uppercut End"));
					localScale = AeternalEverwatcherPlugin.transform.localScale;
					((Vector3)(ref localScale)).Set((float)((!Helpers.ObjLeftOfHornet(((Component)AeternalEverwatcherPlugin.transform).gameObject)) ? 1 : (-1)), 1f, 1f);
					<>2__current = _waitForSeconds0_7;
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -1;
					pcrSlamsEndWave = true;
					AeternalEverwatcherPlugin.controlFsm.SetState("Uppercut Antic Q");
					<>2__current = _waitForSeconds0_65;
					<>1__state = 4;
					return true;
				case 4:
					<>1__state = -1;
					AeternalEverwatcherPlugin.controlFsm.SetState("Jump Away Air");
					AeternalEverwatcherPlugin.pcrSlamming = false;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <PauseCorpseFsm>d__37 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			private PlayMakerFSM <corpseFsm>5__1;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <PauseCorpseFsm>d__37(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<corpseFsm>5__1 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<corpseFsm>5__1 = GameObject.Find("Corpse Coral Warrior Grey(Clone)").GetComponent<PlayMakerFSM>();
					FsmUtil.GetFirstActionOfType<StartRoarEmitter>(<corpseFsm>5__1, "Roar").noVisualEffect = FsmBool.op_Implicit(true);
					<>2__current = _waitForSeconds1_3;
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<corpseFsm>5__1.Fsm.ManualUpdate = true;
					<>2__current = _waitForSeconds9;
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					<corpseFsm>5__1.Fsm.ManualUpdate = false;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <QuadSlashSpears>d__35 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			private GameObject <spear1>5__1;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <QuadSlashSpears>d__35(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<spear1>5__1 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0044: Unknown result type (might be due to invalid IL or missing references)
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				//IL_0051: Unknown result type (might be due to invalid IL or missing references)
				//IL_0065: Unknown result type (might be due to invalid IL or missing references)
				//IL_0076: Unknown result type (might be due to invalid IL or missing references)
				//IL_0093: Unknown result type (might be due to invalid IL or missing references)
				//IL_0098: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
				//IL_0140: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
				{
					<>1__state = -1;
					<spear1>5__1 = Pools.GetSpear();
					Transform transform = <spear1>5__1.transform;
					Vector3 position = <spear1>5__1.transform.position;
					position.x = AeternalEverwatcherPlugin.transform.position.x - 18f * AeternalEverwatcherPlugin.transform.localScale.x;
					transform.position = position;
					Transform transform2 = <spear1>5__1.transform;
					position = <spear1>5__1.transform.localScale;
					position.x = AeternalEverwatcherPlugin.transform.localScale.x * 2f;
					transform2.localScale = position;
					<spear1>5__1.SetActive(true);
					((Component)<spear1>5__1.transform.GetChild(0)).gameObject.SetActive(true);
					<>2__current = _waitForSeconds1;
					<>1__state = 1;
					return true;
				}
				case 1:
					<>1__state = -1;
					<spear1>5__1.SetActive(false);
					((Component)<spear1>5__1.transform.GetChild(0)).gameObject.SetActive(false);
					<spear1>5__1.transform.localScale = khannUcSpearSetup.transform.localScale;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <QuadWindSlash>d__36 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <QuadWindSlash>d__36(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					if (!AeternalEverwatcherPlugin.quadSlashing && !AeternalEverwatcherPlugin.eigongAirDashing)
					{
						AeternalEverwatcherPlugin.quadSlashing = true;
						((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(QuadSlashSpears());
						AeternalEverwatcherPlugin.controlFsm.SetState("F Slash Antic");
						AeternalEverwatcherPlugin.controlFsm.Fsm.ManualUpdate = true;
						<>2__current = _waitForSeconds0_375;
						<>1__state = 1;
						return true;
					}
					break;
				case 1:
					<>1__state = -1;
					((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(SpawnSkProjectile());
					<>2__current = _waitForSeconds0_425;
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					FsmUtil.GetFirstActionOfType<SetVelocityByScale>(AeternalEverwatcherPlugin.controlFsm, "Slash Combo 1").speed = FsmFloat.op_Implicit(0f);
					AeternalEverwatcherPlugin.controlFsm.SetState("Slash Combo 1");
					AeternalEverwatcherPlugin.controlFsm.Fsm.ManualUpdate = true;
					((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(SpawnSkProjectile());
					<>2__current = _waitForSeconds0_2;
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -1;
					((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(SpawnSkProjectile());
					<>2__current = _waitForSeconds0_05;
					<>1__state = 4;
					return true;
				case 4:
					<>1__state = -1;
					AeternalEverwatcherPlugin.controlFsm.SetState("F Slash 2");
					AeternalEverwatcherPlugin.controlFsm.Fsm.ManualUpdate = true;
					<>2__current = _waitForSeconds0_4;
					<>1__state = 5;
					return true;
				case 5:
					<>1__state = -1;
					AeternalEverwatcherPlugin.controlFsm.SetState("Jump Slash New");
					AeternalEverwatcherPlugin.controlFsm.Fsm.ManualUpdate = true;
					((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(SpawnSkProjectile());
					<>2__current = _waitForSeconds0_2;
					<>1__state = 6;
					return true;
				case 6:
					<>1__state = -1;
					AeternalEverwatcherPlugin.quadSlashing = false;
					AeternalEverwatcherPlugin.controlFsm.Fsm.ManualUpdate = false;
					AeternalEverwatcherPlugin.controlFsm.SetState("Range Check");
					break;
				}
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <SandTelegraph>d__47 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public string type;

			private Vector3 <pos>5__1;

			private string <>s__2;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <SandTelegraph>d__47(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>s__2 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0106: Unknown result type (might be due to invalid IL or missing references)
				//IL_011f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0129: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
				//IL_008d: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
				//IL_0142: Unknown result type (might be due to invalid IL or missing references)
				//IL_0156: Unknown result type (might be due to invalid IL or missing references)
				//IL_0171: Unknown result type (might be due to invalid IL or missing references)
				//IL_017b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0180: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
				{
					<>1__state = -1;
					if (!Settings.SAND_WAVE_TELEGRAPH)
					{
						return false;
					}
					string text = type;
					<>s__2 = text;
					switch (<>s__2)
					{
					case "uppercut":
						CreateWave("sandTelegraph", new Vector3(AeternalEverwatcherPlugin.transform.position.x - 15f * AeternalEverwatcherPlugin.transform.localScale.x, 2.5524979f, sandTelegraph.transform.position.z), 1f, rotation: false);
						break;
					case "ground":
						<>2__current = _waitForSeconds0_15;
						<>1__state = 1;
						return true;
					case "slam":
						<pos>5__1 = new Vector3(AeternalEverwatcherPlugin.transform.position.x + 21f * AeternalEverwatcherPlugin.transform.localScale.x, 2.5524979f, sandTelegraph.transform.position.z);
						<>2__current = _waitForSeconds0_3;
						<>1__state = 2;
						return true;
					}
					break;
				}
				case 1:
					<>1__state = -1;
					CreateWave("sandTelegraph", new Vector3(HeroController.instance.transform.position.x, 2.5524979f, sandTelegraph.transform.position.z), 1f, rotation: false);
					break;
				case 2:
					<>1__state = -1;
					CreateWave("sandTelegraph", <pos>5__1, 1f, rotation: false);
					break;
				}
				<>s__2 = null;
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <SpawnGroundWave>d__30 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			private int <xOffset>5__1;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <SpawnGroundWave>d__30(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_008a: Unknown result type (might be due to invalid IL or missing references)
				//IL_008f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0097: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
				//IL_0157: Unknown result type (might be due to invalid IL or missing references)
				//IL_0259: Unknown result type (might be due to invalid IL or missing references)
				//IL_0353: Unknown result type (might be due to invalid IL or missing references)
				//IL_048e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0294: Unknown result type (might be due to invalid IL or missing references)
				//IL_02ad: Unknown result type (might be due to invalid IL or missing references)
				//IL_02b7: Unknown result type (might be due to invalid IL or missing references)
				//IL_02d7: Unknown result type (might be due to invalid IL or missing references)
				//IL_02f3: Unknown result type (might be due to invalid IL or missing references)
				//IL_038e: Unknown result type (might be due to invalid IL or missing references)
				//IL_03a7: Unknown result type (might be due to invalid IL or missing references)
				//IL_03b1: Unknown result type (might be due to invalid IL or missing references)
				//IL_03ef: Unknown result type (might be due to invalid IL or missing references)
				//IL_040b: Unknown result type (might be due to invalid IL or missing references)
				//IL_04b2: Unknown result type (might be due to invalid IL or missing references)
				//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
				//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
				{
					<>1__state = -1;
					AeternalEverwatcherPlugin.ResetFlags();
					AeternalEverwatcherPlugin.eigongAirDashing = AeternalEverwatcherPlugin.PHASE_3;
					AeternalEverwatcherPlugin.controlFsm.SetState("Wake Roar 2");
					((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(SandTelegraph("ground"));
					AudioEvent enemyCoalHurtSound = Effects.EnemyCoalHurtSound;
					((AudioEvent)(ref enemyCoalHurtSound)).SpawnAndPlayOneShot(AeternalEverwatcherPlugin.transform.position, (Action)null);
					<>2__current = _waitForSeconds0_5;
					<>1__state = 1;
					return true;
				}
				case 1:
					<>1__state = -1;
					CreateWave("groundWave", new Vector3(HeroController.instance.transform.position.x, 6.552498f, sandburst.transform.position.z), 3f, rotation: false);
					if (!AeternalEverwatcherPlugin.PHASE_3)
					{
						AeternalEverwatcherPlugin.controlFsm.SetState("Dig In 1");
					}
					else if (!AeternalEverwatcherPlugin.pcrSlamming)
					{
						<>2__current = _waitForSeconds0_2;
						<>1__state = 2;
						return true;
					}
					goto IL_04d4;
				case 2:
					<>1__state = -1;
					if ((double)HeroController.instance.transform.position.y < 11.5)
					{
						HeroController.instance.TakeDamage((GameObject)null, (CollisionSide)0, 2, (HazardType)0, (DamagePropertyFlags)0);
					}
					<xOffset>5__1 = ((Random.Range(0, 2) == 0) ? (-9) : 9);
					FsmUtil.GetFirstActionOfType<SetVelocity2d>(AeternalEverwatcherPlugin.controlFsm, "F Slash Antic").y = FsmFloat.op_Implicit(30f);
					((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(Teleport(HeroController.instance.transform.position.x + (float)<xOffset>5__1, HeroController.instance.transform.position.y, "F Slash Antic"));
					((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(Helpers.FinishStateEarly("FINISHED", 0.3f));
					<>2__current = _waitForSeconds0_5;
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -1;
					FsmUtil.GetFirstActionOfType<SetVelocity2d>(AeternalEverwatcherPlugin.controlFsm, "F Slash Antic").y = FsmFloat.op_Implicit(0f);
					if ((double)HeroController.instance.transform.position.y < 11.5)
					{
						HeroController.instance.TakeDamage((GameObject)null, (CollisionSide)0, 2, (HazardType)0, (DamagePropertyFlags)0);
					}
					CreateWave("groundWave", new Vector3(HeroController.instance.transform.position.x, 6.552498f, sandburst.transform.position.z), 3f, rotation: false);
					((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(Teleport(HeroController.instance.transform.position.x - (float)<xOffset>5__1, HeroController.instance.transform.position.y + 3f, "F Slash Antic"));
					((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(Helpers.FinishStateEarly("FINISHED", 0.1f));
					<>2__current = _waitForSeconds0_3;
					<>1__state = 4;
					return true;
				case 4:
					<>1__state = -1;
					if ((double)HeroController.instance.transform.position.y < 11.5)
					{
						HeroController.instance.TakeDamage((GameObject)null, (CollisionSide)0, 2, (HazardType)0, (DamagePropertyFlags)0);
					}
					CreateWave("groundWave", new Vector3(HeroController.instance.transform.position.x, 6.552498f, sandburst.transform.position.z), 3f, rotation: false);
					FsmUtil.GetFirstActionOfType<SetVelocity2d>(AeternalEverwatcherPlugin.controlFsm, "F Slash Antic").y = FsmFloat.op_Implicit(30f);
					((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(Teleport(HeroController.instance.transform.position.x + (float)<xOffset>5__1, HeroController.instance.transform.position.y + 1f, "F Slash Antic"));
					((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(Helpers.FinishStateEarly("FINISHED", 0.3f));
					<>2__current = _waitForSeconds0_5;
					<>1__state = 5;
					return true;
				case 5:
					<>1__state = -1;
					FsmUtil.GetFirstActionOfType<SetVelocity2d>(AeternalEverwatcherPlugin.controlFsm, "F Slash Antic").y = FsmFloat.op_Implicit(0f);
					((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(Teleport(HeroController.instance.transform.position.x + (float)((Random.Range(0, 2) == 0) ? (-7) : 7), HeroController.instance.transform.position.y + 4f, "Uppercut End"));
					goto IL_04d4;
				case 6:
					{
						<>1__state = -1;
						AeternalEverwatcherPlugin.eigongAirDashing = false;
						return false;
					}
					IL_04d4:
					<>2__current = _waitForSeconds0_2;
					<>1__state = 6;
					return true;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <SpawnSandWave>d__32 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public bool left;

			public bool right;

			private float <pos1>5__1;

			private float <pos2>5__2;

			private float <pos3>5__3;

			private float <scaleOffset>5__4;

			private GameObject <burst>5__5;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <SpawnSandWave>d__32(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<burst>5__5 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_026f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0279: Unknown result type (might be due to invalid IL or missing references)
				//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_02c9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
				//IL_0113: Unknown result type (might be due to invalid IL or missing references)
				//IL_0146: Unknown result type (might be due to invalid IL or missing references)
				//IL_0161: Unknown result type (might be due to invalid IL or missing references)
				//IL_017c: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
				//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
				//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
				//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
				//IL_0307: Unknown result type (might be due to invalid IL or missing references)
				//IL_0311: Unknown result type (might be due to invalid IL or missing references)
				//IL_021f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0229: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					if (!Object.op_Implicit((Object)(object)originObject))
					{
						originObject = AeternalEverwatcherPlugin.transform.FindRelativeTransformWithPath("sand_burst_effect_uppercut_origin", false);
					}
					<>2__current = _waitForSeconds0_2;
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<pos1>5__1 = 0f;
					<pos2>5__2 = 0f;
					<pos3>5__3 = 0f;
					if (left & right)
					{
						<scaleOffset>5__4 = AeternalEverwatcherPlugin.transform.localScale.x * -1f;
						<pos1>5__1 = originObject.position.x + 6f * <scaleOffset>5__4;
						<pos2>5__2 = originObject.position.x + 10f * <scaleOffset>5__4;
						<pos3>5__3 = originObject.position.x + 14f * <scaleOffset>5__4;
					}
					else if (left)
					{
						<pos1>5__1 = AeternalEverwatcherPlugin.transform.position.x - 5f;
						<pos2>5__2 = AeternalEverwatcherPlugin.transform.position.x - 10f;
						<pos3>5__3 = AeternalEverwatcherPlugin.transform.position.x - 15f;
					}
					else if (right)
					{
						<pos1>5__1 = AeternalEverwatcherPlugin.transform.position.x + 5f;
						<pos2>5__2 = AeternalEverwatcherPlugin.transform.position.x + 10f;
						<pos3>5__3 = AeternalEverwatcherPlugin.transform.position.x + 15f;
					}
					if (!pcrSlamsEndWave)
					{
						CreateWave("sandburst", new Vector3(<pos1>5__1, 6.552498f, sandburst.transform.position.z));
						<>2__current = _waitForSeconds0_1;
						<>1__state = 2;
						return true;
					}
					<burst>5__5 = CreateWave("pcrBurst", new Vector3(HeroController.instance.transform.position.x, 6.552498f, sandburst.transform.position.z), 3f, rotation: false);
					Helpers.SandSpeedSetup(<burst>5__5, 10f);
					pcrSlamsEndWave = false;
					<burst>5__5 = null;
					break;
				case 2:
					<>1__state = -1;
					CreateWave("sandburst", new Vector3(<pos2>5__2, 6.552498f, sandburst.transform.position.z));
					<>2__current = _waitForSeconds0_1;
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -1;
					CreateWave("sandburst", new Vector3(<pos3>5__3, 6.552498f, sandburst.transform.position.z));
					break;
				}
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <SpawnSkProjectile>d__28 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			private GameObject <instance>5__1;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <SpawnSkProjectile>d__28(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<instance>5__1 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
				//IL_011a: Unknown result type (might be due to invalid IL or missing references)
				//IL_013a: Unknown result type (might be due to invalid IL or missing references)
				//IL_005e: Unknown result type (might be due to invalid IL or missing references)
				//IL_016f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0179: Unknown result type (might be due to invalid IL or missing references)
				//IL_017e: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					if (AeternalEverwatcherPlugin.fiveSLash || AeternalEverwatcherPlugin.eigongAirDashing)
					{
						return false;
					}
					if (!Object.op_Implicit((Object)(object)skProjectileSetup))
					{
						<>2__current = ((ManagedAssetBase<GameObject>)(object)skProjectile).Load();
						<>1__state = 1;
						return true;
					}
					goto IL_00ff;
				case 1:
					<>1__state = -1;
					skProjectileSetup = ManagedAssetExtensions.InstantiateAsset<GameObject>(skProjectile);
					skProjectileSetup.GetComponent<Collider2D>().isTrigger = true;
					Helpers.MakeProjectileIgnoreEnvironment(skProjectileSetup);
					Helpers.RemoveProjectileWallEvents(skProjectileSetup);
					skProjectileSetup.AddComponent<ProjectileMover>();
					skProjectileSetup.SetActive(false);
					skProjectileSetup.transform.position = new Vector3(0f, 500f, 0f);
					((Object)skProjectileSetup).name = "windSlash";
					goto IL_00ff;
				case 2:
					{
						<>1__state = -1;
						<instance>5__1.SetActive(false);
						return false;
					}
					IL_00ff:
					<instance>5__1 = Pools.GetWindSlash();
					<instance>5__1.transform.position = AeternalEverwatcherPlugin.transform.position;
					Extensions.SetPosition2D(<instance>5__1.transform, Vector2.op_Implicit(new Vector3(HeroController.instance.transform.position.x + (float)((Helpers.ObjLeftOfHornet(<instance>5__1) ? 15 : (-15)) * ((!AeternalEverwatcherPlugin.quadSlashing) ? 1 : (-1))), 7.327499f, AeternalEverwatcherPlugin.transform.position.z)));
					<instance>5__1.SetActive(true);
					<>2__current = _waitForSeconds1;
					<>1__state = 2;
					return true;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <StunSpears>d__46 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <StunSpears>d__46(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_002d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_005d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0071: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					Helpers.SetSpearX(left2, AeternalEverwatcherPlugin.transform.position.x - 6f * AeternalEverwatcherPlugin.transform.localScale.x);
					Helpers.SetSpearX(right2, AeternalEverwatcherPlugin.transform.position.x + 6f * AeternalEverwatcherPlugin.transform.localScale.x);
					left1.SetActive(true);
					left2.SetActive(true);
					right1.SetActive(true);
					right2.SetActive(true);
					((Component)left1.transform.GetChild(0)).gameObject.SetActive(true);
					((Component)right1.transform.GetChild(0)).gameObject.SetActive(true);
					<>2__current = _waitForSeconds0_15;
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					((Component)left2.transform.GetChild(0)).gameObject.SetActive(true);
					((Component)right2.transform.GetChild(0)).gameObject.SetActive(true);
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <Teleport>d__29 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public float x;

			public float y;

			public string nextState;

			public bool flipX;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <Teleport>d__29(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0023: Unknown result type (might be due to invalid IL or missing references)
				//IL_0028: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				//IL_0046: Unknown result type (might be due to invalid IL or missing references)
				//IL_0055: Unknown result type (might be due to invalid IL or missing references)
				//IL_006f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0079: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00da: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
				//IL_0103: Unknown result type (might be due to invalid IL or missing references)
				//IL_010d: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
				{
					<>1__state = -1;
					AudioEvent enemyCoalHurtSound = Effects.EnemyCoalHurtSound;
					((AudioEvent)(ref enemyCoalHurtSound)).SpawnAndPlayOneShot(AeternalEverwatcherPlugin.transform.position, (Action)null);
					CreateWave("sandburstSmall", new Vector3(AeternalEverwatcherPlugin.transform.position.x, AeternalEverwatcherPlugin.transform.position.y - 1.5f, sandburst.transform.position.z), 1f, rotation: false);
					<>2__current = _waitForSeconds0_05;
					<>1__state = 1;
					return true;
				}
				case 1:
					<>1__state = -1;
					AeternalEverwatcherPlugin.transform.position = new Vector3(x, y, AeternalEverwatcherPlugin.transform.position.z);
					CreateWave("sandburstSmall", new Vector3(AeternalEverwatcherPlugin.transform.position.x, AeternalEverwatcherPlugin.transform.position.y - 1.5f, sandburst.transform.position.z), 1f, rotation: false);
					FsmUtil.GetFirstActionOfType<SetVelocityByScale>(AeternalEverwatcherPlugin.controlFsm, "Slash Combo 9").speed = FsmFloat.op_Implicit(0f);
					if (nextState != null)
					{
						AeternalEverwatcherPlugin.controlFsm.SetState(nextState);
					}
					if (flipX)
					{
						Extensions.FlipLocalScale(AeternalEverwatcherPlugin.transform, true, false, false);
					}
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		private static readonly WaitForSeconds _waitForSeconds2 = new WaitForSeconds(2f);

		private static readonly WaitForSeconds _waitForSeconds9 = new WaitForSeconds(9f);

		private static readonly WaitForSeconds _waitForSeconds1_3 = new WaitForSeconds(1.3f);

		private static readonly WaitForSeconds _waitForSeconds0_4 = new WaitForSeconds(0.4f);

		private static readonly WaitForSeconds _waitForSeconds0_425 = new WaitForSeconds(0.425f);

		private static readonly WaitForSeconds _waitForSeconds0_375 = new WaitForSeconds(0.375f);

		private static readonly WaitForSeconds _waitForSeconds0_65 = new WaitForSeconds(0.65f);

		private static readonly WaitForSeconds _waitForSeconds0_7 = new WaitForSeconds(0.7f);

		private static readonly WaitForSeconds _waitForSeconds0_8 = new WaitForSeconds(0.8f);

		private static readonly WaitForSeconds _waitForSeconds0_1 = new WaitForSeconds(0.1f);

		private static readonly WaitForSeconds _waitForSeconds0_3 = new WaitForSeconds(0.3f);

		private static readonly WaitForSeconds _waitForSeconds0_2 = new WaitForSeconds(0.2f);

		private static readonly WaitForSeconds _waitForSeconds0_5 = new WaitForSeconds(0.5f);

		private static readonly WaitForSeconds _waitForSeconds0_05 = new WaitForSeconds(0.05f);

		private static readonly WaitForSeconds _waitForSeconds1 = new WaitForSeconds(1f);

		private static readonly WaitForSeconds _waitForSeconds0_15 = new WaitForSeconds(0.15f);

		private const float SANDBURST_DEFAULT_Y = 6.552498f;

		private const float WINDSLASH_DEFAULT_Y = 7.327499f;

		public static ManagedAsset<GameObject> skProjectile = null;

		public static ManagedAsset<GameObject> khannUcSpear = null;

		public static GameObject skProjectileSetup = null;

		public static GameObject khannUcSpearSetup = null;

		public static GameObject groundWave = null;

		public static GameObject pcrBurst = null;

		public static GameObject sandburst = null;

		public static GameObject sandburstSmall = null;

		public static GameObject sandTelegraph = null;

		private static Transform originObject = null;

		private static bool pcrSlamsEndWave;

		private static GameObject arenaBorderLeft = null;

		private static GameObject arenaBorderRight = null;

		private static GameObject left1 = null;

		private static GameObject left2 = null;

		private static GameObject right1 = null;

		private static GameObject right2 = null;

		[IteratorStateMachine(typeof(<SpawnSkProjectile>d__28))]
		public static IEnumerator SpawnSkProjectile()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <SpawnSkProjectile>d__28(0);
		}

		[IteratorStateMachine(typeof(<Teleport>d__29))]
		public static IEnumerator Teleport(float x, float y, string? nextState = null, bool flipX = false)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <Teleport>d__29(0)
			{
				x = x,
				y = y,
				nextState = nextState,
				flipX = flipX
			};
		}

		[IteratorStateMachine(typeof(<SpawnGroundWave>d__30))]
		public static IEnumerator SpawnGroundWave()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <SpawnGroundWave>d__30(0);
		}

		private static GameObject CreateWave(string waveType, Vector3 position, float delayToDestruction = 1f, bool rotation = true)
		{
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			if (1 == 0)
			{
			}
			GameObject val = (GameObject)(waveType switch
			{
				"groundWave" => Pools.GetGroundWave(), 
				"sandburst" => Pools.GetSandWave(), 
				"sandburstSmall" => Pools.GetSandBurstSmall(), 
				"pcrBurst" => Pools.GetPcrBurst(), 
				"sandTelegraph" => Pools.GetSandTelegraph(), 
				_ => null, 
			});
			if (1 == 0)
			{
			}
			GameObject val2 = val;
			val2.transform.position = position;
			if (rotation)
			{
				Extensions.SetRotation2D(val2.transform, (float)Random.Range(-5, 5));
			}
			val2.SetActive(false);
			val2.SetActive(true);
			if (waveType == "sandburstSmall")
			{
				((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(Helpers.DestroyLater(val2, delayToDestruction));
			}
			return val2;
		}

		[IteratorStateMachine(typeof(<SpawnSandWave>d__32))]
		public static IEnumerator SpawnSandWave(bool left = true, bool right = true)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <SpawnSandWave>d__32(0)
			{
				left = left,
				right = right
			};
		}

		[IteratorStateMachine(typeof(<PCRSlams>d__34))]
		public static IEnumerator PCRSlams()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <PCRSlams>d__34(0);
		}

		[IteratorStateMachine(typeof(<QuadSlashSpears>d__35))]
		private static IEnumerator QuadSlashSpears()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <QuadSlashSpears>d__35(0);
		}

		[IteratorStateMachine(typeof(<QuadWindSlash>d__36))]
		public static IEnumerator QuadWindSlash()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <QuadWindSlash>d__36(0);
		}

		[IteratorStateMachine(typeof(<PauseCorpseFsm>d__37))]
		private static IEnumerator PauseCorpseFsm()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <PauseCorpseFsm>d__37(0);
		}

		[IteratorStateMachine(typeof(<DesperationSpears>d__38))]
		public static IEnumerator DesperationSpears()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <DesperationSpears>d__38(0);
		}

		[IteratorStateMachine(typeof(<ArenaBorders>d__41))]
		public static IEnumerator ArenaBorders(bool createOrDestroy)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <ArenaBorders>d__41(0)
			{
				createOrDestroy = createOrDestroy
			};
		}

		[IteratorStateMachine(typeof(<StunSpears>d__46))]
		public static IEnumerator StunSpears()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <StunSpears>d__46(0);
		}

		[IteratorStateMachine(typeof(<SandTelegraph>d__47))]
		public static IEnumerator SandTelegraph(string type)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <SandTelegraph>d__47(0)
			{
				type = type
			};
		}
	}
	public static class Helpers
	{
		[CompilerGenerated]
		private sealed class <DestroyLater>d__5 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public GameObject go;

			public float delay;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <DestroyLater>d__5(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0027: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(delay);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					go.SetActive(false);
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <FinishStateEarly>d__10 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public string eventName;

			public float delay;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <FinishStateEarly>d__10(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0027: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(delay);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					AeternalEverwatcherPlugin.controlFsm.SendEvent(eventName);
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static readonly int Color1 = Shader.PropertyToID("_Color");

		public static float GetPosDiffSpeed()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			return Mathf.Clamp(Math.Abs(HeroController.instance.transform.position.x - AeternalEverwatcherPlugin.transform.position.x) * 30f, 230f, 270f);
		}

		public static bool ObjLeftOfHornet(GameObject go)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			return go.transform.position.x < HeroController.instance.transform.position.x;
		}

		public static void MakeProjectileIgnoreEnvironment(GameObject projectile)
		{
			Collider2D[] componentsInChildren = projectile.GetComponentsInChildren<Collider2D>(true);
			if (componentsInChildren == null || componentsInChildren.Length == 0)
			{
				return;
			}
			Collider2D[] array = componentsInChildren;
			foreach (Collider2D val in array)
			{
				int num = LayerMask.NameToLayer("Terrain");
				if (num >= 0)
				{
					Physics2D.IgnoreLayerCollision(projectile.layer, num, true);
				}
				val.isTrigger = true;
			}
		}

		public static void RemoveProjectileWallEvents(GameObject projectile)
		{
			PlayMakerFSM val = FSMUtility.LocateMyFSM(projectile, "Control");
			FsmState[] fsmStates = val.FsmStates;
			foreach (FsmState val2 in fsmStates)
			{
				FsmTransition[] array = val2.Transitions.Where((FsmTransition t) => !t.EventName.Equals("WALL", StringComparison.OrdinalIgnoreCase)).ToArray();
				if (array.Length != val2.Transitions.Length)
				{
					val2.Transitions = array;
				}
			}
			string[] array2 = new string[2] { "Wall End", "Floor?" };
			foreach (string text in array2)
			{
				FsmState state = FsmUtil.GetState(val, text);
				if (state != null)
				{
					state.Transitions = Array.Empty<FsmTransition>();
					state.Actions = Array.Empty<FsmStateAction>();
				}
			}
		}

		public static void removeEventFromState(string stateName, string eventName)
		{
			string stateName2 = stateName;
			string eventName2 = eventName;
			FsmState val = ((IEnumerable<FsmState>)AeternalEverwatcherPlugin.controlFsm.FsmStates).FirstOrDefault((Func<FsmState, bool>)((FsmState state) => state.Name == stateName2));
			val.Transitions = val.Transitions.Where((FsmTransition t) => t.EventName != eventName2).ToArray();
		}

		[IteratorStateMachine(typeof(<DestroyLater>d__5))]
		public static IEnumerator DestroyLater(GameObject go, float delay)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <DestroyLater>d__5(0)
			{
				go = go,
				delay = delay
			};
		}

		public static void SandColorSetup(GameObject wave, string name)
		{
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			((Object)wave).name = name;
			ParticleSystem[] componentsInChildren = wave.GetComponentsInChildren<ParticleSystem>(true);
			foreach (ParticleSystem val in componentsInChildren)
			{
				string name2 = ((Object)val).name;
				if ((name2 == "sand_blown" || name2 == "particles_small") ? true : false)
				{
					continue;
				}
				MainModule main = val.main;
				((MainModule)(ref main)).startColor = new MinMaxGradient(Color.white);
				ParticleSystemRenderer component = ((Component)val).GetComponent<ParticleSystemRenderer>();
				if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)((Renderer)component).material))
				{
					((Renderer)component).material.color = Color.white;
					string name3 = ((Object)val).name;
					string text = name3;
					if (!(text == "sand_burst  back"))
					{
						if (text == "sand_burst front")
						{
							((Renderer)component).material.SetColor(Color1, new Color(Settings.SAND_EFFECTS_BRIGHTNESS * ((name == "sandTelegraph") ? 1.8f : 2.2f), Settings.SAND_EFFECTS_BRIGHTNESS * ((name == "sandTelegraph") ? 1.5f : 2.2f), Settings.SAND_EFFECTS_BRIGHTNESS * ((name == "sandTelegraph") ? 1.5f : 2.2f), 0.3f));
							if (!Settings.BOSS_AND_PLAYER_ABOVE_SAND || name == "sandTelegraph")
							{
								((Renderer)component).sortingOrder = 2000;
							}
						}
						else
						{
							((Renderer)component).material.SetColor(Color1, new Color(Settings.SAND_EFFECTS_BRIGHTNESS * 2f, Settings.SAND_EFFECTS_BRIGHTNESS * 2f, Settings.SAND_EFFECTS_BRIGHTNESS * 2f, 1f));
						}
					}
					else
					{
						((Renderer)component).material.SetColor(Color1, new Color(Settings.SAND_EFFECTS_BRIGHTNESS * 2f, Settings.SAND_EFFECTS_BRIGHTNESS * 2f, Settings.SAND_EFFECTS_BRIGHTNESS * 2f, 1f));
					}
				}
				NoiseModule noise = val.noise;
				((NoiseModule)(ref noise)).enabled = true;
				((NoiseModule)(ref noise)).separateAxes = false;
				((NoiseModule)(ref noise)).strength = MinMaxCurve.op_Implicit(1f);
				((NoiseModule)(ref noise)).frequency = 0.2f;
				((NoiseModule)(ref noise)).scrollSpeed = MinMaxCurve.op_Implicit(0.2f);
				((NoiseModule)(ref noise)).quality = (ParticleSystemNoiseQuality)0;
			}
		}

		public static void SandSpeedSetup(GameObject wave, float velLimit = 2f)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			ParticleSystem[] componentsInChildren = wave.GetComponentsInChildren<ParticleSystem>(true);
			foreach (ParticleSystem val in componentsInChildren)
			{
				LimitVelocityOverLifetimeModule limitVelocityOverLifetime = val.limitVelocityOverLifetime;
				((LimitVelocityOverLifetimeModule)(ref limitVelocityOverLifetime)).enabled = true;
				((LimitVelocityOverLifetimeModule)(ref limitVelocityOverLifetime)).limit = MinMaxCurve.op_Implicit(velLimit);
				((LimitVelocityOverLifetimeModule)(ref limitVelocityOverLifetime)).dampen = 0.5f;
			}
		}

		private static void GroundWaveSetup(GameObject wave)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			PolygonCollider2D component = ((Component)wave.transform.FindRelativeTransformWithPath("damager", false)).GetComponent<PolygonCollider2D>();
			Vector2[] array = (Vector2[])(object)new Vector2[4]
			{
				new Vector2(-30f, 3f),
				new Vector2(30f, 3f),
				new Vector2(30f, 0f),
				new Vector2(-30f, 0f)
			};
			component.SetPath(0, array);
			ParticleSystem[] componentsInChildren = wave.GetComponentsInChildren<ParticleSystem>(true);
			foreach (ParticleSystem val in componentsInChildren)
			{
				ShapeModule shape = val.shape;
				((ShapeModule)(ref shape)).scale = new Vector3(6f, 0.1f, 1f);
				EmissionModule emission = val.emission;
				Burst[] array2 = (Burst[])(object)new Burst[((EmissionModule)(ref emission)).burstCount];
				((EmissionModule)(ref emission)).GetBursts(array2);
				for (int j = 0; j < array2.Length; j++)
				{
					ref Burst reference = ref array2[j];
					((Burst)(ref reference)).minCount = (short)(((Burst)(ref reference)).minCount * 20);
					ref Burst reference2 = ref array2[j];
					((Burst)(ref reference2)).maxCount = (short)(((Burst)(ref reference2)).maxCount * 20);
				}
				((EmissionModule)(ref emission)).SetBursts(array2);
				MainModule main = val.main;
				((MainModule)(ref main)).maxParticles = 1000;
			}
		}

		public static void InitSandEffects()
		{
			GameObject value = FsmUtil.GetLastActionOfType<ActivateGameObject>(AeternalEverwatcherPlugin.controlFsm, "Uppercut 1").gameObject.GameObject.Value;
			SandColorSetup(value, "sandburst");
			CustomBehaviour.sandburst = Object.Instantiate<GameObject>(value);
			CustomBehaviour.sandburst.SetActive(false);
			SandSpeedSetup(CustomBehaviour.sandburst, 3f);
			CustomBehaviour.groundWave = Object.Instantiate<GameObject>(CustomBehaviour.sandburst);
			CustomBehaviour.groundWave.SetActive(false);
			SandColorSetup(CustomBehaviour.groundWave, "groundWave");
			GroundWaveSetup(CustomBehaviour.groundWave);
			CustomBehaviour.pcrBurst = Object.Instantiate<GameObject>(CustomBehaviour.groundWave);
			((Object)CustomBehaviour.pcrBurst).name = "pcrBurst";
			CustomBehaviour.pcrBurst.SetActive(false);
			SandSpeedSetup(CustomBehaviour.groundWave);
			CustomBehaviour.sandTelegraph = Object.Instantiate<GameObject>(CustomBehaviour.groundWave);
			Object.Destroy((Object)(object)((Component)CustomBehaviour.sandTelegraph.transform.Find("damager")).gameObject);
			Object.Destroy((Object)(object)((Component)CustomBehaviour.sandTelegraph.transform.Find("sand_blown")).gameObject);
			Object.Destroy((Object)(object)((Component)CustomBehaviour.sandTelegraph.transform.Find("particles_small")).gameObject);
			Object.Destroy((Object)(object)((Component)CustomBehaviour.sandTelegraph.transform.Find("sand_burst")).gameObject);
			Object.Destroy((Object)(object)((Component)CustomBehaviour.sandTelegraph.transform.Find("sand_burst  back")).gameObject);
			((Object)CustomBehaviour.sandTelegraph).name = "sandTelegraph";
			SandColorSetup(CustomBehaviour.sandTelegraph, "sandTelegraph");
			CustomBehaviour.sandTelegraph.SetActive(false);
		}

		[IteratorStateMachine(typeof(<FinishStateEarly>d__10))]
		public static IEnumerator FinishStateEarly(string eventName, float delay)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <FinishStateEarly>d__10(0)
			{
				eventName = eventName,
				delay = delay
			};
		}

		public static bool CheckDamage()
		{
			if (!AeternalEverwatcherPlugin.tookDamage)
			{
				return false;
			}
			AeternalEverwatcherPlugin.tookDamage = false;
			return true;
		}

		public static void ModifyTerrain()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_035c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0361: Unknown result type (might be due to invalid IL or missing references)
			//IL_036f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0380: Unknown result type (might be due to invalid IL or missing references)
			//IL_0385: Unknown result type (might be due to invalid IL or missing references)
			//IL_0393: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0445: Unknown result type (might be due to invalid IL or missing references)
			//IL_0466: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ec: Expected O, but got Unknown
			//IL_04f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f8: Expected O, but got Unknown
			//IL_057f: Unknown result type