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 d__22 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public AeternalEverwatcherPlugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public 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(d__22))] public IEnumerator Start() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new 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((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(); 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(); ((tk2dBaseSprite)((Component)transform).gameObject.GetComponentInChildren()).renderLayer = 200; tk2dSprite[] componentsInChildren = ((Component)HeroController.instance).GetComponentsInChildren(); 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.FromNonSceneAsset("Assets/Prefabs/Hornet Enemies/Song Knight Projectile.prefab", "localpoolprefabs_assets_areahangareasong"); CustomBehaviour.khannUcSpear = ManagedAsset.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(controlFsm, "Sleep").MinReactDelay = FsmFloat.op_Implicit(1f); FsmUtil.GetFirstActionOfType(controlFsm, "Sleep").MaxReactDelay = FsmFloat.op_Implicit(1f); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Sleep"), (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)delegate { if (!sandburstOutSetup) { FsmUtil.RemoveActionsOfType(controlFsm, "Wake Roar 2"); Helpers.SandColorSetup(FsmUtil.GetFirstActionOfType(controlFsm, "Wake Roar 2").gameObject.GameObject.Value, "sandburstOut"); sandburstOutSetup = true; } }); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Wake Antic"), (Action)delegate { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.ArenaBorders(createOrDestroy: true)); Helpers.ModifyTerrain(); }); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Stun Recover"), (Action)delegate { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.SpawnGroundWave()); ((Behaviour)damageHeroComponent).enabled = false; }); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Stunned"), (Action)delegate { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.StunSpears()); }); FsmUtil.GetLastActionOfType(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(controlFsm, "Wake Roar 2").stunHero = FsmBool.op_Implicit(false); FsmUtil.GetFirstActionOfType(controlFsm, "Wake Roar 2").time = FsmFloat.op_Implicit(0.5f); FsmUtil.GetFirstActionOfType(controlFsm, "Emerge Pause").time = FsmFloat.op_Implicit(0f); FsmUtil.GetFirstActionOfType(controlFsm, "Init Idle").time = FsmFloat.op_Implicit(0.3f); FsmUtil.GetFirstActionOfType(controlFsm, "Idle").time = FsmFloat.op_Implicit(0f); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Very Far"), (Action)delegate { if (!quadSlashing && !pcrSlamming && !eigongAirDashing && !fiveSLash) { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.SpawnGroundWave()); } }); FsmUtil.GetFirstActionOfType(controlFsm, "Range Out Pause").time = FsmFloat.op_Implicit(0f); FsmUtil.GetFirstActionOfType(controlFsm, "Slash Combo Antic Q").everyFrame = true; FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo Antic Q"), (Action)delegate { if (!PhaseCheck()) { ((MonoBehaviour)Instance).StartCoroutine(Helpers.FinishStateEarly("FINISHED", 0.45f)); FsmUtil.GetFirstActionOfType(controlFsm, "Slash Combo 1").speed = FsmFloat.op_Implicit(fiveSLash ? 0f : (Helpers.GetPosDiffSpeed() * -1f)); } }); FsmUtil.GetFirstActionOfType(controlFsm, "Slash Combo Antic").everyFrame = true; FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo Antic"), (Action)delegate { if (quadSlashing || !PhaseCheck()) { ((MonoBehaviour)Instance).StartCoroutine(Helpers.FinishStateEarly("FINISHED", 0.55f)); FsmUtil.GetFirstActionOfType(controlFsm, "Slash Combo 1").speed = FsmFloat.op_Implicit(fiveSLash ? 0f : (Helpers.GetPosDiffSpeed() * -1f)); } }); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo 1"), (Action)delegate { if (PHASE_2 && !fiveSLash && !quadSlashing) { didSlashCombo1 = true; } }); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo 3"), (Action)delegate { if (PHASE_2 && !eigongAirDashing && !quadSlashing) { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.SpawnSkProjectile()); } }); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo 4"), (Action)delegate { FsmUtil.GetFirstActionOfType(controlFsm, "Slash Combo 5").speed = FsmFloat.op_Implicit(Helpers.GetPosDiffSpeed() * (float)((!fiveSLash) ? 1 : (-1))); }); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo 5"), (Action)delegate { Extensions.FlipLocalScale(transform, !fiveSLash && !quadSlashing, false, false); }); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo 7"), (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)delegate { FsmUtil.GetFirstActionOfType(controlFsm, "Slash Combo 9").speed = FsmFloat.op_Implicit(Helpers.GetPosDiffSpeed() * -0.5f); }); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo 7"), (Action)delegate { if (didSlashCombo1) { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.SandTelegraph("slam")); } }); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Slash Combo 11"), (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)delegate { controlFsm.SetState("Range Check"); }); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "F Slash Antic"), (Action)delegate { if (quadSlashing || !PhaseCheck()) { FsmUtil.GetFirstActionOfType(controlFsm, "F Slash 2").ySpeed = FsmFloat.op_Implicit((float)(eigongAirDashing ? (-50) : 0)); FsmUtil.GetFirstActionOfType(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)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)delegate { controlFsm.SetState("Jump Slash Antic"); }); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Dash To Antic"), (Action)delegate { controlFsm.SetState("Jump Slash Antic"); }); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Jump Slash Antic"), (Action)delegate { if (quadSlashing) { controlFsm.Fsm.manualUpdate = true; } else { controlFsm.SetState("F Slash Antic"); } }); FsmUtil.GetFirstActionOfType(controlFsm, "Jump Slash Launch").y = FsmFloat.op_Implicit(3f); FsmUtil.GetFirstActionOfType(controlFsm, "Dig Pos").minValue = FsmFloat.op_Implicit(0f); FsmUtil.GetFirstActionOfType(controlFsm, "Dig Out Antic").time = FsmFloat.op_Implicit(0.3f); FsmUtil.GetFirstActionOfType(controlFsm, "Dig Out Uppercut").speed = FsmFloat.op_Implicit(120f); FsmUtil.GetFirstActionOfType(controlFsm, "Uppercut Antic").everyFrame = true; FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Uppercut Antic Q"), (Action)delegate { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.SandTelegraph(pcrSlamming ? "ground" : "uppercut")); }); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Uppercut Antic"), (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(controlFsm, "Uppercut 1").speed = FsmFloat.op_Implicit(70f); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Uppercut 1"), (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)delegate { FsmUtil.GetFirstActionOfType(controlFsm, "Uppercut Launch").minValue = FsmFloat.op_Implicit(0f); controlFsm.SetState("Uppercut Launch"); }); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Die"), (Action)delegate { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.DesperationSpears()); }); foreach (FsmState item in new List { 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)delegate { ((Behaviour)damageHeroComponent).enabled = true; }); } foreach (FsmState item2 in new List { 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)delegate { ((Behaviour)damageHeroComponent).enabled = false; }); } if (Settings.NORMAL_COMBAT) { FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Stun Start"), (Action)delegate { healthManager.invincible = true; }); FsmUtil.AddLambdaMethod(FsmUtil.GetState(controlFsm, "Stun Recover"), (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 d__41 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public bool createOrDestroy; private SpriteRenderer[] <>s__1; private int <>s__2; private SpriteRenderer 5__3; private ParticleSystemRenderer[] <>s__4; private int <>s__5; private ParticleSystemRenderer 5__6; private Transform 5__7; private Transform 5__8; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__41(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = null; 5__3 = null; <>s__4 = null; 5__6 = null; 5__7 = null; 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)(object)khannUcSpear).Load(); <>1__state = 1; return true; } goto IL_03e5; case 1: { <>1__state = -1; khannUcSpearSetup = ManagedAssetExtensions.InstantiateAsset(khannUcSpear); <>s__1 = khannUcSpearSetup.GetComponentsInChildren(true); for (<>s__2 = 0; <>s__2 < <>s__1.Length; <>s__2++) { 5__3 = <>s__1[<>s__2]; 5__3.color = ((((Object)((Component)5__3).gameObject.transform.parent).name == "blurred") ? new Color(0.4f, 1f, 1f, 1f) : new Color(0.5f, 1f, 1f, 1f)); 5__3 = null; } <>s__1 = null; <>s__4 = khannUcSpearSetup.GetComponentsInChildren(true); for (<>s__5 = 0; <>s__5 < <>s__4.Length; <>s__5++) { 5__6 = <>s__4[<>s__5]; ((Renderer)5__6).material.SetColor(Helpers.Color1, ((Object)5__6).name.StartsWith("coral_spear_shatter_particles") ? new Color(0.5f, 1f, 1f, 1f) : new Color(0.6f, 0.8f, 0.8f, 1f)); 5__6 = null; } <>s__4 = null; khannUcSpearSetup.SetActive(false); ((Object)khannUcSpearSetup).name = "spear"; left1 = Object.Instantiate(khannUcSpearSetup, AeternalEverwatcherPlugin.transform); left2 = Object.Instantiate(khannUcSpearSetup, AeternalEverwatcherPlugin.transform); right1 = Object.Instantiate(khannUcSpearSetup, AeternalEverwatcherPlugin.transform); right2 = Object.Instantiate(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(khannUcSpearSetup); arenaBorderRight = Object.Instantiate(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); 5__7 = arenaBorderLeft.transform.GetChild(0); 5__8 = arenaBorderRight.transform.GetChild(0); ((Behaviour)((Component)5__7).GetComponent()).enabled = false; ((Behaviour)((Component)5__7).GetComponent()).enabled = false; ((Behaviour)((Component)5__8).GetComponent()).enabled = false; ((Behaviour)((Component)5__8).GetComponent()).enabled = false; ((Component)5__7.GetChild(1).GetChild(0)).gameObject.SetActive(false); ((Component)5__8.GetChild(1).GetChild(0)).gameObject.SetActive(false); ((Component)5__7.GetChild(1).GetChild(1)).gameObject.SetActive(true); ((Component)5__8.GetChild(1).GetChild(1)).gameObject.SetActive(true); ((Component)5__7.GetChild(1)).gameObject.AddComponent(); ((Component)5__8.GetChild(1).GetChild(3)).gameObject.AddComponent(); ((Component)5__7.GetChild(1).GetChild(3)).gameObject.AddComponent(); 5__7 = null; 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()).enabled = true; ((Behaviour)((Component)arenaBorderRight.transform.GetChild(0)).GetComponent()).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 d__38 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private GameObject 5__1; private GameObject 5__2; private int 5__3; private GameObject 5__4; private GameObject 5__5; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__38(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__4 = null; 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; 5__1 = GameObject.Find("BorderLeftHitbox"); 5__2 = GameObject.Find("BorderRightHitbox"); Transform transform = 5__1.transform; Vector3 position = 5__1.transform.position; position.x = HeroController.instance.transform.position.x - 55.4f; transform.position = position; Transform transform2 = 5__2.transform; position = 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; 5__3 = 0; goto IL_036e; } case 2: <>1__state = -1; 5__4.SetActive(true); ((Component)5__4.transform.GetChild(0)).gameObject.SetActive(true); <>2__current = _waitForSeconds0_15; <>1__state = 3; return true; case 3: <>1__state = -1; 5__5.SetActive(true); ((Component)5__5.transform.GetChild(0)).gameObject.SetActive(true); 5__4 = null; 5__5 = null; 5__3++; goto IL_036e; case 4: { <>1__state = -1; ((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(ArenaBorders(createOrDestroy: false)); return false; } IL_036e: if (5__3 < Settings.DESPERATION_PHASE_LENGTH) { 5__4 = Pools.GetSpear(); 5__5 = Pools.GetSpear(); Extensions.SetRotation2D(5__4.transform, (float)Random.Range(-30, 30)); Extensions.SetRotation2D(5__5.transform, (float)Random.Range(-30, 30)); Helpers.SetSpearX(5__4, HeroController.instance.transform.position.x + (float)Random.Range(-10, 10) + 11f); Helpers.SetSpearX(5__5, HeroController.instance.transform.position.x + (float)Random.Range(-10, 10) + 11f); Transform transform5 = 5__4.transform; Vector3 position = 5__4.transform.position; position.y = HeroController.instance.transform.position.y; transform5.position = position; Transform transform6 = 5__5.transform; position = 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 d__34 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public 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 d__37 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private PlayMakerFSM 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__37(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = GameObject.Find("Corpse Coral Warrior Grey(Clone)").GetComponent(); FsmUtil.GetFirstActionOfType(5__1, "Roar").noVisualEffect = FsmBool.op_Implicit(true); <>2__current = _waitForSeconds1_3; <>1__state = 1; return true; case 1: <>1__state = -1; 5__1.Fsm.ManualUpdate = true; <>2__current = _waitForSeconds9; <>1__state = 2; return true; case 2: <>1__state = -1; 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 d__35 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private GameObject 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__35(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 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; 5__1 = Pools.GetSpear(); Transform transform = 5__1.transform; Vector3 position = 5__1.transform.position; position.x = AeternalEverwatcherPlugin.transform.position.x - 18f * AeternalEverwatcherPlugin.transform.localScale.x; transform.position = position; Transform transform2 = 5__1.transform; position = 5__1.transform.localScale; position.x = AeternalEverwatcherPlugin.transform.localScale.x * 2f; transform2.localScale = position; 5__1.SetActive(true); ((Component)5__1.transform.GetChild(0)).gameObject.SetActive(true); <>2__current = _waitForSeconds1; <>1__state = 1; return true; } case 1: <>1__state = -1; 5__1.SetActive(false); ((Component)5__1.transform.GetChild(0)).gameObject.SetActive(false); 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 d__36 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public 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(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 d__47 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public string type; private Vector3 5__1; private string <>s__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public 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": 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", 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 d__30 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private int 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public 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); } 5__1 = ((Random.Range(0, 2) == 0) ? (-9) : 9); FsmUtil.GetFirstActionOfType(AeternalEverwatcherPlugin.controlFsm, "F Slash Antic").y = FsmFloat.op_Implicit(30f); ((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(Teleport(HeroController.instance.transform.position.x + (float)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(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)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(AeternalEverwatcherPlugin.controlFsm, "F Slash Antic").y = FsmFloat.op_Implicit(30f); ((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(Teleport(HeroController.instance.transform.position.x + (float)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(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 d__32 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public bool left; public bool right; private float 5__1; private float 5__2; private float 5__3; private float 5__4; private GameObject 5__5; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__32(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 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; 5__1 = 0f; 5__2 = 0f; 5__3 = 0f; if (left & right) { 5__4 = AeternalEverwatcherPlugin.transform.localScale.x * -1f; 5__1 = originObject.position.x + 6f * 5__4; 5__2 = originObject.position.x + 10f * 5__4; 5__3 = originObject.position.x + 14f * 5__4; } else if (left) { 5__1 = AeternalEverwatcherPlugin.transform.position.x - 5f; 5__2 = AeternalEverwatcherPlugin.transform.position.x - 10f; 5__3 = AeternalEverwatcherPlugin.transform.position.x - 15f; } else if (right) { 5__1 = AeternalEverwatcherPlugin.transform.position.x + 5f; 5__2 = AeternalEverwatcherPlugin.transform.position.x + 10f; 5__3 = AeternalEverwatcherPlugin.transform.position.x + 15f; } if (!pcrSlamsEndWave) { CreateWave("sandburst", new Vector3(5__1, 6.552498f, sandburst.transform.position.z)); <>2__current = _waitForSeconds0_1; <>1__state = 2; return true; } 5__5 = CreateWave("pcrBurst", new Vector3(HeroController.instance.transform.position.x, 6.552498f, sandburst.transform.position.z), 3f, rotation: false); Helpers.SandSpeedSetup(5__5, 10f); pcrSlamsEndWave = false; 5__5 = null; break; case 2: <>1__state = -1; CreateWave("sandburst", new Vector3(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(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 d__28 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private GameObject 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__28(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 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)(object)skProjectile).Load(); <>1__state = 1; return true; } goto IL_00ff; case 1: <>1__state = -1; skProjectileSetup = ManagedAssetExtensions.InstantiateAsset(skProjectile); skProjectileSetup.GetComponent().isTrigger = true; Helpers.MakeProjectileIgnoreEnvironment(skProjectileSetup); Helpers.RemoveProjectileWallEvents(skProjectileSetup); skProjectileSetup.AddComponent(); skProjectileSetup.SetActive(false); skProjectileSetup.transform.position = new Vector3(0f, 500f, 0f); ((Object)skProjectileSetup).name = "windSlash"; goto IL_00ff; case 2: { <>1__state = -1; 5__1.SetActive(false); return false; } IL_00ff: 5__1 = Pools.GetWindSlash(); 5__1.transform.position = AeternalEverwatcherPlugin.transform.position; Extensions.SetPosition2D(5__1.transform, Vector2.op_Implicit(new Vector3(HeroController.instance.transform.position.x + (float)((Helpers.ObjLeftOfHornet(5__1) ? 15 : (-15)) * ((!AeternalEverwatcherPlugin.quadSlashing) ? 1 : (-1))), 7.327499f, AeternalEverwatcherPlugin.transform.position.z))); 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 d__46 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public 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 d__29 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float x; public float y; public string nextState; public bool flipX; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public 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(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 skProjectile = null; public static ManagedAsset 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(d__28))] public static IEnumerator SpawnSkProjectile() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__28(0); } [IteratorStateMachine(typeof(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 d__29(0) { x = x, y = y, nextState = nextState, flipX = flipX }; } [IteratorStateMachine(typeof(d__30))] public static IEnumerator SpawnGroundWave() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new 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(d__32))] public static IEnumerator SpawnSandWave(bool left = true, bool right = true) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__32(0) { left = left, right = right }; } [IteratorStateMachine(typeof(d__34))] public static IEnumerator PCRSlams() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__34(0); } [IteratorStateMachine(typeof(d__35))] private static IEnumerator QuadSlashSpears() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__35(0); } [IteratorStateMachine(typeof(d__36))] public static IEnumerator QuadWindSlash() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__36(0); } [IteratorStateMachine(typeof(d__37))] private static IEnumerator PauseCorpseFsm() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__37(0); } [IteratorStateMachine(typeof(d__38))] public static IEnumerator DesperationSpears() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__38(0); } [IteratorStateMachine(typeof(d__41))] public static IEnumerator ArenaBorders(bool createOrDestroy) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__41(0) { createOrDestroy = createOrDestroy }; } [IteratorStateMachine(typeof(d__46))] public static IEnumerator StunSpears() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__46(0); } [IteratorStateMachine(typeof(d__47))] public static IEnumerator SandTelegraph(string type) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__47(0) { type = type }; } } public static class Helpers { [CompilerGenerated] private sealed class d__5 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GameObject go; public float delay; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public 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 d__10 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public string eventName; public float delay; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public 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(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(); state.Actions = Array.Empty(); } } } public static void removeEventFromState(string stateName, string eventName) { string stateName2 = stateName; string eventName2 = eventName; FsmState val = ((IEnumerable)AeternalEverwatcherPlugin.controlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == stateName2)); val.Transitions = val.Transitions.Where((FsmTransition t) => t.EventName != eventName2).ToArray(); } [IteratorStateMachine(typeof(d__5))] public static IEnumerator DestroyLater(GameObject go, float delay) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new 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(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(); 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(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(); 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(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(AeternalEverwatcherPlugin.controlFsm, "Uppercut 1").gameObject.GameObject.Value; SandColorSetup(value, "sandburst"); CustomBehaviour.sandburst = Object.Instantiate(value); CustomBehaviour.sandburst.SetActive(false); SandSpeedSetup(CustomBehaviour.sandburst, 3f); CustomBehaviour.groundWave = Object.Instantiate(CustomBehaviour.sandburst); CustomBehaviour.groundWave.SetActive(false); SandColorSetup(CustomBehaviour.groundWave, "groundWave"); GroundWaveSetup(CustomBehaviour.groundWave); CustomBehaviour.pcrBurst = Object.Instantiate(CustomBehaviour.groundWave); ((Object)CustomBehaviour.pcrBurst).name = "pcrBurst"; CustomBehaviour.pcrBurst.SetActive(false); SandSpeedSetup(CustomBehaviour.groundWave); CustomBehaviour.sandTelegraph = Object.Instantiate(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(d__10))] public static IEnumerator FinishStateEarly(string eventName, float delay) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new 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 (might be due to invalid IL or missing references) //IL_0584: Unknown result type (might be due to invalid IL or missing references) //IL_0604: Unknown result type (might be due to invalid IL or missing references) //IL_0633: Unknown result type (might be due to invalid IL or missing references) //IL_0638: Unknown result type (might be due to invalid IL or missing references) //IL_064c: Unknown result type (might be due to invalid IL or missing references) //IL_067c: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("Battle Range"); Transform transform = val.transform; Vector3 position = val.transform.position; position.x = 75.2f; transform.position = position; val.transform.localScale = new Vector3(5f, 25f, 1f); GameObject val2 = GameObject.Find("right1"); Transform transform2 = val2.transform; position = val2.transform.localScale; position.y = 10f; transform2.localScale = position; GameObject val3 = GameObject.Find("CameraLockArea (4)"); Transform transform3 = val3.transform; position = val3.transform.position; position.x = 81f; transform3.position = position; Transform transform4 = val3.transform; position = val3.transform.localScale; position.x = 7f; transform4.localScale = position; GameObject.Find("CameraLockArea (5)").SetActive(false); GameObject.Find("sand_centipede_scuffle").SetActive(false); GameObject.Find("Sand Centipede Hero Damager").SetActive(false); GameObject.Find("Sand Centipede Group").SetActive(false); GameObject.Find("Sand_Centipede_Ambient_Audio Variant").SetActive(false); GameObject.Find("terrain collider non slider").SetActive(false); GameObject.Find("terrain collider non slider (1)").SetActive(false); GameObject.Find("terrain collider non slider (2)").SetActive(false); GameObject.Find("terrain collider non slider (3)").SetActive(false); GameObject.Find("terrain collider (13)").SetActive(false); GameObject.Find("terrain collider (12)").SetActive(false); GameObject.Find("terrain collider (11)").SetActive(false); GameObject.Find("terrain collider (10)").SetActive(false); GameObject.Find("Roof Collider_Basic").SetActive(false); GameObject.Find("Roof Collider_Basic (2)").SetActive(false); GameObject val4 = Object.Instantiate(GameObject.Find("Giant_Conch_bg_horn (23)")); val4.transform.localScale = new Vector3(4.3223f, 5.3747f, 1f); val4.transform.position = new Vector3(159.4092f, 45.6818f, -5.1127f); Extensions.SetRotation2D(val4.transform, 338.352f); Transform child = GameObject.Find("TileMap Render Data").transform.GetChild(0); EdgeCollider2D[] components = ((Component)child.Find("Chunk 1 5")).gameObject.GetComponents(); foreach (EdgeCollider2D val5 in components) { ((Behaviour)val5).enabled = false; } EdgeCollider2D[] components2 = ((Component)child.Find("Chunk 1 4")).gameObject.GetComponents(); foreach (EdgeCollider2D val6 in components2) { ((Behaviour)val6).enabled = false; } EdgeCollider2D[] components3 = ((Component)child.Find("Chunk 1 3")).gameObject.GetComponents(); foreach (EdgeCollider2D val7 in components3) { ((Behaviour)val7).enabled = false; } EdgeCollider2D[] components4 = ((Component)child.Find("Chunk 0 5")).gameObject.GetComponents(); foreach (EdgeCollider2D val8 in components4) { ((Behaviour)val8).enabled = false; } Transform val9 = child.Find("Chunk 0 4"); Transform transform5 = ((Component)val9).transform; position = val9.localScale; position.x = 300f; transform5.localScale = position; Transform transform6 = ((Component)val9).transform; position = val9.position; position.x = 0f; transform6.position = position; Transform val10 = Object.Instantiate(val9, val9.parent); ((Component)val10).transform.position = new Vector3(-2.6f, 5f, 0f); ((Component)val10).transform.localScale = new Vector3(1f, 65f, 1f); ((Component)val10).gameObject.AddComponent(); ((Renderer)((Component)val10).gameObject.GetComponent()).enabled = false; ((Object)((Component)val10).gameObject).name = "BorderLeftHitbox"; Transform val11 = Object.Instantiate(val9, val9.parent); ((Component)val11).transform.position = new Vector3(173f, -2f, 0f); ((Component)val11).transform.localScale = new Vector3(1f, 65f, 1f); ((Component)val11).gameObject.AddComponent(); ((Renderer)((Component)val11).gameObject.GetComponent()).enabled = false; ((Object)((Component)val11).gameObject).name = "BorderRightHitbox"; Transform val12 = Object.Instantiate(val9, val9.parent); ((Component)val12).transform.position = new Vector3(173.9688f, 3.0291f, ((Component)val9).transform.position.z); GameObject val13 = new GameObject("Terrain Extension 1"); GameObject val14 = new GameObject("Terrain Extension 2"); HashSet source = new HashSet { "kingdom_gate_0000_sand_dune_ground", "bone_deep", "Bone_floor_02" }; HashSet hashSet = new HashSet { "kingdom_gate_0000_sand_dune_ground (28)", "kingdom_gate_0000_sand_dune_ground (19)", "bone_deep_0170_t (14)", "bone_deep_0170_t (12)", "bone_deep_0170_t (16)", "bone_deep_0170_t (15)", "bone_deep_0170_t (13)" }; Scene activeScene = SceneManager.GetActiveScene(); GameObject[] rootGameObjects = ((Scene)(ref activeScene)).GetRootGameObjects(); foreach (GameObject rootGameObject in rootGameObjects) { if (source.Any((string assetName) => ((Object)rootGameObject).name.StartsWith(assetName)) && !hashSet.Contains(((Object)rootGameObject).name)) { GameObject val15 = Object.Instantiate(rootGameObject, val13.transform); float x = rootGameObject.transform.position.x; float num = x - 108f - 10f; Transform transform7 = val15.transform; position = rootGameObject.transform.position; position.x = x - num * 2f; transform7.position = position; GameObject val16 = Object.Instantiate(rootGameObject, val14.transform); Transform transform8 = val16.transform; position = rootGameObject.transform.position; position.x = x - num * 2f - 54f; transform8.position = position; } } } public static void SetSpearX(GameObject spear, float x) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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) Transform transform = spear.transform; Vector3 position = spear.transform.position; position.x = x; transform.position = position; } } [HarmonyPatch] public class PatchesLikeFromEldenRing { [HarmonyPrefix] [HarmonyPatch(typeof(HealthManager), "Hit")] private static void HealthManager_Hit(HealthManager __instance) { //IL_007c: Unknown result type (might be due to invalid IL or missing references) if (AeternalEverwatcherPlugin.foundWatcher) { __instance.invincible = !Settings.NORMAL_COMBAT; DamageHero val = default(DamageHero); if (StateData.parryableStates.Contains(AeternalEverwatcherPlugin.controlFsm.ActiveStateName) && ((Component)((Component)__instance).gameObject.transform.root.Find("Body Damager")).TryGetComponent(ref val)) { ((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(val.NailClash(0f, "Nail Attack", AeternalEverwatcherPlugin.transform.position)); GameManager.instance.FreezeMoment((FreezeMomentTypes)3, (Action)null); } } } [HarmonyPrefix] [HarmonyPatch(typeof(GameManager), "FreezeMoment", new Type[] { typeof(FreezeMomentTypes), typeof(Action) })] private static bool GameManager_FreezeMoment(GameManager __instance, FreezeMomentTypes type) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Invalid comparison between Unknown and I4 if (!AeternalEverwatcherPlugin.foundWatcher || (int)type != 3) { return true; } if (Settings.PARRY_TIME_FREEZE >= 0f && Settings.PARRY_TIME_FREEZE <= 0.261f) { ((MonoBehaviour)AeternalEverwatcherPlugin.Instance).StartCoroutine(GameManager.instance.FreezeMoment(0.01f, Settings.PARRY_TIME_FREEZE - 0.11f, 0.1f, 0f, (Action)null)); return false; } return true; } [HarmonyPostfix] [HarmonyPatch(typeof(DamageHero), "NailClash")] private static void DamageHero_NailClash(DamageHero __instance) { //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: 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_013a: Unknown result type (might be due to invalid IL or missing references) if (!AeternalEverwatcherPlugin.foundWatcher) { return; } ((Behaviour)AeternalEverwatcherPlugin.damageHeroComponent).enabled = false; AeternalEverwatcherPlugin.parryCounter++; if (StateData.iframeStates.Contains(AeternalEverwatcherPlugin.controlFsm.ActiveStateName)) { HeroController.instance.StartInvulnerable(0.3f); } if (!GameManager.instance.TimeSlowed) { GameManager.instance.FreezeMoment((FreezeMomentTypes)3, (Action)null); } AeternalEverwatcherPlugin.healthManager.SpriteFlash.flashArmoured(); HeroController.instance.AddSilk(1, false); if (!Settings.NORMAL_COMBAT) { if (AeternalEverwatcherPlugin.parryCounter >= Settings.END_FIGHT_QUOTA && AeternalEverwatcherPlugin.PHASE_2 && AeternalEverwatcherPlugin.PHASE_3) { AeternalEverwatcherPlugin.ResetFlags(); AeternalEverwatcherPlugin.healthManager.TakeDamage(new HitInstance { Source = ((Component)HeroController.instance).gameObject, AttackType = (AttackTypes)2, DamageDealt = 3000, Direction = 0f, Multiplier = 1f, MagnitudeMultiplier = 1f, IgnoreInvulnerable = true, HitEffectsType = (EffectsTypes)0, IsNailTag = true }); } } else { int num = AeternalEverwatcherPlugin.healthManager.hp - PlayerData.instance.nailDamage / 3; AeternalEverwatcherPlugin.healthManager.hp = ((num < 1) ? 1 : num); } } } [HarmonyPatch(typeof(Language), "Get")] [HarmonyPatch(new Type[] { typeof(string), typeof(string) })] public static class BossTitlePatch { private static void Postfix(string key, string sheetTitle, ref string __result) { if (1 == 0) { } string text = ((key == "GREY_CORAL_WARRIOR_SUPER") ? "Aeternal" : ((!(key == "GREY_CORAL_WARRIOR_MAIN")) ? __result : "Everwatcher")); if (1 == 0) { } __result = text; } } public static class Pools { private static GameObject pooledObjectsParent = new GameObject("Pooled Objects Parent"); private static readonly List spears = new List(); private static readonly List windSlashes = new List(); private static readonly List sandWaves = new List(); private static readonly List groundWaves = new List(); private static readonly List sandBurstSmalls = new List(); private static readonly List pcrBursts = new List(); private static readonly List sandTelegraphs = new List(); public static GameObject GetSpear() { return GetPooledObject(spears, CustomBehaviour.khannUcSpearSetup); } public static GameObject GetWindSlash() { return GetPooledObject(windSlashes, CustomBehaviour.skProjectileSetup); } public static GameObject GetSandWave() { return GetPooledObject(sandWaves, CustomBehaviour.sandburst); } public static GameObject GetGroundWave() { return GetPooledObject(groundWaves, CustomBehaviour.groundWave); } public static GameObject GetSandBurstSmall() { return GetPooledObject(sandBurstSmalls, CustomBehaviour.sandburstSmall); } public static GameObject GetPcrBurst() { return GetPooledObject(pcrBursts, CustomBehaviour.pcrBurst); } public static GameObject GetSandTelegraph() { return GetPooledObject(sandTelegraphs, CustomBehaviour.sandTelegraph); } public static void PrewarmSpears() { for (int i = 0; i < 15; i++) { AddToPool(spears, CustomBehaviour.khannUcSpearSetup); } } public static void PrewarmTelegraps() { for (int i = 0; i < 3; i++) { AddToPool(sandTelegraphs, CustomBehaviour.sandTelegraph); } } private static GameObject GetPooledObject(List pool, GameObject setup) { GameObject setup2 = setup; GameObject val = null; bool flag = false; using (IEnumerator enumerator = pool.Where((GameObject obj) => (!((Object)setup2).name.Equals("spear")) ? (!obj.activeInHierarchy) : (!((Component)obj.transform.GetChild(0)).gameObject.activeInHierarchy)).GetEnumerator()) { if (enumerator.MoveNext()) { GameObject current = enumerator.Current; val = current; flag = true; } } return (GameObject)(flag ? ((object)val) : ((object)AddToPool(pool, setup2))); } private static GameObject AddToPool(List pool, GameObject setup) { GameObject val = Object.Instantiate(setup, pooledObjectsParent.transform); ((Object)val).name = ((Object)val).name + "_POOLED"; pool.Add(val); return val; } public static void Clear() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown pooledObjectsParent = new GameObject("Pooled Objects Parent"); Object.DontDestroyOnLoad((Object)(object)pooledObjectsParent); spears.Clear(); windSlashes.Clear(); sandWaves.Clear(); groundWaves.Clear(); sandBurstSmalls.Clear(); pcrBursts.Clear(); } } public class ProjectileMover : MonoBehaviour { private Vector3 moveDirection; private void OnEnable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: 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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) moveDirection = ((((Component)this).transform.position.x < HeroController.instance.transform.position.x) ? Vector3.right : Vector3.left); ((Component)this).transform.localScale = new Vector3(moveDirection.x * -1.75f, Random.Range(1.8f, 2.2f), 1f); Extensions.SetLocalRotation2D(((Component)this).transform, (float)Random.Range(-10, 10)); } private void Update() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) Transform transform = ((Component)this).transform; transform.position += moveDirection * (Time.deltaTime * 100f); } } public static class Settings { public static bool SAND_WAVE_TELEGRAPH; public static bool NORMAL_COMBAT; public static int NORMAL_HP = 900; public static int NORMAL_PHASE_2_QUOTA = 700; public static int NORMAL_PHASE_3_QUOTA = 400; public static bool ON_DAMAGE_FREEZE; public static bool DISABLE_WIND_EFFECTS; public static float SAND_EFFECTS_BRIGHTNESS = 1f; public static bool BOSS_AND_PLAYER_ABOVE_SAND; public static float PARRY_TIME_FREEZE = -1f; public static int PHASE_2_QUOTA = 25; public static int PHASE_3_QUOTA = 75; public static int END_FIGHT_QUOTA = 160; public static int DESPERATION_PHASE_LENGTH = 50; public static void SetupSettings(ConfigFile Config) { SAND_EFFECTS_BRIGHTNESS = Config.Bind("Visual Effects", "Sand Effects Brightness", 1f, "By default i raise the brightness of the sand effects, and then multiply that by this value. Increase or decrease it to change the sand effects brightness, id advise to keep it above 0 to avoid shenanigans.").Value; BOSS_AND_PLAYER_ABOVE_SAND = Config.Bind("Visual Effects", "Boss And Player Above Sand", false, "I already put the boss and the player above most of the sand effects, turn this on if you want to put them above everything.").Value; SAND_WAVE_TELEGRAPH = Config.Bind("Visual Effects", "Sand Wave Telegraph", true, "Turn on or off sand wave telegraphy (the small sand effects on the ground before a sand shockwave).").Value; DISABLE_WIND_EFFECTS = Config.Bind("Visual Effects", "Disable Wind Effects", false, "Disables the wind effects in the background and foreground.").Value; PARRY_TIME_FREEZE = Config.Bind("Accessibility", "Parry Time Freeze", -1f, "Use this to change the parry time freeze, set it to 0 to disable it entirely, or leave it at -1 to use the default time freeze. Must be greater than or equal 0 and less than or equal 0.261.").Value; ON_DAMAGE_FREEZE = Config.Bind("Accessibility", "On Damage Freeze", false, "This setting should help you keep your rhythm even when taking damage.").Value; PHASE_2_QUOTA = Config.Bind("Bossfight Settings", "Phase 2 Quota", 25, "Quota of parries to trigger phase 2.").Value; PHASE_3_QUOTA = Config.Bind("Bossfight Settings", "Phase 3 Quota", 75, "Quota of parries to trigger phase 3.").Value; END_FIGHT_QUOTA = Config.Bind("Bossfight Settings", "Fight End Quota", 130, "Quota of parries to trigger the fight end.").Value; DESPERATION_PHASE_LENGTH = Config.Bind("Bossfight Settings", "Desperation Phase Length", 50, "For each unit here, 2 coral spears spawn every 0.15 seconds.").Value; NORMAL_COMBAT = Config.Bind("Normal Combat Mode", "Normal Combat Mode", false, "Turns on/off normal combat, meaning you wont need to parry to beat the boss, you can attack him normally. Remember to configure the options below because i did not test this mode!").Value; NORMAL_HP = Config.Bind("Normal Combat Mode", "Normal Combat HP", 900, "Sets the initial hp in normal combat mode.").Value; NORMAL_PHASE_2_QUOTA = Config.Bind("Normal Combat Mode", "Normal Combat Phase 2 HP", 700, "Sets the Phase 2 transition hp in normal combat mode.").Value; NORMAL_PHASE_3_QUOTA = Config.Bind("Normal Combat Mode", "Normal Combat Phase 3 HP", 400, "Sets the phase 3 transition hp in normal combat mode.").Value; } } public static class StateData { public static readonly HashSet undergroundStates = new HashSet { "Dig In 1", "Dig In 2", "Away", "Hiding", "Emerge Pause", "Dig Pos", "Dig Out Antic", "Dig Out 1" }; public static readonly HashSet iframeStates = new HashSet { "Uppercut 1", "Uppercut 2", "Uppercut 3", "Dig Out Uppercut", "Slash Combo 9", "Slash Combo 10", "Slash Combo 11", "Slash Combo 12" }; public static readonly HashSet parryableStates = new HashSet { "Slash Combo 1", "Slash Combo 2", "Slash Combo 3", "Slash Combo 5", "Slash Combo 6", "Slash Combo 7", "Slash Combo 9", "Slash Combo 10", "F Slash 2", "F Slash 3", "F Slash 4", "Uppercut 1", "Uppercut 2", "Uppercut 3", "Dig Out Uppercut", "Jump Slash Launch", "Jump Slash Air", "Jump Slash New" }; } }