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 Architect.Behaviour.Utility; using BepInEx; using BepInEx.Configuration; using GlobalEnums; using HarmonyLib; using HutongGames.PlayMaker; using HutongGames.PlayMaker.Actions; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; 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("PaleAutomaton")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("0.1.0.0")] [assembly: AssemblyInformationalVersion("0.1.0+3aa37c7e92c44d97f53ea5fd05da19339a77c3cf")] [assembly: AssemblyProduct("PaleAutomaton")] [assembly: AssemblyTitle("PaleAutomaton")] [assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/astrum-nova/PaleAutomaton")] [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 Architect.Behaviour.Utility { public class SceneBorderRemover : MonoBehaviour { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func, CameraController, bool> <>9__1_0; public static Func <>9__1_2; public static Func <>9__1_3; public static Func <>9__1_4; public static Func <>9__1_5; public static Manipulator <>9__1_1; internal bool b__1_0(Func orig, CameraController self) { return orig(self) || _count > 0; } internal void b__1_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func[3] { (Instruction instr) => ILPatternMatchingExt.MatchLdcR4(instr, 0f), (Instruction _) => true, (Instruction instr) => ILPatternMatchingExt.MatchLdcR4(instr, 9999f) })) { val.Remove(); val.Emit(OpCodes.Ldc_R4, -9999f); if (val.TryGotoNext((MoveType)0, new Func[1] { (Instruction instr) => ILPatternMatchingExt.MatchLdcR4(instr, 0f) })) { val.Remove(); val.Emit(OpCodes.Ldc_R4, -9999f); } } } internal bool b__1_2(Instruction instr) { return ILPatternMatchingExt.MatchLdcR4(instr, 0f); } internal bool b__1_3(Instruction _) { return true; } internal bool b__1_4(Instruction instr) { return ILPatternMatchingExt.MatchLdcR4(instr, 9999f); } internal bool b__1_5(Instruction instr) { return ILPatternMatchingExt.MatchLdcR4(instr, 0f); } } private static int _count; public static void Init() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown new Hook((MethodBase)typeof(CameraController).GetProperty("AllowExitingSceneBounds").GetGetMethod(), (Delegate)(Func, CameraController, bool>)((Func orig, CameraController self) => orig(self) || _count > 0)); MethodInfo? method = typeof(CameraTarget).GetMethod("Update"); object obj = <>c.<>9__1_1; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); if (val2.TryGotoNext((MoveType)0, new Func[3] { (Instruction instr) => ILPatternMatchingExt.MatchLdcR4(instr, 0f), (Instruction _) => true, (Instruction instr) => ILPatternMatchingExt.MatchLdcR4(instr, 9999f) })) { val2.Remove(); val2.Emit(OpCodes.Ldc_R4, -9999f); if (val2.TryGotoNext((MoveType)0, new Func[1] { (Instruction instr) => ILPatternMatchingExt.MatchLdcR4(instr, 0f) })) { val2.Remove(); val2.Emit(OpCodes.Ldc_R4, -9999f); } } }; <>c.<>9__1_1 = val; obj = (object)val; } new ILHook((MethodBase)method, (Manipulator)obj); } private void OnEnable() { _count++; } private void OnDisable() { _count--; } } } namespace PaleAutomaton { public static class CustomBehaviour { [CompilerGenerated] private sealed class <>c__DisplayClass35_0 { public GameObject corpse; internal void b__0() { Extensions.FlipLocalScale(corpse.transform, true, false, false); } internal void b__1() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(Helpers.TpEffect(corpse: true)); Transform transform = corpse.transform; Vector3 position = corpse.transform.position; position.x = 500000f; transform.position = position; } } [CompilerGenerated] private sealed class d__36 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private string 5__1; private PlayMakerFSM <>s__2; 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() { 5__1 = null; <>s__2 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = PaleAutomatonPlugin.controlFsm.ActiveStateName; if (parriedState.Equals(5__1)) { return false; } PaleAutomatonPlugin.controlFsm.SetState("Parry Dir"); <>2__current = _waitForSeconds0_15; <>1__state = 1; return true; case 1: { <>1__state = -1; parriedState = 5__1; <>s__2 = PaleAutomatonPlugin.controlFsm; if (1 == 0) { } string state = ((!(5__1 == "Dive Antic")) ? 5__1 : "Dive Dir"); if (1 == 0) { } <>s__2.SetState(state); <>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__50 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private float 5__1; private int 5__2; private Vector3 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__50(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Expected O, but got Unknown //IL_0151: 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_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Expected O, but got Unknown //IL_02bb: 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_035f: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_03ff: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Expected O, but got Unknown //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: 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 = 0.8f; FsmUtil.GetFirstActionOfType(PaleAutomatonPlugin.controlFsm, "CS Antic").time = FsmFloat.op_Implicit(5__1); 5__2 = ((!(Random.value > 0.5f)) ? 1 : (-1)); 5__3 = HeroController.instance.transform.position; <>2__current = Teleport(5__3.x + (float)(3 * 5__2), 5__3.y - 2f, "CS Antic", 0.2f, -1f, lookAtHornet: true); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = (object)new WaitForSeconds(5__1 + 0.2f); <>1__state = 2; return true; case 2: <>1__state = -1; 5__3 = HeroController.instance.transform.position; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(Teleport(5__3.x, 5__3.y + 500f, "First Idle")); ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(SpawnCrossSlash(5__3.x, 5__3.y, 0f, 0.3f, randomizePosition: true, 1f, csStarter: true, iframes: true)); <>2__current = _waitForSeconds0_6; <>1__state = 3; return true; case 3: <>1__state = -1; 5__3 = HeroController.instance.transform.position; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(SpawnCrossSlash(5__3.x, 5__3.y, 0f, 0.3f, randomizePosition: true, 1f, csStarter: true, iframes: true)); <>2__current = Teleport(5__3.x + (float)(3 * -5__2), 5__3.y - 2f, "CS Antic", 0.2f, -1f, lookAtHornet: true); <>1__state = 4; return true; case 4: <>1__state = -1; <>2__current = (object)new WaitForSeconds(5__1 + 0.2f); <>1__state = 5; return true; case 5: <>1__state = -1; 5__3 = HeroController.instance.transform.position; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(Teleport(5__3.x, 5__3.y + 500f, "First Idle")); ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(SpawnCrossSlash(5__3.x, 5__3.y, 0f, 0.3f, randomizePosition: true, 1f, csStarter: true, iframes: true)); <>2__current = _waitForSeconds0_6; <>1__state = 6; return true; case 6: <>1__state = -1; 5__3 = HeroController.instance.transform.position; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(SpawnCrossSlash(5__3.x, 5__3.y, 0f, 0.3f, randomizePosition: true, 1f, csStarter: true, iframes: true)); <>2__current = Teleport(5__3.x + (float)(3 * 5__2), 5__3.y - 2f, "CS Antic", 0.2f, -1f, lookAtHornet: true); <>1__state = 7; return true; case 7: <>1__state = -1; <>2__current = (object)new WaitForSeconds(5__1 + 0.2f); <>1__state = 8; return true; case 8: <>1__state = -1; 5__3 = HeroController.instance.transform.position; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(Teleport(5__3.x, 5__3.y + 500f, "First Idle")); ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(SpawnCrossSlash(5__3.x, 5__3.y, 0f, 0.3f, randomizePosition: true, 1f, csStarter: true, iframes: true)); <>2__current = _waitForSeconds0_6; <>1__state = 9; return true; case 9: <>1__state = -1; 5__3 = HeroController.instance.transform.position; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(SpawnCrossSlash(5__3.x, 5__3.y, 0f, 0.3f, randomizePosition: true, 1f, csStarter: true, iframes: true)); <>2__current = _waitForSeconds0_6; <>1__state = 10; return true; case 10: <>1__state = -1; 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__45 : 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__45(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_00fb: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; PaleAutomatonPlugin.customComboSequence = true; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(SpawnCrossSlash(PaleAutomatonPlugin.songKnight.transform.localScale.x * -9f + PaleAutomatonPlugin.songKnight.transform.position.x, PaleAutomatonPlugin.songKnight.transform.position.y - 2f, 0.05f, 0.15f, randomizePosition: false, 0.7f, csStarter: true)); ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(SpawnCrossSlash(PaleAutomatonPlugin.songKnight.transform.localScale.x * -15f + PaleAutomatonPlugin.songKnight.transform.position.x, PaleAutomatonPlugin.songKnight.transform.position.y - 3f, 0.1f, 0.3f, randomizePosition: false, 0.4f, csStarter: true)); <>2__current = _waitForSeconds0_1; <>1__state = 1; return true; case 1: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("Windslash A"); <>2__current = _waitForSeconds0_3; <>1__state = 2; return true; case 2: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SendEvent("FINISHED"); <>2__current = _waitForSeconds0_175; <>1__state = 3; return true; case 3: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("Dive Dir"); <>2__current = _waitForSeconds0_05; <>1__state = 4; return true; case 4: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SendEvent("FINISHED"); <>2__current = _waitForSeconds0_4; <>1__state = 5; return true; case 5: <>1__state = -1; PaleAutomatonPlugin.customComboSequence = 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 <>c__DisplayClass35_0 <>8__1; private PlayMakerFSM 5__2; 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() { <>8__1 = null; 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_005f: 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) //IL_006b: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_0108: 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_011a: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass35_0(); <>2__current = _waitForSeconds0_7; <>1__state = 1; return true; case 1: <>1__state = -1; PaleAutomatonPlugin.songKnight = null; GameManager.instance.BeginSceneTransition(new SceneLoadInfo { IsFirstLevelForPlayer = false, SceneName = "Hang_17b", SceneResourceLocation = null, AsyncPriority = 0, HeroLeaveDirection = null, EntryGateName = null, EntryDelay = 0f, EntrySkip = false, PreventCameraFadeOut = false, WaitForSceneTransitionCameraFade = false, Visualization = (SceneLoadVisualizations)0, AlwaysUnloadUnusedAssets = false, ForceWaitFetch = false, TransitionID = 0 }); <>2__current = _waitForSeconds0_4; <>1__state = 2; return true; case 2: { <>1__state = -1; Transform transform = PaleAutomatonPlugin.songKnight.transform; Vector3 position = PaleAutomatonPlugin.songKnight.transform.position; position.x = 500000f; transform.position = position; <>8__1.corpse = ((Component)PaleAutomatonPlugin.songKnight.transform.Find("Corpse Song Knight(Clone)")).gameObject; <>8__1.corpse.SetActive(true); 5__2 = <>8__1.corpse.GetComponent(); 5__2.SetState("Land"); FsmUtil.GetFirstActionOfType(5__2, "Leave Antic").clipName = FsmString.op_Implicit("Bow"); FsmUtil.RemoveActionsOfType(FsmUtil.GetState(5__2, "Leave Antic")); FsmUtil.AddMethod(FsmUtil.GetState(5__2, "Leave Antic"), (Action)delegate { Extensions.FlipLocalScale(<>8__1.corpse.transform, true, false, false); }, false); FsmUtil.AddMethod(FsmUtil.GetState(5__2, "Leave Jump"), (Action)delegate { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(Helpers.TpEffect(corpse: true)); Transform transform2 = <>8__1.corpse.transform; Vector3 position2 = <>8__1.corpse.transform.position; position2.x = 500000f; transform2.position = position2; }, false); <>8__1.corpse.transform.position = new Vector3(50.0426f, 27.0411f, 0.0097f); 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__48 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private int 5__1; private Vector3 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__48(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_054b: 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_00c3: 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 = ((!(Random.value > 0.5f)) ? 1 : (-1)); 5__2 = HeroController.instance.transform.position; <>2__current = Teleport(5__2.x + 8.5f * (float)5__1, 5__2.y + 5f, "Dive Dir"); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = _waitForSeconds0_7; <>1__state = 2; return true; case 2: <>1__state = -1; 5__2 = HeroController.instance.transform.position; <>2__current = Teleport(5__2.x + 8.5f * (float)(-5__1), 5__2.y + 5f, "Dive Dir", 0f, 0.2f); <>1__state = 3; return true; case 3: <>1__state = -1; <>2__current = _waitForSeconds0_2; <>1__state = 4; return true; case 4: <>1__state = -1; 5__2 = HeroController.instance.transform.position; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(SpawnCrossSlash(5__2.x, 5__2.y, 0f, 0.4f)); ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(SpawnCrossSlash(5__2.x - 7f, 5__2.y + 7f, 0.05f, 0.45f, randomizePosition: true)); ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(SpawnCrossSlash(5__2.x + 7f, 5__2.y - 7f, 0.1f, 0.5f, randomizePosition: true)); <>2__current = Teleport(5__2.x, 5__2.y + 500f, "First Idle", 0f, 0f); <>1__state = 5; return true; case 5: <>1__state = -1; <>2__current = _waitForSeconds0_8; <>1__state = 6; return true; case 6: <>1__state = -1; 5__2 = HeroController.instance.transform.position; <>2__current = Teleport(5__2.x + 8.5f * (float)(-5__1), 5__2.y + 5f, "Dive Dir", 0.2f, 0.2f); <>1__state = 7; return true; case 7: <>1__state = -1; <>2__current = _waitForSeconds0_2; <>1__state = 8; return true; case 8: <>1__state = -1; 5__2 = HeroController.instance.transform.position; <>2__current = Teleport(5__2.x + 8.5f * (float)5__1, 5__2.y + 5f, "Dive Dir", 0f, 0.2f); <>1__state = 9; return true; case 9: <>1__state = -1; <>2__current = _waitForSeconds0_2; <>1__state = 10; return true; case 10: <>1__state = -1; 5__2 = HeroController.instance.transform.position; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(SpawnCrossSlash(5__2.x, 5__2.y, 0f, 0.4f)); ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(SpawnCrossSlash(5__2.x + 7f, 5__2.y + 7f, 0.05f, 0.45f, randomizePosition: true)); ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(SpawnCrossSlash(5__2.x - 7f, 5__2.y - 7f, 0.1f, 0.5f, randomizePosition: true)); <>2__current = Teleport(5__2.x, 5__2.y + 500f, "First Idle", 0f, 0f); <>1__state = 11; return true; case 11: <>1__state = -1; <>2__current = _waitForSeconds0_8; <>1__state = 12; return true; case 12: <>1__state = -1; 5__2 = HeroController.instance.transform.position; <>2__current = Teleport(5__2.x + 8.5f * (float)(-5__1), 5__2.y + 5f, "Dive Dir", 0.2f, 0.2f); <>1__state = 13; return true; case 13: <>1__state = -1; <>2__current = _waitForSeconds0_2; <>1__state = 14; return true; case 14: <>1__state = -1; 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__44 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private bool 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__44(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; PaleAutomatonPlugin.customComboSequence = true; 5__1 = Random.value > 0.5f; if (5__1) { <>2__current = _waitForSeconds0_3; <>1__state = 1; return true; } <>2__current = _waitForSeconds0_2; <>1__state = 2; return true; case 1: <>1__state = -1; PaleAutomatonPlugin.rapidSlashFollowupAllowed = true; PaleAutomatonPlugin.controlFsm.SetState("Rapid Slash Dash"); goto IL_01c2; case 2: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("Rising Slash Antic"); <>2__current = _waitForSeconds0_15; <>1__state = 3; return true; case 3: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SendEvent("FINISHED"); <>2__current = _waitForSeconds0_4; <>1__state = 4; return true; case 4: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("CS Antic"); <>2__current = _waitForSeconds0_1; <>1__state = 5; return true; case 5: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SendEvent("FINISHED"); <>2__current = _waitForSeconds0_3; <>1__state = 6; return true; case 6: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("Windslash A"); <>2__current = _waitForSeconds0_3; <>1__state = 7; return true; case 7: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SendEvent("FINISHED"); goto IL_01c2; case 8: { <>1__state = -1; if (!5__1) { PaleAutomatonPlugin.customComboSequence = false; } return false; } IL_01c2: <>2__current = _waitForSeconds0_3; <>1__state = 8; 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__42 : 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__42(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; PaleAutomatonPlugin.customComboSequence = true; <>2__current = _waitForSeconds0_2; <>1__state = 1; return true; case 1: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("WindSlash"); <>2__current = _waitForSeconds0_2; <>1__state = 2; return true; case 2: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("Dive Dir"); <>2__current = _waitForSeconds0_6; <>1__state = 3; return true; case 3: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("Windslash G"); <>2__current = _waitForSeconds0_3; <>1__state = 4; return true; case 4: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SendEvent("FINISHED"); <>2__current = _waitForSeconds0_3; <>1__state = 5; return true; case 5: <>1__state = -1; PaleAutomatonPlugin.customComboSequence = 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__33 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GameObject silkSwish; public float delay; public bool flip; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__33(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_00ac: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; silkSwish.SetActive(false); <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; case 1: { <>1__state = -1; Object.Destroy((Object)(object)((Component)silkSwish.transform.GetChild(2)).gameObject); Transform transform = silkSwish.transform; Vector3 position = silkSwish.transform.position; position.x = silkSwish.transform.position.x + (float)Random.Range(-6, 6); transform.position = position; if (flip) { Extensions.FlipLocalScale(silkSwish.transform, true, false, false); } silkSwish.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__34 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private KeepHornetInPlace 5__1; private HeroController 5__2; private HeroAnimationController 5__3; private float 5__4; private tk2dSpriteAnimationClip 5__5; 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() { 5__1 = null; 5__2 = null; 5__3 = null; 5__5 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = ((Component)HeroController.instance).gameObject.AddComponent(); 5__2 = HeroController.instance; 5__3 = ((Component)5__2).GetComponent(); 5__3.PlayClipForced("Prostrate"); <>2__current = _waitForSeconds1; <>1__state = 1; return true; case 1: <>1__state = -1; 5__4 = 5__3.GetClipDuration("Wake Up Ground"); 5__3.PlayClipForced("Wake Up Ground"); 5__5 = 5__3.animator.CurrentClip; break; case 2: <>1__state = -1; 5__4 -= Time.deltaTime; break; } if (5__3.animator.IsPlaying(5__5) && 5__4 > 0f) { <>2__current = null; <>1__state = 2; return true; } ((Behaviour)5__1).enabled = 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__47 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private int 5__1; private Vector3 5__2; private int 5__3; private float 5__4; 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() { <>1__state = -2; } private bool MoveNext() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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 = ((!(Random.value > 0.5f)) ? 1 : (-1)); 5__2 = HeroController.instance.transform.position; 5__3 = Random.Range(-3, 3); 5__4 = 5__2.x + (float)(13 * 5__1) - (float)(5__3 * 5__1); <>2__current = Teleport(5__4, 5__2.y + (float)5__3, "DashStab Antic", 0.2f, -1f, lookAtHornet: true); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = _waitForSeconds1_7; <>1__state = 2; return true; case 2: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("DashStab Antic"); <>2__current = _waitForSeconds0_05; <>1__state = 3; return true; case 3: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SendEvent("FINISHED"); <>2__current = _waitForSeconds1_1; <>1__state = 4; return true; case 4: <>1__state = -1; 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; 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() { <>1__state = -2; } private bool MoveNext() { //IL_005f: 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) //IL_0065: 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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0090: 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_00ac: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Expected O, but got Unknown //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; Helpers.DisableChargingEffects(); PaleAutomatonPlugin.controlFsm.SetState("Parry Antic"); FsmUtil.AddAction(FsmUtil.GetState(PaleAutomatonPlugin.controlFsm, "Parry Stance"), (FsmStateAction)new StartRoarEmitter { spawnPoint = new FsmOwnerDefault { gameObject = FsmGameObject.op_Implicit(PaleAutomatonPlugin.songKnight), GameObject = FsmGameObject.op_Implicit(PaleAutomatonPlugin.songKnight) }, delay = FsmFloat.op_Implicit(0f), stunHero = FsmBool.op_Implicit(false), roarBurst = FsmBool.op_Implicit(false), isSmall = FsmBool.op_Implicit(false), noVisualEffect = FsmBool.op_Implicit(false), forceThroughBind = FsmBool.op_Implicit(true), stopOnExit = true }); <>2__current = _waitForSeconds0_5; <>1__state = 1; return true; case 1: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SendEvent("BLOCKED HIT"); <>2__current = _waitForSeconds0_3; <>1__state = 2; return true; case 2: <>1__state = -1; HeroController.instance.StartInvulnerable(0.2f); <>2__current = _waitForSeconds1; <>1__state = 3; return true; case 3: <>1__state = -1; FsmUtil.RemoveActionsOfType(FsmUtil.GetState(PaleAutomatonPlugin.controlFsm, "Parry Stance")); FsmUtil.AddAction(FsmUtil.GetState(PaleAutomatonPlugin.controlFsm, "Rapid Slash End"), (FsmStateAction)new SetVelocityByScale { gameObject = FsmUtil.GetFirstActionOfType(PaleAutomatonPlugin.controlFsm, "Rapid Slash Dash").gameObject, speed = FsmFloat.op_Implicit(90f), ySpeed = FsmFloat.op_Implicit(0f), everyFrame = false }); FsmUtil.AddAction(FsmUtil.GetState(PaleAutomatonPlugin.controlFsm, "Dash Slash End 2"), (FsmStateAction)new SetVelocityByScale { gameObject = FsmUtil.GetFirstActionOfType(PaleAutomatonPlugin.controlFsm, "Rapid Slash Dash").gameObject, speed = FsmFloat.op_Implicit(90f), ySpeed = FsmFloat.op_Implicit(0f), everyFrame = 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__39 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private GameObject 5__1; private Transform 5__2; private SpriteRenderer[] <>s__3; private int <>s__4; private SpriteRenderer 5__5; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__39(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; <>s__3 = null; 5__5 = null; <>1__state = -2; } private bool MoveNext() { //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_0481: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_05f0: Unknown result type (might be due to invalid IL or missing references) //IL_05f5: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_063e: Unknown result type (might be due to invalid IL or missing references) //IL_064b: Unknown result type (might be due to invalid IL or missing references) //IL_074a: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_079f: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_06d7: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; Helpers.DisableChargingEffects(); ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(Teleport(100f, HeroController.instance.transform.position.y + 500f, "First Idle")); PaleAutomatonPlugin.controlFsm.Fsm.ManualUpdate = true; InfiniteTerrainMover.cameraLockArea.cameraYMax = 15f; ((Behaviour)InfiniteTerrainMover.cameraLockArea).enabled = false; ((Behaviour)InfiniteTerrainMover.cameraLockArea).enabled = true; ((TrackTriggerObjects)InfiniteTerrainMover.cameraLockArea).OnInsideStateChanged(true); <>2__current = _waitForSeconds0_6; <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = ((Component)GameObject.Find("Boss Title(Clone)").transform.GetChild(0)).gameObject; 5__1.SetActive(false); <>s__3 = 5__1.GetComponentsInChildren(); for (<>s__4 = 0; <>s__4 < <>s__3.Length; <>s__4++) { 5__5 = <>s__3[<>s__4]; ((Renderer)5__5).sortingOrder = 500; 5__5 = null; } <>s__3 = null; 5__1.transform.position = new Vector3(1.2f, -5f, 1f); 5__1.transform.localScale = new Vector3(1.2f, 0.6114f, 0.8734f); ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(GroundSpikeAntic(Object.Instantiate(5__1), 0f)); <>2__current = null; <>1__state = 2; return true; case 2: <>1__state = -1; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(GroundSpikeAntic(Object.Instantiate(5__1), 0.5f, flip: true)); <>2__current = null; <>1__state = 3; return true; case 3: <>1__state = -1; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(GroundSpikeAntic(Object.Instantiate(5__1), 0.2f)); <>2__current = null; <>1__state = 4; return true; case 4: <>1__state = -1; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(GroundSpikeAntic(Object.Instantiate(5__1), 0.25f, flip: true)); <>2__current = null; <>1__state = 5; return true; case 5: <>1__state = -1; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(GroundSpikeAntic(Object.Instantiate(5__1), 0.4f)); <>2__current = null; <>1__state = 6; return true; case 6: <>1__state = -1; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(GroundSpikeAntic(Object.Instantiate(5__1), 0.45f, flip: true)); <>2__current = null; <>1__state = 7; return true; case 7: <>1__state = -1; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(GroundSpikeAntic(Object.Instantiate(5__1), 0.6f)); <>2__current = null; <>1__state = 8; return true; case 8: <>1__state = -1; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(GroundSpikeAntic(Object.Instantiate(5__1), 0.65f, flip: true)); <>2__current = null; <>1__state = 9; return true; case 9: <>1__state = -1; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(GroundSpikeAntic(Object.Instantiate(5__1), 0.8f)); <>2__current = null; <>1__state = 10; return true; case 10: <>1__state = -1; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(GroundSpikeAntic(Object.Instantiate(5__1), 0.85f, flip: true)); <>2__current = null; <>1__state = 11; return true; case 11: <>1__state = -1; <>2__current = Teleport(500f, HeroController.instance.transform.position.y + 100f, "First Idle"); <>1__state = 12; return true; case 12: <>1__state = -1; <>2__current = _waitForSeconds0_6; <>1__state = 13; return true; case 13: <>1__state = -1; 5__1.transform.position = new Vector3(-2f, -4f, 1f); 5__1.transform.localScale = new Vector3(5.1726f, 0.6114f, 0.8734f); 5__1.SetActive(true); <>2__current = _waitForSeconds0_4; <>1__state = 14; return true; case 14: <>1__state = -1; Object.Destroy((Object)(object)((Component)PaleAutomatonPlugin.songKnight.transform.Find("WindSlash Hit")).gameObject); PaleAutomatonPlugin.groundSpikesParent.SetActive(true); Helpers.clonedGroundSpikes.SetActive(true); groundSpikesCollider.SetActive(true); Helpers.clonedGroundSpikesCollider.SetActive(true); if (!Settings.DISABLE_CAMERA_ZOOMOUT) { ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(PaleAutomatonPlugin.FancyZoomOut(2f, 0.575f)); } <>2__current = _waitForSeconds0_5; <>1__state = 15; return true; case 15: { <>1__state = -1; Transform transform = PaleAutomatonPlugin.terrainCollider.transform; Vector3 position = PaleAutomatonPlugin.terrainCollider.transform.position; position.y = -50f; transform.position = position; 5__2 = Helpers.clonedTerrainArt.transform.Find("Terrain Collider"); Transform transform2 = ((Component)5__2).transform; position = ((Component)5__2).transform.position; position.y = -50f; transform2.position = position; <>2__current = _waitForSeconds0_5; <>1__state = 16; return true; } case 16: <>1__state = -1; PaleAutomatonPlugin.controlFsm.Fsm.ManualUpdate = true; InfiniteTerrainMover.cameraLockArea.cameraYMax = 100000f; ((Behaviour)InfiniteTerrainMover.cameraLockArea).enabled = false; ((Behaviour)InfiniteTerrainMover.cameraLockArea).enabled = true; ((TrackTriggerObjects)InfiniteTerrainMover.cameraLockArea).OnInsideStateChanged(true); if (Settings.CUSTOM_POGO_HITBOX) { Helpers.ToggleDownSlashHitbox(useExpanded: true); } if (Settings.BELL_BIND_EFFECT_ON_THE_BOSS) { <>2__current = ((ManagedAssetBase)(object)PaleAutomatonPlugin.BELL_BIND_EFFECT).Load(); <>1__state = 17; return true; } break; case 17: <>1__state = -1; bellBindEffect = ManagedAssetExtensions.InstantiateAsset(PaleAutomatonPlugin.BELL_BIND_EFFECT); bellBindEffect.transform.SetParent(PaleAutomatonPlugin.songKnight.transform); ((Behaviour)bellBindEffect.GetComponent()).enabled = false; bellBindEffect.transform.localScale = new Vector3(1.7f, 1.7f, 1f); bellBindEffect.transform.localPosition = Vector3.zero; bellBindEffect.SetActive(true); break; } ((Component)PaleAutomatonPlugin.songKnight.transform.Find("Rising Slash")).transform.localScale = new Vector3(1f, 1f, 1f); ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(SelectPhase3Attack()); 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__40 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private Vector3 5__1; private float 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__40(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //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_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_012a: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; Helpers.DisableChargingEffects(); inPhase4Transition = true; 5__1 = HeroController.instance.transform.position; 5__2 = Math.Clamp(5__1.y - 8f, 20f, 5__1.y + 9999f); <>2__current = Teleport(5__1.x, 5__2, "Windslash A"); <>1__state = 1; return true; case 1: { <>1__state = -1; ((Component)PaleAutomatonPlugin.songKnight.transform.Find("Charge Effect")).gameObject.SetActive(true); Transform transform = PaleAutomatonPlugin.songKnight.transform; Vector3 localScale = PaleAutomatonPlugin.songKnight.transform.localScale; localScale.x = 1f; transform.localScale = localScale; Extensions.SetRotation2D(PaleAutomatonPlugin.songKnight.transform, 90f); PaleAutomatonPlugin.controlFsm.Fsm.Stop(); <>2__current = _waitForSeconds0_8; <>1__state = 2; return true; } case 2: <>1__state = -1; PaleAutomatonPlugin.controlFsm.Fsm.Start(); PaleAutomatonPlugin.controlFsm.SetState("WindSlash"); ((Component)PaleAutomatonPlugin.songKnight.transform.Find("Charge Effect")).gameObject.SetActive(false); <>2__current = _waitForSeconds0_1; <>1__state = 3; return true; case 3: <>1__state = -1; PaleAutomatonPlugin.groundSpikesParent.SetActive(false); GameObject.Find("Main Terrain Art").SetActive(false); GameObject.Find("Cloned Terrain Art").SetActive(false); <>2__current = _waitForSeconds0_2; <>1__state = 4; return true; case 4: <>1__state = -1; Extensions.SetRotation2D(PaleAutomatonPlugin.songKnight.transform, 0f); <>2__current = Teleport(5__1.x, HeroController.instance.transform.position.y + 100f, "First Idle"); <>1__state = 5; return true; case 5: <>1__state = -1; inPhase4Transition = false; <>2__current = _waitForSeconds0_5; <>1__state = 6; return true; case 6: <>1__state = -1; 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__43 : 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__43(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; PaleAutomatonPlugin.controlFsm.SetState("DashStab Antic"); ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(Helpers.ScheduleNextState(0.4f, "Stab 3")); <>2__current = _waitForSeconds0_3; <>1__state = 1; return true; case 1: <>1__state = -1; PaleAutomatonPlugin.customComboSequence = 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__41 : 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__41(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; PaleAutomatonPlugin.customComboSequence = true; <>2__current = _waitForSeconds0_55; <>1__state = 1; return true; case 1: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("CrossSlash 1"); <>2__current = _waitForSeconds0_1; <>1__state = 2; return true; case 2: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("Rising Slash Antic"); FsmUtil.GetFirstActionOfType(PaleAutomatonPlugin.controlFsm, "Rising Slash").speed = FsmFloat.op_Implicit(-70f); <>2__current = _waitForSeconds0_01; <>1__state = 3; return true; case 3: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SendEvent("FINISHED"); <>2__current = _waitForSeconds0_4; <>1__state = 4; return true; case 4: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("Windslash A"); <>2__current = _waitForSeconds0_3; <>1__state = 5; return true; case 5: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SendEvent("FINISHED"); if (Random.value > 0.5f) { <>2__current = _waitForSeconds0_2; <>1__state = 6; return true; } <>2__current = _waitForSeconds0_175; <>1__state = 9; return true; case 6: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("WindSlash"); <>2__current = _waitForSeconds0_2; <>1__state = 7; return true; case 7: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("Dive Dir"); <>2__current = _waitForSeconds0_2; <>1__state = 8; return true; case 8: <>1__state = -1; goto IL_02c6; case 9: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("Dive Dir"); <>2__current = _waitForSeconds0_05; <>1__state = 10; return true; case 10: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SendEvent("FINISHED"); <>2__current = _waitForSeconds0_3; <>1__state = 11; return true; case 11: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("Windslash G"); <>2__current = _waitForSeconds0_3; <>1__state = 12; return true; case 12: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SendEvent("FINISHED"); goto IL_02c6; case 13: { <>1__state = -1; PaleAutomatonPlugin.customComboSequence = false; return false; } IL_02c6: FsmUtil.GetFirstActionOfType(PaleAutomatonPlugin.controlFsm, "Rising Slash").speed = FsmFloat.op_Implicit(-80f); <>2__current = _waitForSeconds0_3; <>1__state = 13; 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; private int 5__1; private Bounds 5__2; 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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_014f: 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_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: 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_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) IEnumerator enumerator; switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (!PaleAutomatonPlugin.bossScene) { return false; } goto IL_03f3; case 1: <>1__state = -1; if (PaleAutomatonPlugin.healthManager.hp <= PaleAutomatonPlugin.PHASE_4_THRESHOLD && !PaleAutomatonPlugin.PHASE_4) { PaleAutomatonPlugin.PHASE_4 = true; <>2__current = Phase4Transition(); <>1__state = 2; return true; } goto IL_00f3; case 2: <>1__state = -1; goto IL_00f3; case 3: <>1__state = -1; <>2__current = _waitForSeconds1; <>1__state = 4; return true; case 4: <>1__state = -1; Pools.DisableAll(); return false; case 5: <>1__state = -1; goto IL_03f3; case 6: { <>1__state = -1; Pools.DisableAll(); return false; } IL_00f3: if (PaleAutomatonPlugin.PHASE_4) { Transform transform = Helpers.fallKiller.transform; Vector3 position = Helpers.fallKiller.transform.position; position.x = HeroController.instance.transform.position.x - 250f; transform.position = position; 5__2 = InfiniteTerrainMover.cameraLockArea.box2d.bounds; ref Bounds reference = ref 5__2; position = ((Bounds)(ref 5__2)).min; position.x = HeroController.instance.transform.position.x - 500f; ((Bounds)(ref reference)).min = position; ref Bounds reference2 = ref 5__2; position = ((Bounds)(ref 5__2)).max; position.x = HeroController.instance.transform.position.x + 500f; ((Bounds)(ref reference2)).max = position; InfiniteTerrainMover.cameraLockArea.cameraXMin = HeroController.instance.transform.position.x - 500f; InfiniteTerrainMover.cameraLockArea.cameraXMax = HeroController.instance.transform.position.x + 500f; InfiniteTerrainMover.cameraLockArea.cameraYMax = HeroController.instance.transform.position.y + 100000f; Helpers.UpdateSaveHeroClamps(); ((Behaviour)InfiniteTerrainMover.cameraLockArea).enabled = false; Transform transform2 = Helpers.cameraLockArea.transform; position = Helpers.cameraLockArea.transform.position; position.x = HeroController.instance.transform.position.x; transform2.position = position; ((Behaviour)InfiniteTerrainMover.cameraLockArea).enabled = true; ((TrackTriggerObjects)InfiniteTerrainMover.cameraLockArea).OnInsideStateChanged(true); } if (Extensions.GetFsmBoolIfExists(PaleAutomatonPlugin.controlFsm, "Hornet Dead")) { <>2__current = Teleport(HeroController.instance.transform.position.x, HeroController.instance.transform.position.y + 100f, "First Idle"); <>1__state = 3; return true; } do { 5__1 = Random.Range(1, 6); } while (attackMemory.Contains(5__1)); attackMemory.RemoveAt(0); attackMemory.Add(5__1); if (1 == 0) { } enumerator = 5__1 switch { 1 => WindSlashSpam(), 2 => LiterallyBoundlessInfinity(), 3 => CrossSlashSpam(), 4 => DiveIntoCrossSlash(), 5 => TripleRisingSlash(), _ => throw new ArgumentOutOfRangeException(), }; if (1 == 0) { } <>2__current = enumerator; <>1__state = 5; return true; IL_03f3: if (Object.op_Implicit((Object)(object)PaleAutomatonPlugin.songKnight)) { PaleAutomatonPlugin.controlFsm.FsmVariables.GetFsmFloat("Gravity").Value = 0f; PaleAutomatonPlugin.controlFsm.SetState("First Idle"); <>2__current = _waitForSeconds0_5; <>1__state = 1; return true; } <>2__current = _waitForSeconds1; <>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 float x; public float y; public float startDelay; public float activationDelay; public bool randomizePosition; public float scaleMultiplier; public bool csStarter; public bool iframes; private float 5__1; private float 5__2; private int 5__3; private float 5__4; private GameObject 5__5; private GameObject 5__6; 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; 5__6 = null; <>1__state = -2; } private bool MoveNext() { //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Expected O, but got Unknown //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = (randomizePosition ? ((float)Random.Range(-2, 2) + 1E-05f) : 0f); 5__2 = (randomizePosition ? ((float)Random.Range(-2, 2) + 1E-05f) : 0f); if (csStarter & randomizePosition) { 5__1 /= 2f; 5__2 /= 2f; } 5__3 = 90 + (randomizePosition ? Random.Range(-10, 10) : 0) + ((csStarter && PaleAutomatonPlugin.songKnight.transform.localScale.x == 1f) ? 270 : 90); 5__4 = Random.Range(2f, 2.3f) * scaleMultiplier; <>2__current = (object)new WaitForSeconds(startDelay); <>1__state = 1; return true; case 1: { <>1__state = -1; 5__5 = Pools.GetCrossSlashAntic(); 5__5.transform.localScale = new Vector3(1f, 1f, 1f); 5__5.SetActive(true); 5__5.transform.position = new Vector3(x + 5__1, y + 5__2, 5__5.transform.position.z); Transform transform2 = 5__5.transform; transform2.localScale *= 5__4; Extensions.SetRotation2D(5__5.transform, (float)5__3); Extensions.FlipLocalScale(5__5.transform, false, true, false); <>2__current = (object)new WaitForSeconds(activationDelay - startDelay); <>1__state = 2; return true; } case 2: { <>1__state = -1; 5__5.SetActive(false); 5__6 = Pools.GetCrossSlash(); 5__6.transform.localScale = new Vector3(1f, 1f, 1f); try { FsmUtil.RemoveActionsOfType(FsmUtil.GetState(5__6.GetComponent(), "Recycle")); } catch { } if (iframes) { HeroController.instance.StartInvulnerable(0.1f); } 5__6.SetActive(true); 5__6.transform.position = 5__5.transform.position; Transform transform = 5__6.transform; transform.localScale *= 5__4; Extensions.SetRotation2D(5__6.transform, (float)(5__3 - 20)); <>2__current = _waitForSeconds0_3; <>1__state = 3; return true; } case 3: <>1__state = -1; 5__6.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__31 : 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__31(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_00ea: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (!Object.op_Implicit((Object)(object)skProjectileSetup)) { <>2__current = ((ManagedAssetBase)(object)SK_PROJECTILE_ASSET).Load(); <>1__state = 1; return true; } goto IL_0106; case 1: <>1__state = -1; skProjectileSetup = ManagedAssetExtensions.InstantiateAsset(SK_PROJECTILE_ASSET); skProjectileSetup.GetComponent().isTrigger = true; Helpers.MakeProjectileIgnoreEnvironment(skProjectileSetup); Helpers.RemoveProjectileWallEvents(skProjectileSetup); Helpers.MakeProjectileRenderAboveWalls(skProjectileSetup); skProjectileSetup.AddComponent(); skProjectileSetup.GetComponent().SetDamageAmount(2); skProjectileSetup.SetActive(false); skProjectileSetup.transform.position = new Vector3(0f, -1000f, 0f); ((Object)skProjectileSetup).name = "WindSlash"; goto IL_0106; case 2: { <>1__state = -1; 5__1.SetActive(false); 5__1.GetComponent().Reset(); return false; } IL_0106: 5__1 = Pools.GetWindSlash(); 5__1.SetActive(true); ((Behaviour)5__1.GetComponent()).enabled = !inPhase4Transition; <>2__current = (inPhase4Transition ? _waitForSeconds10 : _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__37 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float x; public float y; public string nextState; public float delay; public float finishNextStateIn; public bool lookAtHornet; private Transform 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() { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: 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_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: { <>1__state = -1; teleporting = true; rb.linearVelocityY = 0f; rb.linearVelocityX = 0f; PaleAutomatonPlugin.controlFsm.Fsm.manualUpdate = true; 5__1 = PaleAutomatonPlugin.songKnight.transform; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(Helpers.TpEffect()); Transform obj3 = 5__1; Vector3 position = 5__1.position; position.y = HeroController.instance.transform.position.y + 100f; obj3.position = position; PaleAutomatonPlugin.controlFsm.SetState("First Idle"); <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; } case 1: { <>1__state = -1; Transform obj = 5__1; Vector3 position = 5__1.position; position.x = x; obj.position = position; Transform obj2 = 5__1; position = 5__1.position; position.y = y; obj2.position = position; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(Helpers.TpEffect()); PaleAutomatonPlugin.controlFsm.Fsm.manualUpdate = false; PaleAutomatonPlugin.controlFsm.SetState(nextState); if (lookAtHornet) { Helpers.LookAtHornet(); } else { PaleAutomatonPlugin.songKnight.transform.rotation = Quaternion.Euler(0f, 0f, 0f); } if (finishNextStateIn != -1f) { <>2__current = (object)new WaitForSeconds(finishNextStateIn); <>1__state = 2; return true; } break; } case 2: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SendEvent("FINISHED"); break; } Helpers.DisableChargingEffects(); teleporting = 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__51 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private int 5__1; private Vector3 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__51(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; thirdRisingSlash = false; FsmUtil.GetFirstActionOfType(PaleAutomatonPlugin.controlFsm, "Rising Slash").ySpeed = FsmFloat.op_Implicit(40f); 5__1 = ((!(Random.value > 0.5f)) ? 1 : (-1)); 5__2 = HeroController.instance.transform.position; <>2__current = Teleport(5__2.x + (float)(4 * 5__1), 5__2.y - 6f, "Rising Slash Antic", 0.2f, 0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = _waitForSeconds0_5; <>1__state = 2; return true; case 2: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("CrossSlash 1"); <>2__current = _waitForSeconds0_1; <>1__state = 3; return true; case 3: <>1__state = -1; 5__2 = HeroController.instance.transform.position; <>2__current = Teleport(5__2.x + (float)(4 * -5__1), 5__2.y - 6f, "Rising Slash Antic", 0.2f, 0.1f); <>1__state = 4; return true; case 4: <>1__state = -1; <>2__current = _waitForSeconds0_5; <>1__state = 5; return true; case 5: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("CrossSlash 1"); <>2__current = _waitForSeconds0_1; <>1__state = 6; return true; case 6: <>1__state = -1; FsmUtil.GetFirstActionOfType(PaleAutomatonPlugin.controlFsm, "Rising Slash").speed = FsmFloat.op_Implicit(0f); FsmUtil.GetFirstActionOfType(PaleAutomatonPlugin.controlFsm, "Rising Slash").ySpeed = FsmFloat.op_Implicit(90f); 5__2 = HeroController.instance.transform.position; <>2__current = Teleport(5__2.x, 5__2.y - 6f, "Rising Slash Antic", 0.2f, 0.1f); <>1__state = 7; return true; case 7: <>1__state = -1; <>2__current = _waitForSeconds0_2; <>1__state = 8; return true; case 8: <>1__state = -1; thirdRisingSlash = true; <>2__current = _waitForSeconds0_3; <>1__state = 9; return true; case 9: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("Windslash A"); <>2__current = _waitForSeconds0_2; <>1__state = 10; return true; case 10: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SendEvent("FINISHED"); FsmUtil.GetFirstActionOfType(PaleAutomatonPlugin.controlFsm, "Rising Slash").speed = FsmFloat.op_Implicit(-80f); FsmUtil.GetFirstActionOfType(PaleAutomatonPlugin.controlFsm, "Rising Slash").ySpeed = FsmFloat.op_Implicit(15f); <>2__current = _waitForSeconds0_2; <>1__state = 11; return true; case 11: <>1__state = -1; 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__49 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private int 5__1; private float 5__2; private float 5__3; private Vector3 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__49(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031a: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = ((!(Random.value > 0.5f)) ? 1 : (-1)); 5__2 = Random.Range(10f, 13f) * (float)5__1; 5__3 = Random.Range(-4f, 1f); 5__4 = HeroController.instance.transform.position; <>2__current = Teleport(5__4.x + 5__2, 5__4.y + 5__3, "Windslash A", 0.2f, -1f, lookAtHornet: true); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = _waitForSeconds0_6; <>1__state = 2; return true; case 2: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("WindSlash"); <>2__current = _waitForSeconds0_2; <>1__state = 3; return true; case 3: <>1__state = -1; 5__2 = Random.Range(10f, 13f) * (float)(-5__1); 5__3 = Random.Range(-4f, 1f); 5__4 = HeroController.instance.transform.position; <>2__current = Teleport(5__4.x + 5__2, 5__4.y + 5__3, "Windslash A", 0.2f, -1f, lookAtHornet: true); <>1__state = 4; return true; case 4: <>1__state = -1; <>2__current = _waitForSeconds0_6; <>1__state = 5; return true; case 5: <>1__state = -1; 5__2 = Random.Range(10f, 13f) * (float)5__1; 5__3 = Random.Range(-4f, 1f); 5__4 = HeroController.instance.transform.position; <>2__current = Teleport(5__4.x + 5__2, 5__4.y + 5__3, "Windslash A", 0.2f, -1f, lookAtHornet: true); <>1__state = 6; return true; case 6: <>1__state = -1; <>2__current = _waitForSeconds0_6; <>1__state = 7; return true; case 7: <>1__state = -1; 5__2 = Random.Range(10f, 13f) * (float)(-5__1); 5__3 = Random.Range(-4f, 1f); 5__4 = HeroController.instance.transform.position; <>2__current = Teleport(5__4.x + 5__2, 5__4.y + 5__3, "Windslash A", 0.2f, -1f, lookAtHornet: true); <>1__state = 8; return true; case 8: <>1__state = -1; <>2__current = _waitForSeconds0_6; <>1__state = 9; return true; case 9: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("WindSlash"); <>2__current = _waitForSeconds0_2; <>1__state = 10; return true; case 10: <>1__state = -1; PaleAutomatonPlugin.controlFsm.SetState("WindSlash"); <>2__current = _waitForSeconds0_2; <>1__state = 11; return true; case 11: <>1__state = -1; 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 _waitForSeconds1_1 = new WaitForSeconds(1.1f); private static readonly WaitForSeconds _waitForSeconds1_7 = new WaitForSeconds(1.7f); private static readonly WaitForSeconds _waitForSeconds0_05 = new WaitForSeconds(0.05f); private static readonly WaitForSeconds _waitForSeconds0_175 = new WaitForSeconds(0.175f); private static readonly WaitForSeconds _waitForSeconds0_01 = new WaitForSeconds(0.01f); private static readonly WaitForSeconds _waitForSeconds0_55 = new WaitForSeconds(0.55f); private static readonly WaitForSeconds _waitForSeconds0_2 = new WaitForSeconds(0.2f); private static readonly WaitForSeconds _waitForSeconds0_1 = new WaitForSeconds(0.1f); private static readonly WaitForSeconds _waitForSeconds0_8 = new WaitForSeconds(0.8f); private static readonly WaitForSeconds _waitForSeconds0_6 = new WaitForSeconds(0.6f); private static readonly WaitForSeconds _waitForSeconds0_5 = new WaitForSeconds(0.5f); private static readonly WaitForSeconds _waitForSeconds0_15 = new WaitForSeconds(0.15f); private static readonly WaitForSeconds _waitForSeconds0_4 = new WaitForSeconds(0.4f); private static readonly WaitForSeconds _waitForSeconds0_7 = new WaitForSeconds(0.7f); private static readonly WaitForSeconds _waitForSeconds1 = new WaitForSeconds(1f); private static readonly WaitForSeconds _waitForSeconds0_3 = new WaitForSeconds(0.3f); private static readonly WaitForSeconds _waitForSeconds10 = new WaitForSeconds(10f); public static ManagedAsset SK_PROJECTILE_ASSET = null; public static GameObject skProjectileSetup = null; public static GameObject tpEffectSetup = null; public static GameObject crossSlashSetup = null; public static GameObject crossSlashAnticSetup = null; public static GameObject groundSpikesCollider = null; public static GameObject bellBindEffect = null; public static Rigidbody2D rb = null; public static bool teleporting; public static bool csSpam; public static bool thirdRisingSlash; public static bool inPhase4Transition; private static readonly List attackMemory = new List(3) { 3, 4, 5 }; private static string parriedState = ""; [IteratorStateMachine(typeof(d__31))] public static IEnumerator SpawnWindSlash() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__31(0); } [IteratorStateMachine(typeof(d__32))] private static IEnumerator SpawnCrossSlash(float x, float y, float startDelay, float activationDelay, bool randomizePosition = false, float scaleMultiplier = 1f, bool csStarter = false, bool iframes = false) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__32(0) { x = x, y = y, startDelay = startDelay, activationDelay = activationDelay, randomizePosition = randomizePosition, scaleMultiplier = scaleMultiplier, csStarter = csStarter, iframes = iframes }; } [IteratorStateMachine(typeof(d__33))] private static IEnumerator GroundSpikeAntic(GameObject silkSwish, float delay, bool flip = false) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__33(0) { silkSwish = silkSwish, delay = delay, flip = flip }; } [IteratorStateMachine(typeof(d__34))] public static IEnumerator LieDown() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__34(0); } [IteratorStateMachine(typeof(d__35))] public static IEnumerator DeathSequence() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__35(0); } [IteratorStateMachine(typeof(d__36))] public static IEnumerator AnticParry() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__36(0); } [IteratorStateMachine(typeof(d__37))] public static IEnumerator Teleport(float x, float y, string nextState, float delay = 0.2f, float finishNextStateIn = -1f, bool lookAtHornet = false) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__37(0) { x = x, y = y, nextState = nextState, delay = delay, finishNextStateIn = finishNextStateIn, lookAtHornet = lookAtHornet }; } [IteratorStateMachine(typeof(d__38))] public static IEnumerator Phase2Transition() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__38(0); } [IteratorStateMachine(typeof(d__39))] public static IEnumerator Phase3Transition() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__39(0); } [IteratorStateMachine(typeof(d__40))] private static IEnumerator Phase4Transition() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__40(0); } [IteratorStateMachine(typeof(d__41))] public static IEnumerator RisingSlashStarter() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__41(0); } [IteratorStateMachine(typeof(d__42))] public static IEnumerator DoubleWindslashStarter() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__42(0); } [IteratorStateMachine(typeof(d__43))] public static IEnumerator RapidSlashFollowup() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__43(0); } [IteratorStateMachine(typeof(d__44))] public static IEnumerator DiveStarter() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__44(0); } [IteratorStateMachine(typeof(d__45))] public static IEnumerator CrossSlashStarter() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__45(0); } [IteratorStateMachine(typeof(d__46))] private static IEnumerator SelectPhase3Attack() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__46(0); } [IteratorStateMachine(typeof(d__47))] private static IEnumerator LiterallyBoundlessInfinity() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__47(0); } [IteratorStateMachine(typeof(d__48))] private static IEnumerator DiveIntoCrossSlash() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__48(0); } [IteratorStateMachine(typeof(d__49))] private static IEnumerator WindSlashSpam() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__49(0); } [IteratorStateMachine(typeof(d__50))] private static IEnumerator CrossSlashSpam() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__50(0); } [IteratorStateMachine(typeof(d__51))] private static IEnumerator TripleRisingSlash() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__51(0); } } public static class Helpers { [CompilerGenerated] private sealed class d__6 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float delay; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__6(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; Extensions.FlipLocalScale(((Component)PaleAutomatonPlugin.controlFsm).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(); } } [CompilerGenerated] private sealed class d__10 : 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__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //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_0065: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = _waitForSeconds0_15; <>1__state = 1; return true; case 1: <>1__state = -1; if (PaleAutomatonPlugin.songKnight.transform.localScale.x > 0f) { if (PaleAutomatonPlugin.songKnight.transform.position.x < HeroController.instance.transform.position.x) { Extensions.FlipLocalScale(PaleAutomatonPlugin.songKnight.transform, true, false, false); } } else if (PaleAutomatonPlugin.songKnight.transform.position.x > HeroController.instance.transform.position.x) { Extensions.FlipLocalScale(PaleAutomatonPlugin.songKnight.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(); } } [CompilerGenerated] private sealed class d__7 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float delay; public string state; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__7(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; PaleAutomatonPlugin.controlFsm.SetState(state); 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__9 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public bool corpse; private GameObject 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__9(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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.GetTpEffect(); 5__1.transform.position = ((!corpse) ? PaleAutomatonPlugin.songKnight.transform.position : ((Component)PaleAutomatonPlugin.songKnight.transform.Find("Corpse Song Knight(Clone)")).transform.position); 5__1.SetActive(true); PaleAutomatonPlugin.healthManager.SpriteFlash.flashArmoured(); <>2__current = _waitForSeconds1; <>1__state = 1; return true; case 1: <>1__state = -1; 5__1.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(); } } private static readonly WaitForSeconds _waitForSeconds0_15 = new WaitForSeconds(0.15f); private static readonly WaitForSeconds _waitForSeconds1 = new WaitForSeconds(1f); public static Vector2[]? originalDownSlash = null; public static Vector2[]? originalDownSlashAlt = null; private static readonly Vector2[] expandedDownSlash = (Vector2[])(object)new Vector2[16] { new Vector2(3.524622f, 0f), new Vector2(3.256326f, 1.211478f), new Vector2(2.492284f, 2.238519f), new Vector2(1.348815f, 2.924766f), new Vector2(0f, 3.165744f), new Vector2(-1.348815f, 2.924766f), new Vector2(-2.492284f, 2.238519f), new Vector2(-3.256326f, 1.211478f), new Vector2(-3.524622f, 0f), new Vector2(-3.256326f, -1.211478f), new Vector2(-2.492284f, -2.238519f), new Vector2(-1.348815f, -2.924766f), new Vector2(-0f, -3.165744f), new Vector2(1.348815f, -2.924766f), new Vector2(2.492284f, -2.238519f), new Vector2(3.256326f, -1.211478f) }; private static readonly HashSet arenaWhitelist = new HashSet { "Black Thread States", "strut_bg_song_bridge_example", "song_city_default (1)", "GameObject (11)", "wind_tiled_set", "Hero Corpse Marker (10)", "Hornet Cocoon Corpse(Clone)", "BlurPlane", "Spike Collider", "CameraLockArea (1)", "Camera Wind Region", "terrain collider", "BossHealthBarCanvas", "Boss Scene - To Additive Load(Clone)" }; private static readonly HashSet arenaBlacklist = new HashSet { "dust_root_bg_set (1)", "dust_root_bg_set", "black_fader_moon (4)" }; public static GameObject mainTerrainArt = null; public static GameObject clonedTerrainArt = null; public static GameObject clonedGroundSpikes = null; public static GameObject clonedGroundSpikesCollider = null; public static GameObject fallKiller = null; public static GameObject cameraLockArea = null; public static ConstrainPosition constrainPosition = null; 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 MakeProjectileRenderAboveWalls(GameObject projectile) { tk2dSprite[] componentsInChildren = projectile.GetComponentsInChildren(true); tk2dSprite[] array = componentsInChildren; foreach (tk2dSprite val in array) { ((tk2dBaseSprite)val).SortingOrder = 1000; } } 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)PaleAutomatonPlugin.controlFsm.FsmStates).FirstOrDefault((Func)((FsmState state) => state.Name == stateName2)); val.Transitions = val.Transitions.Where((FsmTransition t) => t.EventName != eventName2).ToArray(); } [IteratorStateMachine(typeof(d__6))] public static IEnumerator DelayedTurnAround(float delay) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__6(0) { delay = delay }; } [IteratorStateMachine(typeof(d__7))] public static IEnumerator ScheduleNextState(float delay, string state) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__7(0) { delay = delay, state = state }; } private static void SetupGroundSpikeHitbox(GameObject groundSpikesCollider) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_00d1: 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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) groundSpikesCollider.layer = LayerMask.NameToLayer("Enemies"); DamageHero component = groundSpikesCollider.GetComponent(); component.SetDamageAmount(2); component.hazardType = (HazardType)0; PolygonCollider2D component2 = groundSpikesCollider.GetComponent(); ((Object)component2).name = "GroundSpikeColliderComponent"; component2.SetPath(0, new List { new Vector2(0f, 0f), new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(1f, 0f) }); Transform transform = groundSpikesCollider.transform; Vector3 position = groundSpikesCollider.transform.position; position.y = 12.5f; transform.position = position; Transform transform2 = groundSpikesCollider.transform; position = groundSpikesCollider.transform.localScale; position.y = 180f; transform2.localScale = position; Transform transform3 = groundSpikesCollider.transform; position = groundSpikesCollider.transform.localScale; position.x = 16.4f; transform3.localScale = position; } [IteratorStateMachine(typeof(d__9))] public static IEnumerator TpEffect(bool corpse = false) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__9(0) { corpse = corpse }; } [IteratorStateMachine(typeof(d__10))] public static IEnumerator DiveTurnaround() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__10(0); } public static Vector2 GetNormalizedDirection() { //IL_000b: 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) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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_0048: Unknown result type (might be due to invalid IL or missing references) Vector3 val = HeroController.instance.transform.position - PaleAutomatonPlugin.songKnight.transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; normalized.x = Math.Abs(normalized.x); return Vector2.op_Implicit(normalized); } public static void LookAtHornet() { //IL_000b: 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) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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_0047: 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_00a5: Unknown result type (might be due to invalid IL or missing references) Vector3 val = HeroController.instance.transform.position - PaleAutomatonPlugin.songKnight.transform.position; float num = Mathf.Atan2(val.y, val.x) * 57.29578f; if (HeroController.instance.transform.position.x < PaleAutomatonPlugin.songKnight.transform.position.x) { num -= 180f; } PaleAutomatonPlugin.songKnight.transform.rotation = Quaternion.Euler(0f, 0f, PaleAutomatonPlugin.controlFsm.ActiveStateName.Equals("Dive Antic") ? 0f : num); } public static float GetAdaptedSpeed(float speed, float min, float max) { //IL_000a: 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) return Mathf.Clamp(Math.Abs(HeroController.instance.transform.position.x - PaleAutomatonPlugin.songKnight.transform.position.x) * speed, min, max); } public static void ToggleDownSlashHitbox(bool useExpanded) { if (originalDownSlash != null && originalDownSlashAlt != null) { ((Component)HeroController.instance.transform.Find("Attacks").Find("Wanderer").Find("DownSlash")).gameObject.GetComponent().SetPath(0, useExpanded ? expandedDownSlash : originalDownSlash); ((Component)HeroController.instance.transform.Find("Attacks").Find("Wanderer").Find("DownSlashAlt")).gameObject.GetComponent().SetPath(0, useExpanded ? expandedDownSlash : originalDownSlashAlt); } } public static void DisableChargingEffects() { ((Component)PaleAutomatonPlugin.songKnight.transform.GetChild(17)).gameObject.SetActive(false); ((Component)PaleAutomatonPlugin.songKnight.transform.GetChild(18)).gameObject.SetActive(false); } public static void UpdateSaveHeroClamps() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) FsmUtil.GetFirstActionOfType(PaleAutomatonPlugin.controlFsm, "Dash Slash 3").minValue = FsmFloat.op_Implicit(HeroController.instance.transform.position.x - 1000f); FsmUtil.GetFirstActionOfType(PaleAutomatonPlugin.controlFsm, "Dash Slash 3").maxValue = FsmFloat.op_Implicit(HeroController.instance.transform.position.x + 1000f); PlayMakerFSM val = FSMUtility.LocateMyFSM(PaleAutomatonPlugin.songKnight, "Save Hero"); FsmUtil.GetFirstActionOfType(val, "State 2").minValue = FsmFloat.op_Implicit(HeroController.instance.transform.position.x - 1000f); FsmUtil.GetFirstActionOfType(val, "State 2").maxValue = FsmFloat.op_Implicit(HeroController.instance.transform.position.x + 1000f); MeshRenderer component = PaleAutomatonPlugin.songKnight.GetComponent(); ((Renderer)component).forceRenderingOff = false; ((Renderer)component).bounds = new Bounds(HeroController.instance.transform.position, new Vector3(1000f, 1000f, 1000f)); } public static void SetupArena() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_009d: 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: 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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: 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_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0e02: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_0478: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_051a: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_0533: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_0571: Unknown result type (might be due to invalid IL or missing references) //IL_0576: Unknown result type (might be due to invalid IL or missing references) //IL_058a: Unknown result type (might be due to invalid IL or missing references) //IL_059f: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05cd: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Unknown result type (might be due to invalid IL or missing references) //IL_061f: Unknown result type (might be due to invalid IL or missing references) //IL_0624: 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_064d: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: 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_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0b99: Unknown result type (might be due to invalid IL or missing references) //IL_0b9e: Unknown result type (might be due to invalid IL or missing references) //IL_0ba8: Unknown result type (might be due to invalid IL or missing references) //IL_0bbd: Unknown result type (might be due to invalid IL or missing references) //IL_0cb0: Unknown result type (might be due to invalid IL or missing references) //IL_0cbf: Unknown result type (might be due to invalid IL or missing references) //IL_0cc4: Unknown result type (might be due to invalid IL or missing references) //IL_0cd1: Unknown result type (might be due to invalid IL or missing references) //IL_084f: Unknown result type (might be due to invalid IL or missing references) //IL_0856: Expected O, but got Unknown //IL_087e: Unknown result type (might be due to invalid IL or missing references) //IL_0897: Unknown result type (might be due to invalid IL or missing references) //IL_089c: Unknown result type (might be due to invalid IL or missing references) //IL_08b5: Unknown result type (might be due to invalid IL or missing references) //IL_08d5: Unknown result type (might be due to invalid IL or missing references) //IL_08dc: Expected O, but got Unknown //IL_0904: Unknown result type (might be due to invalid IL or missing references) //IL_091d: Unknown result type (might be due to invalid IL or missing references) //IL_0922: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_09df: Unknown result type (might be due to invalid IL or missing references) //IL_0a01: Unknown result type (might be due to invalid IL or missing references) //IL_0a23: Unknown result type (might be due to invalid IL or missing references) //IL_0ac4: Unknown result type (might be due to invalid IL or missing references) constrainPosition = PaleAutomatonPlugin.songKnight.AddComponent(); constrainPosition.constrainY = true; constrainPosition.SetYMax(HeroController.instance.transform.position.y + 100f); constrainPosition.SetYMin(11f); GameCameras.instance.cameraController.SetAllowExitingSceneBounds(true); GameObject val = new GameObject("Scene Border Remover"); Object.DontDestroyOnLoad((Object)(object)val); val.SetActive(false); SceneBorderRemover.Init(); val.AddComponent(); val.transform.position = new Vector3(0f, 0f, 0.1f); Transform transform = PaleAutomatonPlugin.terrainCollider.transform; Vector3 localScale = PaleAutomatonPlugin.terrainCollider.transform.localScale; localScale.x = 3f; transform.localScale = localScale; Transform transform2 = PaleAutomatonPlugin.terrainCollider.transform; localScale = PaleAutomatonPlugin.terrainCollider.transform.position; localScale.x = -100f; transform2.position = localScale; CustomBehaviour.groundSpikesCollider = Object.Instantiate(GameObject.Find("Spike Collider")); ((Object)CustomBehaviour.groundSpikesCollider).name = "GroundSpikesCollider"; SetupGroundSpikeHitbox(CustomBehaviour.groundSpikesCollider); fallKiller = Object.Instantiate(GameObject.Find("Spike Collider")); SetupGroundSpikeHitbox(fallKiller); ((Object)fallKiller).name = "FallKiller"; Transform transform3 = fallKiller.transform; localScale = fallKiller.transform.position; localScale.y = -2f; transform3.position = localScale; fallKiller.GetComponent().SetDamageAmount(999); Transform transform4 = fallKiller.transform; localScale = fallKiller.transform.localScale; localScale.y = 500f; transform4.localScale = localScale; Transform transform5 = fallKiller.transform; localScale = fallKiller.transform.localScale; localScale.x = 100f; transform5.localScale = localScale; fallKiller.AddComponent(); Scene activeScene = SceneManager.GetActiveScene(); GameObject[] rootGameObjects = ((Scene)(ref activeScene)).GetRootGameObjects(); foreach (GameObject val2 in rootGameObjects) { if (((Object)val2).name.Contains("Audio")) { continue; } if (arenaWhitelist.Contains(((Object)val2).name)) { switch (((Object)val2).name) { case "CameraLockArea (1)": { Transform transform10 = val2.transform; localScale = val2.transform.position; localScale.x = 150.7405f; transform10.position = localScale; Transform transform11 = val2.transform; localScale = val2.transform.localScale; localScale.x = val2.transform.localScale.x * 5f; transform11.localScale = localScale; Transform transform12 = val2.transform; localScale = val2.transform.localScale; localScale.y = val2.transform.localScale.y * 5f; transform12.localScale = localScale; cameraLockArea = val2; InfiniteTerrainMover.cameraLockArea = val2.GetComponent(); break; } case "Spike Collider": { Transform transform9 = val2.transform; localScale = val2.transform.position; localScale.y = -1000f; transform9.position = localScale; break; } case "wind_tiled_set": { Transform obj = val2.transform.Find("plane"); obj.localScale *= 200f; Transform obj2 = val2.transform.Find("plane (1)"); obj2.localScale *= 200f; Transform obj3 = val2.transform.Find("plane (2)"); obj3.localScale *= 200f; Transform obj4 = val2.transform.Find("plane (3)"); obj4.localScale *= 200f; Transform obj5 = val2.transform.Find("plane"); localScale = val2.transform.Find("plane").localScale; localScale.y = val2.transform.Find("plane").localScale.y * 500f; obj5.localScale = localScale; Transform obj6 = val2.transform.Find("plane (1)"); localScale = val2.transform.Find("plane (1)").localScale; localScale.y = val2.transform.Find("plane (1)").localScale.y * 500f; obj6.localScale = localScale; Transform obj7 = val2.transform.Find("plane (2)"); localScale = val2.transform.Find("plane (2)").localScale; localScale.y = val2.transform.Find("plane (2)").localScale.y * 500f; obj7.localScale = localScale; Transform obj8 = val2.transform.Find("plane (3)"); localScale = val2.transform.Find("plane (3)").localScale; localScale.y = val2.transform.Find("plane (3)").localScale.y * 500f; obj8.localScale = localScale; break; } case "strut_bg_song_bridge_example": { string[] array4 = new string[41] { "bridge_under_strut_plat_45_angle (8)", "dock_arch_small_strut_0001_1 (328)", "dock_arch_small_strut_0001_1 (373)", "dock_arch_small_strut_0001_1 (354)", "dock_arch_small_strut_0001_1 (557)", "dock_arch_small_strut_0001_1 (554)", "dock_arch_small_strut_0001_1 (549)", "dock_arch_small_strut_0001_1 (547)", "dock_arch_small_strut_0001_1 (546)", "dock_arch_small_strut_0001_1 (537)", "dock_arch_small_strut_0001_1 (532)", "dock_arch_small_strut_0001_1 (527)", "dock_arch_small_strut_0001_1 (525)", "dock_arch_small_strut_0001_1 (522)", "dock_arch_small_strut_0001_1 (520)", "dock_arch_small_strut_0001_1 (515)", "dock_arch_small_strut_0001_1 (512)", "dock_arch_small_strut_0001_1 (511)", "dock_arch_small_strut_0001_1 (509)", "dock_arch_small_strut_0001_1 (508)", "dock_arch_small_strut_0001_1 (507)", "dock_arch_small_strut_0001_1 (499)", "dock_arch_small_strut_0001_1 (495)", "dock_arch_small_strut_0001_1 (491)", "dock_arch_small_strut_0001_1 (466)", "dock_arch_small_strut_0001_1 (489)", "dock_arch_small_strut_0001_1 (488)", "dock_arch_small_strut_0001_1 (484)", "dock_arch_small_strut_0001_1 (480)", "dock_arch_small_strut_0001_1 (479)", "dock_arch_small_strut_0001_1 (530)", "dock_arch_small_strut_0001_1 (510)", "dock_arch_small_strut_0001_1 (470)", "dock_arch_small_strut_0001_1 (468)", "dock_arch_small_strut_0001_1 (427)", "dock_arch_small_strut_0001_1 (408)", "dock_arch_small_strut_0001_1 (406)", "dock_arch_small_strut_0001_1 (28)", "sc_metal_strut_back (40)", "sc_metal_strut_back (33)", "sc_metal_strut_back (32)" }; foreach (string text2 in array4) { ((Component)val2.transform.Find(text2)).gameObject.SetActive(false); } mainTerrainArt = val2; ((Object)PaleAutomatonPlugin.terrainCollider).name = "Terrain Collider"; PaleAutomatonPlugin.terrainCollider.transform.SetParent(mainTerrainArt.transform); CustomBehaviour.groundSpikesCollider.transform.SetParent(mainTerrainArt.transform); GameObject val3 = new GameObject("Infinite Terrain Mover Left"); BoxCollider2D val4 = val3.AddComponent(); ((Collider2D)val4).isTrigger = true; val3.transform.localScale = new Vector3(1f, 100000f, 1f); Transform transform7 = val3.transform; localScale = val3.transform.position; localScale.x = 75f; localScale.y = 49000f; transform7.position = localScale; val3.transform.SetParent(val2.transform); GameObject val5 = new GameObject("Infinite Terrain Mover Right"); BoxCollider2D val6 = val5.AddComponent(); ((Collider2D)val6).isTrigger = true; val5.transform.localScale = new Vector3(1f, 100000f, 1f); Transform transform8 = val5.transform; localScale = val5.transform.position; localScale.x = 185f; localScale.y = 49000f; transform8.position = localScale; val5.transform.SetParent(val2.transform); InfiniteTerrainMover infiniteTerrainMover = val3.AddComponent(); InfiniteTerrainMover infiniteTerrainMover2 = val5.AddComponent(); infiniteTerrainMover.other = val5; infiniteTerrainMover2.other = val3; Transform child3 = PaleAutomatonPlugin.groundSpikesParent.transform.GetChild(0); ((Component)child3.GetChild(0)).gameObject.SetActive(false); ((Component)child3.GetChild(2)).gameObject.SetActive(false); ((Component)child3.GetChild(3)).gameObject.SetActive(false); child3.GetChild(1).position = new Vector3(45.5544f, 10.9078f, -1.4537f); child3.GetChild(6).position = new Vector3(49.7621f, 10.9079f, -1.4537f); child3.GetChild(7).position = new Vector3(48.4338f, 10.9079f, -1.4537f); PaleAutomatonPlugin.groundSpikesParent.transform.SetParent(mainTerrainArt.transform); clonedTerrainArt = Object.Instantiate(mainTerrainArt); clonedGroundSpikes = ((Component)clonedTerrainArt.transform.Find("GroundSpikesParent")).gameObject; clonedGroundSpikes.SetActive(false); clonedGroundSpikesCollider = ((Component)clonedTerrainArt.transform.Find("GroundSpikeColliderComponent")).gameObject; clonedGroundSpikesCollider.SetActive(false); clonedTerrainArt.transform.position = new Vector3(-98.7366f, -34.5f, -5.1624f); ((Component)clonedTerrainArt.transform.Find("Infinite Terrain Mover Right")).gameObject.SetActive(false); ((Component)clonedTerrainArt.transform.Find("Infinite Terrain Mover Left")).gameObject.SetActive(true); ((Component)mainTerrainArt.transform.Find("Infinite Terrain Mover Right")).gameObject.SetActive(true); ((Component)mainTerrainArt.transform.Find("Infinite Terrain Mover Left")).gameObject.SetActive(true); ((Object)mainTerrainArt).name = "Main Terrain Art"; ((Object)clonedTerrainArt).name = "Cloned Terrain Art"; break; } case "BlurPlane": { val2.transform.SetParent(HeroController.instance.transform); Transform transform6 = val2.transform; localScale = val2.transform.position; localScale.y = val2.transform.position.y - 10f; transform6.position = localScale; break; } case "Black Thread States": { Transform child = val2.transform.GetChild(0); string[] array = new string[13] { "hanging_garden__0013_fence_mid (9)", "song_city_pipes_0016_1 (16)", "song_fence_standard (8)", "song_city_pipes_0016_1 (12)", "song_city_pipes_0016_1 (11)", "song_city_pipes_0016_1 (15)", "hanging_garden__0013_fence_mid (10)", "song_city_pipes_0016_1 (9)", "hanging_garden__0017_arch_brace (6)", "hanging_garden__0013_fence_mid (16)", "hanging_garden__0013_fence_mid (17)", "break_lamp_slab_bridge", "arborium_tunnel_simple" }; foreach (string text in array) { ((Component)child.Find(text)).gameObject.SetActive(false); } Transform child2 = val2.transform.GetChild(1); ((Component)child2).gameObject.SetActive(true); ((Component)child2).transform.position = new Vector3(19.9373f, 21.1073f, 0f); localScale = child2.localScale; localScale.x = -1f; child2.localScale = localScale; int[] array2 = new int[4] { 16, 18, 19, 24 }; foreach (int num in array2) { ((Component)child2.GetChild(0).GetChild(num)).gameObject.SetActive(false); } int[] array3 = new int[27] { 2, 3, 4, 5, 7, 8, 9, 10, 13, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 }; foreach (int num2 in array3) { ((Component)child2.GetChild(num2)).gameObject.SetActive(false); } break; } case "GameObject (11)": { for (int j = 0; j < val2.transform.childCount; j++) { if (((Object)((Component)val2.transform.GetChild(j)).gameObject).name.StartsWith("deepnest_stalactites_bg_simple_wall") || ((Object)((Component)val2.transform.GetChild(j)).gameObject).name == "sc_outer_bg_towers_0010_1_bg_outer_wall (2)") { ((Component)val2.transform.GetChild(j)).gameObject.SetActive(false); } } break; } } } else { if (val2.transform.position.z < 25f || arenaBlacklist.Contains(((Object)val2).name)) { val2.SetActive(false); } PaleAutomatonPlugin.terrainCollider.SetActive(true); fallKiller.SetActive(true); } } } } public class InfiniteTerrainMover : MonoBehaviour { private const float TERRAIN_DISTANCE_LEFT = 173.675f; private const float TERRAIN_DISTANCE_RIGHT = 72.9f; public GameObject other = null; public static CameraLockArea cameraLockArea; private void OnTriggerEnter2D(Collider2D collision) { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: 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_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_017f: 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_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) if (!((Object)collision).name.StartsWith("Hero_Hornet")) { return; } other.SetActive(true); ((Component)this).gameObject.SetActive(false); Transform transform = Helpers.fallKiller.transform; Vector3 position = Helpers.fallKiller.transform.position; position.x = HeroController.instance.transform.position.x - 250f; transform.position = position; Bounds bounds = cameraLockArea.box2d.bounds; position = ((Bounds)(ref bounds)).min; position.x = HeroController.instance.transform.position.x - 500f; ((Bounds)(ref bounds)).min = position; position = ((Bounds)(ref bounds)).max; position.x = HeroController.instance.transform.position.x + 500f; ((Bounds)(ref bounds)).max = position; cameraLockArea.cameraXMin = HeroController.instance.transform.position.x - 500f; cameraLockArea.cameraXMax = HeroController.instance.transform.position.x + 500f; cameraLockArea.cameraYMax = HeroController.instance.transform.position.y + 100000f; Helpers.UpdateSaveHeroClamps(); ((Behaviour)cameraLockArea).enabled = false; Transform transform2 = Helpers.cameraLockArea.transform; position = Helpers.cameraLockArea.transform.position; position.x = HeroController.instance.transform.position.x; transform2.position = position; Transform transform3 = ((((Object)((Component)other.transform.parent).gameObject).name == "Main Terrain Art") ? Helpers.clonedTerrainArt : Helpers.mainTerrainArt).transform; string name = ((Object)((Component)this).gameObject).name; string text = name; if (!(text == "Infinite Terrain Mover Left")) { if (text == "Infinite Terrain Mover Right") { ((Component)transform3.Find("Infinite Terrain Mover Left")).gameObject.SetActive(false); ((Component)transform3.Find("Infinite Terrain Mover Right")).gameObject.SetActive(true); position = transform3.position; position.x = ((Component)this).gameObject.transform.position.x + 72.9f; transform3.position = position; } } else { ((Component)transform3.Find("Infinite Terrain Mover Right")).gameObject.SetActive(false); ((Component)transform3.Find("Infinite Terrain Mover Left")).gameObject.SetActive(true); position = transform3.position; position.x = ((Component)this).gameObject.transform.position.x - 173.675f; transform3.position = position; } ((Behaviour)cameraLockArea).enabled = true; ((TrackTriggerObjects)cameraLockArea).OnInsideStateChanged(true); } } public class KeepHornetInPlace : MonoBehaviour { private void OnEnable() { ((Component)HeroController.instance.transform.GetChild(8)).gameObject.SetActive(false); HeroController.instance.RelinquishControl(); HeroController.instance.StopAnimationControl(); } private void OnDisable() { HeroController.instance.RegainControl(); HeroController.instance.StartAnimationControl(); ((Component)HeroController.instance.transform.GetChild(8)).gameObject.SetActive(false); } private void Update() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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) HeroController.instance.transform.position = new Vector3(45.5f, 25.5938f, 0.004f); Transform transform = HeroController.instance.transform; Vector3 localScale = HeroController.instance.transform.localScale; localScale.x = -1f; transform.localScale = localScale; } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("io.github.astrum-nova.paleautomaton", "PaleAutomaton", "0.1.0")] public class PaleAutomatonPlugin : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__34_1; public static DeathEvent <>9__34_2; public static Action <>9__36_0; public static Action <>9__36_8; public static Action <>9__36_1; public static Action <>9__36_2; public static Action <>9__36_3; public static Action <>9__36_4; public static Action <>9__36_5; public static Action <>9__36_6; public static Action <>9__36_7; public static Action <>9__37_0; public static Action <>9__37_1; public static Action <>9__37_2; public static Action <>9__37_3; public static Action <>9__37_4; public static Action <>9__37_5; public static Action <>9__37_6; public static Action <>9__37_7; public static Action <>9__37_8; public static Action <>9__37_9; public static Action <>9__37_10; public static Action <>9__37_11; public static Action <>9__37_12; public static Action <>9__37_13; internal bool b__34_1(GameObject g) { return ((Object)g).name == "Boss Death FinalHit"; } internal void b__34_2() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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) if (CustomBehaviour.teleporting) { songKnight.transform.position = new Vector3(HeroController.instance.transform.position.x + 4f, HeroController.instance.transform.position.y, songKnight.transform.position.z); } dead = true; Helpers.fallKiller.SetActive(false); ((MonoBehaviour)Instance).StopAllCoroutines(); GameManager.instance.FreezeMoment((FreezeMomentTypes)11, (Action)null); ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.DeathSequence()); } internal void b__36_0() { ((MonoBehaviour)Instance).StartCoroutine(DisplayBigTitle()); if (!Settings.DISABLE_CAMERA_ZOOMOUT) { ((MonoBehaviour)Instance).StartCoroutine(FancyZoomOut(2f, 0.675f)); } FsmUtil.RemoveActionsOfType(FsmUtil.GetState(controlFsm, "Battle Start")); if (Settings.INFINITE_WALKWAY) { Helpers.SetupArena(); } } internal void b__36_8() { //IL_0012: 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) //IL_0054: 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) if (!PHASE_3 && Math.Abs(songKnight.transform.position.x - HeroController.instance.transform.position.x) > 60f) { Helpers.constrainPosition.SetYMax(HeroController.instance.transform.position.y + 100f); ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.Teleport(HeroController.instance.transform.position.x + (float)((Random.value > 0.5f) ? 10 : (-10)), 12.9413f, "First Idle")); } PhaseCheck(); } internal void b__36_1() { //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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) float adaptedSpeed = Helpers.GetAdaptedSpeed(25f, 230f, 330f); if (!PHASE_3) { FsmUtil.GetFirstActionOfType(controlFsm, "DashStab Dash").speed = FsmFloat.op_Implicit(0f - adaptedSpeed); return; } Vector2 normalizedDirection = Helpers.GetNormalizedDirection(); adaptedSpeed *= 1.25f; FsmUtil.GetFirstActionOfType(controlFsm, "DashStab Dash").speed = FsmFloat.op_Implicit(normalizedDirection.x * (0f - adaptedSpeed)); FsmUtil.GetFirstActionOfType(controlFsm, "DashStab Dash").ySpeed = FsmFloat.op_Implicit(normalizedDirection.y * adaptedSpeed); } internal void b__36_2() { windslashGround = controlFsm.Fsm.previousActiveState.name.EndsWith('G'); } internal void b__36_3() { ((MonoBehaviour)Instance).StartCoroutine(Helpers.DiveTurnaround()); } internal void b__36_4() { HeroController.instance.StartInvulnerable(0.1f); } internal void b__36_5() { HeroController.instance.StartInvulnerable(0.1f); } internal void b__36_6() { HeroController.instance.StartInvulnerable(0.1f); } internal void b__36_7() { ((MonoBehaviour)controlFsm).StartCoroutine(Helpers.DelayedTurnAround(0.15f)); } internal void b__37_0() { controlFsm.SendEvent("FINISHED"); } internal void b__37_1() { //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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) float adaptedSpeed = Helpers.GetAdaptedSpeed(35f, 260f, 870f); if (!PHASE_3) { FsmUtil.GetFirstActionOfType(controlFsm, "DashStab Dash").speed = FsmFloat.op_Implicit(0f - adaptedSpeed); return; } Vector2 normalizedDirection = Helpers.GetNormalizedDirection(); adaptedSpeed *= 1.25f; FsmUtil.GetFirstActionOfType(controlFsm, "DashStab Dash").speed = FsmFloat.op_Implicit(normalizedDirection.x * (0f - adaptedSpeed)); FsmUtil.GetFirstActionOfType(controlFsm, "DashStab Dash").ySpeed = FsmFloat.op_Implicit(normalizedDirection.y * adaptedSpeed); } internal void b__37_2() { //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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) float adaptedSpeed = Helpers.GetAdaptedSpeed(12.5f, 110f, 210f); if (!PHASE_3) { FsmUtil.GetFirstActionOfType(controlFsm, "Dash Slash Antic").speed = FsmFloat.op_Implicit(0f - adaptedSpeed); return; } Vector2 normalizedDirection = Helpers.GetNormalizedDirection(); adaptedSpeed *= 1.15f; FsmUtil.GetFirstActionOfType(controlFsm, "Dash Slash Antic").speed = FsmFloat.op_Implicit(normalizedDirection.x * (0f - adaptedSpeed)); FsmUtil.GetFirstActionOfType(controlFsm, "Dash Slash Antic").ySpeed = FsmFloat.op_Implicit(normalizedDirection.y * adaptedSpeed); } internal void b__37_3() { //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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) float adaptedSpeed = Helpers.GetAdaptedSpeed(25f, 250f, 300f); if (!PHASE_3) { FsmUtil.GetFirstActionOfType(controlFsm, "Stab 3").speed = FsmFloat.op_Implicit(0f - adaptedSpeed); return; } Vector2 normalizedDirection = Helpers.GetNormalizedDirection(); adaptedSpeed *= 1.25f; FsmUtil.GetFirstActionOfType(controlFsm, "Stab 3").speed = FsmFloat.op_Implicit(normalizedDirection.x * (0f - adaptedSpeed)); FsmUtil.GetFirstActionOfType(controlFsm, "Stab 3").ySpeed = FsmFloat.op_Implicit(normalizedDirection.y * adaptedSpeed); } internal void b__37_4() { FsmUtil.GetFirstActionOfType(controlFsm, "Rapid Slash Dash").speed = FsmFloat.op_Implicit(0f - Helpers.GetAdaptedSpeed(4f, 30f, 300f)); } internal void b__37_5() { ((MonoBehaviour)Instance).StartCoroutine(Helpers.DelayedTurnAround(0.1f)); } internal void b__37_6() { ((MonoBehaviour)Instance).StartCoroutine(Helpers.ScheduleNextState(0.25f, "Stab 3")); } internal void b__37_7() { if (!PHASE_3 && !customComboSequence) { if (!windslashGround) { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.DoubleWindslashStarter()); } else if (!dashToWindslashFollowup) { ((MonoBehaviour)Instance).StartCoroutine(Helpers.ScheduleNextState(0.3f, "DashStab Antic")); ((MonoBehaviour)Instance).StartCoroutine(Helpers.ScheduleNextState(0.47f, "DashStab Dash")); dashToWindslashFollowup = true; } else { dashToWindslashFollowup = false; } } } internal void b__37_8() { if (!PHASE_3 && !customComboSequence) { if (!dashToWindslashFollowup) { controlFsm.SetState("Windslash G"); ((MonoBehaviour)Instance).StartCoroutine(Helpers.ScheduleNextState(0.3f, "WindSlash")); dashToWindslashFollowup = true; } else { dashToWindslashFollowup = false; } } } internal void b__37_9() { if (!PHASE_3 && !customComboSequence) { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.RisingSlashStarter()); } } internal void b__37_10() { if (!PHASE_3 && !customComboSequence) { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.DiveStarter()); } } internal void b__37_11() { if (!PHASE_3 && rapidSlashFollowupAllowed && customComboSequence) { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.RapidSlashFollowup()); } } internal void b__37_12() { if (!PHASE_3 && rapidSlashFollowupAllowed && customComboSequence) { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.RapidSlashFollowup()); } } internal void b__37_13() { if (!PHASE_3 && !customComboSequence) { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.CrossSlashStarter()); } } } [CompilerGenerated] private sealed class <>c__DisplayClass34_0 { public PlayMakerFSM mainFsm; internal void b__0(Action _) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (HeroController.instance.transform.position.x < songKnight.transform.position.x) { FsmUtil.GetFirstActionOfType(mainFsm, "Catch").toValue.value.x *= -1f; } } } [CompilerGenerated] private sealed class d__33 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private GameObject 5__1; private PlayMakerFSM 5__2; private GameObject 5__3; private GameObject
5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__33(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__3 = null;
5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_0172: 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_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019d: 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 = ((ManagedAssetBase)(object)BIG_TITLE).Load(); <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = ManagedAssetExtensions.InstantiateAsset(BIG_TITLE); 5__2 = 5__1.GetComponent(); FsmUtil.RemoveActionsOfType(FsmUtil.GetState(5__2, "Flash Effect")); FsmUtil.RemoveActionsOfType(FsmUtil.GetState(5__2, "Flash Effect")); 5__2.SendEvent("TITLE UP"); Object.Destroy((Object)(object)((Component)5__1.transform.GetChild(1).GetChild(2)).gameObject); <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 2; return true; case 2: { <>1__state = -1; ((Component)5__1.transform.GetChild(1).GetChild(1)).gameObject.SetActive(true); 5__3 = ((Component)5__1.transform.GetChild(1).GetChild(1).GetChild(1)).gameObject;
5__4 = ((Component)5__1.transform.GetChild(1).GetChild(1).GetChild(0)).gameObject; Transform transform = 5__3.transform; transform.localScale *= 1.6f; Transform transform2 =
5__4.transform; transform2.localScale *= 0.8f; ((Behaviour)5__3.GetComponent()).enabled = false; ((Behaviour)
5__4.GetComponent()).enabled = false; ((Behaviour)5__3.GetComponent()).enabled = false; ((Behaviour)
5__4.GetComponent()).enabled = false; 5__3.SendMessage("SetText", (object)"Pale");
5__4.SendMessage("SetText", (object)"Automaton"); 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__32 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float duration; public float targetZoom; private float 5__1; private float 5__2; private float 5__3; 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() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = 0f; 5__2 = GameCameras.instance.tk2dCam.ZoomFactor; break; case 1: <>1__state = -1; break; } if (5__1 < duration) { 5__1 += Time.deltaTime; 5__3 = Mathf.Clamp01(5__1 / duration); GameCameras.instance.tk2dCam.ZoomFactor = Mathf.Lerp(5__2, targetZoom, ((double)5__3 < 0.5) ? (4f * 5__3 * 5__3 * 5__3) : (1f - Mathf.Pow(-2f * 5__3 + 2f, 3f) / 2f)); <>2__current = null; <>1__state = 1; return true; } GameCameras.instance.tk2dCam.ZoomFactor = targetZoom; 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__31 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private tk2dSprite[] <>s__1; private int <>s__2; private tk2dSprite 5__3; private int 5__4; private int 5__5; private GameObject 5__6; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__31(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = null; 5__3 = null; 5__6 = null; <>1__state = -2; } private bool MoveNext() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Expected O, but got Unknown //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_027b: 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_02c4: 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_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_0484: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_012c: 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 = (object)new WaitForSeconds(0.3475f); <>1__state = 1; return true; case 1: <>1__state = -1; HeroController.instance.transform.position = new Vector3(dead ? 44f : 46.8476f, 25.5938f, 0.004f); if (dead) { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.LieDown()); } else { <>s__1 = songKnight.GetComponentsInChildren(true); for (<>s__2 = 0; <>s__2 < <>s__1.Length; <>s__2++) { 5__3 = <>s__1[<>s__2]; ((tk2dBaseSprite)5__3).SortingOrder = 500; 5__3 = null; } <>s__1 = null; } dead = false; ((Renderer)HeroController.instance.vignette).enabled = false; <>2__current = ((ManagedAssetBase)(object)GROUND_SPIKES).Load(); <>1__state = 2; return true; case 2: <>1__state = -1; groundSpikesSetup = ManagedAssetExtensions.InstantiateAsset(GROUND_SPIKES); groundSpikesSetup.transform.position = new Vector3(1000f, 1000f, 0f); groundSpikesParent = new GameObject("GroundSpikesParent"); 5__4 = 0; while (5__4 < groundSpikesSetup.transform.childCount) { if (5__4 > 7) { ((Component)groundSpikesSetup.transform.GetChild(5__4)).gameObject.SetActive(false); } 5__4++; } 5__5 = 0; break; case 3: { <>1__state = -1; 5__6 = Object.Instantiate(groundSpikesSetup, groundSpikesParent.transform, true); Transform transform = ((Component)5__6.transform.GetChild(0)).transform; Vector3 position = ((Component)5__6.transform.GetChild(0)).transform.position; position.x = ((Component)5__6.transform.GetChild(0)).transform.position.x - 1.1f; transform.position = position; Transform transform2 = ((Component)5__6.transform.GetChild(1)).transform; position = ((Component)5__6.transform.GetChild(1)).transform.position; position.x = ((Component)5__6.transform.GetChild(1)).transform.position.x - 1.1f; transform2.position = position; Transform transform3 = 5__6.transform; position = 5__6.transform.position; position.x = (float)5__5 * 10.15f + 43f; transform3.position = position; Transform transform4 = 5__6.transform; position = 5__6.transform.position; position.y = 7f; transform4.position = position; Transform transform5 = ((Component)5__6.transform.GetChild(0)).transform; position = ((Component)5__6.transform.GetChild(0)).transform.position; position.z = -1.4537f; transform5.position = position; Transform transform6 = ((Component)5__6.transform.GetChild(1)).transform; position = ((Component)5__6.transform.GetChild(1)).transform.position; position.z = -1.4537f; transform6.position = position; Transform transform7 = ((Component)5__6.transform.GetChild(6)).transform; position = ((Component)5__6.transform.GetChild(6)).transform.position; position.z = -1.4537f; transform7.position = position; Transform transform8 = ((Component)5__6.transform.GetChild(7)).transform; position = ((Component)5__6.transform.GetChild(7)).transform.position; position.z = -1.4537f; transform8.position = position; 5__6 = null; 5__5++; break; } } if (5__5 < 18) { <>2__current = null; <>1__state = 3; return true; } groundSpikesParent.SetActive(false); Helpers.originalDownSlash = ((Component)HeroController.instance.transform.Find("Attacks").Find("Wanderer").Find("DownSlash")).gameObject.GetComponent().points; Helpers.originalDownSlashAlt = ((Component)HeroController.instance.transform.Find("Attacks").Find("Wanderer").Find("DownSlashAlt")).gameObject.GetComponent().points; 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__34 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private <>c__DisplayClass34_0 <>8__1; private GameObject 5__2; private Vector2[] 5__3; private MeshRenderer 5__4; private DamageHero[] <>s__5; private int <>s__6; private DamageHero 5__7; private string[] <>s__8; private int <>s__9; private string 5__10; private GameObject 5__11; private tk2dSprite[] <>s__12; private int <>s__13; private tk2dSprite 5__14; 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() { <>8__1 = null; 5__2 = null; 5__3 = null; 5__4 = null; <>s__5 = null; 5__7 = null; <>s__8 = null; 5__10 = null; 5__11 = null; <>s__12 = null; 5__14 = null; <>1__state = -2; } private bool MoveNext() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Unknown result type (might be due to invalid IL or missing references) //IL_0596: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass34_0(); <>2__current = ((ManagedAssetBase)(object)SK_ASSET).Load(); <>1__state = 1; return true; case 1: { <>1__state = -1; songKnightBossScene = ManagedAssetExtensions.InstantiateAsset(SK_ASSET); songKnightBossScene.transform.position = new Vector3(125f, 7.19f, 0.004f); Object.Destroy((Object)(object)((Component)songKnightBossScene.transform.GetChild(0)).gameObject); Object.Destroy((Object)(object)((Component)songKnightBossScene.transform.GetChild(1)).gameObject); songKnight = ((Component)songKnightBossScene.transform.GetChild(2)).gameObject; PaleAutomatonPlugin.healthManager = songKnight.GetComponent(); PaleAutomatonPlugin.healthManager.recoil = null; PaleAutomatonPlugin.healthManager.hp = INITIAL_HP; PaleAutomatonPlugin.healthManager.SetImmuneToSpikes(true); PaleAutomatonPlugin.healthManager.SetImmuneToTraps(true); Object.Destroy((Object)(object)FSMUtility.LocateMyFSM(songKnight, "Stun Control")); controlFsm = FSMUtility.LocateMyFSM(songKnight, "Control"); Helpers.UpdateSaveHeroClamps(); <>8__1.mainFsm = FSMUtility.LocateMyFSM(songKnight, "FSM"); FsmUtil.InsertLambdaMethod(FsmUtil.GetState(<>8__1.mainFsm, "Catch"), (Action)delegate { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (HeroController.instance.transform.position.x < songKnight.transform.position.x) { FsmUtil.GetFirstActionOfType(<>8__1.mainFsm, "Catch").toValue.value.x *= -1f; } }, 3); damageHero = songKnight.GetComponent(); ((Behaviour)damageHero).enabled = false; 5__2 = ((Component)songKnight.transform.Find("ComboSlash 1")).gameObject; 5__3 = 5__2.GetComponent().points; 5__2.transform.localScale = new Vector3(1f, 2f, 1f); <>s__5 = songKnight.GetComponentsInChildren(true); for (<>s__6 = 0; <>s__6 < <>s__5.Length; <>s__6++) { 5__7 = <>s__5[<>s__6]; 5__7.SetDamageAmount(2); 5__7 = null; } <>s__5 = null; <>s__8 = new string[3] { "DashStab Hit 1", "DashStab Hit 2", "ComboSlash 2" }; for (<>s__9 = 0; <>s__9 < <>s__8.Length; <>s__9++) { 5__10 = <>s__8[<>s__9]; 5__11 = ((Component)songKnight.transform.Find(5__10)).gameObject; 5__11.GetComponent().SetPath(0, 5__3); 5__11.transform.localScale = new Vector3(1f, 2f, 1f); 5__11 = null; 5__10 = null; } <>s__8 = null; CustomBehaviour.rb = songKnight.GetComponent(); ((Component)songKnight.transform.Find("Rising Slash")).transform.localScale = new Vector3(1f, 1.8f, 1f); ((Component)songKnight.transform.Find("RapidSlash Collider")).transform.localScale = new Vector3(1.2f, 1f, 1f); <>s__12 = songKnight.GetComponentsInChildren(true); for (<>s__13 = 0; <>s__13 < <>s__12.Length; <>s__13++) { 5__14 = <>s__12[<>s__13]; ((tk2dBaseSprite)5__14).renderLayer = 500; 5__14 = null; } <>s__12 = null; CustomBehaviour.tpEffectSetup = Object.Instantiate(((IEnumerable)Resources.FindObjectsOfTypeAll()).FirstOrDefault((Func)((GameObject g) => ((Object)g).name == "Boss Death FinalHit"))); CustomBehaviour.tpEffectSetup.SetActive(false); songKnight.transform.GetChild(27).localScale = new Vector3(2.5f, 2.5f, 1f); CustomBehaviour.crossSlashAnticSetup = Object.Instantiate(((Component)songKnight.transform.GetChild(27)).gameObject); CustomBehaviour.crossSlashAnticSetup.SetActive(false); Object.Destroy((Object)(object)((Component)CustomBehaviour.tpEffectSetup.transform.Find("white_solid")).gameObject); Object.Destroy((Object)(object)((Component)CustomBehaviour.tpEffectSetup.transform.Find("Slash")).gameObject); Object.Destroy((Object)(object)((Component)CustomBehaviour.tpEffectSetup.transform.Find("Strike L")).gameObject); Object.Destroy((Object)(object)((Component)CustomBehaviour.tpEffectSetup.transform.Find("Strike R")).gameObject); HealthManager healthManager = PaleAutomatonPlugin.healthManager; object obj = <>c.<>9__34_2; if (obj == null) { DeathEvent val = delegate { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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) if (CustomBehaviour.teleporting) { songKnight.transform.position = new Vector3(HeroController.instance.transform.position.x + 4f, HeroController.instance.transform.position.y, songKnight.transform.position.z); } dead = true; Helpers.fallKiller.SetActive(false); ((MonoBehaviour)Instance).StopAllCoroutines(); GameManager.instance.FreezeMoment((FreezeMomentTypes)11, (Action)null); ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.DeathSequence()); }; <>c.<>9__34_2 = val; obj = (object)val; } healthManager.OnDeath += (DeathEvent)obj; 5__4 = songKnight.GetComponent(); ((Renderer)5__4).forceRenderingOff = false; ((Renderer)5__4).bounds = new Bounds(Vector3.zero, new Vector3(1000f, 1000f, 1000f)); SetupPaleAutomaton(); 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 PaleAutomatonPlugin <>4__this; 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_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(Language_Get_Patch), (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 ManagedAsset SK_ASSET = null; private static ManagedAsset BIG_TITLE = null; private static ManagedAsset GROUND_SPIKES = null; public static ManagedAsset BELL_BIND_EFFECT = null; private static GameObject songKnightBossScene = null; public static GameObject songKnight = null; private static GameObject groundSpikesSetup = null; public static GameObject groundSpikesParent = null; public static GameObject terrainCollider = null; public static PlayMakerFSM controlFsm = null; public static HealthManager healthManager = null; public static DamageHero damageHero = null; private static int INITIAL_HP = 1800; public static int PHASE_2_THRESHOLD = 1600; public static int PHASE_3_THRESHOLD = 800; public static int PHASE_4_THRESHOLD = 400; public static bool PHASE_2; public static bool PHASE_3; public static bool PHASE_4; public static bool bossScene; public static bool windslashGround; public static bool customComboSequence; private static bool dashToWindslashFollowup; public static bool rapidSlashFollowupAllowed; private static bool dead; public const string Id = "io.github.astrum-nova.paleautomaton"; public static PaleAutomatonPlugin Instance { get; private set; } = null; public static string Name => "PaleAutomaton"; public static string Version => "0.1.0"; [IteratorStateMachine(typeof(d__29))] public IEnumerator Start() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__29(0) { <>4__this = this }; } private void Awake() { ((BaseUnityPlugin)this).Logger.LogInfo((object)("Plugin " + Name + " (io.github.astrum-nova.paleautomaton) has loaded!")); Instance = this; Settings.InitializeSettings(((BaseUnityPlugin)this).Config); if (Settings.DEBUG_MODE) { INITIAL_HP = Settings.INITIAL_HP; PHASE_2_THRESHOLD = Settings.PHASE_2_THRESHOLD; PHASE_3_THRESHOLD = Settings.PHASE_3_THRESHOLD; PHASE_4_THRESHOLD = Settings.PHASE_4_THRESHOLD; } Harmony.CreateAndPatchAll(typeof(Patches), (string)null); SK_ASSET = ManagedAsset.FromSceneAsset("hang_17b", "Boss Scene - To Additive Load"); BIG_TITLE = ManagedAsset.FromSceneAsset("cradle_03", "Boss Scene/Boss Title"); GROUND_SPIKES = ManagedAsset.FromSceneAsset("song_24", "sc_wall_spiked"); BELL_BIND_EFFECT = ManagedAsset.FromNonSceneAsset("Assets/Prefabs/Heroes/bind_bell_appear.prefab", "localpoolprefabs_assets_shared"); CustomBehaviour.SK_PROJECTILE_ASSET = ManagedAsset.FromNonSceneAsset("Assets/Prefabs/Hornet Enemies/Song Knight Projectile.prefab", "localpoolprefabs_assets_areahangareasong"); SceneManager.sceneLoaded += delegate(Scene scene, LoadSceneMode _) { //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: 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) if (!((Object)(object)GameManager.instance == (Object)null) && GameManager.instance.IsGameplayScene()) { bossScene = false; songKnight = null; controlFsm = null; healthManager = null; windslashGround = false; customComboSequence = false; dashToWindslashFollowup = false; rapidSlashFollowupAllowed = false; CustomBehaviour.bellBindEffect = null; CustomBehaviour.thirdRisingSlash = false; CustomBehaviour.inPhase4Transition = false; GameCameras.instance.tk2dCam.ZoomFactor = 1f; Helpers.ToggleDownSlashHitbox(useExpanded: false); if (!(((Scene)(ref scene)).name != "Arborium_11")) { PHASE_2 = false; PHASE_3 = false; PHASE_4 = false; windslashGround = false; CustomBehaviour.csSpam = false; Transform transform = GameObject.Find("Black Thread States").transform; ((Component)transform.GetChild(0)).gameObject.SetActive(true); ((Component)transform.GetChild(1)).gameObject.SetActive(false); GameObject val = GameObject.Find("Merchant Quest Parent"); if (!((Component)val.transform.GetChild(0)).gameObject.activeSelf) { val.SetActive(false); bossScene = true; ((MonoBehaviour)this).StartCoroutine(PlaceHornet()); GameObject[] rootGameObjects = ((Scene)(ref scene)).GetRootGameObjects(); foreach (GameObject val2 in rootGameObjects) { if (((Object)val2).name.StartsWith("Alert Range")) { Object.Destroy((Object)(object)val2); } if (((Object)val2).name.StartsWith("Hero Corpse Marker")) { if (((Object)val2).name.EndsWith("(10)")) { Transform transform2 = val2.transform; Vector3 position = val2.transform.position; position.x = 129f; transform2.position = position; } else { Object.Destroy((Object)(object)val2); } } if (((Object)val2).name == "terrain collider") { terrainCollider = val2; } } Object.Destroy((Object)(object)GameObject.Find("citadel_bat_swarms")); Object.Destroy((Object)(object)GameObject.Find("bat swarm_bg_left")); ((MonoBehaviour)this).StartCoroutine(SpawnSongKnight()); PlayerData.instance.encounteredSongChevalierBoss = true; Pools.Clear(); } } } }; } [IteratorStateMachine(typeof(d__31))] private static IEnumerator PlaceHornet() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__31(0); } [IteratorStateMachine(typeof(d__32))] public static IEnumerator FancyZoomOut(float duration, float targetZoom) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__32(0) { duration = duration, targetZoom = targetZoom }; } [IteratorStateMachine(typeof(d__33))] private static IEnumerator DisplayBigTitle() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__33(0); } [IteratorStateMachine(typeof(d__34))] private static IEnumerator SpawnSongKnight() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__34(0); } private static void PhaseCheck() { //IL_00fa: Unknown result type (might be due to invalid IL or missing references) if (healthManager.hp <= PHASE_2_THRESHOLD && !PHASE_2) { PHASE_2 = true; ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.Phase2Transition()); SetupPhase2(); } else if (healthManager.hp <= PHASE_3_THRESHOLD && !PHASE_3 && Object.op_Implicit((Object)(object)CustomBehaviour.crossSlashSetup)) { PHASE_3 = true; ((Behaviour)Helpers.constrainPosition).enabled = false; ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.Phase3Transition()); SetupPhase3(); GameObject gameObject = ((Component)songKnight.transform.Find("Dive Hit")).gameObject; gameObject.GetComponent().SetPath(0, ((Component)songKnight.transform.Find("ComboSlash 1")).gameObject.GetComponent().points); gameObject.transform.localScale = new Vector3(1f, 2f, 1f); } } private static void SetupPaleAutomaton() { //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_018d: 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_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Expected O, but got Unknown //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Expected O, but got Unknown //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Expected O, but got Unknown //IL_0449: Unknown result type (might be due to invalid IL or missing references) //IL_044e: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Expected O, but got Unknown //IL_0485: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_04a5: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Expected O, but got Unknown //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04d6: Unknown result type (might be due to invalid IL or missing references) //IL_04e1: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Expected O, but got Unknown Helpers.RemoveEventFromState("Parry Antic", "TOOK DAMAGE"); Helpers.RemoveEventFromState("Target Check", "NEEDOLIN"); Helpers.RemoveEventFromState("Rising Slash Followup", "FALL"); Helpers.RemoveEventFromState("Rising Slash Followup", "STEP"); Helpers.RemoveEventFromState("WJ Cross Slash", "CANCEL"); Helpers.RemoveEventFromState("Jump Rise", "LAND"); Helpers.RemoveEventFromState("Become Active", "BLOCKED HIT"); Helpers.RemoveEventFromState("Far Air Attack", "DIVE SLASH"); FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, "Enc Wake"), (Action)delegate { ((MonoBehaviour)Instance).StartCoroutine(DisplayBigTitle()); if (!Settings.DISABLE_CAMERA_ZOOMOUT) { ((MonoBehaviour)Instance).StartCoroutine(FancyZoomOut(2f, 0.675f)); } FsmUtil.RemoveActionsOfType(FsmUtil.GetState(controlFsm, "Battle Start")); if (Settings.INFINITE_WALKWAY) { Helpers.SetupArena(); } }, false); string[] array = new string[5] { "Set DiveSlash", "Set Dash Attack", "Set Wind Slash", "Set CrossSlash", "Set Rising Slash" }; foreach (string text in array) { FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, text), (Action)delegate { //IL_0012: 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) //IL_0054: 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) if (!PHASE_3 && Math.Abs(songKnight.transform.position.x - HeroController.instance.transform.position.x) > 60f) { Helpers.constrainPosition.SetYMax(HeroController.instance.transform.position.y + 100f); ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.Teleport(HeroController.instance.transform.position.x + (float)((Random.value > 0.5f) ? 10 : (-10)), 12.9413f, "First Idle")); } PhaseCheck(); }, false); } FsmUtil.InsertMethod(FsmUtil.GetState(controlFsm, "DashStab Dash"), (Action)delegate { //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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) float adaptedSpeed = Helpers.GetAdaptedSpeed(25f, 230f, 330f); if (!PHASE_3) { FsmUtil.GetFirstActionOfType(controlFsm, "DashStab Dash").speed = FsmFloat.op_Implicit(0f - adaptedSpeed); } else { Vector2 normalizedDirection = Helpers.GetNormalizedDirection(); adaptedSpeed *= 1.25f; FsmUtil.GetFirstActionOfType(controlFsm, "DashStab Dash").speed = FsmFloat.op_Implicit(normalizedDirection.x * (0f - adaptedSpeed)); FsmUtil.GetFirstActionOfType(controlFsm, "DashStab Dash").ySpeed = FsmFloat.op_Implicit(normalizedDirection.y * adaptedSpeed); } }, 0, false); FsmUtil.AddAction(FsmUtil.GetState(controlFsm, "DashStab Dash"), (FsmStateAction)new ActivateGameObject { gameObject = FsmUtil.GetFirstActionOfType(controlFsm, "Stab 1").gameObject, activate = FsmBool.op_Implicit(true), recursive = FsmBool.op_Implicit(false), resetOnExit = false, everyFrame = false }); FsmUtil.GetFirstActionOfType(controlFsm, "Dive").speed = FsmFloat.op_Implicit(120f); FsmUtil.GetFirstActionOfType(controlFsm, "Dive Land").decelerationX = FsmFloat.op_Implicit(0.85f); FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, "WindSlash Antic"), (Action)delegate { windslashGround = controlFsm.Fsm.previousActiveState.name.EndsWith('G'); }, false); FsmUtil.GetLastActionOfType(controlFsm, "CrossSlash Recoil").speed = FsmFloat.op_Implicit(15f); FsmUtil.GetFirstActionOfType(controlFsm, "Idle").time = FsmFloat.op_Implicit(-1f); FsmUtil.GetFirstActionOfType(controlFsm, "Idle").floatVariable = FsmFloat.op_Implicit(0f); FsmUtil.GetFirstActionOfType(controlFsm, "Idle").falseValue = FsmFloat.op_Implicit(0f); FsmUtil.GetFirstActionOfType(controlFsm, "Idle").trueValue = FsmFloat.op_Implicit(0f); FsmUtil.GetFirstActionOfType(controlFsm, "Dive L").minValue = FsmFloat.op_Implicit(180f); FsmUtil.GetFirstActionOfType(controlFsm, "Dive R").maxValue = FsmFloat.op_Implicit(360f); FsmUtil.GetLastActionOfType(controlFsm, "Dive Dir").pauseBetweenTurns = 0f; FsmUtil.GetLastActionOfType(controlFsm, "CS Antic").time = FsmFloat.op_Implicit(0.25f); FsmUtil.AddAction(FsmUtil.GetState(controlFsm, "Rising Slash Antic"), (FsmStateAction)new Wait { time = FsmFloat.op_Implicit(0.6f), finishEvent = FsmEvent.Finished, realTime = false }); FsmUtil.GetFirstActionOfType(controlFsm, "Rising Slash").speed = FsmFloat.op_Implicit(-80f); FsmUtil.GetFirstActionOfType(controlFsm, "Rising Slash").ySpeed = FsmFloat.op_Implicit(15f); FsmUtil.GetFirstActionOfType(controlFsm, "Rising Slash Followup").float2 = FsmFloat.op_Implicit(1000f); FsmUtil.AddAction(FsmUtil.GetState(controlFsm, "Dive Antic"), (FsmStateAction)new Wait { time = FsmFloat.op_Implicit(0.3f), finishEvent = FsmEvent.Finished, realTime = false }); FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, "Dive Land"), (Action)delegate { ((MonoBehaviour)Instance).StartCoroutine(Helpers.DiveTurnaround()); }, false); FsmUtil.AddAction(FsmUtil.GetState(controlFsm, "WindSlash Antic"), (FsmStateAction)new Wait { time = FsmFloat.op_Implicit(0.4f), finishEvent = FsmEvent.Finished, realTime = false }); FsmUtil.AddAction(FsmUtil.GetState(controlFsm, "DashStab Antic"), (FsmStateAction)new Wait { time = FsmFloat.op_Implicit(0.5f), finishEvent = FsmEvent.Finished, realTime = false }); FsmUtil.AddAction(FsmUtil.GetState(controlFsm, "DashStab Dash"), (FsmStateAction)new Wait { time = FsmFloat.op_Implicit(0.02f), finishEvent = FsmEvent.Finished, realTime = false }); FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, "CrossSlash 1"), (Action)delegate { HeroController.instance.StartInvulnerable(0.1f); }, false); FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, "Rising Slash"), (Action)delegate { HeroController.instance.StartInvulnerable(0.1f); }, false); FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, "RapidSlash"), (Action)delegate { HeroController.instance.StartInvulnerable(0.1f); }, false); FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, "Stab 1"), (Action)delegate { ((MonoBehaviour)controlFsm).StartCoroutine(Helpers.DelayedTurnAround(0.15f)); }, false); } private static void SetupPhase2() { //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0155: 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_0168: Expected O, but got Unknown //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Expected O, but got Unknown FsmUtil.InsertMethod(FsmUtil.GetState(controlFsm, "Dash to CS?"), (Action)delegate { controlFsm.SendEvent("FINISHED"); }, 0, false); FsmUtil.InsertMethod(FsmUtil.GetState(controlFsm, "DashStab Dash"), (Action)delegate { //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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) float adaptedSpeed3 = Helpers.GetAdaptedSpeed(35f, 260f, 870f); if (!PHASE_3) { FsmUtil.GetFirstActionOfType(controlFsm, "DashStab Dash").speed = FsmFloat.op_Implicit(0f - adaptedSpeed3); } else { Vector2 normalizedDirection3 = Helpers.GetNormalizedDirection(); adaptedSpeed3 *= 1.25f; FsmUtil.GetFirstActionOfType(controlFsm, "DashStab Dash").speed = FsmFloat.op_Implicit(normalizedDirection3.x * (0f - adaptedSpeed3)); FsmUtil.GetFirstActionOfType(controlFsm, "DashStab Dash").ySpeed = FsmFloat.op_Implicit(normalizedDirection3.y * adaptedSpeed3); } }, 0, false); FsmUtil.InsertMethod(FsmUtil.GetState(controlFsm, "Dash Slash Antic"), (Action)delegate { //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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) float adaptedSpeed2 = Helpers.GetAdaptedSpeed(12.5f, 110f, 210f); if (!PHASE_3) { FsmUtil.GetFirstActionOfType(controlFsm, "Dash Slash Antic").speed = FsmFloat.op_Implicit(0f - adaptedSpeed2); } else { Vector2 normalizedDirection2 = Helpers.GetNormalizedDirection(); adaptedSpeed2 *= 1.15f; FsmUtil.GetFirstActionOfType(controlFsm, "Dash Slash Antic").speed = FsmFloat.op_Implicit(normalizedDirection2.x * (0f - adaptedSpeed2)); FsmUtil.GetFirstActionOfType(controlFsm, "Dash Slash Antic").ySpeed = FsmFloat.op_Implicit(normalizedDirection2.y * adaptedSpeed2); } }, 0, false); FsmUtil.InsertMethod(FsmUtil.GetState(controlFsm, "Stab 3"), (Action)delegate { //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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) float adaptedSpeed = Helpers.GetAdaptedSpeed(25f, 250f, 300f); if (!PHASE_3) { FsmUtil.GetFirstActionOfType(controlFsm, "Stab 3").speed = FsmFloat.op_Implicit(0f - adaptedSpeed); } else { Vector2 normalizedDirection = Helpers.GetNormalizedDirection(); adaptedSpeed *= 1.25f; FsmUtil.GetFirstActionOfType(controlFsm, "Stab 3").speed = FsmFloat.op_Implicit(normalizedDirection.x * (0f - adaptedSpeed)); FsmUtil.GetFirstActionOfType(controlFsm, "Stab 3").ySpeed = FsmFloat.op_Implicit(normalizedDirection.y * adaptedSpeed); } }, 0, false); FsmUtil.InsertMethod(FsmUtil.GetState(controlFsm, "Rapid Slash Dash"), (Action)delegate { FsmUtil.GetFirstActionOfType(controlFsm, "Rapid Slash Dash").speed = FsmFloat.op_Implicit(0f - Helpers.GetAdaptedSpeed(4f, 30f, 300f)); }, 0, false); FsmUtil.AddAction(FsmUtil.GetState(controlFsm, "Dash Slash Antic"), (FsmStateAction)new ActivateGameObject { gameObject = FsmUtil.GetFirstActionOfType(controlFsm, "Dash Slash 1").gameObject, activate = FsmBool.op_Implicit(true), recursive = FsmBool.op_Implicit(false), resetOnExit = false, everyFrame = false }); FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, "Dash Slash End"), (Action)delegate { ((MonoBehaviour)Instance).StartCoroutine(Helpers.DelayedTurnAround(0.1f)); }, false); FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, "Dash Slash End"), (Action)delegate { ((MonoBehaviour)Instance).StartCoroutine(Helpers.ScheduleNextState(0.25f, "Stab 3")); }, false); FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, "WindSlash"), (Action)delegate { if (!PHASE_3 && !customComboSequence) { if (!windslashGround) { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.DoubleWindslashStarter()); } else if (!dashToWindslashFollowup) { ((MonoBehaviour)Instance).StartCoroutine(Helpers.ScheduleNextState(0.3f, "DashStab Antic")); ((MonoBehaviour)Instance).StartCoroutine(Helpers.ScheduleNextState(0.47f, "DashStab Dash")); dashToWindslashFollowup = true; } else { dashToWindslashFollowup = false; } } }, false); FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, "Stab End 2"), (Action)delegate { if (!PHASE_3 && !customComboSequence) { if (!dashToWindslashFollowup) { controlFsm.SetState("Windslash G"); ((MonoBehaviour)Instance).StartCoroutine(Helpers.ScheduleNextState(0.3f, "WindSlash")); dashToWindslashFollowup = true; } else { dashToWindslashFollowup = false; } } }, false); FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, "Rising Slash"), (Action)delegate { if (!PHASE_3 && !customComboSequence) { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.RisingSlashStarter()); } }, false); FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, "Dive Land"), (Action)delegate { if (!PHASE_3 && !customComboSequence) { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.DiveStarter()); } }, false); FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, "Dash Slash End 2"), (Action)delegate { if (!PHASE_3 && rapidSlashFollowupAllowed && customComboSequence) { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.RapidSlashFollowup()); } }, false); FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, "Rapid Slash End"), (Action)delegate { if (!PHASE_3 && rapidSlashFollowupAllowed && customComboSequence) { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.RapidSlashFollowup()); } }, false); FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, "CrossSlash Recoil"), (Action)delegate { if (!PHASE_3 && !customComboSequence) { ((MonoBehaviour)Instance).StartCoroutine(CustomBehaviour.CrossSlashStarter()); } }, false); FsmUtil.AddAction(FsmUtil.GetState(controlFsm, "Jump Antic"), (FsmStateAction)new Wait { time = FsmFloat.op_Implicit(0.01f), finishEvent = FsmEvent.Finished, realTime = false }); FsmUtil.GetFirstActionOfType(controlFsm, "Set Wind Slash").floatValue = FsmFloat.op_Implicit(9f); } private static void SetupPhase3() { //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0126: 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) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016a: 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_0181: Expected O, but got Unknown //IL_0191: 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_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Expected O, but got Unknown FsmUtil.GetFirstActionOfType(controlFsm, "Dive L").minValue = FsmFloat.op_Implicit(135f); FsmUtil.GetFirstActionOfType(controlFsm, "Dive L").maxValue = FsmFloat.op_Implicit(270f); FsmUtil.GetFirstActionOfType(controlFsm, "Dive R").minValue = FsmFloat.op_Implicit(270f); FsmUtil.GetFirstActionOfType(controlFsm, "Dive R").maxValue = FsmFloat.op_Implicit(360f); FsmUtil.GetFirstActionOfType(controlFsm, "Dive Antic").time = FsmFloat.op_Implicit(0.6f); string[] array = new string[3] { "DashStab Dash", "Dash Slash Antic", "Stab 3" }; string[] array2 = array; foreach (string text in array2) { FsmUtil.AddMethod(FsmUtil.GetState(controlFsm, text), (Action)Helpers.LookAtHornet, false); } FsmUtil.AddAction(FsmUtil.GetState(controlFsm, "CS Antic"), (FsmStateAction)new FaceObjectV2 { objectA = FsmUtil.GetFirstActionOfType(controlFsm, "CS Jump Antic").objectA, objectB = FsmUtil.GetFirstActionOfType(controlFsm, "CS Jump Antic").objectB, spriteFacesRight = FsmBool.op_Implicit(false), playNewAnimation = false, newAnimationClip = FsmString.op_Implicit(""), resetFrame = false, everyFrame = false, pauseBetweenTurns = 0f }); FsmUtil.AddAction(FsmUtil.GetState(controlFsm, "Dive Antic"), (FsmStateAction)new DecelerateXY { gameObject = FsmUtil.GetFirstActionOfType(controlFsm, "Dive Land").gameObject, decelerationX = FsmFloat.op_Implicit(0.6f), decelerationY = FsmFloat.op_Implicit(0.6f), brakeOnExit = true }); FsmUtil.AddAction(FsmUtil.GetState(controlFsm, "First Idle"), (FsmStateAction)new DecelerateXY { gameObject = FsmUtil.GetFirstActionOfType(controlFsm, "Dive Land").gameObject, decelerationX = FsmFloat.op_Implicit(0.7f), decelerationY = FsmFloat.op_Implicit(0.7f), brakeOnExit = true }); FsmUtil.GetFirstActionOfType(controlFsm, "WindSlash Antic").time = FsmFloat.op_Implicit(0.6f); MirrorYDecel("Stab 1"); MirrorYDecel("Stab 2"); MirrorYDecel("Stab End"); MirrorYDecel("Dash Slash 1"); MirrorYDecel("Dash Slash 2"); MirrorYDecel("Dash Slash End"); MirrorYDecel("Stab 3"); MirrorYDecel("Stab 4"); MirrorYDecel("Stab End 2"); MirrorYDecel("Dive Land"); static void MirrorYDecel(string stateName) { FsmUtil.GetFirstActionOfType(controlFsm, stateName).decelerationY = FsmUtil.GetFirstActionOfType(controlFsm, stateName).decelerationX; } } } [HarmonyPatch] public static class Patches { [HarmonyPrefix] [HarmonyPatch(typeof(GameManager), "BeginSceneTransition")] public static void GameManager_BeginSceneTransition_Prefix(GameManager __instance, ref SceneLoadInfo info) { if (!(info.SceneName != "Hang_17b")) { info.SceneName = "Arborium_11"; info.EntryGateName = "left1"; info.PreventCameraFadeOut = true; GameCameras.instance.cameraFadeFSM.SetState("Scene Fade Out Instant"); } } [HarmonyPatch(typeof(SpawnObjectFromGlobalPool), "OnEnter")] [HarmonyPostfix] private static void SpawnObjectFromGlobalPool_OnEnter_Postfix(SpawnObjectFromGlobalPool __instance) { //IL_0095: Unknown result type (might be due to invalid IL or missing references) if (!PaleAutomatonPlugin.bossScene || !Object.op_Implicit((Object)(object)PaleAutomatonPlugin.controlFsm) || !Object.op_Implicit((Object)(object)__instance.storeObject.Value)) { return; } GameObject value = __instance.storeObject.Value; if ((Object)(object)value == (Object)null) { return; } Transform transform = value.transform; if (((Object)transform).name.StartsWith("Song Knight CrossSlash")) { transform.localScale = new Vector3(2.5f, 2.5f, 1f); Helpers.MakeProjectileRenderAboveWalls(__instance.storeObject.Value); ((Object)transform).name = "CrossSlashSetup"; if (!Object.op_Implicit((Object)(object)CustomBehaviour.crossSlashSetup)) { CustomBehaviour.crossSlashSetup = Object.Instantiate(value); CustomBehaviour.crossSlashSetup.SetActive(false); ((Object)CustomBehaviour.crossSlashSetup).name = "CrossSlashSetup"; PlayMakerFSM component = CustomBehaviour.crossSlashSetup.GetComponent(); FsmUtil.RemoveActionsOfType(FsmUtil.GetState(component, "Recycle")); } } else if (((Object)transform).name.StartsWith("Song Knight Projectile")) { ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(CustomBehaviour.SpawnWindSlash()); Object.Destroy((Object)(object)value); } } [HarmonyPrefix] [HarmonyPatch(typeof(GameManager), "FreezeMoment", new Type[] { typeof(FreezeMomentTypes), typeof(Action) })] private static bool GameManager_FreezeMoment(GameManager __instance, FreezeMomentTypes type, Action onFinish) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: 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_0019: Invalid comparison between Unknown and I4 //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Invalid comparison between Unknown and I4 if (!PaleAutomatonPlugin.bossScene) { return true; } if (1 == 0) { } bool result; if ((int)type != 3) { if ((int)type != 10) { goto IL_0035; } result = false; } else { if (!Settings.DISABLE_PARRY_FREEZE) { goto IL_0035; } result = false; } goto IL_0039; IL_0039: if (1 == 0) { } return result; IL_0035: result = true; goto IL_0039; } [HarmonyPrefix] [HarmonyPatch(typeof(HealthManager), "Hit")] private static void HealthManager_Hit(HealthManager __instance, ref HitInstance hitInstance) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (PaleAutomatonPlugin.bossScene) { if (StateData.IsInParryableState()) { hitInstance.DamageDealt = 0; ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(PaleAutomatonPlugin.damageHero.NailClash(0f, "Nail Attack", PaleAutomatonPlugin.songKnight.transform.position)); GameManager.instance.FreezeMoment((FreezeMomentTypes)3, (Action)null); } else if (PaleAutomatonPlugin.controlFsm.ActiveStateName.Contains("Antic") && !(PaleAutomatonPlugin.controlFsm.ActiveStateName == "Dash Slash Antic") && !PaleAutomatonPlugin.customComboSequence && !PaleAutomatonPlugin.PHASE_3 && !Settings.DISABLE_BOSS_PARRYING_YOU) { ((MonoBehaviour)PaleAutomatonPlugin.Instance).StartCoroutine(CustomBehaviour.AnticParry()); } } } [HarmonyPrefix] [HarmonyPatch(typeof(DamageHero), "NailClash")] private static void DamageHero_NailClash_Prefix(DamageHero __instance) { if (CustomBehaviour.csSpam && ((Object)((Component)((Component)__instance).transform.parent).gameObject).name.StartsWith("CrossSlashSetup")) { HeroController.instance.StartInvulnerable(0.15f); HeroController.instance.invulnerableDuration = 0.15f; } } [HarmonyPostfix] [HarmonyPatch(typeof(DamageHero), "NailClash")] private static void DamageHero_NailClash_Postfix(DamageHero __instance) { if (!PaleAutomatonPlugin.bossScene) { return; } if (HeroController.instance.cState.downAttacking) { HeroController.instance.DownspikeBounce(false, (HeroSlashBounceConfig)null); } if (PaleAutomatonPlugin.PHASE_3 && ((Object)((Component)__instance).gameObject).name == "Rising Slash") { HeroController.instance.StartInvulnerable(0.15f); } HeroController.instance.AddSilkParts(1, false); PaleAutomatonPlugin.healthManager.SpriteFlash.flashArmoured(); int num = PlayerData.instance.nailDamage / 2; if (PaleAutomatonPlugin.PHASE_4) { if (PaleAutomatonPlugin.healthManager.hp - num > 1) { HealthManager healthManager = PaleAutomatonPlugin.healthManager; healthManager.hp -= num; } else { PaleAutomatonPlugin.healthManager.hp = 1; } } else if (PaleAutomatonPlugin.PHASE_3) { if (PaleAutomatonPlugin.healthManager.hp - num > PaleAutomatonPlugin.PHASE_4_THRESHOLD) { HealthManager healthManager2 = PaleAutomatonPlugin.healthManager; healthManager2.hp -= num; } else { PaleAutomatonPlugin.healthManager.hp = PaleAutomatonPlugin.PHASE_4_THRESHOLD; } } else if (PaleAutomatonPlugin.PHASE_2) { if (PaleAutomatonPlugin.healthManager.hp - num > PaleAutomatonPlugin.PHASE_3_THRESHOLD) { HealthManager healthManager3 = PaleAutomatonPlugin.healthManager; healthManager3.hp -= num; } else { PaleAutomatonPlugin.healthManager.hp = PaleAutomatonPlugin.PHASE_3_THRESHOLD; } } else if (PaleAutomatonPlugin.healthManager.hp - num > PaleAutomatonPlugin.PHASE_2_THRESHOLD) { HealthManager healthManager4 = PaleAutomatonPlugin.healthManager; healthManager4.hp -= num; } else { PaleAutomatonPlugin.healthManager.hp = PaleAutomatonPlugin.PHASE_2_THRESHOLD; } } [HarmonyPostfix] [HarmonyPatch(typeof(DamageHero), "OnEnable")] private static void DamageHero_OnEnable(DamageHero __instance) { if (PaleAutomatonPlugin.bossScene && ((Object)__instance).name == "Song Knight") { ((Behaviour)__instance).enabled = false; } } [HarmonyPrefix] [HarmonyPatch(typeof(CameraController), "LockToArea")] public static bool CameraController_LockToArea(CameraController __instance, CameraLockArea lockArea) { //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Invalid comparison between Unknown and I4 //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_016b: 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_0194: 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_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) if (!PaleAutomatonPlugin.bossScene || ((Object)((Component)lockArea).gameObject).name != "CameraLockArea (1)") { return true; } if (!__instance.lockZoneList.Contains(lockArea) || (Object)(object)lockArea == (Object)(object)__instance.currentLockArea) { if ((Object)(object)lockArea != (Object)(object)__instance.currentLockArea) { __instance.lockZoneList.Add(lockArea); } if ((Object)(object)__instance.currentLockArea != (Object)null && __instance.currentLockArea.priority > lockArea.priority) { return false; } if (lockArea.IgnoreInSuperjump && __instance.hero_ctrl.cState.superDashing) { return false; } __instance.currentLockArea = lockArea; if ((int)__instance.mode > 0) { __instance.SetMode((CameraMode)2); } __instance.xLockMin = lockArea.cameraXMin; __instance.xLockMax = lockArea.cameraXMax; __instance.yLockMin = ((lockArea.cameraYMin < 8.3f) ? 8.3f : lockArea.cameraYMin); __instance.yLockMax = lockArea.cameraYMax; if (__instance.startLockedTimer > 0f && ((int)__instance.hero_ctrl.transitionState != 0 || __instance.instantLockedArea.Contains(lockArea))) { Vector3 position = __instance.hero_ctrl.transform.position; position.x += __instance.camTarget.xOffset; Extensions.SetPosition2D(((Component)__instance.camTarget).transform, __instance.KeepWithinLockBounds(Vector2.op_Implicit(position))); __instance.camTarget.destination = ((Component)__instance.camTarget).transform.position; __instance.camTarget.EnterLockZoneInstant(__instance.xLockMin, __instance.xLockMax, __instance.yLockMin, __instance.yLockMax); Extensions.SetPosition2D(((Component)__instance).gameObject.transform, __instance.KeepWithinLockBounds(Vector2.op_Implicit(position))); __instance.destination = ((Component)__instance).gameObject.transform.position; __instance.instantLockedArea.Add(lockArea); lockArea.OnDestroyEvent += __instance.OnLockAreaDestroyed; return false; } } float x = HeroController.instance.transform.position.x; __instance.camTarget.EnterLockZone(x - 500f, x + 500f, __instance.yLockMin, __instance.yLockMax); return false; } } [HarmonyPatch(typeof(Language), "Get")] [HarmonyPatch(new Type[] { typeof(string), typeof(string) })] public static class Language_Get_Patch { private static void Postfix(string key, string sheetTitle, ref string __result) { if (key == "SONG_KNIGHT_SUPER") { __result = "Pale"; } if (key == "SONG_KNIGHT_MAIN") { __result = "Automaton"; } if (key == "SONG_KNIGHT_OUTRO_1") { __result = "B-b-bested once again. C-clearly i have much t-t-to learn.I could hardly keep up myself, machine.Thank you for our d-d-duel."; } if (key == "SONG_KNIGHT_OUTRO_2") { __result = "M-may you save us all from the s-s-silken curse, little spider."; } } } public static class Pools { private static GameObject pooledObjectsParent = new GameObject("Pooled Objects Parent"); private static List windSlashes = new List(); private static List tpEffects = new List(); private static List crossSlashes = new List(); private static List crossSlashAntics = new List(); public static GameObject GetWindSlash() { return GetPooledObject(ref windSlashes, CustomBehaviour.skProjectileSetup); } public static GameObject GetTpEffect() { return GetPooledObject(ref tpEffects, CustomBehaviour.tpEffectSetup); } public static GameObject GetCrossSlash() { return GetPooledObject(ref crossSlashes, CustomBehaviour.crossSlashSetup); } public static GameObject GetCrossSlashAntic() { return GetPooledObject(ref crossSlashAntics, CustomBehaviour.crossSlashAnticSetup); } private static GameObject GetPooledObject(ref List pool, GameObject setup) { GameObject val = null; bool flag = false; using (IEnumerator enumerator = pool.Where((GameObject obj) => !obj.activeSelf).GetEnumerator()) { if (enumerator.MoveNext()) { GameObject current = enumerator.Current; val = current; flag = true; } } return (GameObject)(flag ? ((object)val) : ((object)AddToPool(ref pool, setup))); } private static GameObject AddToPool(ref List pool, GameObject setup) { GameObject val = Object.Instantiate(setup, pooledObjectsParent.transform, true); ((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); windSlashes.Clear(); tpEffects.Clear(); crossSlashes.Clear(); crossSlashAntics.Clear(); } public static void DisableAll() { for (int i = 0; i < pooledObjectsParent.transform.childCount; i++) { ((Component)pooledObjectsParent.transform.GetChild(i)).gameObject.SetActive(false); } } } [RequireComponent(typeof(PlayMakerFSM))] public class ProjectileMover : MonoBehaviour { private Vector3 moveDirection; private int speedSet; private void OnEnable() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: 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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0138: 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_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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_0227: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0114: 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) ((Component)this).GetComponent().Reset(); ((Component)this).transform.position = PaleAutomatonPlugin.songKnight.transform.position; Vector3 val; if (!CustomBehaviour.inPhase4Transition) { speedSet = 100; ((Component)this).transform.localScale = new Vector3(2.7f, 2.7f, 1f); Extensions.SetRotation2D(((Component)this).transform, 0f); Vector3 position = HeroController.instance.transform.position; if (PaleAutomatonPlugin.windslashGround) { moveDirection = ((((Component)this).transform.position.x < position.x) ? Vector3.right : Vector3.left); Transform transform = ((Component)this).transform; val = ((Component)this).transform.localScale; val.x = ((Component)this).transform.localScale.x * (moveDirection.x * -1f); transform.localScale = val; Transform transform2 = ((Component)this).transform; val = ((Component)this).transform.position; val.y = ((Component)this).transform.position.y + 2.75f; transform2.position = val; } else { val = position - ((Component)this).transform.position; moveDirection = ((Vector3)(ref val)).normalized; float magnitude = ((Vector3)(ref moveDirection)).magnitude; moveDirection.y = Mathf.Clamp(moveDirection.y, -0.75f * magnitude, 0.75f * magnitude); float num = magnitude * magnitude - moveDirection.y * moveDirection.y; moveDirection.x = Mathf.Sqrt(Mathf.Max(0f, num)) * Mathf.Sign(moveDirection.x); float num2 = Mathf.Atan2(moveDirection.y, moveDirection.x) * 57.29578f; ((Component)this).transform.rotation = ((moveDirection.x < 0f) ? Quaternion.Euler(0f, 0f, num2 - 180f) : Quaternion.Euler(0f, 0f, num2 + 180f)); } } else { speedSet = 75; Transform transform3 = ((Component)this).transform; val = ((Component)this).transform.position; val.y = ((Component)this).transform.position.y + 6f; transform3.position = val; ((Component)this).transform.localScale = new Vector3(10f, 20f, 1f); Extensions.SetRotation2D(((Component)this).transform, 90f); moveDirection = Vector3.down; } } 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_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) Transform transform = ((Component)this).transform; transform.position += moveDirection * (Time.deltaTime * (float)speedSet); } } public static class Settings { public static bool DISABLE_PARRY_FREEZE = true; public static bool DISABLE_CAMERA_ZOOMOUT; public static bool CUSTOM_POGO_HITBOX = true; public static bool INFINITE_WALKWAY = true; public static bool BELL_BIND_EFFECT_ON_THE_BOSS = true; public static bool DISABLE_BOSS_PARRYING_YOU = false; public static bool DEBUG_MODE; public static int INITIAL_HP = 1000; public static int PHASE_2_THRESHOLD = 990; public static int PHASE_3_THRESHOLD = 890; public static int PHASE_4_THRESHOLD = 500; public static void InitializeSettings(ConfigFile Config) { DISABLE_PARRY_FREEZE = Config.Bind("Accessibility", "Disable Parry Freeze", true, "Disables parry freeze, set this to false to use vanilla parry freeze behaviour.").Value; DISABLE_CAMERA_ZOOMOUT = Config.Bind("Accessibility", "Disable Camera Zoomout", false, "Disables the camera zoomout at the start of the fight and phase 3.").Value; CUSTOM_POGO_HITBOX = Config.Bind("Accessibility", "Custom Pogo Hitbox", true, "I made a custom pogo hitbox for phase 3 and 4 to make aerial parries more consistent (its a circle around the player).").Value; INFINITE_WALKWAY = Config.Bind("Gameplay", "Infinite Walkway", true, "Turns the arena into an infinite walkway, will revert once the boss is defeated or the player dies.").Value; BELL_BIND_EFFECT_ON_THE_BOSS = Config.Bind("Visual Effects", "Bell Bind Effect On The Boss", false, "Enables a scrapped effect for phase 3 and 4 where the boss gains the bell bind visual effect, it looked weird so i scrapepd it.").Value; DISABLE_BOSS_PARRYING_YOU = Config.Bind("Gameplay", "Disable Boss Parrying You", false, "Disables the mechanic where the boss can parry you if you attack during a telegraph.").Value; DEBUG_MODE = Config.Bind("Debug", "Debug Mode", false, "Enables debug mode, allowing you to tinker with the hp to test what you want faster, or practice specific phases.").Value; INITIAL_HP = Config.Bind("Debug", "Initial HP", 1000, "Sets the initial HP if Debug Mode is enabled.").Value; PHASE_2_THRESHOLD = Config.Bind("Debug", "Phase 2 Threshold", 990, "Sets the phase 2 threshold HP if Debug Mode is enabled.").Value; PHASE_3_THRESHOLD = Config.Bind("Debug", "Phase 3 Threshold", 980, "Sets the phase 3 threshold HP if Debug Mode is enabled.").Value; PHASE_4_THRESHOLD = Config.Bind("Debug", "Phase 4 Threshold", 500, "Sets the phase 4 threshold HP if Debug Mode is enabled.").Value; } } public static class StateData { private static readonly HashSet parryableStates = new HashSet { "Dive", "DashStab Dash", "Stab 1", "Stab 2", "Stab 3", "Stab 4", "Stab End", "Stab End 2", "Dash Slash 1", "Dash Slash 2", "Dash Slash End", "Rising Slash", "Rapid Slash Dash", "RapidSlash" }; public static bool IsInParryableState() { return parryableStates.Contains(PaleAutomatonPlugin.controlFsm.ActiveStateName); } } }