using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using GlobalEnums; using GlobalSettings; using Gods_Of_Pharloom; using HarmonyLib; using HutongGames.PlayMaker; using HutongGames.PlayMaker.Actions; using InControl; using Newtonsoft.Json; using TMProOld; using TeamCherry.NestedFadeGroup; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.ResourceManagement.ResourceProviders; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyCompany("GodsOfPharloom")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+073048b694c6e2506a1392502eea824269c6bbc4")] [assembly: AssemblyProduct("GodsOfPharloom")] [assembly: AssemblyTitle("GodsOfPharloom")] [assembly: AssemblyVersion("1.0.0.0")] public class CustomScene { public List TransitionGates = new List(); public Action BeforeSceneLoaded; public Action AfterSceneLoaded; public Action AfterSceneActivated; public Action AfterHeroEnteredScene; public Vector2 tileMapVector = new Vector2(512f, 512f); public bool isSceneActive; public bool isPreloading; public bool isSkongScene = true; public bool isFastSuperJump; public static float customSuperJumpSpeed = 60f; public static float customWaitForSuperJump = 0.01f; public string sceneName { get; private set; } public CustomScene(string sceneName, bool isSkongScene = true, bool isFastSuperJump = false) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) this.sceneName = sceneName; this.isSkongScene = isSkongScene; this.isFastSuperJump = isFastSuperJump; } public void AddTransitionPoint(TransitionPointInfo TransitionPointInfo) { TransitionGates.Add(TransitionPointInfo); SceneTeleportMap.AddTransitionGate(sceneName, TransitionPointInfo.gateName); } public bool Remove(string entryPoint) { TransitionPointInfo item = TransitionGates.Find((TransitionPointInfo transitionPointInfo) => transitionPointInfo.entryPoint == entryPoint); if (TransitionGates.IndexOf(item) == -1) { return false; } TransitionGates.Remove(item); return true; } public IEnumerator PreloadScene() { isPreloading = true; yield return SceneManager.LoadSceneAsync(sceneName, (LoadSceneMode)1); Activate(GodsOfPharloomMod.lastLoadedScene.Value); } private void CreateGate(TransitionPointInfo item, Scene scene) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: 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) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(item.gateName); BoxCollider2D val2 = val.AddComponent(); ((Collider2D)val2).isTrigger = true; val.transform.position = item.position; if (item.gateName.Contains("top") || item.gateName.Contains("bot")) { val2.size = new Vector2(4f, 1f); } else { val2.size = new Vector2(1f, 4f); } if (item.isOneTimeTransition) { ((Behaviour)val2).enabled = false; } CreateTransitionPoint(item, val, sceneName); SceneManager.MoveGameObjectToScene(val, scene); } public TransitionPoint CreateTransitionPoint(TransitionPointInfo item, GameObject go, string sceneName) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_00b3: Expected O, but got Unknown //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Expected O, but got Unknown //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown //IL_019c: 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_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Expected O, but got Unknown //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Expected O, but got Unknown //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Expected O, but got Unknown TransitionPoint val = go.AddComponent(); PlayMakerFSM val2 = (val.customEntryFSM = go.AddComponent()); ((Behaviour)val2).enabled = false; Fsm fsm = val2.Fsm; FsmState val3 = new FsmState(fsm); val3.Name = "Init"; FsmState val4 = new FsmState(fsm); val4.Name = "After Entry"; fsm.StartState = "Init"; PatchedFsm.CustomLogicFsm customLogicFsm = new PatchedFsm.CustomLogicFsm(fsm); customLogicFsm.action = delegate { //IL_002b: Unknown result type (might be due to invalid IL or missing references) if (item.forceMemoryZone) { GameManager.instance.ForceCurrentSceneIsMemory(true); } if (item.noInputOnStart) { HeroController.instance.hero_state = (ActorStates)7; } if (item.doSendEventAfterTransition) { PlayMakerFSM.BroadcastEvent(TransitionPointInfo.eventName); } item.afterTransition?.Invoke(); AfterHeroEnteredScene?.Invoke(); }; val3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("FINISH ENTRY"), ToFsmState = val4 } }; val4.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; fsm.States = (FsmState[])(object)new FsmState[2] { val3, val4 }; ((Behaviour)fsm.FsmComponent).enabled = true; PlayMakerFSM val5 = go.AddComponent(); ((Behaviour)val5).enabled = false; Fsm fsm2 = val5.Fsm; fsm2.StartState = "Idle"; FsmState val6 = new FsmState(fsm2); val6.Name = "Idle"; FsmState val7 = new FsmState(fsm2); val7.Name = "After Death"; PatchedFsm.CustomLogicFsm customLogicFsm2 = new PatchedFsm.CustomLogicFsm(fsm2); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) Color val8 = new Color(0f, 0f, 0f, 0f); Color val9 = default(Color); ((Color)(ref val9))..ctor(0f, 0f, 0f, 0f); ScreenFaderUtils.Fade(val8, val9, 0.01f); GameCameras.instance.HUDIn(); }); val7.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm2 }; val6.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("HERO RESPAWNING HERE"), ToFsmState = val7 } }; fsm2.States = (FsmState[])(object)new FsmState[2] { val6, val7 }; ((Behaviour)val5).enabled = true; if (item.alwaysEnterRight) { val.alwaysEnterRight = true; val.alwaysEnterLeft = false; } else { val.alwaysEnterLeft = true; val.alwaysEnterRight = false; } if (item.doCreateRespawnMarker) { RespawnMarker obj = go.AddComponent(); obj.overrideMapZone = new OverrideMapZone(); obj.customWakeUp = true; ((Component)val).gameObject.tag = "RespawnPoint"; AddRespawnMarkerToTeleportMap(sceneName, item.gateName); } val.respawnMarker = go.AddComponent(); val.targetScene = item.targetScene; val.dontWalkOutOfDoor = item.dontWalkOutOfDoor; val.hardLandOnExit = item.hardLandOnExit; val.entryPoint = item.entryPoint; ((InteractableBase)val).InteractLabel = item.InteractLabel; val.isADoor = item.isADoor; val.OnDoorEnter = new UnityEvent(); ((InteractableBase)val).Activate(); return val; } public static TransitionPoint CreateTransitionPoint(TransitionPointInfo item, string sceneName) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: 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_00b7: Expected O, but got Unknown //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Expected O, but got Unknown //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_02ab: 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_02d1: Expected O, but got Unknown //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Expected O, but got Unknown GameObject val = new GameObject(); TransitionPoint val2 = val.AddComponent(); PlayMakerFSM val3 = (val2.customEntryFSM = val.AddComponent()); ((Behaviour)val3).enabled = false; Fsm fsm = val3.Fsm; FsmState val4 = new FsmState(fsm); val4.Name = "Init"; FsmState val5 = new FsmState(fsm); val5.Name = "After Entry"; fsm.StartState = "Init"; PatchedFsm.CustomLogicFsm customLogicFsm = new PatchedFsm.CustomLogicFsm(fsm); customLogicFsm.action = delegate { //IL_002b: Unknown result type (might be due to invalid IL or missing references) if (item.forceMemoryZone) { GameManager.instance.ForceCurrentSceneIsMemory(true); } if (item.noInputOnStart) { HeroController.instance.hero_state = (ActorStates)7; } if (item.doSendEventAfterTransition) { PlayMakerFSM.BroadcastEvent(TransitionPointInfo.eventName); } item.afterTransition?.Invoke(); }; val4.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("FINISH ENTRY"), ToFsmState = val5 } }; val5.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; fsm.States = (FsmState[])(object)new FsmState[2] { val4, val5 }; ((Behaviour)fsm.FsmComponent).enabled = true; PlayMakerFSM val6 = val.AddComponent(); ((Behaviour)val6).enabled = false; Fsm fsm2 = val6.Fsm; fsm2.StartState = "Idle"; FsmState val7 = new FsmState(fsm2); val7.Name = "Idle"; FsmState val8 = new FsmState(fsm2); val8.Name = "After Death"; PatchedFsm.CustomLogicFsm customLogicFsm2 = new PatchedFsm.CustomLogicFsm(fsm2); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) Color val9 = new Color(0f, 0f, 0f, 0f); Color val10 = default(Color); ((Color)(ref val10))..ctor(0f, 0f, 0f, 0f); ScreenFaderUtils.Fade(val9, val10, 0.01f); GameCameras.instance.HUDIn(); }); val8.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm2 }; val7.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("HERO RESPAWNING HERE"), ToFsmState = val8 } }; fsm2.States = (FsmState[])(object)new FsmState[2] { val7, val8 }; ((Behaviour)val6).enabled = true; if (item.alwaysEnterRight) { val2.alwaysEnterRight = true; val2.alwaysEnterLeft = false; } else { val2.alwaysEnterLeft = true; val2.alwaysEnterRight = false; } if (item.doCreateRespawnMarker) { RespawnMarker obj = val.AddComponent(); obj.overrideMapZone = new OverrideMapZone(); obj.customWakeUp = true; ((Component)val2).gameObject.tag = "RespawnPoint"; AddRespawnMarkerToTeleportMap(sceneName, item.gateName); } val2.respawnMarker = val.AddComponent(); val2.targetScene = item.targetScene; val2.dontWalkOutOfDoor = item.dontWalkOutOfDoor; val2.hardLandOnExit = item.hardLandOnExit; val2.entryPoint = item.entryPoint; ((InteractableBase)val2).InteractLabel = item.InteractLabel; val2.isADoor = item.isADoor; val2.OnDoorEnter = new UnityEvent(); ((InteractableBase)val2).Activate(); return val2; } public static CameraLockArea CreateCameraLock(Scene scene) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("CameraLockArea"); SceneManager.MoveGameObjectToScene(val, scene); BoxCollider2D obj = val.AddComponent(); ((Collider2D)obj).isTrigger = true; obj.size = new Vector2(10f, 10f); return val.AddComponent(); } public static void AddRespawnMarkerToTeleportMap(string sceneName, string respawnMarkerName) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown Dictionary teleportMap = SceneTeleportMap.GetTeleportMap(); if (!teleportMap.TryGetValue(sceneName, out var _)) { teleportMap.Add(sceneName, new SceneInfo()); } teleportMap.TryGetValue(sceneName, out var value2); value2.RespawnPoints.Add(respawnMarkerName); } public static void InitModRespawnMarkers() { AddRespawnMarkerToTeleportMap("GG_Pharloom_Atrium", "Death Respawn Marker"); AddRespawnMarkerToTeleportMap("GG_Pharloom_Atrium", "RestBench(Clone)"); AddRespawnMarkerToTeleportMap("GG_Pharloom_Hall_Of_Gods", "RestBench(Clone)"); AddRespawnMarkerToTeleportMap("Abyss_05", "Death Respawn Marker_Mod"); } public void Activate(Scene scene) { //IL_0054: 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_0085: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown GameObject[] rootGameObjects = ((Scene)(ref scene)).GetRootGameObjects(); foreach (GameObject val in rootGameObjects) { if (((Object)val).name.StartsWith("CameraLock")) { val.AddComponent(); val.GetComponent(); } } foreach (TransitionPointInfo transitionGate in TransitionGates) { CreateGate(transitionGate, scene); } if (!isSkongScene) { GameObject val2 = new GameObject("TileMap") { tag = "TileMap" }; tk2dTileMap obj = val2.AddComponent(); obj.width = (int)tileMapVector.x; obj.height = (int)tileMapVector.y; SceneManager.MoveGameObjectToScene(val2, scene); } isSceneActive = true; } } public class EnemyHp { public class PhaseHp { public Dictionary hpDict = new Dictionary(); public int hp => hpDict[BossSequence.currentDifficultMode]; public PhaseHp(int attuned, int ascended, int radiant) { hpDict["Attuned"] = attuned; hpDict["Ascended"] = ascended; hpDict["Radiant"] = radiant; } } public static Dictionary enemies = new Dictionary { { "Moss Mother", new EnemyHp(new PhaseHp[4] { new PhaseHp(100, 100, 100), new PhaseHp(100, 100, 100), new PhaseHp(150, 150, 150), new PhaseHp(100, 100, 100) }) }, { "Moss Mother Double 1", new EnemyHp(new PhaseHp[4] { new PhaseHp(100, 100, 100), new PhaseHp(150, 150, 150), new PhaseHp(200, 200, 200), new PhaseHp(100, 100, 100) }) }, { "Moss Mother Double 2", new EnemyHp(new PhaseHp[4] { new PhaseHp(100, 100, 100), new PhaseHp(150, 150, 150), new PhaseHp(200, 200, 200), new PhaseHp(100, 100, 100) }) }, { "Bell Beast", new EnemyHp(new PhaseHp[3] { new PhaseHp(200, 200, 200), new PhaseHp(250, 250, 250), new PhaseHp(150, 150, 150) }) }, { "Fourth Chorus", new EnemyHp(new PhaseHp[4] { new PhaseHp(250, 250, 250), new PhaseHp(250, 250, 250), new PhaseHp(250, 250, 250), new PhaseHp(250, 250, 250) }) }, { "Great Conchflies", new EnemyHp(new PhaseHp[2] { new PhaseHp(500, 500, 500), new PhaseHp(300, 300, 300) }) }, { "Lace in Deep Docks", new EnemyHp(new PhaseHp[2] { new PhaseHp(600, 600, 600), new PhaseHp(300, 300, 300) }) }, { "The Last Judge", new EnemyHp(new PhaseHp[3] { new PhaseHp(500, 500, 500), new PhaseHp(500, 500, 500), new PhaseHp(400, 400, 400) }) }, { "Phantom", new EnemyHp(new PhaseHp[3] { new PhaseHp(300, 300, 300), new PhaseHp(400, 400, 400), new PhaseHp(300, 300, 300) }) }, { "Moorwing", new EnemyHp(new PhaseHp[2] { new PhaseHp(500, 500, 500), new PhaseHp(300, 300, 300) }) }, { "Savage Beastfly in Chapel of The Beast", new EnemyHp(new PhaseHp[3] { new PhaseHp(500, 500, 500), new PhaseHp(350, 350, 350), new PhaseHp(250, 250, 250) }) }, { "Beastfly", new EnemyHp(new PhaseHp[1] { new PhaseHp(18, 18, 18) }) }, { "Kilik", new EnemyHp(new PhaseHp[1] { new PhaseHp(26, 26, 26) }) }, { "Vicious Caranid", new EnemyHp(new PhaseHp[1] { new PhaseHp(50, 50, 50) }) }, { "Sister Splinter", new EnemyHp(new PhaseHp[3] { new PhaseHp(200, 200, 200), new PhaseHp(400, 400, 400), new PhaseHp(200, 200, 200) }) }, { "Splinterbark", new EnemyHp(new PhaseHp[1] { new PhaseHp(18, 18, 18) }) }, { "Skull Tyrant", new EnemyHp(new PhaseHp[1] { new PhaseHp(800, 800, 800) }) }, { "Widow", new EnemyHp(new PhaseHp[3] { new PhaseHp(300, 300, 300), new PhaseHp(400, 400, 400), new PhaseHp(550, 550, 550) }) }, { "Cogwork Dancers", new EnemyHp(new PhaseHp[4] { new PhaseHp(450, 450, 450), new PhaseHp(450, 450, 450), new PhaseHp(450, 450, 450), new PhaseHp(150, 150, 150) }) }, { "Disgraced Chef Lugoli", new EnemyHp(new PhaseHp[2] { new PhaseHp(400, 400, 400), new PhaseHp(350, 350, 350) }) }, { "Father of the Flame", new EnemyHp(new PhaseHp[6] { new PhaseHp(100, 100, 100), new PhaseHp(100, 100, 100), new PhaseHp(100, 100, 100), new PhaseHp(100, 100, 100), new PhaseHp(200, 200, 200), new PhaseHp(250, 250, 250) }) }, { "First Sinner", new EnemyHp(new PhaseHp[3] { new PhaseHp(300, 300, 300), new PhaseHp(500, 500, 500), new PhaseHp(500, 500, 500) }) }, { "Forebrothers_Sigins", new EnemyHp(new PhaseHp[4] { new PhaseHp(100, 100, 100), new PhaseHp(300, 300, 300), new PhaseHp(300, 300, 300), new PhaseHp(300, 300, 300) }) }, { "Forebrothers_Gron", new EnemyHp(new PhaseHp[1] { new PhaseHp(650, 650, 650) }) }, { "Flintstone Flyer", new EnemyHp(new PhaseHp[1] { new PhaseHp(36, 36, 36) }) }, { "Smokerock Sifter", new EnemyHp(new PhaseHp[1] { new PhaseHp(47, 47, 47) }) }, { "Garmond & Zaza", new EnemyHp(new PhaseHp[1] { new PhaseHp(500, 500, 500) }) }, { "Voltvyrm", new EnemyHp(new PhaseHp[3] { new PhaseHp(300, 300, 300), new PhaseHp(200, 200, 200), new PhaseHp(200, 200, 200) }) }, { "Groal the Great", new EnemyHp(new PhaseHp[2] { new PhaseHp(450, 450, 450), new PhaseHp(350, 350, 350) }) }, { "Lace in the Cradle", new EnemyHp(new PhaseHp[3] { new PhaseHp(500, 500, 500), new PhaseHp(400, 400, 400), new PhaseHp(200, 200, 200) }) }, { "Raging Conchfly", new EnemyHp(new PhaseHp[2] { new PhaseHp(700, 700, 700), new PhaseHp(400, 400, 400) }) }, { "Savage Beastfly in Far Fields", new EnemyHp(new PhaseHp[3] { new PhaseHp(500, 500, 500), new PhaseHp(500, 500, 500), new PhaseHp(300, 300, 300) }) }, { "Tarmite", new EnemyHp(new PhaseHp[1] { new PhaseHp(34, 34, 34) }) }, { "Second Sentiel", new EnemyHp(new PhaseHp[2] { new PhaseHp(700, 700, 700), new PhaseHp(600, 600, 600) }) }, { "Shakra", new EnemyHp(new PhaseHp[1] { new PhaseHp(700, 700, 700) }) }, { "The Unravelled", new EnemyHp(new PhaseHp[3] { new PhaseHp(400, 400, 400), new PhaseHp(400, 400, 400), new PhaseHp(200, 200, 200) }) }, { "Trobbio", new EnemyHp(new PhaseHp[2] { new PhaseHp(700, 700, 700), new PhaseHp(500, 500, 500) }) }, { "Palestag", new EnemyHp(new PhaseHp[2] { new PhaseHp(250, 250, 250), new PhaseHp(250, 250, 250) }) }, { "Bell Eater", new EnemyHp(new PhaseHp[4] { new PhaseHp(400, 400, 400), new PhaseHp(400, 400, 400), new PhaseHp(300, 300, 300), new PhaseHp(200, 200, 200) }) }, { "Crawfather", new EnemyHp(new PhaseHp[2] { new PhaseHp(900, 900, 900), new PhaseHp(700, 700, 700) }) }, { "Pin Wielder Craw", new EnemyHp(new PhaseHp[1] { new PhaseHp(66, 66, 66) }) }, { "Dagger Craw", new EnemyHp(new PhaseHp[1] { new PhaseHp(66, 66, 66) }) }, { "Tinie Craw", new EnemyHp(new PhaseHp[1] { new PhaseHp(55, 55, 55) }) }, { "Crust King Khann", new EnemyHp(new PhaseHp[3] { new PhaseHp(600, 600, 600), new PhaseHp(600, 600, 600), new PhaseHp(450, 450, 450) }) }, { "Gurr the Outcast", new EnemyHp(new PhaseHp[3] { new PhaseHp(400, 400, 400), new PhaseHp(350, 350, 350), new PhaseHp(250, 250, 250) }) }, { "Lost Garmond", new EnemyHp(new PhaseHp[1] { new PhaseHp(900, 900, 900) }) }, { "Nyleth", new EnemyHp(new PhaseHp[2] { new PhaseHp(625, 625, 625), new PhaseHp(625, 625, 625) }) }, { "Watcher at the Edge", new EnemyHp(new PhaseHp[2] { new PhaseHp(450, 450, 450), new PhaseHp(450, 450, 450) }) }, { "Pinstress", new EnemyHp(new PhaseHp[2] { new PhaseHp(500, 500, 500), new PhaseHp(500, 500, 500) }) }, { "Plasmified Zango", new EnemyHp(new PhaseHp[5] { new PhaseHp(200, 200, 200), new PhaseHp(200, 200, 200), new PhaseHp(200, 200, 200), new PhaseHp(200, 200, 200), new PhaseHp(200, 200, 200) }) }, { "Shrine Guardian Seth", new EnemyHp(new PhaseHp[3] { new PhaseHp(200, 200, 200), new PhaseHp(550, 550, 550), new PhaseHp(500, 500, 500) }) }, { "Skarrsinger Karmelita", new EnemyHp(new PhaseHp[3] { new PhaseHp(600, 600, 600), new PhaseHp(600, 600, 600), new PhaseHp(400, 400, 400) }) }, { "Clover Dancers", new EnemyHp(new PhaseHp[2] { new PhaseHp(600, 600, 600), new PhaseHp(600, 600, 600) }) }, { "Tormented Trobbio", new EnemyHp(new PhaseHp[3] { new PhaseHp(150, 150, 150), new PhaseHp(800, 800, 800), new PhaseHp(550, 550, 550) }) }, { "Grand Mother Silk", new EnemyHp(new PhaseHp[6] { new PhaseHp(150, 150, 150), new PhaseHp(250, 250, 250), new PhaseHp(300, 300, 300), new PhaseHp(200, 200, 200), new PhaseHp(300, 300, 300), new PhaseHp(400, 400, 400) }) }, { "Lost Lace", new EnemyHp(new PhaseHp[4] { new PhaseHp(400, 400, 400), new PhaseHp(500, 500, 500), new PhaseHp(700, 700, 700), new PhaseHp(600, 600, 600) }) } }; public Dictionary hpFullDict = new Dictionary { { "Attuned", 0 }, { "Ascended", 0 }, { "Radiant", 0 } }; public PhaseHp[] phases; public EnemyHp(PhaseHp[] phases) { this.phases = phases; foreach (PhaseHp phaseHp in phases) { hpFullDict["Attuned"] += phaseHp.hpDict["Attuned"]; hpFullDict["Ascended"] += phaseHp.hpDict["Ascended"]; hpFullDict["Radiant"] += phaseHp.hpDict["Radiant"]; } } } public class TransitionPointInfo { public string gateName; public Vector3 position; public string targetScene; public string entryPoint; public PromptLabels InteractLabel; public bool isADoor; public bool isOneTimeTransition; public bool dontWalkOutOfDoor; public bool hardLandOnExit; public bool noInputOnStart; public bool alwaysEnterRight; public bool forceMemoryZone; public Action afterTransition; public bool doSendEventAfterTransition; public bool doCreateRespawnMarker; public static string eventName = "HORNET TRANSITION DONE MOD"; public TransitionPointInfo(string gateName, Vector3 position, string targetScene, string entryPoint, PromptLabels InteractLabel = (PromptLabels)3, bool isADoor = false, bool isOneTimeTransition = false, bool dontWalkOutOfDoor = false, bool hardLandOnExit = false, bool noInputOnStart = false, bool alwaysEnterRight = true, bool forceMemoryZone = true, Action afterTransition = null, bool doSendEventAfterTransition = true, bool doCreateRespawnMarker = true, bool doCreateHazardRespawnMarker = true) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: 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) this.gateName = gateName; this.position = position; this.targetScene = targetScene; this.entryPoint = entryPoint; this.InteractLabel = InteractLabel; this.isADoor = isADoor; this.isOneTimeTransition = isOneTimeTransition; this.dontWalkOutOfDoor = dontWalkOutOfDoor; this.hardLandOnExit = hardLandOnExit; this.noInputOnStart = noInputOnStart; this.alwaysEnterRight = alwaysEnterRight; this.forceMemoryZone = forceMemoryZone; this.afterTransition = afterTransition; this.doSendEventAfterTransition = doSendEventAfterTransition; this.doCreateRespawnMarker = doCreateRespawnMarker; } } namespace Gods_Of_Pharloom; public class ActiveCameraLockOnEnter : MonoBehaviour { private void OnTriggerEnter2D(Collider2D collider) { BoxCollider2D component = ((Component)HeroController.instance).gameObject.GetComponent(); if ((Object)(object)collider == (Object)(object)component) { _ = GameCameras.instance.cameraController; ((Behaviour)((Component)this).GetComponent()).enabled = true; } } private void OnTriggerStay2D(Collider2D collider) { BoxCollider2D component = ((Component)HeroController.instance).gameObject.GetComponent(); if ((Object)(object)collider == (Object)(object)component) { _ = GameCameras.instance.cameraController; ((Behaviour)((Component)this).GetComponent()).enabled = true; } } private void OnTriggerExit2D(Collider2D collider) { BoxCollider2D component = ((Component)HeroController.instance).gameObject.GetComponent(); if ((Object)(object)collider == (Object)(object)component) { _ = GameCameras.instance.cameraController; ((Behaviour)((Component)this).GetComponent()).enabled = false; } } } [BepInPlugin("bepinex.plugin.test", "GodsOfPharloom", "0.0.1.3")] public class GodsOfPharloomMod : BaseUnityPlugin { public static Action afterSceneLoadedGetScenes; public static Action afterSceneLoaded; public static Action afterSceneActivated; public static string previousSceneName; public static Scene? lastLoadedScene = null; public static MethodInfo RecordBeginTime = AccessTools.Method(typeof(SceneLoad), "RecordBeginTime", (Type[])null, (Type[])null); public static MethodInfo RecordEndTime = AccessTools.Method(typeof(SceneLoad), "RecordEndTime", (Type[])null, (Type[])null); public static MethodInfo LocalTryClearMemory = AccessTools.Method(typeof(SceneLoad), "LocalTryClearMemory", (Type[])null, (Type[])null); public static GodsOfPharloomMod instance; public static string currentSceneName; public static Scene currentScene; private string pathToModData = Paths.ConfigPath + "/GodsOfPharloomData.dat"; public static object obj; private static string[] assetBundleNames = new string[4] { "gg_pharloom_atrium", "gg_pharloom_hall_of_gods", "gg_rest_scene", "gg_resources" }; public static List assetBundles = new List(); public static List customScenes = new List(); public static ManualLogSource Log; public static MethodInfo HeroController_SetState = AccessTools.Method(typeof(HeroController), "SetState", (Type[])null, (Type[])null); [HarmonyPrefix] [HarmonyPatch(typeof(SceneLoad), "Begin")] private static bool Prefix(SceneLoad __instance) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) currentSceneName = __instance.TargetSceneName; ((MonoBehaviour)((object)__instance).GetType().GetField("runner", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue(__instance)).StartCoroutine(BeginRoutine_Patched(__instance)); return false; } private static IEnumerator BeginRoutine_Patched(SceneLoad __instance) { Log.LogInfo((object)"PAAAAAAAAATTTTTCCCCHHHEEEDDD"); FieldInfo operationHandle = ((object)__instance).GetType().GetField("operationHandle", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo _tempOps = typeof(SceneLoad).GetField("_tempOps", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo runner = ((object)__instance).GetType().GetField("runner", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); Log.LogInfo((object)"PAAAAAAAAATTTTTCCCCHHHEEEDDD2"); Func InvokeMethod = (MethodInfo method, object[] obj) => method.Invoke(__instance, obj); string address = "Scenes/" + __instance.SceneLoadInfo.SceneName; CustomScene scene = customScenes.Find((CustomScene item) => item.sceneName == __instance.TargetSceneName); int sceneTypeTo = ((scene != null) ? (scene.isSkongScene ? 1 : 2) : 0); scene?.BeforeSceneLoaded?.Invoke(); bool wasPreloaded = false; AsyncOperationHandle? preLoadOperation = null; SceneAdditiveLoadConditional.LoadInSequence = true; AsyncOperation op = null; lastLoadedScene = null; if (sceneTypeTo == 0 || sceneTypeTo == 1) { preLoadOperation = ScenePreloader.TakeSceneLoadOperation(address, (LoadSceneMode)1); wasPreloaded = preLoadOperation.HasValue; } else { op = SceneManager.LoadSceneAsync(scene.sceneName, (LoadSceneMode)1); op.allowSceneActivation = false; } InvokeMethod(RecordBeginTime, new object[1] { (object)(Phases)0 }); while (!__instance.IsFetchAllowed) { yield return null; } Log.LogInfo((object)"PAAAAAAAAATTTTTCCCCHHHEEEDDD3"); InvokeMethod(RecordEndTime, new object[1] { (object)(Phases)0 }); bool hasClearedMemory = false; if (SceneLoad.IsClearMemoryRequired()) { GameManager.IsCollectingGarbage = true; InvokeMethod(RecordBeginTime, new object[1] { (object)(Phases)1 }); yield return InvokeMethod(LocalTryClearMemory, new object[2] { true, false }); hasClearedMemory = true; InvokeMethod(RecordEndTime, new object[1] { (object)(Phases)1 }); } InvokeMethod(RecordBeginTime, new object[1] { (object)(Phases)2 }); int num = __instance.SceneLoadInfo.AsyncPriority; Scene activeScene = SceneManager.GetActiveScene(); previousSceneName = ((Scene)(ref activeScene)).name; if (sceneTypeTo == 0 || sceneTypeTo == 1) { if (CheatManager.OverrideSceneLoadPriority) { num = CheatManager.SceneLoadPriority; } if (wasPreloaded) { operationHandle.SetValue(__instance, preLoadOperation.Value); } else if (__instance.SceneLoadInfo.SceneResourceLocation != null) { operationHandle.SetValue(__instance, Addressables.LoadSceneAsync(__instance.SceneLoadInfo.SceneResourceLocation, (LoadSceneMode)1, false, num)); } else { operationHandle.SetValue(__instance, Addressables.LoadSceneAsync((object)address, (LoadSceneMode)1, false, num, (SceneReleaseMode)0)); } yield return (AsyncOperationHandle)operationHandle.GetValue(__instance); } if (__instance.TargetSceneName != "Opening_Sequence") { while (!Preload.isInitialized) { yield return null; } } SceneInstance result; if (sceneTypeTo == 1 || sceneTypeTo == 2) { if (sceneTypeTo == 2) { op.allowSceneActivation = true; yield return op; currentScene = SceneManager.GetSceneAt(SceneManager.sceneCount - 1); } else { result = ((AsyncOperationHandle)operationHandle.GetValue(__instance)).Result; currentScene = ((SceneInstance)(ref result)).Scene; } scene.Activate(currentScene); scene.AfterSceneLoaded?.Invoke(currentScene); while (!scene.isSceneActive) { yield return null; } scene.isSceneActive = false; scene.isPreloading = false; Log.LogInfo((object)"Activated2"); } afterSceneLoaded?.Invoke(); Log.LogInfo((object)"Activated3"); InvokeMethod(RecordEndTime, new object[1] { (object)(Phases)2 }); Log.LogInfo((object)"PAAAAAAAAATTTTTCCCCHHHEEEDD4"); FetchCompleteDelegate val = (FetchCompleteDelegate)AccessTools.Field(typeof(SceneLoad), "FetchComplete").GetValue(__instance); if (val != null) { try { val.Invoke(); } catch (Exception ex) { Debug.LogError((object)"Exception in responders to SceneLoad.FetchComplete. Attempting to continue load regardless."); CheatManager.LastErrorText = ex.ToString(); Debug.LogException(ex); } } Log.LogInfo((object)"PAAAAAAAAATTTTTCCCCHHHEEEDDD4.1"); InvokeMethod(RecordBeginTime, new object[1] { (object)(Phases)3 }); if (!wasPreloaded && ScenePreloader.HasPendingOperations) { yield return ((MonoBehaviour)runner.GetValue(__instance)).StartCoroutine(ScenePreloader.ForceEndPendingOperations()); } while (!__instance.IsActivationAllowed) { yield return null; } Log.LogInfo((object)"PAAAAAAAAATTTTTCCCCHHHEEEDDD4.1.1"); SceneAdditiveLoadConditional.Unload(SceneManager.GetActiveScene(), (List>)_tempOps.GetValue(null)); Log.LogInfo((object)"PAAAAAAAAATTTTTCCCCHHHEEEDDD4.1.2"); InvokeMethod(RecordEndTime, new object[1] { (object)(Phases)3 }); InvokeMethod(RecordBeginTime, new object[1] { (object)(Phases)4 }); Log.LogInfo((object)"PAAAAAAAAATTTTTCCCCHHHEEEDDD4.2"); WillActivateDelegate val2 = (WillActivateDelegate)AccessTools.Field(typeof(SceneLoad), "WillActivate").GetValue(__instance); if (val2 != null) { try { val2.Invoke(); } catch (Exception ex2) { Debug.LogError((object)"Exception in responders to SceneLoad.WillActivate. Attempting to continue load regardless."); CheatManager.LastErrorText = ex2.ToString(); Debug.LogException(ex2); } } Log.LogInfo((object)"PAAAAAAAAATTTTTCCCCHHHEEEDDD5"); if (sceneTypeTo == 0 || sceneTypeTo == 1) { if (((AsyncOperationHandle)operationHandle.GetValue(__instance)).OperationException != null) { Debug.LogError((object)"Exception in scene load OperationHandle:"); CheatManager.LastErrorText = ((AsyncOperationHandle)operationHandle.GetValue(__instance)).OperationException.ToString(); Debug.LogException(((AsyncOperationHandle)operationHandle.GetValue(__instance)).OperationException); } result = ((AsyncOperationHandle)operationHandle.GetValue(__instance)).Result; yield return ((SceneInstance)(ref result)).ActivateAsync(); } if (sceneTypeTo == 1 || sceneTypeTo == 2) { scene.AfterSceneActivated?.Invoke(currentScene); } afterSceneActivated?.Invoke(); InvokeMethod(RecordEndTime, new object[1] { (object)(Phases)4 }); ActivationCompleteDelegate val3 = (ActivationCompleteDelegate)AccessTools.Field(typeof(SceneLoad), "ActivationComplete").GetValue(__instance); if (val3 != null) { try { val3.Invoke(); } catch (Exception ex3) { Debug.LogError((object)"Exception in responders to SceneLoad.ActivationComplete. Attempting to continue load regardless."); CheatManager.LastErrorText = ex3.ToString(); Debug.LogException(ex3); } } Log.LogInfo((object)"PAAAAAAAAATTTTTCCCCHHHEEEDDD6"); foreach (AsyncOperationHandle item in (List>)_tempOps.GetValue(null)) { yield return item; } ((List>)_tempOps.GetValue(null)).Clear(); List _assetUnloadOps = (List)((object)__instance).GetType().GetField("_assetUnloadOps", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic).GetValue(__instance); Log.LogInfo((object)"PAAAAAAAAATTTTTCCCCHHHEEEDDD7"); while (_assetUnloadOps.Count > 0) { int index = _assetUnloadOps.Count - 1; AsyncOperation assetUnloadOp = _assetUnloadOps[index]; _assetUnloadOps.RemoveAt(index); if (assetUnloadOp != null && !assetUnloadOp.isDone) { float t = 5f; while (!assetUnloadOp.isDone && t > 0f) { t -= Time.deltaTime; yield return null; } if (!assetUnloadOp.isDone) { Debug.LogError((object)"Timed out while waiting for asset unload."); } } } Log.LogInfo((object)"PAAAAAAAAATTTTTCCCCHHHEEEDDD7.1"); if (__instance.IsUnloadAssetsRequired || SceneLoad.IsClearMemoryRequired()) { GameManager.IsCollectingGarbage = true; InvokeMethod(RecordBeginTime, new object[1] { (object)(Phases)5 }); yield return SceneLoad.TryClearMemory(!hasClearedMemory, true); InvokeMethod(RecordEndTime, new object[1] { (object)(Phases)5 }); } else if (__instance.IsGarbageCollectRequired) { GameManager.IsCollectingGarbage = true; InvokeMethod(RecordBeginTime, new object[1] { (object)(Phases)6 }); GCManager.Collect(); InvokeMethod(RecordEndTime, new object[1] { (object)(Phases)6 }); } GameManager.IsCollectingGarbage = false; CompleteDelegate val4 = (CompleteDelegate)AccessTools.Field(typeof(SceneLoad), "Complete").GetValue(__instance); if (val4 != null) { try { val4.Invoke(); } catch (Exception ex4) { Debug.LogError((object)"Exception in responders to SceneLoad.Complete. Attempting to continue load regardless."); CheatManager.LastErrorText = ex4.ToString(); Debug.LogException(ex4); } } Log.LogInfo((object)"PAAAAAAAAATTTTTCCCCHHHEEEDDD8"); InvokeMethod(RecordBeginTime, new object[1] { (object)(Phases)7 }); yield return null; InvokeMethod(RecordEndTime, new object[1] { (object)(Phases)7 }); StartCalledDelegate val5 = (StartCalledDelegate)AccessTools.Field(typeof(SceneLoad), "StartCalled").GetValue(__instance); if (val5 != null) { try { val5.Invoke(); } catch (Exception ex5) { Debug.LogError((object)"Exception in responders to SceneLoad.StartCalled. Attempting to continue load regardless."); CheatManager.LastErrorText = ex5.ToString(); Debug.LogException(ex5); } } if (SceneAdditiveLoadConditional.ShouldLoadBoss) { InvokeMethod(RecordBeginTime, new object[1] { (object)(Phases)8 }); yield return ((MonoBehaviour)runner.GetValue(__instance)).StartCoroutine(SceneAdditiveLoadConditional.LoadAll()); InvokeMethod(RecordEndTime, new object[1] { (object)(Phases)8 }); try { BossLoadCompleteDelegate val6 = (BossLoadCompleteDelegate)AccessTools.Field(typeof(SceneLoad), "BossLoaded").GetValue(__instance); if (val6 != null) { val6.Invoke(); } if (Object.op_Implicit((Object)(object)GameManager.instance)) { GameManager.instance.LoadedBoss(); } } catch (Exception ex6) { Debug.LogError((object)"Exception in responders to SceneLoad.BossLoaded. Attempting to continue load regardless."); CheatManager.LastErrorText = ex6.ToString(); Debug.LogException(ex6); } } Log.LogInfo((object)"PAAAAAAAAATTTTTCCCCHHHEEEDDD9"); try { ScenePreloader.Cleanup(); } catch (Exception ex7) { Debug.LogError((object)"Exception in responders to ScenePreloader.Cleanup. Attempting to continue load regardless."); CheatManager.LastErrorText = ex7.ToString(); Debug.LogException(ex7); } ((object)__instance).GetType().GetProperty("IsFinished", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).SetValue(__instance, true); FinishDelegate val7 = (FinishDelegate)AccessTools.Field(typeof(SceneLoad), "Finish").GetValue(__instance); Log.LogInfo((object)"PAAAAAAAAATTTTTCCCCHHHEEEDDD10"); if (val7 != null) { try { val7.Invoke(); } catch (Exception ex8) { Debug.LogError((object)"Exception in responders to SceneLoad.Finish. Attempting to continue load regardless."); CheatManager.LastErrorText = ex8.ToString(); Debug.LogException(ex8); } } } [HarmonyPostfix] [HarmonyPatch(typeof(PlayMakerFSM), "Awake")] private static void PlayMakerPatch_Postfix(PlayMakerFSM __instance) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0071: 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) GameObject gameObject = ((Component)__instance).gameObject; int hashCode = ((Object)gameObject.gameObject).name.GetHashCode(); int hashCode2 = __instance.FsmName.GetHashCode(); Scene scene = gameObject.scene; int hashCode3 = ((Scene)(ref scene)).name.GetHashCode(); ManualLogSource log = Log; string[] obj = new string[5] { ((Object)((Component)__instance).gameObject).name, " ", __instance.FsmName, " ", null }; scene = ((Component)__instance).gameObject.scene; obj[4] = ((Scene)(ref scene)).name; log.LogInfo((object)string.Concat(obj)); int i; for (i = 0; i < PatchedFsm.patchedFsms.Length && hashCode3 != PatchedFsm.patchedFsms[i].sceneNameHash; i++) { if (i == PatchedFsm.patchedFsms.Length - 1) { return; } } PatchedFsm.FsmPatch[] fsms = PatchedFsm.patchedFsms[i].fsms; foreach (PatchedFsm.FsmPatch fsmPatch in fsms) { if (hashCode == fsmPatch.objNameHash && hashCode2 == fsmPatch.fsmNameHash) { Log.LogInfo((object)(__instance.FsmName + "YAAAAAAAAAAAAAAAAAY")); fsmPatch.method(__instance.Fsm); break; } } } [HarmonyPrefix] [HarmonyPatch(typeof(SceneParticlesController), "OnPositionedAtHero")] private static bool Prefix(SceneParticlesController __instance) { if (customScenes.Find(delegate(CustomScene item) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) string sceneName = item.sceneName; Scene activeScene = SceneManager.GetActiveScene(); return sceneName == ((Scene)(ref activeScene)).name; }) == null) { return true; } Log.LogInfo((object)"cleared OnPositionedAtHero"); return false; } [HarmonyPrefix] [HarmonyPatch(typeof(GameManager), "PlayerDead")] public static bool PlayerDead_Prefix(ref float waitTime) { if (!BossSequence.isInSequence) { return true; } waitTime = 0f; return true; } [HarmonyPrefix] [HarmonyPatch(typeof(ScenePreloader), "SpawnPreloader")] public static bool ScenePreloader_Prefix(string sceneName, LoadSceneMode mode) { if (BossSequence.isInSequence) { return false; } return true; } [HarmonyPostfix] [HarmonyPatch(typeof(HeroController), "Awake")] public static void HeroControllerAwake_Postfix() { if (!Preload.isInitialized) { Preload.Init(); } } [HarmonyPrefix] [HarmonyPatch(typeof(HeroController), "ResetAllCrestState", new Type[] { })] public static bool HeroControllerResetAllCrestState_Prefix() { Log.LogInfo((object)"ResetAllCrestState"); if (BossSequence.isInSequence && !PlayerData.instance.atBench) { return false; } Log.LogInfo((object)"DoResetAllCrestState"); return true; } [HarmonyPrefix] [HarmonyPatch(typeof(HeroController), "ClearEffects")] public static bool HeroControllerClearEffects_Prefix() { Log.LogInfo((object)"ClearEffects"); if (BossSequence.isInSequence && !PlayerData.instance.atBench) { return false; } Log.LogInfo((object)"DoClearEffects"); return true; } [HarmonyPrefix] [HarmonyPatch(typeof(HeroController), "ClearEffectsInstant")] public static bool HeroControllerClearEffectsInstant_Prefix() { Log.LogInfo((object)"ClearEffectsInstant"); if (BossSequence.isInSequence && !PlayerData.instance.atBench) { return false; } Log.LogInfo((object)"DoClearEffectsInstant"); return true; } [HarmonyPrefix] [HarmonyPatch(typeof(HeroController), "ClearEffectsLite")] public static bool HeroControllerClearEffectsLite_Prefix() { Log.LogInfo((object)"ClearEffectsLite"); if (BossSequence.isInSequence && !PlayerData.instance.atBench) { return false; } Log.LogInfo((object)"DoClearEffectsLite"); return true; } [HarmonyPrefix] [HarmonyPatch(typeof(HeroController), "MaxHealth")] public static bool HeroControllerMaxHealth_Prefix() { Log.LogInfo((object)"MaxHealth"); if (BossSequence.isInSequence && !PlayerData.instance.atBench) { return false; } Log.LogInfo((object)"DoMaxHealth"); return true; } [HarmonyPrefix] [HarmonyPatch(typeof(HeroController), "RefillHealthToMax")] public static bool HeroControllerRefillHealthToMax_Prefix() { Log.LogInfo((object)"RefillHealthToMax"); if (BossSequence.isInSequence && !PlayerData.instance.atBench) { return false; } Log.LogInfo((object)"DoRefillHealthToMax"); return true; } [HarmonyPrefix] [HarmonyPatch(typeof(PlayerData), "MaxHealth")] public static bool PlayerDataMaxHealth_Prefix() { Log.LogInfo((object)"MaxHealth"); if (BossSequence.isInSequence && !PlayerData.instance.atBench) { return false; } Log.LogInfo((object)"DoMaxHealth"); return true; } [HarmonyPrefix] [HarmonyPatch(typeof(HealthManager), "ApplyDamageScaling")] public static bool HealthManagerApplyDamageScaling_Prefix(HealthManager __instance, HitInstance hitInstance, ref HitInstance __result) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) if (BossSequence.isInSequence) { __result = hitInstance; return false; } return true; } [HarmonyPostfix] [HarmonyPatch(typeof(PlayerData), "get_nailDamage")] public static void PlayerDataNailDamage_Postfix(ref int __result) { if (PlayerDataMod.instance.bindings["Needle Binding"]) { int num = __result; if (num > 13) { num = 13; __result = num; } else { num = ((num > 9 && num < 14) ? 10 : ((num > 5 && num < 10) ? 7 : ((num <= 3 || num >= 6) ? 1 : 4))); __result = num; } } } [HarmonyPrefix] [HarmonyPatch(typeof(PlayerData), "TakeHealth")] private static bool TakeDamagePatch_Prefix(PlayerData __instance, ref int amount, ref bool hasBlueHealth, ref bool allowFracturedMaskBreak) { //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (!BossSequence.isInSequence) { return true; } BossSequence.hitCounter++; if (BossSequence.currentDifficultMode == "Ascended") { amount *= 2; return true; } if (BossSequence.currentDifficultMode == "Radiant") { amount = int.MaxValue; return true; } ToolItem fracturedMaskTool = Gameplay.FracturedMaskTool; if ((amount >= __instance.health + __instance.healthBlue && !((ToolBase)fracturedMaskTool).IsEquipped) || fracturedMaskTool.SavedData.AmountLeft < 1) { BossSequence.isHeroDead = true; Log.LogInfo((object)"HERO DEAD YOOOOO"); } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(SceneAdditiveLoadConditional), "OnEnable")] private static bool SceneAdditiveLoadPatch_Prefix(SceneAdditiveLoadConditional __instance) { //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Expected O, but got Unknown //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Expected O, but got Unknown //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Expected O, but got Unknown //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Expected O, but got Unknown //IL_05d9: Unknown result type (might be due to invalid IL or missing references) //IL_05e0: Expected O, but got Unknown //IL_0682: Unknown result type (might be due to invalid IL or missing references) //IL_0689: Expected O, but got Unknown //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_0750: Expected O, but got Unknown //IL_07e5: Unknown result type (might be due to invalid IL or missing references) //IL_07ec: Expected O, but got Unknown if ((BossSequence.isInSequence && ((Object)((Component)__instance).gameObject).name.Contains("Bellway Additive Loader")) || ((Object)((Component)__instance).gameObject).name.Contains("Bell Centipede Loader")) { Object.Destroy((Object)(object)((Component)__instance).gameObject); return false; } if (BossSequence.isInSequence && ((Object)((Component)__instance).gameObject).name.Contains("Boss Loader")) { FieldInfo? field = ((object)__instance).GetType().GetField("questTests", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field2 = ((object)__instance).GetType().GetField("tests", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field3 = ((object)__instance).GetType().GetField("doorBlackList", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field4 = ((object)__instance).GetType().GetField("otherLoaderBlacklist", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field5 = ((object)__instance).GetType().GetField("loadAlt", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); ((object)__instance).GetType().GetField("_additiveSceneLoads", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); PlayerDataTest value = new PlayerDataTest(); field.SetValue(__instance, new QuestTest[0]); field2.SetValue(__instance, value); field3.SetValue(__instance, new string[0]); field4.SetValue(__instance, new SceneAdditiveLoadConditional[0]); field5.SetValue(__instance, false); return true; } if (BossSequence.currentSequenceScene == BossScene.bosses["Fourth Chorus"] && ((Object)((Component)__instance).gameObject).name.Contains("Boss Golem Loader")) { FieldInfo? field6 = ((object)__instance).GetType().GetField("questTests", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field7 = ((object)__instance).GetType().GetField("tests", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field8 = ((object)__instance).GetType().GetField("doorBlackList", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field9 = ((object)__instance).GetType().GetField("otherLoaderBlacklist", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field10 = ((object)__instance).GetType().GetField("loadAlt", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); ((object)__instance).GetType().GetField("_additiveSceneLoads", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); PlayerDataTest value2 = new PlayerDataTest(); field6.SetValue(__instance, new QuestTest[0]); field7.SetValue(__instance, value2); field8.SetValue(__instance, new string[0]); field9.SetValue(__instance, new SceneAdditiveLoadConditional[0]); field10.SetValue(__instance, false); return true; } if (BossSequence.currentSequenceScene == BossScene.bosses["Fourth Chorus"] && ((Object)((Component)__instance).gameObject).name.Contains("Boss Beastfly Loader")) { Object.Destroy((Object)(object)((Component)__instance).gameObject); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Savage Beastfly in Far Fields"] && ((Object)((Component)__instance).gameObject).name.Contains("Boss Beastfly Loader")) { FieldInfo? field11 = ((object)__instance).GetType().GetField("questTests", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field12 = ((object)__instance).GetType().GetField("tests", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field13 = ((object)__instance).GetType().GetField("doorBlackList", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field14 = ((object)__instance).GetType().GetField("otherLoaderBlacklist", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field15 = ((object)__instance).GetType().GetField("loadAlt", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); ((object)__instance).GetType().GetField("_additiveSceneLoads", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); PlayerDataTest value3 = new PlayerDataTest(); field11.SetValue(__instance, new QuestTest[0]); field12.SetValue(__instance, value3); field13.SetValue(__instance, new string[0]); field14.SetValue(__instance, new SceneAdditiveLoadConditional[0]); field15.SetValue(__instance, false); return true; } if (BossSequence.currentSequenceScene == BossScene.bosses["Savage Beastfly in Far Fields"] && ((Object)((Component)__instance).gameObject).name.Contains("Boss Golem Loader")) { Object.Destroy((Object)(object)((Component)__instance).gameObject); return false; } if (BossSequence.isInSequence && ((Object)((Component)__instance).gameObject).name.Contains("Rest Golem Loader")) { Object.Destroy((Object)(object)((Component)__instance).gameObject); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Shakra"] && ((Object)((Component)__instance).gameObject).name.Contains("Mapper Sparring")) { FieldInfo? field16 = ((object)__instance).GetType().GetField("questTests", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field17 = ((object)__instance).GetType().GetField("tests", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field18 = ((object)__instance).GetType().GetField("doorBlackList", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field19 = ((object)__instance).GetType().GetField("otherLoaderBlacklist", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field20 = ((object)__instance).GetType().GetField("loadAlt", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); ((object)__instance).GetType().GetField("_additiveSceneLoads", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); PlayerDataTest value4 = new PlayerDataTest(); field16.SetValue(__instance, new QuestTest[0]); field17.SetValue(__instance, value4); field18.SetValue(__instance, new string[0]); field19.SetValue(__instance, new SceneAdditiveLoadConditional[0]); field20.SetValue(__instance, false); return true; } if ((BossSequence.currentSequenceScene == BossScene.bosses["Shakra"] && ((Object)((Component)__instance).gameObject).name.Contains("Boss Scene Loader")) || ((Object)((Component)__instance).gameObject).name.Contains("Caravan Scene Loader")) { Object.Destroy((Object)(object)((Component)__instance).gameObject); return false; } if ((BossSequence.currentSequenceScene == BossScene.bosses["Moorwing"] && ((Object)((Component)__instance).gameObject).name.Contains("Mapper Sparring")) || ((Object)((Component)__instance).gameObject).name.Contains("Caravan Scene Loader")) { Object.Destroy((Object)(object)((Component)__instance).gameObject); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Moorwing"] && ((Object)((Component)__instance).gameObject).name.Contains("Boss Scene Loader")) { FieldInfo? field21 = ((object)__instance).GetType().GetField("questTests", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field22 = ((object)__instance).GetType().GetField("tests", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field23 = ((object)__instance).GetType().GetField("doorBlackList", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field24 = ((object)__instance).GetType().GetField("otherLoaderBlacklist", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field25 = ((object)__instance).GetType().GetField("loadAlt", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field26 = ((object)__instance).GetType().GetField("_additiveSceneLoads", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); PlayerDataTest value5 = new PlayerDataTest(); field21.SetValue(__instance, new QuestTest[0]); field22.SetValue(__instance, value5); field23.SetValue(__instance, new string[0]); field24.SetValue(__instance, new SceneAdditiveLoadConditional[0]); field25.SetValue(__instance, false); field26.SetValue(__instance, new List()); return true; } if (BossSequence.currentSequenceScene == BossScene.bosses["The Unravelled"] && ((Object)((Component)__instance).gameObject).name.Contains("Boss Loader")) { FieldInfo? field27 = ((object)__instance).GetType().GetField("questTests", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field28 = ((object)__instance).GetType().GetField("tests", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); PlayerDataTest value6 = new PlayerDataTest(); field27.SetValue(__instance, new QuestTest[0]); field28.SetValue(__instance, value6); return true; } if (BossSequence.currentSequenceScene == BossScene.bosses["Bell Beast"] && ((Object)((Component)__instance).gameObject).name.Contains("Boss Additive Loader")) { FieldInfo? field29 = ((object)__instance).GetType().GetField("questTests", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field30 = ((object)__instance).GetType().GetField("tests", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field31 = ((object)__instance).GetType().GetField("doorBlackList", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field32 = ((object)__instance).GetType().GetField("otherLoaderBlacklist", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field33 = ((object)__instance).GetType().GetField("loadAlt", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); ((object)__instance).GetType().GetField("_additiveSceneLoads", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); PlayerDataTest value7 = new PlayerDataTest(); field29.SetValue(__instance, new QuestTest[0]); field30.SetValue(__instance, value7); field31.SetValue(__instance, new string[0]); field32.SetValue(__instance, new SceneAdditiveLoadConditional[0]); field33.SetValue(__instance, false); return true; } if (BossSequence.currentSequenceScene == BossScene.bosses["Cogwork Dancers"] && ((Object)((Component)__instance).gameObject).name.Contains("Boss Loader")) { FieldInfo? field34 = ((object)__instance).GetType().GetField("questTests", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field35 = ((object)__instance).GetType().GetField("tests", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); PlayerDataTest value8 = new PlayerDataTest(); field34.SetValue(__instance, new QuestTest[0]); field35.SetValue(__instance, value8); return true; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(TestGameObjectActivator), "OnEnable")] private static bool TestGameObjectActivatorPatch_Prefix(TestGameObjectActivator __instance) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown if (BossSequence.currentSequenceScene == BossScene.bosses["Lost Garmond"] && ((Object)((Component)__instance).gameObject).name == "Garmond Black Threaded Scene") { FieldInfo? field = ((object)__instance).GetType().GetField("questTests", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field2 = ((object)__instance).GetType().GetField("playerDataTest", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); PlayerDataTest value = new PlayerDataTest(); field.SetValue(__instance, new QuestTest[0]); field2.SetValue(__instance, value); return true; } if (BossSequence.currentSequenceScene == BossScene.bosses["Lost Garmond"] && ((Object)((Component)__instance).gameObject).name == "Pre Garmond") { ((Component)__instance).gameObject.SetActive(false); return true; } if (BossSequence.isInSequence && ((Object)((Component)__instance).gameObject).name == "Gnat Corpse Ground") { Object.Destroy((Object)(object)((Component)__instance).gameObject); return true; } if (BossSequence.currentSequenceScene == BossScene.bosses["Broodmother"] && ((Object)((Component)__instance).gameObject).name == "Broodmother Scene Control") { Transform transform = ((Component)__instance).gameObject.transform; ((Component)transform.GetChild(0)).gameObject.SetActive(false); ((Component)transform.GetChild(1)).gameObject.SetActive(true); Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Savage Beastfly in Far Fields"] && ((Object)((Component)__instance).gameObject).name == "Beastfly States") { Transform transform2 = ((Component)__instance).gameObject.transform; ((Component)transform2.GetChild(0)).gameObject.SetActive(true); ((Component)transform2.GetChild(1)).gameObject.SetActive(false); Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Gurr the Outcast"] && ((Object)((Component)__instance).gameObject).name == "Boss Scene") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Plasmified Zango"] && ((Object)((Component)__instance).gameObject).name == "Area_States") { Transform transform3 = ((Component)__instance).gameObject.transform; ((Component)transform3.GetChild(0)).gameObject.SetActive(false); ((Component)transform3.GetChild(1)).gameObject.SetActive(true); Object.Destroy((Object)(object)__instance); return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(PersistentBoolItem), "Awake")] private static bool PersistentBoolItemPatch_Prefix(PersistentBoolItem __instance) { if ((BossSequence.currentSequenceScene == BossScene.bosses["Moss Mother"] && ((Object)((Component)__instance).gameObject).name == "Battle Scene") || ((Object)((Component)__instance).gameObject).name == "Boss Scene") { Object.Destroy((Object)(object)__instance); return false; } if ((BossSequence.currentSequenceScene == BossScene.bosses["Great Conchflies"] && ((Object)((Component)__instance).gameObject).name == "Driller A") || ((Object)((Component)__instance).gameObject).name == "Driller B") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["The Last Judge"] && ((Object)((Component)__instance).gameObject).name == "Last Judge") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Plasmified Zango"] && ((Object)((Component)__instance).gameObject).name == "Blue Assistant") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Clover Dancers"] && ((Object)((Component)__instance).gameObject).name == "Dancer A") { Object.Destroy((Object)(object)__instance); return false; } if ((BossSequence.currentSequenceScene == BossScene.bosses["Forum Battle"] && ((Object)((Component)__instance).gameObject).name == "Battle Scene") || ((Object)((Component)__instance).gameObject).name == "Start Range" || ((Object)((Component)__instance).gameObject).name.Contains("Song Handmaiden") || ((Object)((Component)__instance).gameObject).name.Contains("City Merchant Scavenge Generic")) { Object.Destroy((Object)(object)__instance); return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(DeactivateIfPlayerdataTrue), "OnEnable")] private static bool DeactivateIfPlayerdataTrue_Prefix(DeactivateIfPlayerdataTrue __instance) { if (BossSequence.currentSequenceScene == BossScene.bosses["Moss Mother"] && ((Object)((Component)__instance).gameObject).name == "Battle Scene") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Bell Beast"] && ((Object)((Component)__instance).gameObject).name == "Boss Scene") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Fourth Chorus"] && ((Object)((Component)__instance).gameObject).name == "Lava Rocks") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.isInSequence && ((Object)((Component)__instance).gameObject).name == "Churchkeeper Basement") { Object.Destroy((Object)(object)((Component)__instance).gameObject); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Lace in Deep Docks"] && ((Object)((Component)__instance).gameObject).name == "Boss Scene") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Skull Tyrant"] && ((Object)((Component)__instance).gameObject).name == "Skull King") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["First Sinner"] && ((Object)((Component)__instance).gameObject).name == "Boss Scene") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Lace in the Cradle"] && ((Object)((Component)__instance).gameObject).name == "Lace Return Corpse") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Second Sentiel"] && ((Object)((Component)__instance).gameObject).name == "Boss Scene - To Additive Load") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["The Unravelled"] && ((Object)((Component)__instance).gameObject).name == "Boss Scene") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Voltvyrm"] && ((Object)((Component)__instance).gameObject).name == "boss_eggshell") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Voltvyrm"] && ((Object)((Component)__instance).gameObject).name == "Zap Core Enemy") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Voltvyrm"] && ((Object)((Component)__instance).gameObject).name == "Hunter Fan Outside") { Object.Destroy((Object)(object)((Component)__instance).gameObject); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Palestag"] && ((Object)((Component)__instance).gameObject).name == "Cloverstag White Boss") { Object.Destroy((Object)(object)__instance); return false; } if ((BossSequence.currentSequenceScene == BossScene.bosses["Shrine Guardian Seth"] && ((Object)((Component)__instance).gameObject).name == "Seth") || ((Object)((Component)__instance).gameObject).name == "Flower Gate") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Lace in the Cradle"] && ((Object)((Component)__instance).gameObject).name == "Lace Boss2 New") { Object.Destroy((Object)(object)__instance); return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(DeactivateIfPlayerdataFalse), "OnEnable")] private static bool DeactivateIfPlayerdataFalse_Prefix(DeactivateIfPlayerdataFalse __instance) { if (BossSequence.currentSequenceScene == BossScene.bosses["Great Conchflies"] && ((Object)((Component)__instance).gameObject).name == "Coral Driller Return Corpse") { ((Component)__instance).gameObject.SetActive(false); return false; } if ((BossSequence.currentSequenceScene == BossScene.bosses["Skull Tyrant"] && ((Object)((Component)__instance).gameObject).name == "Corpse") || ((Object)((Component)__instance).gameObject).name == "Hunter Fan Outside Rummage (1)") { ((Component)__instance).gameObject.SetActive(false); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Raging Conchfly"] && ((Object)((Component)__instance).gameObject).name == "Boss Corpse Scene") { ((Component)__instance).gameObject.SetActive(false); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Watcher at the Edge"] && ((Object)((Component)__instance).gameObject).name == "Collectable Item Pickup") { Object.Destroy((Object)(object)((Component)__instance).gameObject); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Disgraced Chef Lugoli"] && ((Object)((Component)__instance).gameObject).name == "Chef Corpse Prepare Scene") { Object.Destroy((Object)(object)((Component)__instance).gameObject); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Voltvyrm"] && ((Object)((Component)__instance).gameObject).name == "Return Aftermath") { Object.Destroy((Object)(object)((Component)__instance).gameObject); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Phantom"] && ((Object)((Component)__instance).gameObject).name == "Return Mask") { Object.Destroy((Object)(object)((Component)__instance).gameObject); return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(ActivateIfPlayerdataFalse), "Start")] private static bool ActivateIfPlayerdataFalse_Prefix(ActivateIfPlayerdataFalse __instance) { if (BossSequence.currentSequenceScene == BossScene.bosses["Savage Beastfly in Chapel of The Beast"] && ((Object)((Component)__instance).gameObject).name == "Boss Control") { __instance.objectToActivate.SetActive(true); Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Disgraced Chef Lugoli"] && ((Object)((Component)__instance).gameObject).name == "Battle Scene") { __instance.objectToActivate.SetActive(true); Object.Destroy((Object)(object)__instance); return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(ActivateIfPlayerdataTrue), "OnEnable")] private static bool ActivateIfPlayerdataTrue_Prefix(ActivateIfPlayerdataTrue __instance) { if (BossSequence.currentSequenceScene == BossScene.bosses["Savage Beastfly in Chapel of The Beast"] && ((Object)((Component)__instance).gameObject).name == "Boss Control") { __instance.objectToActivate.SetActive(false); Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Father of the Flame"] && ((Object)((Component)__instance).gameObject).name == "Boss Scene") { __instance.objectToActivate.SetActive(false); Object.Destroy((Object)(object)__instance); return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(PlayerDataTestResponse), "OnEnable")] private static bool PlayerDataTestResponse_Prefix(PlayerDataTestResponse __instance) { if (BossSequence.currentSequenceScene == BossScene.bosses["Sister Splinter"] && ((Object)((Component)__instance).gameObject).name == "Boss Scene Parent") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Garmond & Zaza"] && ((Object)((Component)__instance).gameObject).name == "Scene Control") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Lace in the Cradle"] && ((Object)((Component)__instance).gameObject).name == "Boss Scene") { Object.Destroy((Object)(object)__instance); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Lost Garmond"] && ((Object)((Component)__instance).gameObject).name == "Garmond Defeated Scene") { Object.Destroy((Object)(object)((Component)__instance).gameObject); return false; } if (BossSequence.currentSequenceScene == BossScene.bosses["Crawfather"] && ((Object)((Component)__instance).gameObject).name == "grey_lever_gate") { ((Component)__instance).gameObject.GetComponent().ForceClose(); Object.Destroy((Object)(object)__instance); return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(StateChangeSequence), "CheckCompleteBool")] private static bool StateChangeSequenceCheckCompleteBool_Prefix(PlayerDataTestResponse __instance, ref bool __result) { if (BossSequence.currentSequenceScene == BossScene.bosses["Widow"] && ((Object)((Component)__instance).gameObject).name == "Bellshrine Sequence Bellhart") { __result = true; return false; } return true; } [HarmonyPostfix] [HarmonyPatch(typeof(BattleScene), "Awake")] private static void BattleSceneAwake_Postfix(BattleScene __instance) { if (BossSequence.currentSequenceScene == BossScene.bosses["Broodmother"] && ((Object)((Component)__instance).gameObject).name == "Battle Scene Broodmother") { __instance.setPDBoolOnEnd = null; } if (BossSequence.currentSequenceScene == BossScene.bosses["Disgraced Chef Lugoli"] && ((Object)((Component)__instance).gameObject).name == "Battle Scene") { __instance.setPDBoolOnEnd = null; } if (BossSequence.currentSequenceScene == BossScene.bosses["Groal the Great"] && ((Object)((Component)__instance).gameObject).name == "Battle Scene") { __instance.setPDBoolOnEnd = null; } if (BossSequence.currentSequenceScene == BossScene.bosses["Raging Conchfly"] && ((Object)((Component)__instance).gameObject).name == "Battle Scene") { __instance.setPDBoolOnEnd = null; } if (BossSequence.currentSequenceScene == BossScene.bosses["Crawfather"] && ((Object)((Component)__instance).gameObject).name == "Battle Scene") { __instance.setPDBoolOnEnd = null; __instance.activeAfterBattle = null; } } [HarmonyPrefix] [HarmonyPatch(typeof(HarpoonRingSlider), "Awake")] private static void HarpoonRingSliderAwake_Prefix(HarpoonRingSlider __instance) { if (BossSequence.currentSequenceScene == BossScene.bosses["Cogwork Dancers"]) { Object.Destroy((Object)(object)((Component)__instance).gameObject); } } [HarmonyPrefix] [HarmonyPatch(typeof(CustomSceneManager), "Awake")] private static bool SceneManagerAwake_Prefix(CustomSceneManager __instance) { CustomScene customScene = customScenes.Find((CustomScene item) => item.sceneName == currentSceneName); if (customScene != null && !customScene.isSkongScene) { __instance.scenePools = (SceneObjectPool[])(object)new SceneObjectPool[0]; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(CustomSceneManager), "DrawBlackBorders")] private static bool SceneManagerDrawBlackBorders_Prefix(CustomSceneManager __instance) { CustomScene customScene = customScenes.Find((CustomScene item) => item.sceneName == currentSceneName); if (customScene != null && !customScene.isSkongScene) { return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(InventoryItemCollectable), "Submit")] private static bool InventoryItemCollectableSubmit_Prefix(InventoryItemCollectable __instance) { if (!((Component)__instance).transform.IsChildOf(BindingsMenu.menuBindings.transform)) { return true; } if (BindingsMenu.TryShowSequenceMsg()) { return false; } if (BindingsMenu.submitActions.TryGetValue(((Object)((Component)__instance).gameObject).name, out var value)) { value?.Invoke(obj: false); return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(InventoryItemSelectable), "Submit")] private static bool InventoryItemSelectableSubmit_Prefix(InventoryItemSelectable __instance) { if (!((Component)__instance).transform.IsChildOf(BindingsMenu.menuBindings.transform)) { return true; } if (BindingsMenu.TryShowSequenceMsg()) { return false; } if (BindingsMenu.submitActions.TryGetValue(((Object)((Component)__instance).gameObject).name, out var value)) { value?.Invoke(obj: false); return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(InventoryItemTool), "Submit")] private static bool InventoryItemToolSubmit_Prefix(InventoryItemTool __instance) { if (!PlayerDataMod.instance.bindings["Tools Binding"]) { return true; } if (((Object)__instance).name != "Silk Spear" && ((Object)__instance).name != "Thread Sphere" && ((Object)__instance).name != "Parry" && ((Object)__instance).name != "Silk Charge" && ((Object)__instance).name != "Silk Bomb" && ((Object)__instance).name != "Silk Boss Needle" && BindingsMenu.submitActions.TryGetValue("Tools Buttons Msg", out var value)) { value?.Invoke(obj: false); return false; } return true; } public AssetBundle LoadBundle(string bundleName) { Assembly executingAssembly = Assembly.GetExecutingAssembly(); string[] manifestResourceNames = executingAssembly.GetManifestResourceNames(); foreach (string text in manifestResourceNames) { string text2 = Path.GetExtension(text).Substring(1); ((BaseUnityPlugin)this).Logger.LogInfo((object)text2); if (text2 != bundleName) { continue; } using Stream stream = executingAssembly.GetManifestResourceStream(text); if (stream == null) { continue; } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); stream.Dispose(); ((BaseUnityPlugin)this).Logger.LogInfo((object)("Loading bundle " + bundleName)); return AssetBundle.LoadFromMemory(array); } return null; } public void LoadModData() { if (File.Exists(pathToModData)) { PlayerDataMod.instance = JsonConvert.DeserializeObject(File.ReadAllText(pathToModData)); return; } PlayerDataMod.instance = new PlayerDataMod(); SaveModData(); } public void SaveModData() { string contents = JsonConvert.SerializeObject((object)PlayerDataMod.instance, (Formatting)1); File.WriteAllText(pathToModData, contents); } private void Awake() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) instance = this; Log = ((BaseUnityPlugin)this).Logger; new Harmony("com.godsofpharloom"); Harmony.CreateAndPatchAll(typeof(GodsOfPharloomMod), (string)null); try { BossScene.InitBossesInfo(); BossStatueInfo.InitBossesStatue(); LoadModData(); BossStatueInfo.GetBadges(); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogInfo((object)ex.Message); } SceneManager.sceneLoaded += delegate(Scene scene, LoadSceneMode mode) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) lastLoadedScene = scene; }; BossSequence.CreateSequenceController(); CustomScene.InitModRespawnMarkers(); afterSceneLoaded = (Action)Delegate.Combine(afterSceneLoaded, new Action(CustomMenu.Reset)); InitCustomScenes(); string[] array = assetBundleNames; foreach (string text in array) { AssetBundle val = LoadBundle(text); assetBundles.Add(val); if (text == "gg_resources") { Object[] array2 = val.LoadAllAssets(); foreach (Object val2 in array2) { Preload.bundleResources[val2.name] = val2; } } } TransitionSequence.Init(); afterSceneLoaded = (Action)Delegate.Combine(afterSceneLoaded, (Action)delegate { BossSequence.isHeroDead = false; }); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin is loaded!"); } private void Update() { //IL_007a: 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) //IL_008a: 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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown if (((ButtonControl)Keyboard.current.bKey).wasPressedThisFrame) { if (BindingsMenu.menuBindingsFsm != null && BindingsMenu.menuBindingsFsm.ActiveStateName == "Opened") { BindingsMenu.menuBindingsFsm.FsmComponent.SendEvent("CLOSE"); } else if (BindingsMenu.menuBindingsFsm.ActiveStateName == "Closed") { BindingsMenu.menuBindingsFsm.SetState("Can Open Inventory?"); } } if (((ButtonControl)Keyboard.current.f6Key).wasPressedThisFrame) { SceneLoadInfo val = new SceneLoadInfo { SceneName = "GG_Pharloom_Atrium", EntryGateName = "door_wakeInMemory_AntQueen(Clone)", EntrySkip = true, Visualization = (SceneLoadVisualizations)0 }; GameManager.instance.BeginSceneTransition(val); } } public static void SetHeroState(ActorStates state) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) ((Func)((MethodInfo method, object[] obj) => method.Invoke(HeroController.instance, obj)))(HeroController_SetState, new object[1] { state }); } private void InitCustomScenes() { //IL_0039: 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_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_039b: 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_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_05af: Unknown result type (might be due to invalid IL or missing references) //IL_0643: 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) //IL_076b: Unknown result type (might be due to invalid IL or missing references) //IL_07ff: Unknown result type (might be due to invalid IL or missing references) //IL_0893: Unknown result type (might be due to invalid IL or missing references) //IL_0927: Unknown result type (might be due to invalid IL or missing references) //IL_09bb: Unknown result type (might be due to invalid IL or missing references) //IL_0a4f: Unknown result type (might be due to invalid IL or missing references) //IL_0ae3: Unknown result type (might be due to invalid IL or missing references) //IL_0b77: Unknown result type (might be due to invalid IL or missing references) //IL_0c0b: Unknown result type (might be due to invalid IL or missing references) //IL_0c9f: Unknown result type (might be due to invalid IL or missing references) //IL_0d33: Unknown result type (might be due to invalid IL or missing references) //IL_0dc7: Unknown result type (might be due to invalid IL or missing references) //IL_0e5b: Unknown result type (might be due to invalid IL or missing references) //IL_0eef: Unknown result type (might be due to invalid IL or missing references) //IL_0fa1: Unknown result type (might be due to invalid IL or missing references) //IL_1035: Unknown result type (might be due to invalid IL or missing references) //IL_10c9: Unknown result type (might be due to invalid IL or missing references) //IL_115d: Unknown result type (might be due to invalid IL or missing references) //IL_11f1: Unknown result type (might be due to invalid IL or missing references) //IL_1285: Unknown result type (might be due to invalid IL or missing references) //IL_1319: Unknown result type (might be due to invalid IL or missing references) //IL_13ad: Unknown result type (might be due to invalid IL or missing references) //IL_1441: Unknown result type (might be due to invalid IL or missing references) //IL_14d5: Unknown result type (might be due to invalid IL or missing references) //IL_1569: Unknown result type (might be due to invalid IL or missing references) //IL_15c6: Unknown result type (might be due to invalid IL or missing references) //IL_1678: Unknown result type (might be due to invalid IL or missing references) //IL_170c: Unknown result type (might be due to invalid IL or missing references) //IL_17a0: Unknown result type (might be due to invalid IL or missing references) //IL_1834: Unknown result type (might be due to invalid IL or missing references) //IL_18c8: Unknown result type (might be due to invalid IL or missing references) //IL_195c: Unknown result type (might be due to invalid IL or missing references) //IL_19f0: Unknown result type (might be due to invalid IL or missing references) //IL_1a84: Unknown result type (might be due to invalid IL or missing references) //IL_1b18: Unknown result type (might be due to invalid IL or missing references) //IL_1bac: Unknown result type (might be due to invalid IL or missing references) //IL_1c40: Unknown result type (might be due to invalid IL or missing references) CustomScene GG_Pharloom_Atrium = new CustomScene("GG_Pharloom_Atrium", isSkongScene: false, isFastSuperJump: true); GG_Pharloom_Atrium.AddTransitionPoint(new TransitionPointInfo("door2", new Vector3(156.4901f, 36.18f, 0f), BossStatueInfo.hog_sceneName, "door1", (PromptLabels)3, isADoor: true)); CustomScene customScene = GG_Pharloom_Atrium; customScene.AfterSceneLoaded = (Action)Delegate.Combine(customScene.AfterSceneLoaded, (Action)delegate(Scene scene) { //IL_0069: 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_007f: 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_0097: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: 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_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0248: 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_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0331: 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_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: 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_04d4: Unknown result type (might be due to invalid IL or missing references) //IL_04da: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_0544: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Expected O, but got Unknown //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_054f: Unknown result type (might be due to invalid IL or missing references) //IL_0564: Unknown result type (might be due to invalid IL or missing references) //IL_056e: Unknown result type (might be due to invalid IL or missing references) //IL_0583: Unknown result type (might be due to invalid IL or missing references) //IL_05a1: Unknown result type (might be due to invalid IL or missing references) //IL_0cdf: Unknown result type (might be due to invalid IL or missing references) //IL_0ce5: Unknown result type (might be due to invalid IL or missing references) //IL_0cec: Expected O, but got Unknown AudioManager audioManager = GameManager.instance.AudioManager; audioManager.StopAndClearAtmos(); audioManager.StopAndClearMusic(); GameObject[] rootGameObjects = ((Scene)(ref scene)).GetRootGameObjects(); GameObject val = null; GameObject[] array = rootGameObjects; foreach (GameObject val2 in array) { if (((Object)val2).name == "GG_Bench") { val = val2; } } GameObject obj = Object.Instantiate(Preload.preloads["RestBench"], new InstantiateParameters { parent = val.transform, scene = scene }); obj.transform.position = val.transform.position; Fsm fsm = FSMUtility.LocateMyFSM(obj, "Bench Control").Fsm; Vector3 value = fsm.GetFsmVector3("Adjust Vector").Value; fsm.GetFsmVector3("Adjust Vector").Value = new Vector3(value.x, 0.7f, value.z); ((Renderer)obj.GetComponent()).enabled = false; Vector2 size = obj.GetComponent().size; obj.GetComponent().size = new Vector2(size.x, 1f); CameraLockArea val3 = CustomScene.CreateCameraLock(scene); GameObject gameObject = ((Component)val3).gameObject; gameObject.transform.position = new Vector3(105.2262f, 60.9892f, 0f); val3.cameraYMin = 50f; val3.cameraYMax = 65f; val3.cameraXMin = 0f; val3.cameraXMax = 1000f; val3.preventLookDown = true; gameObject.GetComponent().size = new Vector2(300f, 18f); gameObject.AddComponent(); ((Behaviour)val3).enabled = false; BoxCollider2D component = ((GameObject)Object.Instantiate((Object)(object)gameObject, scene)).GetComponent(); ((Component)component).transform.position = new Vector3(58.8772f, 42.7895f, 0f); component.size = new Vector2(80f, 18f); ((Component)((GameObject)Object.Instantiate((Object)(object)gameObject, scene)).GetComponent()).transform.position = new Vector3(379.4977f, 42.5895f, 0f); CameraLockArea obj2 = CustomScene.CreateCameraLock(scene); GameObject gameObject2 = ((Component)obj2).gameObject; gameObject2.transform.position = new Vector3(156.5713f, 40.4745f, 0f); obj2.cameraYMin = 40f; obj2.cameraYMax = 50f; obj2.cameraXMin = 157f; obj2.cameraXMax = 157f; obj2.preventLookDown = true; gameObject2.GetComponent().size = new Vector2(12f, 20f); gameObject2.AddComponent(); ((Behaviour)obj2).enabled = false; CameraLockArea obj3 = CustomScene.CreateCameraLock(scene); GameObject gameObject3 = ((Component)obj3).gameObject; gameObject3.transform.position = new Vector3(156.7058f, 76.6994f, 0f); obj3.cameraYMin = 79f; obj3.cameraYMax = 500f; obj3.cameraXMin = 0f; obj3.cameraXMax = 1000f; gameObject3.GetComponent().size = new Vector2(300f, 8f); gameObject3.AddComponent(); ((Behaviour)obj3).enabled = false; CameraLockArea obj4 = CustomScene.CreateCameraLock(scene); GameObject gameObject4 = ((Component)obj4).gameObject; gameObject4.transform.position = new Vector3(156.7058f, 86.9f, 0f); obj4.cameraYMin = 88f; obj4.cameraYMax = 500f; obj4.cameraXMin = 156.4254f; obj4.cameraXMax = 156.4254f; obj4.preventLookDown = true; obj4.preventLookUp = true; obj4.lookYMax = 0f; gameObject4.GetComponent().size = new Vector2(11f, 12f); gameObject4.AddComponent(); ((Behaviour)obj4).enabled = false; GameObject val4 = (GameObject)Object.Instantiate((Object)(object)Preload.preloads["door_wakeInMemory_AntQueen"], scene); val4.transform.position = new Vector3(14f, 54f, 0f); Fsm fsm2 = val4.GetComponent().Fsm; FsmState state = fsm2.GetState("Pause"); fsm2.GetState("Set Respawn?"); FsmState state2 = fsm2.GetState("Blank Screen"); fsm2.GetState("Save?"); fsm2.GetFsmBool("Save Game").Value = true; PatchedFsm.CustomLogicFsm customLogicFsm = new PatchedFsm.CustomLogicFsm(fsm2); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayerData.instance.respawnMarkerName = "Death Respawn Marker"; PlayerData.instance.respawnScene = "GG_Pharloom_Atrium"; }); state2.Actions = PatchedFsm.InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm, 0); state.Transitions = (FsmTransition[])(object)new FsmTransition[1] { state.Transitions[1] }; GameObject val5 = (GameObject)Object.Instantiate((Object)(object)Preload.preloads["Exit Edge Trigger_AntQueen"], scene); val5.transform.position = new Vector3(0f, 54f, 0f); SceneTransitionZone component2 = val5.GetComponent(); ((object)component2).GetType().GetField("targetGate", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).SetValue(component2, "door_wakeOnGround_FlowerQueen(Clone)"); ((object)component2).GetType().GetField("targetScene", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).SetValue(component2, "Abyss_05"); GameObject val6 = (GameObject)Object.Instantiate((Object)val5, scene); val6.transform.position = new Vector3(62f, 28f, 0f); val6.transform.Rotate(new Vector3(0f, 0f, 90f)); val6.transform.localScale = new Vector3(1f, 7f, 1f); Preload.FindObjectByPath(rootGameObjects, "PantheonMenuCanvasHandler").AddComponent(); Pantheon.pantheonsCount = 0; Dictionary bosses = BossScene.bosses; Pantheon pantheon = Preload.FindObjectByPath(rootGameObjects, "Half1/Pantheon1").AddComponent(); pantheon.pantheonName = "Pantheon 1"; pantheon.pantheonDisplayName = "Pantheon of the Devoted"; pantheon.sequence = new BossScene[11] { bosses["Moss Mother"], bosses["Skull Tyrant"], bosses["Bell Beast"], bosses["Savage Beastfly in Chapel of The Beast"], bosses["Lace in Deep Docks"], bosses["RestScene"], bosses["Fourth Chorus"], bosses["Moorwing"], bosses["Great Conchflies"], bosses["Sister Splinter"], bosses["Widow"] }; pantheon.Init(); pantheon = Preload.FindObjectByPath(rootGameObjects, "Half1/Pantheon2").AddComponent(); pantheon.pantheonName = "Pantheon 2"; pantheon.pantheonDisplayName = "Pantheon of the Shaman"; pantheon.sequence = new BossScene[11] { bosses["The Last Judge"], bosses["Broodmother"], bosses["Nyleth"], bosses["Voltvyrm"], bosses["Trobbio"], bosses["RestScene"], bosses["Garmond & Zaza"], bosses["Cogwork Dancers"], bosses["Disgraced Chef Lugoli"], bosses["Raging Conchfly"], bosses["Groal the Great"] }; pantheon.Init(); pantheon = Preload.FindObjectByPath(rootGameObjects, "Half2/Pantheon3").AddComponent(); pantheon.pantheonName = "Pantheon 3"; pantheon.pantheonDisplayName = "Pantheon of the First Sinner"; pantheon.sequence = new BossScene[11] { bosses["Crust King Khann"], bosses["Phantom"], bosses["Crawfather"], bosses["Forebrothers Signis & Gron"], bosses["Second Sentiel"], bosses["RestScene"], bosses["Lace in the Cradle"], bosses["Plasmified Zango"], bosses["Watcher at the Edge"], bosses["The Unravelled"], bosses["First Sinner"] }; pantheon.Init(); pantheon = Preload.FindObjectByPath(rootGameObjects, "Half2/Pantheon4").AddComponent(); pantheon.pantheonName = "Pantheon 4"; pantheon.pantheonDisplayName = "Pantheon of the Singer"; pantheon.sequence = new BossScene[11] { bosses["Bell Eater"], bosses["Father of the Flame"], bosses["Clover Dancers"], bosses["Gurr the Outcast"], bosses["Tormented Trobbio"], bosses["RestScene"], bosses["Shrine Guardian Seth"], bosses["Savage Beastfly in Far Fields"], bosses["Shakra"], bosses["Pinstress"], bosses["Skarrsinger Karmelita"] }; pantheon.Init(); pantheon = Preload.FindObjectByPath(rootGameObjects, "Pantheon5").AddComponent(); pantheon.pantheonName = "Pantheon 5"; pantheon.pantheonDisplayName = "Pantheon of Pharloom"; pantheon.sequence = new BossScene[50] { bosses["Moss Mother"].ascendedVersion, bosses["Skull Tyrant"], bosses["Bell Beast"], bosses["Savage Beastfly in Chapel of The Beast"], bosses["Lace in Deep Docks"], bosses["RestScene"], bosses["Fourth Chorus"], bosses["Moorwing"], bosses["Great Conchflies"], bosses["Sister Splinter"], bosses["Widow"], bosses["RestScene"], bosses["The Last Judge"], bosses["Broodmother"], bosses["Nyleth"], bosses["Voltvyrm"], bosses["Trobbio"], bosses["RestScene"], bosses["Lost Garmond"], bosses["Clover Dancers"], bosses["Disgraced Chef Lugoli"], bosses["Raging Conchfly"], bosses["Groal the Great"], bosses["RestScene"], bosses["Crust King Khann"], bosses["Phantom"], bosses["Crawfather"], bosses["Forebrothers Signis & Gron"], bosses["Second Sentiel"], bosses["RestScene"], bosses["Lace in the Cradle"], bosses["Plasmified Zango"], bosses["Watcher at the Edge"], bosses["The Unravelled"], bosses["First Sinner"], bosses["RestScene"], bosses["Bell Eater"], bosses["Father of the Flame"], bosses["Palestag"], bosses["Gurr the Outcast"], bosses["Tormented Trobbio"], bosses["RestScene"], bosses["Shrine Guardian Seth"], bosses["Savage Beastfly in Far Fields"], bosses["Shakra"], bosses["Pinstress"], bosses["Skarrsinger Karmelita"], bosses["RestScene"], bosses["Grand Mother Silk"], bosses["Lost Lace"] }; pantheon.Init(); HeroController.instance.MaxHealth(); HeroController.instance.MaxRegenSilkInstant(); GameObject val7 = (GameObject)Object.Instantiate((Object)(object)Preload.preloads["_SceneManager_Abyss_05"], scene); CustomSceneManager sceneManagerComp = val7.GetComponent(); val7.SetActive(true); ((MonoBehaviour)this).StartCoroutine(enumerator()); BossSequence.Reset(); ToolItemManager.TryReplenishTools(true, (ReplenishMethod)2); GG_Pharloom_Atrium.isSceneActive = true; IEnumerator enumerator() { yield return null; sceneManagerComp.darknessLevel = 0; sceneManagerComp.saturation = 1.2f; sceneManagerComp.UpdateScene(); } }); CustomScene customScene2 = GG_Pharloom_Atrium; customScene2.AfterSceneActivated = (Action)Delegate.Combine(customScene2.AfterSceneActivated, (Action)delegate { HeroController.instance.MaxHealth(); HeroController.instance.MaxRegenSilkInstant(); HeroController.instance.SetIsMaggoted(false); HeroController.instance.ExitUpdraft(); }); customScenes.Add(GG_Pharloom_Atrium); CustomScene GG_Pharloom_HoG = new CustomScene(BossStatueInfo.hog_sceneName, isSkongScene: false, isFastSuperJump: true); GG_Pharloom_HoG.AddTransitionPoint(new TransitionPointInfo("door1", new Vector3(44.64f, 52.58f, 0f), "GG_Pharloom_Atrium", "door2", (PromptLabels)3, isADoor: true)); CustomScene customScene3 = GG_Pharloom_HoG; customScene3.AfterSceneLoaded = (Action)Delegate.Combine(customScene3.AfterSceneLoaded, (Action)delegate(Scene scene) { //IL_009a: 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_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //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_0186: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: 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_01bc: 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_01cf: 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_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) AudioManager audioManager = GameManager.instance.AudioManager; audioManager.StopAndClearAtmos(); audioManager.StopAndClearMusic(); GameObject[] rootGameObjects = ((Scene)(ref scene)).GetRootGameObjects(); GameObject[] array = rootGameObjects; foreach (GameObject val in array) { if (((Object)val).name == "BossStatues") { foreach (Transform item in val.transform) { ((Component)item).gameObject.AddComponent(); } break; } } CameraLockArea obj = CustomScene.CreateCameraLock(scene); GameObject gameObject = ((Component)obj).gameObject; gameObject.transform.position = new Vector3(44.64f, 90f, 0f); obj.cameraYMin = 57f; obj.cameraYMax = 400f; obj.cameraXMin = 44.64f; obj.cameraXMax = 44.64f; obj.preventLookDown = true; gameObject.GetComponent().size = new Vector2(8f, 100f); GameObject val2 = null; array = rootGameObjects; foreach (GameObject val3 in array) { if (((Object)val3).name == "GG_Bench") { val2 = val3; } } GameObject obj2 = Object.Instantiate(Preload.preloads["RestBench"], new InstantiateParameters { parent = val2.transform, scene = scene }); obj2.transform.position = val2.transform.position; Fsm fsm = FSMUtility.LocateMyFSM(obj2, "Bench Control").Fsm; Vector3 value = fsm.GetFsmVector3("Adjust Vector").Value; fsm.GetFsmVector3("Adjust Vector").Value = new Vector3(value.x, 0.5f, value.z); ((Renderer)obj2.GetComponent()).enabled = false; GameObject val4 = (GameObject)Object.Instantiate((Object)(object)Preload.preloads["_SceneManager_Abyss_05"], scene); CustomSceneManager sceneManagerComp = val4.GetComponent(); val4.SetActive(true); ((MonoBehaviour)this).StartCoroutine(enumerator2()); BossSequence.Reset(); ToolItemManager.TryReplenishTools(true, (ReplenishMethod)2); ((MonoBehaviour)sceneManagerComp).StartCoroutine(UpdateUpdraftState()); GG_Pharloom_HoG.isSceneActive = true; IEnumerator enumerator2() { yield return null; sceneManagerComp.darknessLevel = 0; sceneManagerComp.saturation = 1.2f; sceneManagerComp.UpdateScene(); } }); CustomScene customScene4 = GG_Pharloom_HoG; customScene4.AfterSceneActivated = (Action)Delegate.Combine(customScene4.AfterSceneActivated, (Action)delegate { HeroController.instance.MaxHealth(); HeroController.instance.MaxRegenSilkInstant(); HeroController.instance.SetIsMaggoted(false); }); customScenes.Add(GG_Pharloom_HoG); CustomScene GG_Rest_Scene = new CustomScene("GG_Rest_Scene", isSkongScene: false, isFastSuperJump: true); GG_Rest_Scene.AddTransitionPoint(new TransitionPointInfo("rest_scene_entry", new Vector3(59.1f, 59f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true)); GG_Rest_Scene.AddTransitionPoint(new TransitionPointInfo("right1", new Vector3(123.08f, 54f, 0f), "GG_Pharloom_Atrium", "door2", (PromptLabels)3)); CustomScene customScene5 = GG_Rest_Scene; customScene5.AfterSceneLoaded = (Action)Delegate.Combine(customScene5.AfterSceneLoaded, (Action)delegate(Scene scene) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_010c: 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_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: 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_0336: 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_0373: Unknown result type (might be due to invalid IL or missing references) AudioManager audioManager = GameManager.instance.AudioManager; audioManager.StopAndClearAtmos(); audioManager.StopAndClearMusic(); GameObject[] rootGameObjects = ((Scene)(ref scene)).GetRootGameObjects(); BossScene nextSequenceScene = BossSequence.nextSequenceScene; GameObject val = (GameObject)Object.Instantiate((Object)(object)Preload.preloads["_SceneManager_Abyss_05"], scene); CustomSceneManager sceneManagerComp = val.GetComponent(); val.SetActive(true); GameObject val2 = Preload.FindObjectByPath(rootGameObjects, "GG_Bench"); GameObject obj = Object.Instantiate(Preload.preloads["RestBench"], val2.transform); obj.transform.position = val2.transform.position; Fsm fsm = FSMUtility.LocateMyFSM(obj, "Bench Control").Fsm; Vector3 value = fsm.GetFsmVector3("Adjust Vector").Value; fsm.GetFsmVector3("Adjust Vector").Value = new Vector3(value.x, 0.5f, value.z); ((Renderer)obj.GetComponent()).enabled = false; CameraLockArea obj2 = CustomScene.CreateCameraLock(scene); GameObject gameObject = ((Component)obj2).gameObject; gameObject.transform.position = new Vector3(74.0264f, 77.2036f, 0f); obj2.cameraYMin = 57f; obj2.cameraYMax = 60f; obj2.cameraXMin = 60f; obj2.cameraXMax = 104f; obj2.preventLookDown = true; obj2.preventLookUp = true; obj2.lookYMax = 0f; gameObject.GetComponent().size = new Vector2(100f, 100f); SurfaceWaterRegion water = ((GameObject)Object.Instantiate((Object)(object)Preload.preloads["Surface Water Region"], scene)).GetComponent(); GameObject obj3 = Object.Instantiate(Preload.preloads["Spa Region"], ((Component)water).transform); GameObject obj4 = Object.Instantiate(Preload.preloads["spa_water_small"], ((Component)water).transform); GameObject val3 = Object.Instantiate(Preload.preloads["StillWater"], ((Component)water).transform); ((Component)water).transform.position = new Vector3(80f, 53f, 0f); ((Collider2D)((Component)water).GetComponent()).offset = new Vector2(-14.6142f, -4f); ((Component)water).GetComponent().size = new Vector2(280f, 4.7626f); BoxCollider2D component = ((Component)((Component)water).transform.Find("Splash Surface")).GetComponent(); component.size = new Vector2(280.5812f, 5.6057f); ((Component)component).transform.localPosition = new Vector3(0f, -1.15f, 0f); obj4.transform.localPosition = new Vector3(0f, 3.2164f, 0.1f); obj4.transform.localScale = new Vector3(24.2527f, 1f, 1f); ((Component)obj4.transform.Find("water_fog")).gameObject.SetActive(false); val3.transform.localPosition = new Vector3(0f, -3.7f, 0f); val3.transform.localScale = new Vector3(348.0877f, 4.4392f, 1f); obj3.transform.localPosition = new Vector3(-10.527f, -2f, 0f); obj3.transform.localScale = new Vector3(25.2328f, 1f, 1f); ((MonoBehaviour)this).StartCoroutine(enumerator()); TransitionPoint component2 = Preload.FindObjectByPath(rootGameObjects, "right1").GetComponent(); component2.targetScene = nextSequenceScene.sceneName; component2.entryPoint = nextSequenceScene.entryGate; CustomScene customScene52 = customScenes.Find((CustomScene i) => i.sceneName == nextSequenceScene.sceneName); TransitionPointInfo transitionPointInfo = customScene52.TransitionGates.Find((TransitionPointInfo i) => i.gateName == nextSequenceScene.entryGate); GG_Rest_Scene.TransitionGates.Find((TransitionPointInfo i) => i.gateName == "right1").noInputOnStart = transitionPointInfo.noInputOnStart; Action tmpAction1 = null; Action tmpAction2 = null; Action tmpAction3 = null; tmpAction1 = delegate { CustomScene customScene56 = customScene52; customScene56.BeforeSceneLoaded = (Action)Delegate.Remove(customScene56.BeforeSceneLoaded, tmpAction1); BossSequence.currentSequenceSceneIndex++; PlayerData.instance.blackThreadWorld = BossSequence.currentSequenceScene.is3ActBoss; Log.LogInfo((object)nextSequenceScene.sceneName); }; tmpAction2 = delegate { CustomScene customScene56 = customScene52; customScene56.AfterHeroEnteredScene = (Action)Delegate.Remove(customScene56.AfterHeroEnteredScene, tmpAction2); if (nextSequenceScene.sceneType == BossScene.SceneType.Rest) { TransitionSequence.SetVisible(val: false); } else { TransitionSequence.SetVisible(val: true); } AudioSource transitionEndAudio = TransitionSequence.transitionEndAudio; if ((Object)(object)transitionEndAudio != (Object)null) { transitionEndAudio.Play(); } }; tmpAction3 = delegate { CustomScene customScene56 = customScene52; customScene56.AfterSceneActivated = (Action)Delegate.Remove(customScene56.AfterSceneActivated, tmpAction3); if (nextSequenceScene.sceneType == BossScene.SceneType.Rest) { TransitionSequence.SetVisible(val: false); } else { TransitionSequence.SetVisible(val: true); } }; CustomScene customScene53 = customScene52; customScene53.BeforeSceneLoaded = (Action)Delegate.Combine(customScene53.BeforeSceneLoaded, tmpAction1); CustomScene customScene54 = customScene52; customScene54.AfterHeroEnteredScene = (Action)Delegate.Combine(customScene54.AfterHeroEnteredScene, tmpAction2); CustomScene customScene55 = customScene52; customScene55.AfterSceneActivated = (Action)Delegate.Combine(customScene55.AfterSceneActivated, tmpAction3); Log.LogInfo((object)customScene52.sceneName); PlayMakerFSM.BroadcastEvent("REST SCENE MOD"); GG_Rest_Scene.isSceneActive = true; IEnumerator enumerator() { yield return null; sceneManagerComp.darknessLevel = 0; sceneManagerComp.saturation = 1.2f; sceneManagerComp.UpdateScene(); ((object)water).GetType().GetField("heroSurfaceY", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).SetValue(water, 52f); } }); customScenes.Add(GG_Rest_Scene); CustomScene Abyss_05 = new CustomScene("Abyss_05"); CustomScene customScene6 = Abyss_05; customScene6.AfterSceneLoaded = (Action)Delegate.Combine(customScene6.AfterSceneLoaded, (Action)delegate(Scene scene) { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: 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_007e: Expected O, but got Unknown //IL_007e: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) Texture2D val = assetBundles.Find((AssetBundle i) => ((Object)i).name == "gg_resources").LoadAsset("gg_tuner_0001_2"); Sprite sprite = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f)); GameObject val2 = new GameObject("Tunner_Mod"); SceneManager.MoveGameObjectToScene(val2, scene); val2.transform.position = new Vector3(145.5f, 12.4f, 0.013f); val2.transform.localScale = new Vector3(1.5f, 1.5f, 1f); val2.AddComponent().sprite = sprite; GameObject val3 = (GameObject)Object.Instantiate((Object)(object)Preload.preloads["door_wakeOnGround_FlowerQueen"], scene); val3.transform.position = new Vector3(142f, 12.4f, 0f); RespawnMarker respawnComp = Preload.FindObjectByPath(val3, "Death Respawn Marker").GetComponent(); ((Object)respawnComp).name = "Death Respawn Marker_Mod"; Fsm fsm = val3.GetComponent().Fsm; FsmState state = fsm.GetState("Door Entry"); fsm.GetFsmBool("Save Game").Value = true; PatchedFsm.CustomLogicFsm customLogicFsm = new PatchedFsm.CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayerData.instance.respawnMarkerName = ((Object)((Component)respawnComp).gameObject).name; PlayerData.instance.respawnScene = "Abyss_05"; }); state.Actions = PatchedFsm.InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, 0); }); CustomScene customScene7 = Abyss_05; customScene7.AfterSceneActivated = (Action)Delegate.Combine(customScene7.AfterSceneActivated, (Action)delegate(Scene scene) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: 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_002f: 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_0070: Unknown result type (might be due to invalid IL or missing references) GameObject val = (GameObject)Object.Instantiate((Object)(object)Preload.preloads["Memory Group"], scene); val.transform.position = new Vector3(144.2f, 13f, 0.013f); FsmState state = val.GetComponent().Fsm.GetState("Transition Scene"); ((BeginSceneTransition)state.Actions[4]).sceneName = FsmString.op_Implicit("GG_Pharloom_Atrium"); ((BeginSceneTransition)state.Actions[4]).entryGateName = FsmString.op_Implicit("door_wakeInMemory_AntQueen(Clone)"); Abyss_05.isSceneActive = true; }); customScenes.Add(Abyss_05); CustomScene Tut_03 = new CustomScene("Tut_03"); Tut_03.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(58.41f, 17.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Tut_03.isSkongScene = true; CustomScene customScene8 = Tut_03; customScene8.AfterSceneLoaded = (Action)Delegate.Combine(customScene8.AfterSceneLoaded, (Action)delegate { Tut_03.isSceneActive = true; }); customScenes.Add(Tut_03); CustomScene Weave_03 = new CustomScene("Weave_03"); Weave_03.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(13.41f, 20.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Weave_03.isSkongScene = true; CustomScene customScene9 = Weave_03; customScene9.AfterSceneLoaded = (Action)Delegate.Combine(customScene9.AfterSceneLoaded, (Action)delegate { Weave_03.isSceneActive = true; }); customScenes.Add(Weave_03); CustomScene Bone_05 = new CustomScene("Bone_05"); Bone_05.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(86.48f, 3.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Bone_05.isSkongScene = true; CustomScene customScene10 = Bone_05; customScene10.AfterSceneLoaded = (Action)Delegate.Combine(customScene10.AfterSceneLoaded, (Action)delegate { Bone_05.isSceneActive = true; }); CustomScene customScene11 = Bone_05; customScene11.AfterSceneActivated = (Action)Delegate.Combine(customScene11.AfterSceneActivated, (Action)delegate(Scene scene) { GameObject[] rootGameObjects = ((Scene)(ref scene)).GetRootGameObjects(); foreach (GameObject val in rootGameObjects) { if (((Object)val).name.Contains("Bellbeast Child")) { Object.Destroy((Object)(object)val); } } }); customScenes.Add(Bone_05); CustomScene Bone_East_08 = new CustomScene("Bone_East_08"); Bone_East_08.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(76.89f, 8.08f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true, hardLandOnExit: false, noInputOnStart: false, alwaysEnterRight: true, forceMemoryZone: true, delegate { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) GameObject.Find("Temp plat").SetActive(false); PlayerData.instance.hazardRespawnLocation = new Vector3(80.32f, 8.49f, 0f); })); Bone_East_08.isSkongScene = true; CustomScene customScene12 = Bone_East_08; customScene12.AfterSceneLoaded = (Action)Delegate.Combine(customScene12.AfterSceneLoaded, (Action)delegate(Scene scene) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Temp plat"); SceneManager.MoveGameObjectToScene(val, scene); val.AddComponent(); val.layer = 8; val.transform.position = new Vector3(76.89f, 4.9f, 0f); Bone_East_08.isSceneActive = true; }); customScenes.Add(Bone_East_08); CustomScene Coral_11 = new CustomScene("Coral_11"); Coral_11.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(52.6f, 14.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true, hardLandOnExit: false, noInputOnStart: true)); Coral_11.isSkongScene = true; CustomScene customScene13 = Coral_11; customScene13.AfterSceneLoaded = (Action)Delegate.Combine(customScene13.AfterSceneLoaded, (Action)delegate { Coral_11.isSceneActive = true; }); customScenes.Add(Coral_11); CustomScene Bone_East_12 = new CustomScene("Bone_East_12"); Bone_East_12.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(92f, 7.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Bone_East_12.isSkongScene = true; CustomScene customScene14 = Bone_East_12; customScene14.AfterSceneLoaded = (Action)Delegate.Combine(customScene14.AfterSceneLoaded, (Action)delegate { Bone_East_12.isSceneActive = true; }); customScenes.Add(Bone_East_12); CustomScene Coral_Judge_Arena = new CustomScene("Coral_Judge_Arena"); Coral_Judge_Arena.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(34.1932f, 24.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true, hardLandOnExit: false, noInputOnStart: true)); Coral_Judge_Arena.isSkongScene = true; CustomScene customScene15 = Coral_Judge_Arena; customScene15.AfterSceneLoaded = (Action)Delegate.Combine(customScene15.AfterSceneLoaded, (Action)delegate { Coral_Judge_Arena.isSceneActive = true; }); customScenes.Add(Coral_Judge_Arena); CustomScene Greymoor_08 = new CustomScene("Greymoor_08"); Greymoor_08.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(27.3f, 4.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Greymoor_08.isSkongScene = true; CustomScene customScene16 = Greymoor_08; customScene16.AfterSceneLoaded = (Action)Delegate.Combine(customScene16.AfterSceneLoaded, (Action)delegate { Greymoor_08.isSceneActive = true; }); customScenes.Add(Greymoor_08); CustomScene Organ_01 = new CustomScene("Organ_01"); Organ_01.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(84.36f, 104.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Organ_01.isSkongScene = true; CustomScene customScene17 = Organ_01; customScene17.AfterSceneLoaded = (Action)Delegate.Combine(customScene17.AfterSceneLoaded, (Action)delegate { Organ_01.isSceneActive = true; }); customScenes.Add(Organ_01); CustomScene Ant_19 = new CustomScene("Ant_19"); Ant_19.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(54.8f, 34.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Ant_19.isSkongScene = true; CustomScene customScene18 = Ant_19; customScene18.AfterSceneLoaded = (Action)Delegate.Combine(customScene18.AfterSceneLoaded, (Action)delegate { Ant_19.isSceneActive = true; }); customScenes.Add(Ant_19); CustomScene Shellwood_18 = new CustomScene("Shellwood_18"); Shellwood_18.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(42.49f, 8.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Shellwood_18.isSkongScene = true; CustomScene customScene19 = Shellwood_18; customScene19.AfterSceneLoaded = (Action)Delegate.Combine(customScene19.AfterSceneLoaded, (Action)delegate { Shellwood_18.isSceneActive = true; }); customScenes.Add(Shellwood_18); CustomScene Bone_15 = new CustomScene("Bone_15"); Bone_15.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(83.75f, 14.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Bone_15.isSkongScene = true; CustomScene customScene20 = Bone_15; customScene20.AfterSceneLoaded = (Action)Delegate.Combine(customScene20.AfterSceneLoaded, (Action)delegate { Bone_15.isSceneActive = true; }); customScenes.Add(Bone_15); CustomScene Belltown_Shrine = new CustomScene("Belltown_Shrine"); Belltown_Shrine.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(52.86f, 8.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true, hardLandOnExit: false, noInputOnStart: true)); Belltown_Shrine.isSkongScene = true; CustomScene customScene21 = Belltown_Shrine; customScene21.AfterSceneLoaded = (Action)Delegate.Combine(customScene21.AfterSceneLoaded, (Action)delegate { Belltown_Shrine.isSceneActive = true; }); customScenes.Add(Belltown_Shrine); CustomScene Slab_16b = new CustomScene("Slab_16b"); Slab_16b.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(56.95f, 5.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Slab_16b.isSkongScene = true; CustomScene customScene22 = Slab_16b; customScene22.AfterSceneLoaded = (Action)Delegate.Combine(customScene22.AfterSceneLoaded, (Action)delegate { Slab_16b.isSceneActive = true; }); customScenes.Add(Slab_16b); CustomScene Cog_Dancers = new CustomScene("Cog_Dancers"); Cog_Dancers.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(39.96f, 4.6f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Cog_Dancers.isSkongScene = true; CustomScene customScene23 = Cog_Dancers; customScene23.AfterSceneLoaded = (Action)Delegate.Combine(customScene23.AfterSceneLoaded, (Action)delegate { Cog_Dancers.isSceneActive = true; }); customScenes.Add(Cog_Dancers); CustomScene Dust_Chef = new CustomScene("Dust_Chef"); Dust_Chef.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(36.67f, 35.59f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Dust_Chef.isSkongScene = true; CustomScene customScene24 = Dust_Chef; customScene24.AfterSceneLoaded = (Action)Delegate.Combine(customScene24.AfterSceneLoaded, (Action)delegate { Dust_Chef.isSceneActive = true; }); customScenes.Add(Dust_Chef); CustomScene Belltown_08 = new CustomScene("Belltown_08"); Belltown_08.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(53.11f, 11.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Belltown_08.isSkongScene = true; CustomScene customScene25 = Belltown_08; customScene25.AfterSceneLoaded = (Action)Delegate.Combine(customScene25.AfterSceneLoaded, (Action)delegate { Belltown_08.isSceneActive = true; }); customScenes.Add(Belltown_08); CustomScene Slab_10b = new CustomScene("Slab_10b"); Slab_10b.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(41f, 9.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true, hardLandOnExit: false, noInputOnStart: true)); Slab_10b.isSkongScene = true; CustomScene customScene26 = Slab_10b; customScene26.AfterSceneLoaded = (Action)Delegate.Combine(customScene26.AfterSceneLoaded, (Action)delegate { Slab_10b.isSceneActive = true; }); customScenes.Add(Slab_10b); CustomScene Dock_09 = new CustomScene("Dock_09"); Dock_09.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(30f, 7.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Dock_09.isSkongScene = true; CustomScene customScene27 = Dock_09; customScene27.AfterSceneLoaded = (Action)Delegate.Combine(customScene27.AfterSceneLoaded, (Action)delegate { Dock_09.isSceneActive = true; }); customScenes.Add(Dock_09); CustomScene Library_09 = new CustomScene("Library_09"); Library_09.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(75.39f, 15.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true, hardLandOnExit: false, noInputOnStart: true)); Library_09.isSkongScene = true; CustomScene customScene28 = Library_09; customScene28.AfterSceneLoaded = (Action)Delegate.Combine(customScene28.AfterSceneLoaded, (Action)delegate { Library_09.isSceneActive = true; }); customScenes.Add(Library_09); CustomScene Cradle_03 = new CustomScene("Cradle_03"); Cradle_03.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(39.7f, 133.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true, hardLandOnExit: false, noInputOnStart: false, alwaysEnterRight: true, forceMemoryZone: true, delegate { PlayMakerFSM.BroadcastEvent("START CHALLENGE MOD"); })); Cradle_03.isSkongScene = true; CustomScene customScene29 = Cradle_03; customScene29.AfterSceneLoaded = (Action)Delegate.Combine(customScene29.AfterSceneLoaded, (Action)delegate { Cradle_03.isSceneActive = true; }); customScenes.Add(Cradle_03); CustomScene Shadow_18 = new CustomScene("Shadow_18"); Shadow_18.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(56.5236f, 11.443f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Shadow_18.isSkongScene = true; CustomScene customScene30 = Shadow_18; customScene30.AfterSceneLoaded = (Action)Delegate.Combine(customScene30.AfterSceneLoaded, (Action)delegate { Shadow_18.isSceneActive = true; }); customScenes.Add(Shadow_18); CustomScene Song_Tower_01 = new CustomScene("Song_Tower_01"); Song_Tower_01.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(49.27f, 100.01f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Song_Tower_01.isSkongScene = true; CustomScene customScene31 = Song_Tower_01; customScene31.AfterSceneLoaded = (Action)Delegate.Combine(customScene31.AfterSceneLoaded, (Action)delegate { Song_Tower_01.isSceneActive = true; }); customScenes.Add(Song_Tower_01); CustomScene Coral_27 = new CustomScene("Coral_27"); Coral_27.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(12f, 33.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Coral_27.isSkongScene = true; CustomScene customScene32 = Coral_27; customScene32.AfterSceneLoaded = (Action)Delegate.Combine(customScene32.AfterSceneLoaded, (Action)delegate { Coral_27.isSceneActive = true; }); customScenes.Add(Coral_27); CustomScene Hang_17b = new CustomScene("Hang_17b"); Hang_17b.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(36.4f, 4.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Hang_17b.isSkongScene = true; CustomScene customScene33 = Hang_17b; customScene33.AfterSceneLoaded = (Action)Delegate.Combine(customScene33.AfterSceneLoaded, (Action)delegate { Hang_17b.isSceneActive = true; }); customScenes.Add(Hang_17b); CustomScene Ward_02 = new CustomScene("Ward_02"); Ward_02.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(51.26f, 6.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Ward_02.isSkongScene = true; CustomScene customScene34 = Ward_02; customScene34.AfterSceneLoaded = (Action)Delegate.Combine(customScene34.AfterSceneLoaded, (Action)delegate { Ward_02.isSceneActive = true; }); customScenes.Add(Ward_02); CustomScene Library_13 = new CustomScene("Library_13"); Library_13.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(69.5f, 14.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Library_13.isSkongScene = true; CustomScene customScene35 = Library_13; customScene35.AfterSceneLoaded = (Action)Delegate.Combine(customScene35.AfterSceneLoaded, (Action)delegate { Library_13.isSceneActive = true; }); customScenes.Add(Library_13); CustomScene Coral_29 = new CustomScene("Coral_29"); Coral_29.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(172.76f, 24.573f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Coral_29.isSkongScene = true; CustomScene customScene36 = Coral_29; customScene36.AfterSceneLoaded = (Action)Delegate.Combine(customScene36.AfterSceneLoaded, (Action)delegate { Coral_29.isSceneActive = true; }); customScenes.Add(Coral_29); CustomScene Bellway_Centipede_Arena = new CustomScene("Bellway_Centipede_Arena"); Bellway_Centipede_Arena.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(136.35f, 7.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Bellway_Centipede_Arena.isSkongScene = true; CustomScene customScene37 = Bellway_Centipede_Arena; customScene37.AfterSceneLoaded = (Action)Delegate.Combine(customScene37.AfterSceneLoaded, (Action)delegate { Bellway_Centipede_Arena.isSceneActive = true; }); customScenes.Add(Bellway_Centipede_Arena); CustomScene Clover_10 = new CustomScene("Clover_10"); Clover_10.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(88.55f, 37.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Clover_10.isSkongScene = true; CustomScene customScene38 = Clover_10; customScene38.AfterSceneLoaded = (Action)Delegate.Combine(customScene38.AfterSceneLoaded, (Action)delegate { Clover_10.isSceneActive = true; }); customScenes.Add(Clover_10); CustomScene Room_CrowCourt_02 = new CustomScene("Room_CrowCourt_02"); Room_CrowCourt_02.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(33.5f, 21.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Room_CrowCourt_02.isSkongScene = true; CustomScene customScene39 = Room_CrowCourt_02; customScene39.AfterSceneLoaded = (Action)Delegate.Combine(customScene39.AfterSceneLoaded, (Action)delegate { Room_CrowCourt_02.isSceneActive = true; }); customScenes.Add(Room_CrowCourt_02); CustomScene Memory_Coral_Tower = new CustomScene("Memory_Coral_Tower"); Memory_Coral_Tower.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(54.93f, 550.7f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true, hardLandOnExit: false, noInputOnStart: false, alwaysEnterRight: true, forceMemoryZone: true, delegate { GameObject val = GameObject.Find("Temp plat"); if ((Object)(object)val != (Object)null) { val.SetActive(false); } })); Memory_Coral_Tower.AddTransitionPoint(new TransitionPointInfo("start_battle_entry2", new Vector3(54.62f, 256.6f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true, hardLandOnExit: false, noInputOnStart: false, alwaysEnterRight: true, forceMemoryZone: true, delegate { BattleScene component = GameObject.Find("Battle Scene Chamber 1").GetComponent(); if ((Object)(object)component != (Object)null) { component.LockInBattle(); component.StartBattle(); } })); Memory_Coral_Tower.isSkongScene = true; CustomScene customScene40 = Memory_Coral_Tower; customScene40.AfterSceneLoaded = (Action)Delegate.Combine(customScene40.AfterSceneLoaded, (Action)delegate(Scene scene) { //IL_001b: 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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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) if (BossSequence.currentSequenceScene != BossScene.bosses["Coral Tower Battle"]) { GameObject val = new GameObject("Temp plat"); SceneManager.MoveGameObjectToScene(val, scene); val.AddComponent(); val.layer = 8; val.transform.position = new Vector3(54.93f, 548.7f, 0f); } Memory_Coral_Tower.isSceneActive = true; }); customScenes.Add(Memory_Coral_Tower); CustomScene Bone_East_18b = new CustomScene("Bone_East_18b"); Bone_East_18b.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(172.7f, 6.33f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Bone_East_18b.isSkongScene = true; CustomScene customScene41 = Bone_East_18b; customScene41.AfterSceneLoaded = (Action)Delegate.Combine(customScene41.AfterSceneLoaded, (Action)delegate { Bone_East_18b.isSceneActive = true; }); customScenes.Add(Bone_East_18b); CustomScene Coral_33 = new CustomScene("Coral_33"); Coral_33.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(30f, 61.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Coral_33.isSkongScene = true; CustomScene customScene42 = Coral_33; customScene42.AfterSceneLoaded = (Action)Delegate.Combine(customScene42.AfterSceneLoaded, (Action)delegate { Coral_33.isSceneActive = true; }); customScenes.Add(Coral_33); CustomScene AbyssCocoon = new CustomScene("Abyss_Cocoon"); AbyssCocoon.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(29.16f, 5.65f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true, hardLandOnExit: false, noInputOnStart: true)); AbyssCocoon.isSkongScene = true; CustomScene customScene43 = AbyssCocoon; customScene43.AfterSceneLoaded = (Action)Delegate.Combine(customScene43.AfterSceneLoaded, (Action)delegate { AbyssCocoon.isSceneActive = true; }); customScenes.Add(AbyssCocoon); CustomScene Shellwood_11b_Memory = new CustomScene("Shellwood_11b_Memory"); Shellwood_11b_Memory.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(18f, 96f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Shellwood_11b_Memory.isSkongScene = true; CustomScene customScene44 = Shellwood_11b_Memory; customScene44.AfterSceneLoaded = (Action)Delegate.Combine(customScene44.AfterSceneLoaded, (Action)delegate { Shellwood_11b_Memory.isSceneActive = true; }); customScenes.Add(Shellwood_11b_Memory); CustomScene Clover_19 = new CustomScene("Clover_19"); Clover_19.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(25.64f, 12.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true, hardLandOnExit: false, noInputOnStart: true)); Clover_19.isSkongScene = true; CustomScene customScene45 = Clover_19; customScene45.AfterSceneLoaded = (Action)Delegate.Combine(customScene45.AfterSceneLoaded, (Action)delegate { Clover_19.isSceneActive = true; }); customScenes.Add(Clover_19); CustomScene Peak_07 = new CustomScene("Peak_07"); Peak_07.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(34.65f, 88.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true, hardLandOnExit: false, noInputOnStart: true)); Peak_07.isSkongScene = true; CustomScene customScene46 = Peak_07; customScene46.AfterSceneLoaded = (Action)Delegate.Combine(customScene46.AfterSceneLoaded, (Action)delegate { Peak_07.isSceneActive = true; }); customScenes.Add(Peak_07); CustomScene Crawl_10 = new CustomScene("Crawl_10"); Crawl_10.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(19.66f, 7.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Crawl_10.isSkongScene = true; CustomScene customScene47 = Crawl_10; customScene47.AfterSceneLoaded = (Action)Delegate.Combine(customScene47.AfterSceneLoaded, (Action)delegate { Crawl_10.isSceneActive = true; }); customScenes.Add(Crawl_10); CustomScene Shellwood_22 = new CustomScene("Shellwood_22"); Shellwood_22.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(101.35f, 6.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Shellwood_22.isSkongScene = true; CustomScene customScene48 = Shellwood_22; customScene48.AfterSceneLoaded = (Action)Delegate.Combine(customScene48.AfterSceneLoaded, (Action)delegate { Shellwood_22.isSceneActive = true; }); customScenes.Add(Shellwood_22); CustomScene Memory_Ant_Queen = new CustomScene("Memory_Ant_Queen"); Memory_Ant_Queen.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(148.4f, 19.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true, hardLandOnExit: false, noInputOnStart: true)); Memory_Ant_Queen.isSkongScene = true; CustomScene customScene49 = Memory_Ant_Queen; customScene49.AfterSceneLoaded = (Action)Delegate.Combine(customScene49.AfterSceneLoaded, (Action)delegate { Memory_Ant_Queen.isSceneActive = true; }); customScenes.Add(Memory_Ant_Queen); CustomScene Coral_39 = new CustomScene("Coral_39"); Coral_39.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(131f, 7.57f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Coral_39.isSkongScene = true; CustomScene customScene50 = Coral_39; customScene50.AfterSceneLoaded = (Action)Delegate.Combine(customScene50.AfterSceneLoaded, (Action)delegate { Coral_39.isSceneActive = true; }); customScenes.Add(Coral_39); CustomScene Hang_04 = new CustomScene("Hang_04"); Hang_04.AddTransitionPoint(new TransitionPointInfo("start_battle_entry", new Vector3(30.67f, 5f, 0f), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: true, dontWalkOutOfDoor: true)); Hang_04.isSkongScene = true; CustomScene customScene51 = Hang_04; customScene51.AfterSceneLoaded = (Action)Delegate.Combine(customScene51.AfterSceneLoaded, (Action)delegate { Hang_04.isSceneActive = true; }); customScenes.Add(Hang_04); static IEnumerator UpdateUpdraftState() { while (true) { if (!BossSequence.isInSequence) { HeroController.instance.EnterUpdraft(60f); } yield return null; } } } } public class BindingsMenu { public static GameObject menuBindings; public static Fsm menuBindingsFsm; public static Fsm menuBindingsInvProxyFsm; public static string[] menuBindingsInvProxyFsmStatesHistory = new string[50]; public static GameObject customBrokenSpool; public static TextMeshPro textName; public static TextMeshPro textDesc; public static InventoryItemCollectable needleBinding; public static InventoryItemCollectable silkBinding; public static InventoryItemCollectable toolsBinding; public static InventoryItemCollectable maskBinding; public static InventoryItemCollectable cloaklessMode; public static InventoryItemCollectable cursedMode; public static InventoryItemCollectable needleArt; public static InventoryItemCollectable toolsBugUpgrade; public static InventoryItemCollectable toolsKitUpgrade; public static InventoryItemCollectable crestlessHornet; public static InventoryItemCollectable cursedHornet; public static InventoryItemNail needle; public static NestedFadeGroup toolsMsgWhileBindingEffect; public static NestedFadeGroup bindingsMsgWhileInSequence; public static bool isMsgFading = false; public static int maskBindingCount = 5; public static bool isHealthIncreasing = false; public static InventoryItemHeartPieces heartPieces; public static InventoryItemSpoolPieces spoolPieces; public static InventoryItemConditional sprint; public static InventoryItemConditional harpoonDash; public static InventoryItemConditional evaHeal; public static InventoryItemConditional superJump; public static InventoryItemConditional wallJump; public static InventoryItemConditional needolin; public static InventoryItemSpool silkHeartsSpool; public static InventoryItemCollectable cloakStates; public static AudioSource audioSource; public static AudioClip mainBindingsSoundSelect; public static AudioClip mainBindingsSoundFull; public static AudioClip submitSound1; public static string[] cloakLables = new string[4] { "Hunter's Cloak", "Drifter’s Cloak", "Faydown Cloak", "Faydown Cloak" }; public static string[] cloakDescriptions = new string[4] { "Simple protective garb, expertly woven but showing signs of age.", "Simple protective garb, sewn through with flexible spines.", "Protective garb lined with the soft down of a Fayforn.", "Protective garb lined with the soft down of a Fayforn and sewn through with flexible spines." }; public static Dictionary> crestsPreviousState = new Dictionary>(); public static Dictionary> submitActions = new Dictionary> { { "Tools Buttons Msg", delegate { TryFadeMsg(toolsMsgWhileBindingEffect); } }, { "Needle Binding", delegate { ToggleBinding(((Component)needleBinding).gameObject); UpdateMenuBindingsDisplay(); } }, { "Silk Binding", delegate { ToggleBinding(((Component)silkBinding).gameObject); UpdateMenuBindingsDisplay(); } }, { "Tools Binding", delegate { ToggleBinding(((Component)toolsBinding).gameObject); UpdateMenuBindingsDisplay(); } }, { "Mask Binding", delegate { ToggleBinding(((Component)maskBinding).gameObject); UpdateMenuBindingsDisplay(); } }, { "Needle", delegate { PlayerData instance = PlayerData.instance; if (instance != null) { instance.nailUpgrades = ((instance.nailUpgrades + 1 < 5) ? (instance.nailUpgrades + 1) : 0); audioSource.PlayOneShot(submitSound1); UpdateMenuBindingsDisplay(); } } }, { "Heart Pieces", delegate { PlayerData instance = PlayerData.instance; PlayerDataMod instance2 = PlayerDataMod.instance; if (instance != null && instance2 != null) { int num = instance.maxHealth + 1; num = ((num > 10) ? 1 : num); if (!instance2.bindings["Mask Binding"]) { ((MonoBehaviour)GodsOfPharloomMod.instance).StartCoroutine(TrySetHeroHealth(num)); } else { num = ((num > maskBindingCount) ? 1 : num); ((MonoBehaviour)GodsOfPharloomMod.instance).StartCoroutine(TrySetHeroHealth(num)); instance2.previousHealthCount = num; } audioSource.PlayOneShot(submitSound1); UpdateMenuBindingsDisplay(); } } }, { "Spool Pieces", delegate { PlayerData instance = PlayerData.instance; PlayerDataMod instance2 = PlayerDataMod.instance; if (instance != null && instance2 != null) { int num = ((instance.silkMax < 18) ? (instance.silkMax + 1) : 0); num = ((num <= 9 || !instance2.bindings["Silk Binding"]) ? num : 0); instance.silkMax = num; audioSource.PlayOneShot(submitSound1); UpdateMenuBindingsDisplay(); } } }, { "Sprint", delegate(bool onlyUpdateDisplaying) { PlayerData instance = PlayerData.instance; if (instance != null) { if (!onlyUpdateDisplaying) { instance.hasDash = !instance.hasDash; } audioSource.PlayOneShot(submitSound1); UpdateMenuBindingsDisplay(); } } }, { "Harpoon Dash", delegate(bool onlyUpdateDisplaying) { PlayerData instance = PlayerData.instance; if (instance != null) { if (!onlyUpdateDisplaying) { instance.hasHarpoonDash = !instance.hasHarpoonDash; } audioSource.PlayOneShot(submitSound1); UpdateMenuBindingsDisplay(); } } }, { "Eva Heal", delegate(bool onlyUpdateDisplaying) { PlayerData instance = PlayerData.instance; if (instance != null) { if (!onlyUpdateDisplaying) { instance.HasBoundCrestUpgrader = !instance.HasBoundCrestUpgrader; } audioSource.PlayOneShot(submitSound1); UpdateMenuBindingsDisplay(); } } }, { "Super Jump", delegate(bool onlyUpdateDisplaying) { PlayerData instance = PlayerData.instance; if (instance != null) { if (!onlyUpdateDisplaying) { instance.hasSuperJump = !instance.hasSuperJump; } audioSource.PlayOneShot(submitSound1); UpdateMenuBindingsDisplay(); } } }, { "Wall Jump", delegate(bool onlyUpdateDisplaying) { PlayerData instance = PlayerData.instance; if (instance != null) { if (!onlyUpdateDisplaying) { instance.hasWalljump = !instance.hasWalljump; } audioSource.PlayOneShot(submitSound1); UpdateMenuBindingsDisplay(); } } }, { "Needolin", delegate(bool onlyUpdateDisplaying) { PlayerData instance = PlayerData.instance; if (instance != null) { if (!onlyUpdateDisplaying) { instance.hasNeedolin = !instance.hasNeedolin; } audioSource.PlayOneShot(submitSound1); UpdateMenuBindingsDisplay(); } } }, { "Spool", delegate { PlayerData instance = PlayerData.instance; if (instance != null) { int silkRegenMax = ((instance.silkRegenMax < 3) ? (instance.silkRegenMax + 1) : 0); instance.silkRegenMax = silkRegenMax; audioSource.PlayOneShot(submitSound1); } } }, { "Cloak States", delegate(bool onlyUpdateDisplaying) { PlayerData instance = PlayerData.instance; if (instance != null) { int num = 0; if (!instance.hasBrolly && !instance.hasDoubleJump) { num = 0; } else if (instance.hasBrolly && !instance.hasDoubleJump) { num = 1; } else if (!instance.hasBrolly && instance.hasDoubleJump) { num = 2; } else if (instance.hasBrolly && instance.hasDoubleJump) { num = 3; } if (!onlyUpdateDisplaying) { num = ((num < 3) ? (num + 1) : 0); switch (num) { case 0: instance.hasBrolly = false; instance.hasDoubleJump = false; break; case 1: instance.hasBrolly = true; instance.hasDoubleJump = false; break; case 2: instance.hasBrolly = false; instance.hasDoubleJump = true; break; case 3: instance.hasBrolly = true; instance.hasDoubleJump = true; break; } ((TMP_Text)textName).text = cloakLables[num]; ((TMP_Text)textDesc).text = cloakDescriptions[num]; } audioSource.PlayOneShot(submitSound1); UpdateMenuBindingsDisplay(); } } }, { "Needle Art", delegate { PlayerData instance = PlayerData.instance; if (instance != null) { instance.hasChargeSlash = !instance.hasChargeSlash; audioSource.PlayOneShot(submitSound1); UpdateMenuBindingsDisplay(); } } }, { "Tools Upgrade", delegate { PlayerData instance = PlayerData.instance; if (instance != null) { int toolPouchUpgrades = ((instance.ToolPouchUpgrades + 1 <= 4) ? (instance.ToolPouchUpgrades + 1) : 0); instance.ToolPouchUpgrades = toolPouchUpgrades; audioSource.PlayOneShot(submitSound1); UpdateMenuBindingsDisplay(); } } }, { "Tools Kit Upgrade", delegate { PlayerData instance = PlayerData.instance; if (instance != null) { int toolKitUpgrades = ((instance.ToolKitUpgrades + 1 <= 4) ? (instance.ToolKitUpgrades + 1) : 0); instance.ToolKitUpgrades = toolKitUpgrades; audioSource.PlayOneShot(submitSound1); UpdateMenuBindingsDisplay(); } } }, { "Crestless Hornet", delegate { if (((ToolBase)Gameplay.CloaklessCrest).IsEquipped) { ToolCrest val = Gameplay.HunterCrest3; if (!val.IsUnlocked) { val = Gameplay.HunterCrest2; } if (!val.IsUnlocked) { val = Gameplay.HunterCrest; } ToolItemManager.AutoEquip(val, false, false); } else { ToolItemManager.AutoEquip(Gameplay.CloaklessCrest, false, false); } audioSource.PlayOneShot(submitSound1); UpdateMenuBindingsDisplay(); } }, { "Cursed Hornet", delegate { if (((ToolBase)Gameplay.CursedCrest).IsEquipped) { ToolCrest val = Gameplay.HunterCrest3; if (!val.IsUnlocked) { val = Gameplay.HunterCrest2; } if (!val.IsUnlocked) { val = Gameplay.HunterCrest; } ToolItemManager.AutoEquip(val, false, false); } else { ToolItemManager.AutoEquip(Gameplay.CursedCrest, false, false); } audioSource.PlayOneShot(submitSound1); UpdateMenuBindingsDisplay(); } } }; public static IEnumerator UpdateSilkSpool() { GameCameras gc = GameCameras.instance; Transform spoolParent = null; Transform origSpool = null; PlayerData pd = null; Coroutine silkUpdater = null; int silkAmountStart = 9; while (true) { if (!((Object)(object)gc != (Object)null)) { gc = GameCameras.instance; if ((Object)(object)gc == (Object)null) { yield return null; continue; } } while (pd == null) { pd = PlayerData.instance; if (pd != null) { break; } yield return null; } while (!((Object)(object)spoolParent != (Object)null)) { try { spoolParent = ((Component)gc.hudCanvasSlideOut).gameObject.transform.Find("Thread/Spool/Thread Spool/Parent"); } catch (Exception ex) { GodsOfPharloomMod.Log.LogInfo((object)("UpdateSilkSpool_Method:\n" + ex.Message)); } if (!((Object)(object)spoolParent == (Object)null)) { break; } yield return null; } while (!((Object)(object)origSpool != (Object)null)) { origSpool = spoolParent.Find("Broken"); if (!((Object)(object)origSpool == (Object)null)) { break; } yield return null; } Material brokenSpoolMaterial; if ((Object)(object)customBrokenSpool == (Object)null || (Object)(object)customBrokenSpool.transform.parent != (Object)(object)origSpool) { if ((Object)(object)customBrokenSpool != (Object)null) { Object.Destroy((Object)(object)customBrokenSpool); } ((Renderer)((Component)origSpool).GetComponent()).forceRenderingOff = true; customBrokenSpool = Object.Instantiate((GameObject)Preload.bundleResources["CustomBrokenSilkSpool"], ((Component)origSpool).transform); customBrokenSpool.transform.localPosition = new Vector3(-0.05f, 0f, 0f); customBrokenSpool.SetActive(false); brokenSpoolMaterial = ((Renderer)customBrokenSpool.GetComponent()).material; if (silkUpdater == null) { silkUpdater = ((MonoBehaviour)GodsOfPharloomMod.instance).StartCoroutine(UpdateBrokenSpoolMaterialAndTransform()); } } if (pd.silkMax <= silkAmountStart) { while (pd.silkMax <= silkAmountStart) { customBrokenSpool.SetActive(true); Transform val = spoolParent.Find("Active"); Transform val2 = spoolParent.Find("Broken"); Transform val3 = spoolParent.Find("Bind Notch"); if ((Object)(object)val != (Object)null) { ((Component)val).gameObject.SetActive(false); } if ((Object)(object)val2 != (Object)null) { ((Component)val2).gameObject.SetActive(true); } if ((Object)(object)val3 != (Object)null) { ((Component)val3).gameObject.SetActive(false); } yield return null; } customBrokenSpool.SetActive(false); } yield return null; continue; IEnumerator UpdateBrokenSpoolMaterialAndTransform() { while (true) { brokenSpoolMaterial.SetInt("_SilkSpoolSegAmount", pd.silkMax); yield return null; } } IEnumerator UpdateBrokenSpoolMaterialAndTransform() { while (true) { brokenSpoolMaterial.SetInt("_SilkSpoolSegAmount", pd.silkMax); yield return null; } } } } public static IEnumerator UpdateSilkBinding() { while (true) { PlayerData.instance.IsSilkSpoolBroken = false; if (PlayerDataMod.instance.bindings["Silk Binding"]) { PlayerData pd = null; PlayerDataMod pdm = PlayerDataMod.instance; while (pd == null) { pd = PlayerData.instance; if (pd != null) { break; } yield return null; } pdm.previousSilkSpoolCount = pd.silkMax; while (PlayerDataMod.instance.bindings["Silk Binding"]) { if (pd.silkMax > 9) { pd.silkMax = 9; UpdateMenuBindingsDisplay(); } yield return null; } pd.silkMax = pdm.previousSilkSpoolCount; UpdateMenuBindingsDisplay(); } yield return null; } } public static IEnumerator UpdateToolsBinding() { while (true) { if (PlayerDataMod.instance.bindings["Tools Binding"]) { if (!TryActivateToolsBinding()) { yield return null; continue; } while (PlayerDataMod.instance.bindings["Tools Binding"]) { yield return null; } TryActivateToolsBinding(); } yield return null; } } public static IEnumerator UpdateMaskBinding() { PlayerData pd = PlayerData.instance; PlayerDataMod pdm = PlayerDataMod.instance; while (true) { if (pdm.bindings["Mask Binding"]) { pdm.previousHealthCount = pd.maxHealth; int amount = ((pd.maxHealth > maskBindingCount) ? maskBindingCount : pd.maxHealth); ((MonoBehaviour)GodsOfPharloomMod.instance).StartCoroutine(TrySetHeroHealth(amount)); while (pdm.bindings["Mask Binding"]) { yield return null; } ((MonoBehaviour)GodsOfPharloomMod.instance).StartCoroutine(TrySetHeroHealth(pdm.previousHealthCount)); } yield return null; } } public static IEnumerator TrySetHeroHealth(int amount) { isHealthIncreasing = true; PlayerData.instance.maxHealth = amount; PlayerData.instance.maxHealthBase = amount; PlayerData.instance.health = amount; List list = new List(); List healthsToActivate = new List(); Transform transform = ((Component)GameCameras.instance.hudCanvasSlideOut).transform; int num = 0; foreach (Transform item in transform.Find("Health")) { Transform val = item; if (((Object)val).name == "Health 1" || ((Object)val).name == "Health 2+(Clone)") { PlayMakerFSM val2 = FSMUtility.LocateMyFSM(((Component)val).gameObject, "health_display"); list.Add(val2); if (num < amount) { healthsToActivate.Add(val2); num++; } ((Behaviour)val2).enabled = true; val2.Fsm.SetState("Inactive"); } } foreach (PlayMakerFSM item2 in healthsToActivate) { ((Behaviour)item2).enabled = true; item2.Fsm.SetState("Idle Enter"); } while (true) { bool flag = false; for (int i = 0; i < healthsToActivate.Count; i++) { Fsm fsm = healthsToActivate[i].Fsm; if (((Behaviour)fsm.FsmComponent).enabled || fsm.ActiveStateName != "Idle") { break; } if (i == healthsToActivate.Count - 1) { flag = true; } } if (flag) { break; } yield return null; } UpdateMenuBindingsDisplay(); isHealthIncreasing = false; } public static void TryFadeMsg(NestedFadeGroup fadeComp, float fadeTime = 0.15f) { ((MonoBehaviour)menuBindingsFsm.FsmComponent).StartCoroutine(ITryFadeMsg(fadeComp, fadeTime)); } public static IEnumerator ITryFadeMsg(NestedFadeGroup fadeComp, float fadeTime) { GodsOfPharloomMod.Log.LogInfo((object)"Started try fade msg"); if (isMsgFading) { yield break; } GodsOfPharloomMod.Log.LogInfo((object)"Continued try fade msg"); isMsgFading = true; float timer = 0f; while (((NestedFadeGroupBase)fadeComp).AlphaSelf < 1f) { timer += Time.unscaledDeltaTime; ((NestedFadeGroupBase)fadeComp).AlphaSelf = ((timer / fadeTime > 1f) ? 1f : (timer / fadeTime)); yield return null; } GodsOfPharloomMod.Log.LogInfo((object)"fade msg 1"); while (true) { HeroActions inputActions = ManagerSingleton.Instance.inputActions; if (((OneAxisInputControl)inputActions.Jump).WasPressed || ((OneAxisInputControl)inputActions.Up).WasPressed || ((OneAxisInputControl)inputActions.Down).WasPressed || ((OneAxisInputControl)inputActions.Left).WasPressed || ((OneAxisInputControl)inputActions.Right).WasPressed) { break; } yield return null; } GodsOfPharloomMod.Log.LogInfo((object)"fade msg 2"); timer = 0f; while (((NestedFadeGroupBase)fadeComp).AlphaSelf > 0f) { timer += Time.unscaledDeltaTime; ((NestedFadeGroupBase)fadeComp).AlphaSelf = ((1f - timer / fadeTime < 0f) ? 0f : (1f - timer / fadeTime)); yield return null; } isMsgFading = false; GodsOfPharloomMod.Log.LogInfo((object)"End fade msg"); } public static bool TryShowSequenceMsg() { if (!BossSequence.isInSequence) { return false; } TryFadeMsg(bindingsMsgWhileInSequence); return true; } public static bool TryActivateToolsBinding() { //IL_008c: 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_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Invalid comparison between Unknown and I4 try { GameObject obj = GameObject.Find("_GameCameras/HudCamera/In-game/Inventory"); InventoryToolCrestSlot component = ((Component)obj.transform.Find("Tools/Tool Group/Floating Slots/Defend Slot")).gameObject.GetComponent(); InventoryToolCrestSlot component2 = ((Component)obj.transform.Find("Tools/Tool Group/Floating Slots/Explore Slot")).gameObject.GetComponent(); if (PlayerDataMod.instance.bindings["Tools Binding"]) { foreach (ToolCrest allCrest in ToolItemManager.GetAllCrests()) { if ((Object)(object)allCrest == (Object)null) { continue; } List slots = ((SerializableNamedList)(object)PlayerData.instance.ToolEquips).GetData(allCrest.name).Slots; if (slots == null) { continue; } List list = new List(); List list2 = new List(); foreach (SlotData item2 in slots) { ToolItem toolByName = ToolItemManager.GetToolByName(item2.EquippedTool); if ((Object)(object)toolByName == (Object)null) { list.Add(""); list2.Add(""); continue; } string item = ((toolByName.name != null) ? toolByName.name : ""); list.Add(item); if ((int)toolByName.Type == 3) { list2.Add(item); } else { list2.Add(""); } } crestsPreviousState[allCrest.name] = list; ToolItemManager.SetEquippedTools(allCrest.name, list2); } crestsPreviousState[((Object)component).name] = new List { component.SaveData.EquippedTool }; crestsPreviousState[((Object)component2).name] = new List { component2.SaveData.EquippedTool }; ToolItemManager.SetExtraEquippedTool("Defend1", ""); ToolItemManager.SetExtraEquippedTool("Explore1", ""); ToolItemManager.SendEquippedChangedEvent(false); return true; } foreach (KeyValuePair> item3 in crestsPreviousState) { if (item3.Key == ((Object)component).name) { ToolItemManager.SetExtraEquippedTool("Defend1", item3.Value[0]); } else if (item3.Key == ((Object)((Component)component2).gameObject).name) { ToolItemManager.SetExtraEquippedTool("Explore1", item3.Value[0]); } else { ToolItemManager.SetEquippedTools(item3.Key, item3.Value); } } crestsPreviousState = new Dictionary>(); ToolItemManager.SendEquippedChangedEvent(false); return true; } catch (Exception) { return false; } } public static void ToggleBinding(GameObject bindingObj) { //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Expected O, but got Unknown PlayerDataMod instance = PlayerDataMod.instance; Transform val = bindingObj.transform.Find("Group/Parent"); GameObject gameObject = ((Component)bindingObj.transform.Find("Group/generic_flash_ui")).gameObject; GameObject[] array = (GameObject[])(object)new GameObject[4] { ((Component)needleBinding).gameObject, ((Component)silkBinding).gameObject, ((Component)toolsBinding).gameObject, ((Component)maskBinding).gameObject }; if (instance.bindings["Needle Binding"] && instance.bindings["Silk Binding"] && instance.bindings["Tools Binding"] && instance.bindings["Mask Binding"]) { GameObject[] array2 = array; foreach (GameObject obj in array2) { Transform val2 = obj.transform.Find("Group/Parent"); GameObject gameObject2 = ((Component)obj.transform.Find("Group/generic_flash_ui")).gameObject; gameObject2.SetActive(false); gameObject2.SetActive(true); foreach (Transform item in val2) { Transform val3 = item; if (((Object)val3).name == "Activated") { ((Component)val3).gameObject.SetActive(true); } else { ((Component)val3).gameObject.SetActive(false); } } } } if (((Object)bindingObj).name == "Needle Binding") { bool flag = instance.bindings["Needle Binding"]; instance.bindings["Needle Binding"] = !flag; gameObject.SetActive(false); gameObject.SetActive(true); ((Component)val.Find("Deactivated")).gameObject.SetActive(flag); ((Component)val.Find("Activated")).gameObject.SetActive(!flag); } if (((Object)bindingObj).name == "Silk Binding") { bool flag2 = instance.bindings["Silk Binding"]; instance.bindings["Silk Binding"] = !flag2; gameObject.SetActive(false); gameObject.SetActive(true); ((Component)val.Find("Deactivated")).gameObject.SetActive(flag2); ((Component)val.Find("Activated")).gameObject.SetActive(!flag2); } if (((Object)bindingObj).name == "Tools Binding") { bool flag3 = instance.bindings["Tools Binding"]; instance.bindings["Tools Binding"] = !flag3; gameObject.SetActive(false); gameObject.SetActive(true); ((Component)val.Find("Deactivated")).gameObject.SetActive(flag3); ((Component)val.Find("Activated")).gameObject.SetActive(!flag3); } if (((Object)bindingObj).name == "Mask Binding") { bool flag4 = instance.bindings["Mask Binding"]; instance.bindings["Mask Binding"] = !flag4; gameObject.SetActive(false); gameObject.SetActive(true); ((Component)val.Find("Deactivated")).gameObject.SetActive(flag4); ((Component)val.Find("Activated")).gameObject.SetActive(!flag4); } audioSource.PlayOneShot(mainBindingsSoundSelect); if (instance.bindings["Needle Binding"] && instance.bindings["Silk Binding"] && instance.bindings["Tools Binding"] && instance.bindings["Mask Binding"]) { GameObject[] array2 = array; foreach (GameObject obj2 in array2) { Transform val4 = obj2.transform.Find("Group/Parent"); GameObject gameObject3 = ((Component)obj2.transform.Find("Group/generic_flash_ui")).gameObject; gameObject3.SetActive(false); gameObject3.SetActive(true); obj2.GetComponent().PlayConsumeEffect(); foreach (Transform item2 in val4) { Transform val5 = item2; if (((Object)val5).name == "AllActivated") { ((Component)val5).gameObject.SetActive(true); } else { ((Component)val5).gameObject.SetActive(false); } } } audioSource.PlayOneShot(mainBindingsSoundFull); } GodsOfPharloomMod.instance.SaveModData(); } public static void InitBindingsMenuFsmHistory() { ((MonoBehaviour)GodsOfPharloomMod.instance).StartCoroutine(enumerator()); static IEnumerator enumerator() { while (true) { if (menuBindingsInvProxyFsm != null && menuBindingsInvProxyFsm.ActiveStateName == menuBindingsInvProxyFsmStatesHistory[0]) { yield return null; } else if (menuBindingsInvProxyFsm == null) { yield return null; } else { for (int num = menuBindingsInvProxyFsmStatesHistory.Length - 1; num > 0; num--) { menuBindingsInvProxyFsmStatesHistory[num] = menuBindingsInvProxyFsmStatesHistory[num - 1]; } menuBindingsInvProxyFsmStatesHistory[0] = menuBindingsInvProxyFsm.ActiveStateName; yield return null; } } } } public static void InitBindingsMenu() { if ((Object)(object)menuBindings != (Object)null) { Object.Destroy((Object)(object)menuBindings); } menuBindings = Object.Instantiate(GameObject.Find("_GameCameras/HudCamera/In-game/Inventory")); Object.DontDestroyOnLoad((Object)(object)menuBindings); ((Object)menuBindings).name = "Bindings Menu"; menuBindingsFsm = menuBindings.GetComponent().Fsm; ((MonoBehaviour)menuBindingsFsm.FsmComponent).StartCoroutine(IInitBindingsMenu()); } public static void UpdateMenuBindingsDisplay() { //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_014e: 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_01da: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_05d1: Unknown result type (might be due to invalid IL or missing references) //IL_0690: Unknown result type (might be due to invalid IL or missing references) //IL_06e9: Unknown result type (might be due to invalid IL or missing references) PlayerData instance = PlayerData.instance; PlayerDataMod instance2 = PlayerDataMod.instance; _ = HeroController.instance; if ((Object)(object)heartPieces != (Object)null) { ((TMP_Text)((Component)((Component)heartPieces).transform.Find("Amount Text")).gameObject.GetComponent()).text = $"{PlayerData.instance.maxHealth}"; } ((TMP_Text)((Component)((Component)spoolPieces).transform.Find("Amount Text")).gameObject.GetComponent()).text = $"{instance.silkMax}"; foreach (Transform item in ((Component)needle).transform) { ((Component)item).gameObject.SetActive(false); } ((Component)((Component)needle).transform.Find($"Nail{instance.nailUpgrades + 1}")).gameObject.SetActive(true); float num = (instance.hasDash ? 0f : 0.5f); Color color = default(Color); ((Color)(ref color))..ctor(1f - num, 1f - num, 1f - num, 1f); ((Component)sprint).GetComponent().color = color; num = (instance.hasHarpoonDash ? 0f : 0.5f); ((Color)(ref color))..ctor(1f - num, 1f - num, 1f - num, 1f); ((Component)harpoonDash).GetComponent().color = color; num = (instance.HasBoundCrestUpgrader ? 0f : 0.5f); ((Color)(ref color))..ctor(1f - num, 1f - num, 1f - num, 1f); ((Component)evaHeal).GetComponent().color = color; num = (instance.hasSuperJump ? 0f : 0.5f); ((Color)(ref color))..ctor(1f - num, 1f - num, 1f - num, 1f); ((Component)superJump).GetComponent().color = color; num = (instance.hasWalljump ? 0f : 0.5f); ((Color)(ref color))..ctor(1f - num, 1f - num, 1f - num, 1f); ((Component)wallJump).GetComponent().color = color; num = (instance.hasNeedolin ? 0f : 0.5f); ((Color)(ref color))..ctor(1f - num, 1f - num, 1f - num, 1f); ((Component)needolin).GetComponent().color = color; int num2 = 0; if (!instance.hasBrolly && !instance.hasDoubleJump) { num2 = 0; } else if (instance.hasBrolly && !instance.hasDoubleJump) { num2 = 1; } else if (!instance.hasBrolly && instance.hasDoubleJump) { num2 = 2; } else if (instance.hasBrolly && instance.hasDoubleJump) { num2 = 3; } foreach (Transform item2 in ((Component)cloakStates).transform) { ((Component)item2).gameObject.SetActive(false); } Transform obj = ((Component)cloakStates).transform.Find($"CloakState_{num2}"); if (obj != null) { ((Component)obj).gameObject.SetActive(true); } InventoryItemCollectable[] array = (InventoryItemCollectable[])(object)new InventoryItemCollectable[4] { needleBinding, silkBinding, toolsBinding, maskBinding }; InventoryItemCollectable[] array2 = array; for (int i = 0; i < array2.Length; i++) { foreach (Transform item3 in ((Component)array2[i]).transform.Find("Group/Parent")) { ((Component)item3).gameObject.SetActive(false); } } if (instance2.bindings["Needle Binding"] && instance2.bindings["Silk Binding"] && instance2.bindings["Tools Binding"] && instance2.bindings["Mask Binding"]) { array2 = array; for (int i = 0; i < array2.Length; i++) { ((Component)((Component)array2[i]).transform.Find("Group/Parent/AllActivated")).gameObject.SetActive(true); } } else { array2 = array; foreach (InventoryItemCollectable val in array2) { bool flag = false; if ((Object)(object)val == (Object)(object)needleBinding) { flag = instance2.bindings["Needle Binding"]; } else if ((Object)(object)val == (Object)(object)silkBinding) { flag = instance2.bindings["Silk Binding"]; } else if ((Object)(object)val == (Object)(object)toolsBinding) { flag = instance2.bindings["Tools Binding"]; } else if ((Object)(object)val == (Object)(object)maskBinding) { flag = instance2.bindings["Mask Binding"]; } ((Component)((Component)val).transform.Find("Group/Parent/Activated")).gameObject.SetActive(flag); ((Component)((Component)val).transform.Find("Group/Parent/Deactivated")).gameObject.SetActive(!flag); } } num = (instance.hasChargeSlash ? 0f : 0.5f); ((Color)(ref color))..ctor(1f - num, 1f - num, 1f - num, 1f); ((Component)((Component)needleArt).transform.Find("Icon")).GetComponent().color = color; ((TMP_Text)((Component)((Component)toolsBugUpgrade).transform.Find("Amount Text")).GetComponent()).text = $"{instance.ToolPouchUpgrades}"; ((TMP_Text)((Component)((Component)toolsKitUpgrade).transform.Find("Amount Text")).GetComponent()).text = $"{instance.ToolKitUpgrades}"; num = (((ToolBase)Gameplay.CloaklessCrest).IsEquipped ? 0f : 0.5f); ((Color)(ref color))..ctor(1f - num, 1f - num, 1f - num, 1f); ((Component)((Component)crestlessHornet).transform.Find("Icon")).GetComponent().color = color; num = (((ToolBase)Gameplay.CursedCrest).IsEquipped ? 0f : 0.5f); ((Color)(ref color))..ctor(1f - num, 1f - num, 1f - num, 1f); ((Component)((Component)cursedHornet).transform.Find("Icon")).GetComponent().color = color; } public static InventoryItemCollectable CreateButtonInv(string objName, GameObject template, Vector3 pos, string textLable = "", string textDescription = "") { //IL_0032: Unknown result type (might be due to invalid IL or missing references) GameObject obj = Object.Instantiate(template, menuBindings.transform); ((Object)obj).name = objName; obj.transform.position = pos; ((Component)obj.transform.Find("Group/Amount Text")).gameObject.SetActive(false); ((Component)obj.transform.Find("Group/New Item Orb")).gameObject.SetActive(false); ((Component)obj.transform.Find("Group/generic_flash_ui")).gameObject.SetActive(false); ((Component)obj.transform.Find("Group/Parent/Icon")).gameObject.SetActive(false); InventoryItemCollectable component = obj.GetComponent(); ((object)component).GetType().GetField("buttonPromptDisplay", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).SetValue(component, null); ((object)component).GetType().GetField("consumePrompt", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).SetValue(component, null); if (textLable != "") { ((InventoryItemSelectable)component).OnSelected += delegate { ((TMP_Text)textName).text = textLable; }; } if (textDescription != "") { ((InventoryItemSelectable)component).OnSelected += delegate { ((TMP_Text)textDesc).text = textDescription; }; } obj.SetActive(true); return component; } public static IEnumerator IInitBindingsMenu() { GameObject inventoryOrig = GameObject.Find("_GameCameras/HudCamera/In-game/Inventory"); menuBindingsFsm.GetState("Closed").Transitions = (FsmTransition[])(object)new FsmTransition[0]; mainBindingsSoundSelect = (AudioClip)Preload.bundleResources["chain_cut"]; mainBindingsSoundFull = (AudioClip)Preload.bundleResources["gg_radiant_binding_bling"]; submitSound1 = (AudioClip)Preload.bundleResources["ui_tool_equip"]; audioSource = menuBindings.AddComponent(); audioSource.maxDistance = 9999f; audioSource.priority = 80; yield return null; yield return null; GameObject border = ((Component)menuBindings.transform.Find("Border")).gameObject; foreach (Transform item in border.transform.Find("PaneListDisplay")) { ((Component)item).gameObject.SetActive(false); } foreach (Transform item2 in border.transform.Find("Arrows")) { ((Component)item2).gameObject.SetActive(false); } GameObject inv = ((Component)menuBindings.transform.Find("Inv")).gameObject; PlayMakerFSM[] components = inv.GetComponents(); foreach (PlayMakerFSM val in components) { if (val.FsmName == "Inventory Proxy") { menuBindingsInvProxyFsm = val.Fsm; break; } } InventoryPane component = inv.GetComponent(); ((object)component).GetType().BaseType.GetField("OnPaneStart", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).SetValue(component, null); InventoryPaneList component2 = menuBindings.GetComponent(); ((object)component2).GetType().GetField("panes", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).SetValue(component2, new InventoryPane[1] { component }); spoolPieces = ((Component)inv.transform.Find("Inv_Items/Needle Shift/Spool Pieces")).gameObject.GetComponent(); ((Component)spoolPieces).gameObject.SetActive(true); heartPieces = ((Component)inv.transform.Find("Inv_Items/Needle Shift/Heart Pieces")).gameObject.GetComponent(); ((Component)heartPieces).gameObject.SetActive(true); inv.transform.Find("Inv_Items/Needle Shift/Spool Group").position = new Vector3(-8.42f, -3.479f, 38.18f); silkHeartsSpool = ((Component)inv.transform.Find("Inv_Items/Needle Shift/Spool Group/Spool")).gameObject.GetComponent(); ((Component)silkHeartsSpool).gameObject.SetActive(true); Transform obj = ((Component)silkHeartsSpool).transform.Find("New Item Orb"); if (obj != null) { ((Component)obj).gameObject.SetActive(false); } ((Behaviour)((Component)silkHeartsSpool).GetComponent()).enabled = false; ((InventoryItemSelectable)silkHeartsSpool).OnSelected += delegate { Transform val11 = menuBindings.transform.Find("Inv/Silk Spool Desc Section(Clone)"); if ((Object)(object)val11 != (Object)null) { ((Component)val11).gameObject.SetActive(true); } }; foreach (Transform item3 in inv.transform.Find("Inv_Items/Needle Shift/Spool Group/Radial Layout")) { Transform val2 = item3; ((Component)val2).gameObject.SetActive(true); if (((Object)val2).name == "Sprint") { sprint = ((Component)val2).gameObject.GetComponent(); } if (((Object)val2).name == "Harpoon Dash") { harpoonDash = ((Component)val2).gameObject.GetComponent(); } if (((Object)val2).name == "Eva Heal") { evaHeal = ((Component)val2).gameObject.GetComponent(); } if (((Object)val2).name == "Super Jump") { superJump = ((Component)val2).gameObject.GetComponent(); } if (((Object)val2).name == "Wall Jump") { wallJump = ((Component)val2).gameObject.GetComponent(); } if (((Object)val2).name == "Needolin") { needolin = ((Component)val2).gameObject.GetComponent(); } Transform val3 = val2.Find("New Item Orb"); if (Object.op_Implicit((Object)(object)val3)) { ((Component)val3).gameObject.SetActive(false); } } ((Component)inv.transform.Find("Inv_Items/Needle Shift/Geo")).gameObject.SetActive(false); ((Component)inv.transform.Find("Inv_Items/Needle Shift/Shards")).gameObject.SetActive(false); textName = ((Component)inv.transform.Find("Description Pane/Text Name")).gameObject.GetComponent(); textDesc = ((Component)inv.transform.Find("Description Pane/Text Desc")).gameObject.GetComponent(); GameObject gameObject = ((Component)inv.transform.Find("Equipment")).gameObject; GameObject gameObject2 = ((Component)gameObject.transform.Find("Template Collectable Item")).gameObject; Transform val4 = gameObject2.transform.Find("Group/generic_flash_ui"); Preload.preloads["generic_flash_ui"] = Object.Instantiate(((Component)val4).gameObject, Preload.handler.transform); ((Component)inv.transform.Find("Divider L")).gameObject.transform.position = new Vector3(-2.89f, -0.14f, 36.14f); needle = ((Component)inv.transform.Find("Inv_Items/Needle")).GetComponent(); foreach (Transform item4 in gameObject.transform) { ((Component)item4).gameObject.SetActive(false); } ((InventoryItemSelectableDirectional)needle).Selectables[2] = (InventoryItemSelectable)(object)needle; toolsMsgWhileBindingEffect = Object.Instantiate(((Component)inv.transform.Find("Memory Use Msg")).gameObject, inventoryOrig.transform.Find("Tools")).GetComponent(); ((Component)toolsMsgWhileBindingEffect).gameObject.SetActive(true); ((Object)toolsMsgWhileBindingEffect).name = "ToolsMsgWhileBindingEffect"; TextMeshPro component3 = ((Component)((Component)toolsMsgWhileBindingEffect).transform.Find("Text")).gameObject.GetComponent(); Object.Destroy((Object)(object)((Component)component3).gameObject.GetComponent()); ((TMP_Text)component3).text = "Can't equip tools while Tools Binding is active."; ((InventoryPaneBase)((Component)inventoryOrig.transform.Find("Tools")).gameObject.GetComponent()).OnPaneStart += delegate { ((NestedFadeGroupBase)toolsMsgWhileBindingEffect).AlphaSelf = 0f; }; bindingsMsgWhileInSequence = Object.Instantiate(((Component)inv.transform.Find("Memory Use Msg")).gameObject, inv.transform).GetComponent(); ((Component)bindingsMsgWhileInSequence).gameObject.SetActive(true); ((Object)bindingsMsgWhileInSequence).name = "BindingsMsgWhileInSequence"; TextMeshPro component4 = ((Component)((Component)bindingsMsgWhileInSequence).transform.Find("Text")).gameObject.GetComponent(); Object.Destroy((Object)(object)((Component)component4).gameObject.GetComponent()); ((TMP_Text)component4).text = "Can't toggle bindings while in boss sequence."; ((InventoryPaneBase)component).OnPaneStart += delegate { ((NestedFadeGroupBase)bindingsMsgWhileInSequence).AlphaSelf = 0f; }; needleBinding = CreateButtonInv("Needle Binding", gameObject2, new Vector3(-1.8f, 4.195f, 4.3f), "Needle Binding", "Reduces needle damage."); silkBinding = CreateButtonInv("Silk Binding", gameObject2, new Vector3(0.2f, 4.195f, 4.3f), "Silk Binding", "Makes silk spool broken."); toolsBinding = CreateButtonInv("Tools Binding", gameObject2, new Vector3(2.3f, 4.195f, 4.3f), "Tools Binding", "Removes tools."); maskBinding = CreateButtonInv("Mask Binding", gameObject2, new Vector3(4.4f, 4.195f, 4.3f), "Mask Binding", "Reduces the number of masks to 5."); cloakStates = CreateButtonInv("Cloak States", gameObject2, new Vector3(-4.4933f, 0.5f, 4.3f)); needleArt = CreateButtonInv("Needle Art", gameObject2, new Vector3(-9.7017f, 3.8097f, 4.3f), "Needle Art"); toolsBugUpgrade = CreateButtonInv("Tools Upgrade", gameObject2, new Vector3(-6.7017f, 0.5097f, 4.3f), "Tools Pouch", "Basic pouch designed for holding tools, traps and crafting materials."); toolsKitUpgrade = CreateButtonInv("Tools Kit Upgrade", gameObject2, new Vector3(-8.7969f, 0.5501f, 4.3f), "Crafting Kit"); crestlessHornet = CreateButtonInv("Crestless Hornet", gameObject2, new Vector3(-1.4495f, 2.1501f, 4.3f), "Crestless"); cursedHornet = CreateButtonInv("Cursed Hornet", gameObject2, new Vector3(1.2651f, 2.1501f, 4.3f), "Curse"); ((InventoryItemSelectableDirectional)needleBinding).Selectables = (InventoryItemSelectable[])(object)new InventoryItemSelectable[4] { default(InventoryItemSelectable), (InventoryItemSelectable)crestlessHornet, (InventoryItemSelectable)spoolPieces, (InventoryItemSelectable)silkBinding }; ((InventoryItemSelectableDirectional)silkBinding).Selectables = (InventoryItemSelectable[])(object)new InventoryItemSelectable[4] { default(InventoryItemSelectable), (InventoryItemSelectable)cursedHornet, (InventoryItemSelectable)needleBinding, (InventoryItemSelectable)toolsBinding }; ((InventoryItemSelectableDirectional)toolsBinding).Selectables = (InventoryItemSelectable[])(object)new InventoryItemSelectable[4] { default(InventoryItemSelectable), (InventoryItemSelectable)cursedHornet, (InventoryItemSelectable)silkBinding, (InventoryItemSelectable)maskBinding }; ((InventoryItemSelectableDirectional)maskBinding).Selectables = (InventoryItemSelectable[])(object)new InventoryItemSelectable[4] { default(InventoryItemSelectable), default(InventoryItemSelectable), (InventoryItemSelectable)toolsBinding, (InventoryItemSelectable)maskBinding }; InventoryItemGrid component5 = gameObject.GetComponent(); List list = new List(); List list2 = (List)((object)component5).GetType().GetField("collections", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(component5); list.Add((InventoryItemSelectableDirectional)(object)((Component)needleBinding).GetComponent()); list.Add((InventoryItemSelectableDirectional)(object)((Component)silkBinding).GetComponent()); list.Add((InventoryItemSelectableDirectional)(object)((Component)toolsBinding).GetComponent()); list.Add((InventoryItemSelectableDirectional)(object)((Component)maskBinding).GetComponent()); if (list2.Count > 0) { list2[0].Items = list; } else { list2.Add(new GridSection()); list2[0].Items = list; } ((Component)needleBinding).transform.parent = gameObject.transform.parent; ((Component)silkBinding).transform.parent = gameObject.transform.parent; ((Component)toolsBinding).transform.parent = gameObject.transform.parent; ((Component)maskBinding).transform.parent = gameObject.transform.parent; GameObject gameObject3 = ((Component)((Component)needleBinding).transform.Find("Group/Parent")).gameObject; gameObject3.transform.localScale = new Vector3(0.35f, 0.35f, 1f); GameObject gameObject4 = ((Component)gameObject3.transform.Find("Icon")).gameObject; gameObject4.SetActive(false); GameObject obj2 = Object.Instantiate(gameObject4, gameObject3.transform); ((Object)obj2).name = "Deactivated"; obj2.GetComponent().sprite = (Sprite)Preload.bundleResources["GG_UI_pieces_nail_off"]; obj2.transform.localScale = new Vector3(2.2f, 2.2f, 1f); GameObject obj3 = Object.Instantiate(gameObject4, gameObject3.transform); ((Object)obj3).name = "Activated"; obj3.GetComponent().sprite = (Sprite)Preload.bundleResources["GG_UI_pieces_nail"]; obj3.transform.localScale = new Vector3(2.2f, 2.2f, 1f); GameObject val5 = Object.Instantiate(gameObject4, gameObject3.transform); ((Object)val5).name = "AllActivated"; val5.GetComponent().sprite = (Sprite)Preload.bundleResources["GG_UI_pieces_nail_r"]; val5.transform.localScale = new Vector3(2.2f, 2.2f, 1f); GameObject obj4 = Object.Instantiate(gameObject4, val5.transform); ((Object)obj4).name = "Backboard"; obj4.GetComponent().sprite = (Sprite)Preload.bundleResources["gg_board_radiant_flash0005_custom"]; obj4.transform.localScale = new Vector3(1.5f, 1.5f, 1f); obj4.SetActive(true); GameObject gameObject5 = ((Component)((Component)silkBinding).transform.Find("Group/Parent")).gameObject; gameObject5.transform.localScale = new Vector3(0.35f, 0.35f, 1f); gameObject4 = ((Component)gameObject5.transform.Find("Icon")).gameObject; gameObject4.SetActive(false); GameObject obj5 = Object.Instantiate(gameObject4, gameObject5.transform); ((Object)obj5).name = "Deactivated"; obj5.GetComponent().sprite = (Sprite)Preload.bundleResources["GG_UI_pieces_soul_off"]; obj5.transform.localScale = new Vector3(2.2f, 2.2f, 1f); GameObject obj6 = Object.Instantiate(gameObject4, gameObject5.transform); ((Object)obj6).name = "Activated"; obj6.GetComponent().sprite = (Sprite)Preload.bundleResources["GG_UI_pieces_soul"]; obj6.transform.localScale = new Vector3(2.2f, 2.2f, 1f); GameObject val6 = Object.Instantiate(gameObject4, gameObject5.transform); ((Object)val6).name = "AllActivated"; val6.GetComponent().sprite = (Sprite)Preload.bundleResources["GG_UI_pieces_soul_r"]; val6.transform.localScale = new Vector3(2.2f, 2.2f, 1f); GameObject obj7 = Object.Instantiate(gameObject4, val6.transform); ((Object)obj7).name = "Backboard"; obj7.GetComponent().sprite = (Sprite)Preload.bundleResources["gg_board_radiant_flash0005_custom"]; obj7.transform.localScale = new Vector3(1.5f, 1.5f, 1f); obj7.SetActive(true); GameObject gameObject6 = ((Component)((Component)toolsBinding).transform.Find("Group/Parent")).gameObject; gameObject6.transform.localScale = new Vector3(0.35f, 0.35f, 1f); gameObject4 = ((Component)gameObject6.transform.Find("Icon")).gameObject; gameObject4.SetActive(false); GameObject obj8 = Object.Instantiate(gameObject4, gameObject6.transform); ((Object)obj8).name = "Deactivated"; obj8.GetComponent().sprite = (Sprite)Preload.bundleResources["GG_UI_pieces_charm_off"]; obj8.transform.localScale = new Vector3(2.2f, 2.2f, 1f); GameObject obj9 = Object.Instantiate(gameObject4, gameObject6.transform); ((Object)obj9).name = "Activated"; obj9.GetComponent().sprite = (Sprite)Preload.bundleResources["GG_UI_pieces_charm"]; obj9.transform.localScale = new Vector3(2.2f, 2.2f, 1f); GameObject val7 = Object.Instantiate(gameObject4, gameObject6.transform); ((Object)val7).name = "AllActivated"; val7.GetComponent().sprite = (Sprite)Preload.bundleResources["GG_UI_pieces_charm_r"]; val7.transform.localScale = new Vector3(2.2f, 2.2f, 1f); GameObject obj10 = Object.Instantiate(gameObject4, val7.transform); ((Object)obj10).name = "Backboard"; obj10.GetComponent().sprite = (Sprite)Preload.bundleResources["gg_board_radiant_flash0005_custom"]; obj10.transform.localScale = new Vector3(1.5f, 1.5f, 1f); obj10.SetActive(true); GameObject gameObject7 = ((Component)((Component)maskBinding).transform.Find("Group/Parent")).gameObject; gameObject7.transform.localScale = new Vector3(0.35f, 0.35f, 1f); gameObject4 = ((Component)gameObject7.transform.Find("Icon")).gameObject; gameObject4.SetActive(false); GameObject obj11 = Object.Instantiate(gameObject4, gameObject7.transform); ((Object)obj11).name = "Deactivated"; obj11.GetComponent().sprite = (Sprite)Preload.bundleResources["GG_UI_pieces_shell_off"]; obj11.transform.localScale = new Vector3(2.2f, 2.2f, 1f); GameObject obj12 = Object.Instantiate(gameObject4, gameObject7.transform); ((Object)obj12).name = "Activated"; obj12.GetComponent().sprite = (Sprite)Preload.bundleResources["GG_UI_pieces_shell"]; obj12.transform.localScale = new Vector3(2.2f, 2.2f, 1f); GameObject val8 = Object.Instantiate(gameObject4, gameObject7.transform); ((Object)val8).name = "AllActivated"; val8.GetComponent().sprite = (Sprite)Preload.bundleResources["GG_UI_pieces_shell_r"]; val8.transform.localScale = new Vector3(2.2f, 2.2f, 1f); GameObject obj13 = Object.Instantiate(gameObject4, val8.transform); ((Object)obj13).name = "AllActivated"; obj13.GetComponent().sprite = (Sprite)Preload.bundleResources["gg_board_radiant_flash0005_custom"]; obj13.transform.localScale = new Vector3(1.5f, 1.5f, 1f); obj13.SetActive(true); ((InventoryItemSelectable)heartPieces).OnSelected += delegate { ((TMP_Text)textName).text = "Ancient Mask"; ((TMP_Text)textDesc).text = "An ancient mask carved from cold, pale ore. The mask protects the wearer, guarding their shell against damage."; }; foreach (Transform item5 in ((Component)heartPieces).transform) { Transform val9 = item5; if (((Object)val9).name == "Pieces 4") { ((Component)val9).gameObject.SetActive(true); } else { ((Component)val9).gameObject.SetActive(false); } } GameObject gameObject8 = ((Component)Object.Instantiate(gameObject2.transform.Find("Group/Amount Text"), ((Component)heartPieces).transform)).gameObject; gameObject8.transform.position = new Vector3(-9.4864f, 5.8192f, 41.4f); ((Component)heartPieces).transform.position = new Vector3(-6.6854f, 3.62f, 38.18f); ((Object)gameObject8).name = "Amount Text"; gameObject8.SetActive(true); ((InventoryItemSelectable)spoolPieces).OnSelected += delegate { ((TMP_Text)textName).text = "Silk Spool"; ((TMP_Text)textDesc).text = "Artefact left behind by the Weavers, designed to collect and hold additional Silk."; }; foreach (Transform item6 in ((Component)spoolPieces).transform) { Transform val10 = item6; if (((Object)val10).name == "Full") { ((Component)val10).gameObject.SetActive(true); } else { ((Component)val10).gameObject.SetActive(false); } } GameObject gameObject9 = ((Component)Object.Instantiate(gameObject2.transform.Find("Group/Amount Text"), ((Component)spoolPieces).transform)).gameObject; gameObject9.transform.position = new Vector3(-6.7864f, 5.8192f, 41.4f); ((Component)spoolPieces).transform.position = new Vector3(-4.3445f, 3.71f, 38.18f); ((Object)gameObject9).name = "Amount Text"; gameObject9.SetActive(true); ((MonoBehaviour)menuBindingsFsm.FsmComponent).StartCoroutine(ActivateSilkHeartsEveryFrame()); ((Component)cloakStates).transform.parent = inv.transform; ((InventoryItemSelectableDirectional)cloakStates).Selectables = (InventoryItemSelectable[])(object)new InventoryItemSelectable[4] { (InventoryItemSelectable)spoolPieces, (InventoryItemSelectable)silkHeartsSpool, (InventoryItemSelectable)toolsBugUpgrade, (InventoryItemSelectable)needleBinding }; ((InventoryItemSelectableDirectional)spoolPieces).Selectables[1] = (InventoryItemSelectable)(object)cloakStates; ((InventoryItemSelectableDirectional)needle).Selectables[3] = (InventoryItemSelectable)(object)cloakStates; ((InventoryItemSelectable)cloakStates).OnSelected += delegate { PlayerData instance = PlayerData.instance; if (instance != null) { int num = 0; if (!instance.hasBrolly && !instance.hasDoubleJump) { num = 0; } else if (instance.hasBrolly && !instance.hasDoubleJump) { num = 1; } else if (!instance.hasBrolly && instance.hasDoubleJump) { num = 2; } else if (instance.hasBrolly && instance.hasDoubleJump) { num = 3; } ((TMP_Text)textName).text = cloakLables[num]; ((TMP_Text)textDesc).text = cloakDescriptions[num]; } }; GameObject obj14 = Object.Instantiate(gameObject4, ((Component)cloakStates).transform); ((Object)obj14).name = "CloakState_0"; obj14.GetComponent().sprite = (Sprite)Preload.bundleResources["CloakState_0"]; GameObject obj15 = Object.Instantiate(gameObject4, ((Component)cloakStates).transform); ((Object)obj15).name = "CloakState_1"; obj15.GetComponent().sprite = (Sprite)Preload.bundleResources["CloakState_1"]; GameObject obj16 = Object.Instantiate(gameObject4, ((Component)cloakStates).transform); ((Object)obj16).name = "CloakState_2"; obj16.GetComponent().sprite = (Sprite)Preload.bundleResources["CloakState_2"]; GameObject obj17 = Object.Instantiate(gameObject4, ((Component)cloakStates).transform); ((Object)obj17).name = "CloakState_3"; obj17.GetComponent().sprite = (Sprite)Preload.bundleResources["CloakState_3"]; ((Component)needleArt).transform.localScale = new Vector3(2f, 1.5f, 1f); ((Component)needleArt).transform.parent = inv.transform; ((InventoryItemSelectableDirectional)needleArt).Selectables = (InventoryItemSelectable[])(object)new InventoryItemSelectable[4] { (InventoryItemSelectable)needleArt, (InventoryItemSelectable)toolsKitUpgrade, (InventoryItemSelectable)needle, (InventoryItemSelectable)heartPieces }; ((InventoryItemSelectableDirectional)heartPieces).Selectables[2] = (InventoryItemSelectable)(object)needleArt; GameObject obj18 = Object.Instantiate(gameObject4, ((Component)needleArt).transform); obj18.transform.localScale = new Vector3(0.3f, 0.4f, 1f); obj18.SetActive(true); ((Object)obj18).name = "Icon"; obj18.GetComponent().sprite = (Sprite)Preload.bundleResources["needle_charge_prompt"]; ((Component)toolsBugUpgrade).transform.parent = inv.transform; ((InventoryItemSelectableDirectional)toolsBugUpgrade).Selectables = (InventoryItemSelectable[])(object)new InventoryItemSelectable[4] { (InventoryItemSelectable)heartPieces, (InventoryItemSelectable)silkHeartsSpool, (InventoryItemSelectable)toolsKitUpgrade, (InventoryItemSelectable)cloakStates }; ((InventoryItemSelectableDirectional)heartPieces).Selectables[1] = (InventoryItemSelectable)(object)toolsBugUpgrade; GameObject obj19 = Object.Instantiate(gameObject4, ((Component)toolsBugUpgrade).transform); obj19.SetActive(true); ((Object)obj19).name = "Icon"; obj19.GetComponent().sprite = (Sprite)Preload.bundleResources["tools_bug_upgrade"]; GameObject gameObject10 = ((Component)Object.Instantiate(gameObject2.transform.Find("Group/Amount Text"), ((Component)toolsBugUpgrade).transform)).gameObject; ((Object)gameObject10).name = "Amount Text"; gameObject10.transform.position = new Vector3(-6.7718f, 1.9447f, 4.3f); ((Component)toolsKitUpgrade).transform.parent = inv.transform; ((InventoryItemSelectableDirectional)toolsKitUpgrade).Selectables = (InventoryItemSelectable[])(object)new InventoryItemSelectable[4] { (InventoryItemSelectable)needleArt, (InventoryItemSelectable)silkHeartsSpool, (InventoryItemSelectable)needle, (InventoryItemSelectable)toolsBugUpgrade }; ((InventoryItemSelectableDirectional)needle).Selectables[3] = (InventoryItemSelectable)(object)toolsKitUpgrade; GameObject obj20 = Object.Instantiate(gameObject4, ((Component)toolsKitUpgrade).transform); obj20.SetActive(true); ((Object)obj20).name = "Icon"; obj20.GetComponent().sprite = (Sprite)Preload.bundleResources["tools_upgrade_sack"]; GameObject gameObject11 = ((Component)Object.Instantiate(gameObject2.transform.Find("Group/Amount Text"), ((Component)toolsKitUpgrade).transform)).gameObject; ((Object)gameObject11).name = "Amount Text"; gameObject11.transform.position = new Vector3(-8.9062f, 1.9447f, 4.3f); ((Component)crestlessHornet).transform.parent = inv.transform; ((Component)crestlessHornet).transform.localScale = new Vector3(1.5f, 1.3f, 1f); ((InventoryItemSelectableDirectional)crestlessHornet).Selectables = (InventoryItemSelectable[])(object)new InventoryItemSelectable[4] { (InventoryItemSelectable)needleBinding, (InventoryItemSelectable)crestlessHornet, (InventoryItemSelectable)cloakStates, (InventoryItemSelectable)cursedHornet }; GameObject obj21 = Object.Instantiate(gameObject4, ((Component)crestlessHornet).transform); obj21.transform.position = new Vector3(-1.5495f, 2.4501f, 4.3f); obj21.transform.localScale = new Vector3(0.8f, 1f, 1f); obj21.SetActive(true); ((Object)obj21).name = "Icon"; obj21.GetComponent().sprite = (Sprite)Preload.bundleResources["cloakless_hornet_attack"]; ((MonoBehaviour)menuBindingsFsm.FsmComponent).StartCoroutine(MakeNeedleStateAlwaysActive()); ((Component)cursedHornet).transform.parent = inv.transform; ((InventoryItemSelectableDirectional)cursedHornet).Selectables = (InventoryItemSelectable[])(object)new InventoryItemSelectable[4] { (InventoryItemSelectable)toolsBinding, (InventoryItemSelectable)cursedHornet, (InventoryItemSelectable)crestlessHornet, (InventoryItemSelectable)cursedHornet }; GameObject obj22 = Object.Instantiate(gameObject4, ((Component)cursedHornet).transform); obj22.SetActive(true); ((Object)obj22).name = "Icon"; obj22.GetComponent().sprite = (Sprite)Preload.bundleResources["CurseWitch"]; ((MonoBehaviour)menuBindingsFsm.FsmComponent).StartCoroutine(UpdateSilkSpool()); ((InventoryPaneBase)component).OnPaneStart += delegate { ((TMP_Text)((Component)border.transform.Find("Pane Name")).gameObject.GetComponent()).text = "Bindings"; ((Behaviour)((Component)inv.transform.Find("Text Completion")).gameObject.GetComponent()).enabled = false; ((Behaviour)((Component)inv.transform.Find("Text Completion/Percentage")).gameObject.GetComponent()).enabled = false; InventoryItemCollectable[] array = (InventoryItemCollectable[])(object)new InventoryItemCollectable[4] { needleBinding, silkBinding, toolsBinding, maskBinding }; foreach (InventoryItemCollectable val11 in array) { if (!((Object)(object)val11 == (Object)null)) { ((Component)((Component)val11).gameObject.transform.Find("Group/generic_flash_ui")).gameObject.SetActive(false); } } UpdateMenuBindingsDisplay(); }; ((MonoBehaviour)menuBindingsFsm.FsmComponent).StartCoroutine(UpdateSilkBinding()); ((MonoBehaviour)menuBindingsFsm.FsmComponent).StartCoroutine(UpdateToolsBinding()); ((MonoBehaviour)menuBindingsFsm.FsmComponent).StartCoroutine(UpdateMaskBinding()); static IEnumerator ActivateSilkHeartsEveryFrame() { while (true) { ((Component)silkHeartsSpool).gameObject.SetActive(true); foreach (Transform item7 in ((Component)silkHeartsSpool).transform) { Transform val11 = item7; if (((Object)val11).name == "Heart") { ((Component)val11).gameObject.SetActive(true); } else { ((Component)val11).gameObject.SetActive(false); } } Transform val12 = menuBindings.transform.Find("Inv/Silk Spool Desc Section(Clone)"); if ((Object)(object)val12 != (Object)null) { ((Component)val12.Find("Silk Hearts")).gameObject.SetActive(true); } Transform val13 = ((Component)silkHeartsSpool).transform.Find("Heart"); Transform val14 = (((Object)(object)val12 != (Object)null) ? val12.Find("Silk Hearts/Counter") : null); foreach (Transform item8 in val13) { ((Component)item8).gameObject.SetActive(false); } if ((Object)(object)val14 != (Object)null) { foreach (Transform item9 in val14) { ((Component)item9).gameObject.SetActive(false); } ((Component)val14).gameObject.SetActive(true); } int num = ((PlayerData.instance.silkRegenMax > 3) ? 3 : PlayerData.instance.silkRegenMax); for (int j = 0; j < num; j++) { ((Component)val13.GetChild(j)).gameObject.SetActive(true); if ((Object)(object)val14 != (Object)null) { ((Component)val14.GetChild(j)).gameObject.SetActive(true); } } yield return null; } } static IEnumerator MakeNeedleStateAlwaysActive() { while (true) { ((Component)needle).gameObject.SetActive(true); yield return null; } } } } public class BossScene { public enum SceneType { Boss, Rest } public static Dictionary bosses; public static float waitForBossDeathAnim = 1.6f; public string sceneName; public string entryGate; public string bossName; public Dictionary> bossesGOsInfo; public BossScene ascendedVersion; public bool noInputOnStart; public bool is3ActBoss; public SceneType sceneType; public BossScene(string sceneName, string entryGate, string bossName, BossScene ascendedVersion = null, bool is3ActBoss = false, SceneType sceneType = SceneType.Boss) { this.sceneName = sceneName; this.entryGate = entryGate; this.bossName = bossName; this.ascendedVersion = ascendedVersion; this.is3ActBoss = is3ActBoss; this.sceneType = sceneType; } public static void InitBossesInfo() { BossScene[] obj = new BossScene[47] { new BossScene("Tut_03", "start_battle_entry", "Moss Mother", new BossScene("Weave_03", "start_battle_entry", "Moss Mother")), new BossScene("Bone_05", "start_battle_entry", "Bell Beast"), new BossScene("Bone_East_08", "start_battle_entry", "Fourth Chorus"), new BossScene("Coral_11", "start_battle_entry", "Great Conchflies"), new BossScene("Bone_East_12", "start_battle_entry", "Lace in Deep Docks"), new BossScene("Coral_Judge_Arena", "start_battle_entry", "The Last Judge"), new BossScene("Greymoor_08", "start_battle_entry", "Moorwing"), new BossScene("Organ_01", "start_battle_entry", "Phantom"), new BossScene("Ant_19", "start_battle_entry", "Savage Beastfly in Chapel of The Beast"), new BossScene("Shellwood_18", "start_battle_entry", "Sister Splinter"), new BossScene("Bone_15", "start_battle_entry", "Skull Tyrant"), new BossScene("Belltown_Shrine", "start_battle_entry", "Widow"), new BossScene("Slab_16b", "start_battle_entry", "Broodmother"), new BossScene("Cog_Dancers", "start_battle_entry", "Cogwork Dancers"), new BossScene("Dust_Chef", "start_battle_entry", "Disgraced Chef Lugoli"), new BossScene("Belltown_08", "start_battle_entry", "Father of the Flame"), new BossScene("Slab_10b", "start_battle_entry", "First Sinner"), new BossScene("Dock_09", "start_battle_entry", "Forebrothers Signis & Gron"), new BossScene("Library_09", "start_battle_entry", "Garmond & Zaza"), new BossScene("Cradle_03", "start_battle_entry", "Grand Mother Silk"), new BossScene("Shadow_18", "start_battle_entry", "Groal the Great"), new BossScene("Song_Tower_01", "start_battle_entry", "Lace in the Cradle"), new BossScene("Coral_27", "start_battle_entry", "Raging Conchfly"), new BossScene("Bone_East_08", "start_battle_entry", "Savage Beastfly in Far Fields"), new BossScene("Hang_17b", "start_battle_entry", "Second Sentiel"), new BossScene("Greymoor_08", "start_battle_entry", "Shakra"), new BossScene("Ward_02", "start_battle_entry", "The Unravelled"), new BossScene("Library_13", "start_battle_entry", "Trobbio"), new BossScene("Coral_29", "start_battle_entry", "Voltvyrm"), new BossScene("Bellway_Centipede_Arena", "start_battle_entry", "Bell Eater", null, is3ActBoss: true), new BossScene("Clover_10", "start_battle_entry", "Clover Dancers", null, is3ActBoss: true), new BossScene("Room_CrowCourt_02", "start_battle_entry", "Crawfather", null, is3ActBoss: true), new BossScene("Memory_Coral_Tower", "start_battle_entry", "Crust King Khann", null, is3ActBoss: true), new BossScene("Bone_East_18b", "start_battle_entry", "Gurr the Outcast", null, is3ActBoss: true), new BossScene("Coral_33", "start_battle_entry", "Lost Garmond", null, is3ActBoss: true), new BossScene("Abyss_Cocoon", "start_battle_entry", "Lost Lace", null, is3ActBoss: true), new BossScene("Shellwood_11b_Memory", "start_battle_entry", "Nyleth", null, is3ActBoss: true), new BossScene("Clover_19", "start_battle_entry", "Palestag", null, is3ActBoss: true), new BossScene("Peak_07", "start_battle_entry", "Pinstress", null, is3ActBoss: true), new BossScene("Crawl_10", "start_battle_entry", "Plasmified Zango", null, is3ActBoss: true), new BossScene("Shellwood_22", "start_battle_entry", "Shrine Guardian Seth", null, is3ActBoss: true), new BossScene("Memory_Ant_Queen", "start_battle_entry", "Skarrsinger Karmelita", null, is3ActBoss: true), new BossScene("Library_13", "start_battle_entry", "Tormented Trobbio", null, is3ActBoss: true), new BossScene("Coral_39", "start_battle_entry", "Watcher at the Edge", null, is3ActBoss: true), new BossScene("Hang_04", "start_battle_entry", "Forum Battle"), new BossScene("Memory_Coral_Tower", "start_battle_entry2", "Coral Tower Battle", null, is3ActBoss: true), new BossScene("GG_Rest_Scene", "rest_scene_entry", "RestScene", null, is3ActBoss: false, SceneType.Rest) }; Dictionary dictionary = new Dictionary(); BossScene[] array = obj; foreach (BossScene bossScene in array) { dictionary[bossScene.bossName] = bossScene; } bosses = dictionary; } } public static class BossSequence { public enum SequenceType { None, Pantheon, HoG } public static GameObject sequenceGO; public static bool isInSequence = false; public static BossScene[] bossSequence; public static int currentSequenceSceneIndex = 0; public static string backEntry; public static string backScene; public static PlayMakerFSM sequenceController; public static string currentDifficultMode = "Attuned"; public static string currentPantheon = ""; public static int hitCounter = 0; public static bool isHeroDead = false; public static SequenceType sequenceType; public static BossScene currentSequenceScene { get { if (bossSequence == null) { return null; } if (currentSequenceSceneIndex < bossSequence.Length) { return bossSequence[currentSequenceSceneIndex]; } return null; } } public static BossScene nextSequenceScene { get { if (bossSequence == null) { return null; } if (currentSequenceSceneIndex < bossSequence.Length - 1) { return bossSequence[currentSequenceSceneIndex + 1]; } return null; } } public static void Reset() { isInSequence = false; bossSequence = null; currentSequenceSceneIndex = 0; currentDifficultMode = "Attuned"; currentPantheon = ""; hitCounter = 0; isHeroDead = false; sequenceType = SequenceType.None; if ((Object)(object)sequenceController != (Object)null) { sequenceController.SetState("Dormant"); } } public static void Start() { sequenceController.SendEvent("START SEQUENCE"); } public static void CreateSequenceController() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown //IL_01ab: 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_01c8: Expected O, but got Unknown //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //IL_0203: 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_0221: Expected O, but got Unknown //IL_0223: 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_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Expected O, but got Unknown //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Expected O, but got Unknown //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Expected O, but got Unknown //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Expected O, but got Unknown //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Expected O, but got Unknown GameObject val = new GameObject("BossSequence"); sequenceGO = val; Object.DontDestroyOnLoad((Object)val); PlayMakerFSM obj = val.gameObject.AddComponent(); ((Behaviour)obj).enabled = false; Fsm fsm = obj.Fsm; sequenceController = obj; FsmState val2 = new FsmState(fsm); val2.Name = "Dormant"; FsmState val3 = new FsmState(fsm); val3.Name = "Start Sequence"; FsmState val4 = new FsmState(fsm); val4.Name = "Idle"; FsmState val5 = new FsmState(fsm); val5.Name = "Next"; FsmState val6 = new FsmState(fsm); val6.Name = "Next 2"; FsmState val7 = new FsmState(fsm); val7.Name = "End Sequence"; fsm.StartState = "Dormant"; PatchedFsm.CustomLogicFsm startSequenceAction = new PatchedFsm.CustomLogicFsm(fsm); startSequenceAction.action = delegate { StartSequence(); ((FsmStateAction)startSequenceAction).Finish(); }; PatchedFsm.CustomLogicFsm customLogicFsm = new PatchedFsm.CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { if (nextSequenceScene == null) { sequenceController.SendEvent("END SEQUENCE"); } else { currentSequenceSceneIndex++; NextBoss(); sequenceController.SendEvent("NEXT"); } }); PatchedFsm.CustomLogicFsm customLogicFsm2 = new PatchedFsm.CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { sequenceController.SendEvent("FINISHED"); }); PatchedFsm.CustomLogicFsm endSequenceAction = new PatchedFsm.CustomLogicFsm(fsm); PatchedFsm.CustomLogicFsm customLogicFsm3 = endSequenceAction; customLogicFsm3.action = (Action)Delegate.Combine(customLogicFsm3.action, (Action)delegate { EndSequence(); ((FsmStateAction)endSequenceAction).Finish(); }); val2.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("START SEQUENCE"), ToFsmState = val3 } }; val3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("FINISHED"), ToFsmState = val4 } }; val4.Transitions = (FsmTransition[])(object)new FsmTransition[3] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent(PatchedFsm.bossDeadEvent), ToFsmState = val5 }, new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("REST SCENE MOD"), ToFsmState = val6 }, new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("HORNET DEFEATED"), ToFsmState = val2 } }; val5.Transitions = (FsmTransition[])(object)new FsmTransition[2] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("NEXT"), ToFsmState = val4 }, new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("END SEQUENCE"), ToFsmState = val7 } }; val6.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("FINISHED"), ToFsmState = val4 } }; val3.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { startSequenceAction }; val5.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; val6.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm2 }; val7.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { endSequenceAction }; fsm.States = (FsmState[])(object)new FsmState[6] { val2, val3, val4, val5, val6, val7 }; CreateTransitionListener(); ((Behaviour)fsm.FsmComponent).enabled = true; } private static void CreateTransitionListener() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_00ab: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown PlayMakerFSM obj = sequenceGO.gameObject.AddComponent(); ((Behaviour)obj).enabled = false; Fsm fsm = obj.Fsm; FsmState val = new FsmState(fsm); val.Name = "Start State"; FsmState val2 = new FsmState(fsm); val2.Name = "Do After Transition"; fsm.StartState = val.Name; PatchedFsm.CustomLogicFsm customLogicFsm = new PatchedFsm.CustomLogicFsm(fsm); customLogicFsm.action = delegate { try { GodsOfPharloomMod.Log.LogInfo((object)currentSequenceScene.sceneType); if (currentSequenceScene.sceneType != BossScene.SceneType.Rest) { GodsOfPharloomMod.Log.LogInfo((object)currentSequenceScene.sceneType); GodsOfPharloomMod.Log.LogInfo((object)currentSequenceScene.sceneName); TransitionSequence.Play(); TransitionSequence.Stop(); GodsOfPharloomMod.Log.LogInfo((object)"YEEP"); } if (TransitionSequence.audioStarted) { TransitionSequence.audioStarted = false; AudioSource transitionStartAudio = TransitionSequence.transitionStartAudio; AudioSource transitionEndAudio = TransitionSequence.transitionEndAudio; if ((Object)(object)transitionStartAudio != (Object)null) { TransitionSequence.FadeAudio(transitionStartAudio, 0.5f); } if ((Object)(object)transitionEndAudio != (Object)null) { transitionEndAudio.Play(); } } } catch (Exception ex) { GodsOfPharloomMod.Log.LogInfo((object)ex.Message); } }; val2.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; fsm.States = (FsmState[])(object)new FsmState[2] { val, val2 }; fsm.GlobalTransitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent(TransitionPointInfo.eventName), ToFsmState = val2 } }; ((Behaviour)fsm.FsmComponent).enabled = true; } public static void StartSequence() { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0128: 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_0130: Expected O, but got Unknown //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_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown PlayerData.instance.tempRespawnMarker = backEntry; PlayerData.instance.tempRespawnScene = backScene; PlayerData.instance.tempRespawnType = 0; HeroController.instance.TakeSilk(1000); HeroController.instance.ClearEffectsInstant(); HeroController.instance.ResetTauntEffects(); isInSequence = true; ((MonoBehaviour)sequenceController).StartCoroutine(ExitUpdraft()); if (currentSequenceScene.is3ActBoss) { PlayerData.instance.blackThreadWorld = true; } else { PlayerData.instance.blackThreadWorld = false; } SceneLoadInfo val = ((sequenceType != SequenceType.HoG || currentSequenceScene.ascendedVersion == null || (!(currentDifficultMode == "Ascended") && !(currentDifficultMode == "Radiant"))) ? new SceneLoadInfo { SceneName = currentSequenceScene.sceneName, EntryGateName = currentSequenceScene.entryGate, EntrySkip = true, Visualization = (SceneLoadVisualizations)0 } : new SceneLoadInfo { SceneName = currentSequenceScene.ascendedVersion.sceneName, EntryGateName = currentSequenceScene.ascendedVersion.entryGate, EntrySkip = true, Visualization = (SceneLoadVisualizations)0 }); GameManager.instance.BeginSceneTransition(val); static IEnumerator ExitUpdraft() { int waitFramesCount = 10; int currentFrame = 0; while (currentFrame < waitFramesCount) { currentFrame++; yield return null; } HeroController.instance.ExitUpdraft(); } } public static void NextBoss() { ((MonoBehaviour)sequenceController).StartCoroutine(INextBoss()); } public static IEnumerator INextBoss() { if (!isHeroDead) { if (currentSequenceScene.is3ActBoss) { PlayerData.instance.blackThreadWorld = true; } else { PlayerData.instance.blackThreadWorld = false; } TransitionSequence.Play(); TransitionSequence.transitionStartAudio.Play(); TransitionSequence.audioStarted = true; yield return (object)new WaitForSeconds(1f); TransitionSequence.Pause(); yield return null; yield return null; SceneLoadInfo val = new SceneLoadInfo { SceneName = currentSequenceScene.sceneName, EntryGateName = currentSequenceScene.entryGate, EntrySkip = true, Visualization = (SceneLoadVisualizations)0 }; GameManager.instance.BeginSceneTransition(val); yield return null; if (currentSequenceScene.sceneType == BossScene.SceneType.Rest) { TransitionSequence.SetVisible(val: false); } else { TransitionSequence.SetVisible(val: true); } } } public static void EndSequence() { //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Expected O, but got Unknown if (isHeroDead) { return; } if (sequenceType == SequenceType.HoG) { PlayerDataMod.instance.badges[currentSequenceScene.bossName].badges[currentDifficultMode] = true; } else if (sequenceType == SequenceType.Pantheon) { PlayerDataMod instance = PlayerDataMod.instance; Dictionary bindings = instance.bindings; if (instance.pantheonsInfo.TryGetValue(currentPantheon, out var value)) { value.completedPantheon = true; if (hitCounter == 0) { value.completedNoHit = true; } if (bindings["Needle Binding"] && bindings["Silk Binding"] && bindings["Tools Binding"] && bindings["Mask Binding"]) { value.completedAllBindings = true; if (hitCounter == 0) { value.completedAllBindingsNoHit = true; } } if (bindings["Needle Binding"]) { value.completedNeedleBinding = true; } if (bindings["Silk Binding"]) { value.completedSilkBinding = true; } if (bindings["Tools Binding"]) { value.completedToolsBinding = true; } if (bindings["Mask Binding"]) { value.completedMaskBinding = true; } } } GodsOfPharloomMod.instance.SaveModData(); SceneLoadInfo val = new SceneLoadInfo { SceneName = backScene, EntryGateName = backEntry, EntrySkip = true, Visualization = (SceneLoadVisualizations)0 }; GameManager.instance.BeginSceneTransition(val); Reset(); } public static void SetSequence(BossScene[] bossSequence, string backEntry, string backScene, SequenceType sequenceType, string difficultMode = "Attuned", string pantheonName = "", bool startImmediately = true) { Reset(); BossSequence.bossSequence = bossSequence; BossSequence.backEntry = backEntry; BossSequence.backScene = backScene; BossSequence.sequenceType = sequenceType; currentDifficultMode = difficultMode; currentPantheon = pantheonName; if (startImmediately) { Start(); } } } [Serializable] public class Badges { public string bossStatue; public Dictionary badges; public Badges(string bossStatue) { this.bossStatue = bossStatue; badges = new Dictionary { { "Attuned", false }, { "Ascended", false }, { "Radiant", false } }; } } public class BossStatueInfo { public static string hog_sceneName = "GG_Pharloom_Hall_Of_Gods"; public static List difficultModes = new List { "Attuned", "Ascended", "Radiant" }; public static string currentDifficultMode = difficultModes[0]; public static string difficultyModeCanvasGOName = "DifficultyModeCanvas"; public static bool isInfiniteChallenge = false; public static GameObject difficultyModeCanvas; public static GameObject attunedBadge; public static GameObject ascendedBadge; public static GameObject radiantBadge; public static TextMeshPro bossName; public static Dictionary> menuModesGOs; public Dictionary statueModeSpriteGOs; public static GameObject selectArrow; public static BossStatueInfo[] bossStatues; public BossScene boss; public int statueIndex; public Dictionary> modes; private Badges badges; public BossStatueInfo(BossScene boss) { this.boss = boss; } public static void InitBossesStatue() { BossStatueInfo[] array = new BossStatueInfo[BossScene.bosses.Count]; int num = 0; foreach (KeyValuePair boss in BossScene.bosses) { array[num] = new BossStatueInfo(boss.Value); array[num].statueIndex = num; num++; } bossStatues = array; } public static void GetBadges() { BossStatueInfo[] array = bossStatues; foreach (BossStatueInfo bossStatueInfo in array) { bossStatueInfo.badges = PlayerDataMod.instance.badges[bossStatueInfo.boss.bossName]; } } } public class BossStatue : MonoBehaviour { public BossStatueInfo instance; private void Awake() { ((MonoBehaviour)this).StartCoroutine(Init()); } private IEnumerator Init() { if ((Object)(object)BossStatueInfo.difficultyModeCanvas == (Object)null) { Scene scene = ((Component)this).gameObject.scene; GameObject[] rootGameObjects = ((Scene)(ref scene)).GetRootGameObjects(); foreach (GameObject obj in rootGameObjects) { if (!(((Object)obj).name == BossStatueInfo.difficultyModeCanvasGOName)) { continue; } BossStatueInfo.difficultyModeCanvas = obj; Transform children = obj.transform; GameObject val; while (true) { val = GameObject.Find("_GameCameras/HudCamera/In-game/Inventory/Inv/Description Pane/Text Name"); if ((Object)(object)val != (Object)null) { break; } yield return null; } BossStatueInfo.bossName = Object.Instantiate(val, obj.transform).GetComponent(); BossStatueInfo.bossName.transform.position = new Vector3(3.6391f, 4.4801f, 0f); foreach (Transform item in children) { Transform val2 = item; if (((Object)((Component)val2).gameObject).name == "Modes") { Dictionary> dictionary = new Dictionary>(); foreach (Transform item2 in val2) { Transform val3 = item2; TextMeshPro component = Object.Instantiate(val, ((Component)val3).transform).GetComponent(); ((TMP_Text)component).text = ((Object)val3).name; Vector3 position = val3.Find("SpriteMode").position; component.transform.position = new Vector3(4.5146f, position.y + 0.4f, 0f); Dictionary dictionary2 = new Dictionary(); foreach (Transform item3 in val3) { Transform val4 = item3; dictionary2[((Object)val4).name] = ((Component)val4).gameObject; } dictionary[((Object)val3).name] = dictionary2; } BossStatueInfo.menuModesGOs = dictionary; } else if (((Object)((Component)val2).gameObject).name == "select_arrow") { BossStatueInfo.selectArrow = ((Component)val2).gameObject; } } break; } } BossStatueInfo[] bossStatues = BossStatueInfo.bossStatues; foreach (BossStatueInfo bossStatueInfo in bossStatues) { if (((Object)((Component)this).gameObject).name == bossStatueInfo.boss.bossName) { instance = bossStatueInfo; break; } } foreach (Transform item4 in ((Component)this).gameObject.transform) { Transform val5 = item4; if (!(((Object)val5).name == "Orbs")) { continue; } Transform transform = ((Component)val5).gameObject.transform; Dictionary dictionary3 = new Dictionary(); foreach (Transform item5 in transform) { Transform val6 = item5; dictionary3[((Object)val6).name] = ((Component)val6).gameObject; } instance.statueModeSpriteGOs = dictionary3; } if (instance != null) { InitChallengeRegion(); } } private void InitChallengeRegion() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_011f: 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_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0195: 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_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Expected O, but got Unknown //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Expected O, but got Unknown //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Expected O, but got Unknown //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Expected O, but got Unknown //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Expected O, but got Unknown //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Expected O, but got Unknown //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Expected O, but got Unknown //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Expected O, but got Unknown //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_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Expected O, but got Unknown //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_03ff: Expected O, but got Unknown //IL_040e: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_042c: Expected O, but got Unknown //IL_042e: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Expected O, but got Unknown //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Expected O, but got Unknown //IL_0488: Unknown result type (might be due to invalid IL or missing references) //IL_048d: 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_04a6: Expected O, but got Unknown string currentDifficultMode = BossStatueInfo.currentDifficultMode; Vector3 position = BossStatueInfo.menuModesGOs[currentDifficultMode]["SpriteMode"].transform.position; Vector3 position2 = BossStatueInfo.selectArrow.transform.position; BossStatueInfo.selectArrow.transform.position = new Vector3(position2.x, position.y, position2.z); List difficultModes = BossStatueInfo.difficultModes; for (int num = difficultModes.Count - 1; num >= 0; num--) { if (PlayerDataMod.instance.badges[instance.boss.bossName].badges[difficultModes[num]]) { instance.statueModeSpriteGOs[difficultModes[num]].SetActive(true); break; } } GameObject gameObject = ((Component)this).gameObject; Vector3 position3 = gameObject.transform.position; HeroActions inputHandler = ManagerSingleton.Instance.inputActions; GameObject gameObject2 = ((Component)CustomScene.CreateTransitionPoint(new TransitionPointInfo($"back_entry{instance.statueIndex}", default(Vector3), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: false, dontWalkOutOfDoor: true), BossStatueInfo.hog_sceneName)).gameObject; ((Object)gameObject2).name = $"back_entry{instance.statueIndex}"; SceneManager.MoveGameObjectToScene(gameObject2, ((Component)this).gameObject.scene); gameObject2.transform.position = new Vector3(position3.x, position3.y, position3.z); PlayMakerNPC interactComponent = gameObject.AddComponent(); PlayMakerFSM val = gameObject.AddComponent(); Fsm fsm = val.Fsm; ((InteractableBase)interactComponent).InteractLabel = (PromptLabels)8; interactComponent.CustomEventTarget = val; ((NPCControlBase)interactComponent).TargetDistance = 0f; FsmState val2 = new FsmState(fsm); val2.Name = "Init"; FsmState val3 = new FsmState(fsm); val3.Name = "Idle"; FsmState val4 = new FsmState(fsm); val4.Name = "Interact"; FsmState val5 = new FsmState(fsm); val5.Name = "Next Frame"; FsmState val6 = new FsmState(fsm); val6.Name = "Start Boss Fight"; FsmState val7 = new FsmState(fsm); val7.Name = "Exit Menu"; PatchedFsm.CustomLogicFsm customLogicFsm = new PatchedFsm.CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { foreach (KeyValuePair> menuModesGO in BossStatueInfo.menuModesGOs) { menuModesGO.Value["SpriteMode"].SetActive(PlayerDataMod.instance.badges[instance.boss.bossName].badges[menuModesGO.Key]); } ((TMP_Text)BossStatueInfo.bossName).text = instance.boss.bossName; BossStatueInfo.difficultyModeCanvas.SetActive(true); }); customLogicFsm.updateAction = (Action)Delegate.Combine(customLogicFsm.updateAction, (Action)delegate { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: 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_012f: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) if (((OneAxisInputControl)inputHandler.Up).WasPressed) { int num2 = BossStatueInfo.difficultModes.IndexOf(BossStatueInfo.currentDifficultMode); int num3 = ((num2 == 0) ? BossStatueInfo.difficultModes.Count : num2); BossStatueInfo.currentDifficultMode = BossStatueInfo.difficultModes[num3 - 1]; string currentDifficultMode2 = BossStatueInfo.currentDifficultMode; Vector3 position4 = BossStatueInfo.menuModesGOs[currentDifficultMode2]["SpriteMode"].transform.position; Vector3 position5 = BossStatueInfo.selectArrow.transform.position; BossStatueInfo.selectArrow.transform.position = new Vector3(position5.x, position4.y, position5.z); } if (((OneAxisInputControl)inputHandler.Down).WasPressed) { int num4 = BossStatueInfo.difficultModes.IndexOf(BossStatueInfo.currentDifficultMode); int num5 = ((num4 == BossStatueInfo.difficultModes.Count - 1) ? (-1) : num4); BossStatueInfo.currentDifficultMode = BossStatueInfo.difficultModes[num5 + 1]; string currentDifficultMode3 = BossStatueInfo.currentDifficultMode; Vector3 position6 = BossStatueInfo.menuModesGOs[currentDifficultMode3]["SpriteMode"].transform.position; Vector3 position7 = BossStatueInfo.selectArrow.transform.position; BossStatueInfo.selectArrow.transform.position = new Vector3(position7.x, position6.y, position7.z); } if (((OneAxisInputControl)inputHandler.Jump).WasPressed) { fsm.FsmComponent.SendEvent("START BOSS FIGHT"); } if (((OneAxisInputControl)inputHandler.QuickCast).WasPressed || ((OneAxisInputControl)inputHandler.MenuCancel).WasPressed || ((OneAxisInputControl)inputHandler.Cast).WasPressed) { fsm.FsmComponent.SendEvent("EXIT MENU"); } }); val4.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; val5.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)new NextFrameEvent { sendEvent = FsmEvent.GetFsmEvent("FINISHED") } }; PatchedFsm.CustomLogicFsm exitAction = new PatchedFsm.CustomLogicFsm(fsm); PatchedFsm.CustomLogicFsm customLogicFsm2 = exitAction; customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { BossStatueInfo.difficultyModeCanvas.SetActive(false); ((PlayerActionSet)inputHandler).ClearInputState(); interactComponent.ForceEndDialogue(); ((FsmStateAction)exitAction).Finish(); }); val7.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)new NextFrameEvent(), exitAction }; PatchedFsm.CustomLogicFsm customLogicFsm3 = new PatchedFsm.CustomLogicFsm(fsm); customLogicFsm3.action = (Action)Delegate.Combine(customLogicFsm3.action, (Action)delegate { BossStatueInfo.difficultyModeCanvas.SetActive(false); BossSequence.SetSequence(new BossScene[1] { instance.boss }, $"back_entry{instance.statueIndex}", BossStatueInfo.hog_sceneName, BossSequence.SequenceType.HoG, BossStatueInfo.currentDifficultMode); }); val2.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { ToFsmState = val3, FsmEvent = FsmEvent.GetFsmEvent("FINISHED") } }; val3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { ToFsmState = val5, FsmEvent = FsmEvent.GetFsmEvent("INTERACT") } }; val4.Transitions = (FsmTransition[])(object)new FsmTransition[2] { new FsmTransition { ToFsmState = val6, FsmEvent = FsmEvent.GetFsmEvent("START BOSS FIGHT") }, new FsmTransition { ToFsmState = val7, FsmEvent = FsmEvent.GetFsmEvent("EXIT MENU") } }; val5.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { ToFsmState = val4, FsmEvent = FsmEvent.GetFsmEvent("FINISHED") } }; val7.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { ToFsmState = val3, FsmEvent = FsmEvent.GetFsmEvent("FINISHED") } }; val6.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm3 }; fsm.States = (FsmState[])(object)new FsmState[5] { val2, val3, val4, val6, val7 }; fsm.StartState = "Init"; fsm.SetState("Init"); } } public class CoroutineHandler : MonoBehaviour { } public class CustomButton { public string buttonName; public Action submitAction; public Action OnSelected; public Action OnDeselected; public CustomButton[] selectables; public GameObject GO; } public class CustomMenu { public static List menus = new List(); public bool isActivated; public string menuName; public Action OnActivate; public Action OnDeactivate; public CustomButton[] buttons; public GameObject pointer; public CustomButton currentButton; private void Start() { menus.Add(this); } public static void Reset() { menus = new List(); } } public class FastTeleport { public static string sceneName = "GG_Pharloom_Hall_Of_Gods"; public static string entryGate = "door1"; public static void Start() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: 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_002a: Expected O, but got Unknown SceneLoadInfo val = new SceneLoadInfo { SceneName = sceneName, EntryGateName = entryGate, EntrySkip = true, Visualization = (SceneLoadVisualizations)0 }; GameManager.instance.BeginSceneTransition(val); } } public class Pantheon : MonoBehaviour { public string pantheonName; public string pantheonDisplayName = ""; public Transform bindings; public GameObject needleBinding; public GameObject silkBindng; public GameObject toolsBinding; public GameObject maskBinding; public GameObject hitlessHeart; public GameObject doorStates; public GameObject radiantBackboard; public BossScene[] sequence; public static int pantheonsCount; public int pantheonIndex; private void Awake() { bindings = ((Component)this).transform.Find("Bindings"); needleBinding = ((Component)bindings.Find("Needle Binding")).gameObject; silkBindng = ((Component)bindings.Find("Silk Binding")).gameObject; toolsBinding = ((Component)bindings.Find("Tools Binding")).gameObject; maskBinding = ((Component)bindings.Find("Mask Binding")).gameObject; doorStates = ((Component)((Component)this).transform.Find("Door_States")).gameObject; hitlessHeart = ((Component)doorStates.transform.Find("DoorNoHitHeart")).gameObject; radiantBackboard = ((Component)doorStates.transform.Find("gg_radiant_backboard")).gameObject; pantheonIndex = pantheonsCount; pantheonsCount++; } private void Reset() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) foreach (Transform item in ((Component)bindings).transform) { ((Component)item).gameObject.SetActive(true); foreach (Transform item2 in ((Component)item).transform) { ((Component)item2).gameObject.SetActive(false); } } foreach (Transform item3 in doorStates.transform) { ((Component)item3).gameObject.SetActive(false); } } public void Init() { Reset(); PantheonInfo pantheonInfo = PlayerDataMod.instance.pantheonsInfo[pantheonName]; hitlessHeart.SetActive(pantheonInfo.completedNoHit); if (pantheonInfo.completedAllBindings) { GameObject[] array = (GameObject[])(object)new GameObject[4] { needleBinding, silkBindng, toolsBinding, maskBinding }; for (int i = 0; i < array.Length; i++) { ((Component)array[i].transform.Find("AllActivated")).gameObject.SetActive(true); } radiantBackboard.SetActive(true); } else { ((Component)needleBinding.transform.Find("Activated")).gameObject.SetActive(pantheonInfo.completedNeedleBinding); ((Component)silkBindng.transform.Find("Activated")).gameObject.SetActive(pantheonInfo.completedSilkBinding); ((Component)toolsBinding.transform.Find("Activated")).gameObject.SetActive(pantheonInfo.completedToolsBinding); ((Component)maskBinding.transform.Find("Activated")).gameObject.SetActive(pantheonInfo.completedMaskBinding); } if (pantheonInfo.completedPantheon && !pantheonInfo.completedAllBindings) { ((Component)doorStates.transform.Find("State1")).gameObject.SetActive(true); } else if (pantheonInfo.completedAllBindings && !pantheonInfo.completedAllBindingsNoHit) { ((Component)doorStates.transform.Find("State2")).gameObject.SetActive(true); } else if (pantheonInfo.completedAllBindingsNoHit) { ((Component)doorStates.transform.Find("State3")).gameObject.SetActive(true); } InitChallengeRegion(); } public void InitChallengeRegion() { //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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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: 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_0078: 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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: 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_00eb: 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_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013d: 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_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Expected O, but got Unknown //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Expected O, but got Unknown //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Expected O, but got Unknown //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Expected O, but got Unknown //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Expected O, but got Unknown //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Expected O, but got Unknown //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Expected O, but got Unknown //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Expected O, but got Unknown //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Expected O, but got Unknown //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_0393: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Expected O, but got Unknown //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Expected O, but got Unknown GameObject selectArrow = PantheonMenu.selectArrow; List buttons = PantheonMenu.buttons; GameObject currentButton = PantheonMenu.currentButton; Vector3 position = currentButton.transform.position; Vector3 position2 = selectArrow.transform.position; PantheonMenu.pantheonMenu.SetActive(false); selectArrow.transform.position = new Vector3(position2.x, position.y, position2.z); GameObject gameObject = ((Component)this).gameObject; Vector3 position3 = gameObject.transform.position; HeroActions inputHandler = ManagerSingleton.Instance.inputActions; TransitionPointInfo item = new TransitionPointInfo($"back_entry{pantheonIndex}", default(Vector3), "", "", (PromptLabels)3, isADoor: true, isOneTimeTransition: false, dontWalkOutOfDoor: true); Scene scene = ((Component)this).gameObject.scene; GameObject gameObject2 = ((Component)CustomScene.CreateTransitionPoint(item, ((Scene)(ref scene)).name)).gameObject; ((Object)gameObject2).name = $"back_entry{pantheonIndex}"; SceneManager.MoveGameObjectToScene(gameObject2, ((Component)this).gameObject.scene); gameObject2.transform.position = new Vector3(position3.x, position3.y, position3.z); PlayMakerNPC interactComponent = gameObject.AddComponent(); PlayMakerFSM val = gameObject.AddComponent(); Fsm fsm = val.Fsm; ((InteractableBase)interactComponent).InteractLabel = (PromptLabels)8; interactComponent.CustomEventTarget = val; FsmState val2 = new FsmState(fsm); val2.Name = "Init"; FsmState val3 = new FsmState(fsm); val3.Name = "Idle"; FsmState val4 = new FsmState(fsm); val4.Name = "Interact"; FsmState val5 = new FsmState(fsm); val5.Name = "Start Pantheon Sequence"; FsmState val6 = new FsmState(fsm); val6.Name = "Exit Menu"; PatchedFsm.CustomLogicFsm customLogicFsm = new PatchedFsm.CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PantheonMenu.UpdateButtons(); ((TMP_Text)PantheonMenu.pantheonName).text = pantheonDisplayName; if (!PantheonMenu.instance.isFlashUiInited && Preload.preloads.TryGetValue("generic_flash_ui", out var value)) { GameObject[] array = (GameObject[])(object)new GameObject[4] { PantheonMenu.needleButton, PantheonMenu.silkButton, PantheonMenu.toolsButton, PantheonMenu.maskButton }; foreach (GameObject val7 in array) { ((Object)Object.Instantiate(value, val7.transform)).name = "generic_flash_ui"; } PantheonMenu.instance.isFlashUiInited = true; } foreach (GameObject item2 in buttons) { Transform val8 = item2.transform.Find("generic_flash_ui"); if (Object.op_Implicit((Object)(object)val8)) { ((Component)val8).gameObject.SetActive(false); } } PantheonMenu.pantheonMenu.SetActive(true); }); customLogicFsm.updateAction = (Action)Delegate.Combine(customLogicFsm.updateAction, (Action)delegate { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_007f: 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_008b: 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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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_0119: 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_0127: Unknown result type (might be due to invalid IL or missing references) if (((OneAxisInputControl)inputHandler.Up).WasPressed) { int num = ((PantheonMenu.currentButtonIndex < 1) ? buttons.Count : PantheonMenu.currentButtonIndex); currentButton = buttons[num - 1]; PantheonMenu.currentButtonIndex = num - 1; Vector3 position4 = currentButton.transform.position; Vector3 position5 = selectArrow.transform.position; selectArrow.transform.position = new Vector3(position5.x, position4.y, position5.z); } if (((OneAxisInputControl)inputHandler.Down).WasPressed) { int num2 = ((PantheonMenu.currentButtonIndex >= buttons.Count - 1) ? (-1) : PantheonMenu.currentButtonIndex); currentButton = buttons[num2 + 1]; PantheonMenu.currentButtonIndex = num2 + 1; Vector3 position6 = currentButton.transform.position; Vector3 position7 = selectArrow.transform.position; selectArrow.transform.position = new Vector3(position7.x, position6.y, position7.z); } if (((OneAxisInputControl)inputHandler.Jump).WasPressed) { PlayerDataMod instance = PlayerDataMod.instance; PlayerData instance2 = PlayerData.instance; if ((Object)(object)currentButton == (Object)(object)PantheonMenu.beginButton) { PantheonMenu.pantheonMenu.SetActive(false); fsm.FsmComponent.SendEvent("START BOSS SEQUENCE"); } else if ((Object)(object)currentButton == (Object)(object)PantheonMenu.needleButton) { PantheonMenu.ToggleBinding(PantheonMenu.needleButton); } else if ((Object)(object)currentButton == (Object)(object)PantheonMenu.silkButton) { PantheonMenu.ToggleBinding(PantheonMenu.silkButton); } else if ((Object)(object)currentButton == (Object)(object)PantheonMenu.toolsButton) { PantheonMenu.ToggleBinding(PantheonMenu.toolsButton); } else if ((Object)(object)currentButton == (Object)(object)PantheonMenu.maskButton) { PantheonMenu.ToggleBinding(PantheonMenu.maskButton); if (instance.bindings["Mask Binding"]) { instance.previousHealthCount = instance2.maxHealth; ((MonoBehaviour)GodsOfPharloomMod.instance).StartCoroutine(BindingsMenu.TrySetHeroHealth(BindingsMenu.maskBindingCount)); } else { ((MonoBehaviour)GodsOfPharloomMod.instance).StartCoroutine(BindingsMenu.TrySetHeroHealth(instance.previousHealthCount)); } } } if (((OneAxisInputControl)inputHandler.QuickCast).WasPressed || ((OneAxisInputControl)inputHandler.MenuCancel).WasPressed || ((OneAxisInputControl)inputHandler.Cast).WasPressed) { fsm.FsmComponent.SendEvent("EXIT MENU"); } }); val4.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; PatchedFsm.CustomLogicFsm exitAction = new PatchedFsm.CustomLogicFsm(fsm); PatchedFsm.CustomLogicFsm customLogicFsm2 = exitAction; customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { PantheonMenu.pantheonMenu.SetActive(false); ((PlayerActionSet)inputHandler).ClearInputState(); interactComponent.ForceEndDialogue(); ((FsmStateAction)exitAction).Finish(); }); val6.Actions = (FsmStateAction[])(object)new FsmStateAction[2] { (FsmStateAction)new NextFrameEvent(), exitAction }; PatchedFsm.CustomLogicFsm customLogicFsm3 = new PatchedFsm.CustomLogicFsm(fsm); customLogicFsm3.action = (Action)Delegate.Combine(customLogicFsm3.action, (Action)delegate { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) BossScene[] bossSequence = sequence; string backEntry = $"back_entry{pantheonIndex}"; Scene scene2 = ((Component)this).gameObject.scene; BossSequence.SetSequence(bossSequence, backEntry, ((Scene)(ref scene2)).name, BossSequence.SequenceType.Pantheon, "Attuned", pantheonName); }); val2.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { ToFsmState = val3, FsmEvent = FsmEvent.GetFsmEvent("FINISHED") } }; val3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { ToFsmState = val4, FsmEvent = FsmEvent.GetFsmEvent("INTERACT") } }; val4.Transitions = (FsmTransition[])(object)new FsmTransition[2] { new FsmTransition { ToFsmState = val5, FsmEvent = FsmEvent.GetFsmEvent("START BOSS SEQUENCE") }, new FsmTransition { ToFsmState = val6, FsmEvent = FsmEvent.GetFsmEvent("EXIT MENU") } }; val6.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { ToFsmState = val3, FsmEvent = FsmEvent.GetFsmEvent("FINISHED") } }; val5.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm3 }; fsm.States = (FsmState[])(object)new FsmState[5] { val2, val3, val4, val5, val6 }; fsm.StartState = "Init"; fsm.SetState("Init"); } } public class PantheonMenu : MonoBehaviour { public static PantheonMenu instance; public static GameObject pantheonMenu; public static List buttons; public static GameObject selectArrow; public static TextMeshPro pantheonName; public static GameObject currentButton; public static int currentButtonIndex; public static GameObject needleButton; public static GameObject silkButton; public static GameObject toolsButton; public static GameObject maskButton; public static GameObject[] bindings; public static GameObject beginButton; public static AudioSource audioSource; public static AudioClip mainBindingsSoundSelect; public static AudioClip mainBindingsSoundFull; public bool isFlashUiInited; private void Awake() { instance = this; ((MonoBehaviour)this).StartCoroutine(Init()); } private IEnumerator Init() { pantheonMenu = ((Component)((Component)this).transform.Find("PantheonMenuCanvas")).gameObject; selectArrow = ((Component)pantheonMenu.transform.Find("select_arrow")).gameObject; GameObject val; while (true) { val = GameObject.Find("_GameCameras/HudCamera/In-game/Inventory/Inv/Description Pane/Text Name"); if ((Object)(object)val != (Object)null) { break; } yield return null; } mainBindingsSoundSelect = (AudioClip)Preload.bundleResources["chain_cut"]; mainBindingsSoundFull = (AudioClip)Preload.bundleResources["gg_radiant_binding_bling"]; audioSource = ((Component)this).gameObject.AddComponent(); audioSource.maxDistance = 9999f; audioSource.priority = 80; pantheonName = Object.Instantiate(val, pantheonMenu.transform).GetComponent(); pantheonName.transform.position = new Vector3(-3.5129f, 5.3634f, -0.723f); TextMeshPro component = Object.Instantiate(val, pantheonMenu.transform).GetComponent(); ((TMP_Text)component).text = "Bindings"; component.transform.position = new Vector3(-3.62f, 3.4192f, -0.7229f); Transform obj = pantheonMenu.transform.Find("Buttons"); buttons = new List(); needleButton = ((Component)obj.Find("Needle Binding")).gameObject; _ = needleButton.transform.position; TextMeshPro component2 = Object.Instantiate(val, needleButton.transform).GetComponent(); ((Object)component2).name = "Text"; ((TMP_Text)component2).text = "Needle"; component2.transform.position = new Vector3(-3.0373f, 2.13f, 0f); silkButton = ((Component)obj.Find("Silk Binding")).gameObject; _ = silkButton.transform.position; TextMeshPro component3 = Object.Instantiate(val, silkButton.transform).GetComponent(); ((Object)component3).name = "Text"; ((TMP_Text)component3).text = "Silk"; component3.transform.position = new Vector3(-3.0373f, 0.6357f, 0f); toolsButton = ((Component)obj.Find("Tools Binding")).gameObject; _ = toolsButton.transform.position; TextMeshPro component4 = Object.Instantiate(val, toolsButton.transform).GetComponent(); ((Object)component4).name = "Text"; ((TMP_Text)component4).text = "Tools"; component4.transform.position = new Vector3(-3.0373f, -0.793f, 0f); maskButton = ((Component)obj.Find("Mask Binding")).gameObject; _ = maskButton.transform.position; TextMeshPro component5 = Object.Instantiate(val, maskButton.transform).GetComponent(); ((Object)component5).name = "Text"; ((TMP_Text)component5).text = "Shell"; component5.transform.position = new Vector3(-3.0373f, -2.38f, 0f); beginButton = ((Component)obj.Find("Begin")).gameObject; _ = beginButton.transform.position; TextMeshPro component6 = Object.Instantiate(val, beginButton.transform).GetComponent(); ((Object)component6).name = "Text"; ((TMP_Text)component6).text = "BEGIN"; component6.transform.position = new Vector3(-3.55f, -4.05f, -0.723f); bindings = (GameObject[])(object)new GameObject[4] { needleButton, silkButton, toolsButton, maskButton }; buttons = new List { needleButton, silkButton, toolsButton, maskButton, beginButton }; currentButton = buttons[currentButtonIndex]; pantheonMenu.transform.position = new Vector3(-0.0494f, -0.7522f, -0.7229f); Reset(); } public static void Reset() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) foreach (GameObject button in buttons) { button.SetActive(true); foreach (Transform item in button.transform) { Transform val = item; if (((Object)val).name == "Text") { ((Component)val).gameObject.SetActive(true); } else if (((Object)val).name == "States") { ((Component)val).gameObject.SetActive(true); foreach (Transform item2 in val) { ((Component)item2).gameObject.SetActive(false); } } else { ((Component)val).gameObject.SetActive(false); } } } } public static void UpdateButtons() { PlayerDataMod playerDataMod = PlayerDataMod.instance; Reset(); if (playerDataMod.bindings["Needle Binding"] && playerDataMod.bindings["Silk Binding"] && playerDataMod.bindings["Tools Binding"] && playerDataMod.bindings["Mask Binding"]) { GameObject[] array = (GameObject[])(object)new GameObject[4] { needleButton, silkButton, toolsButton, maskButton }; for (int i = 0; i < array.Length; i++) { ((Component)array[i].transform.Find("States/AllActivated")).gameObject.SetActive(true); } } else { ((Component)needleButton.transform.Find("States/Activated")).gameObject.SetActive(playerDataMod.bindings["Needle Binding"]); ((Component)silkButton.transform.Find("States/Activated")).gameObject.SetActive(playerDataMod.bindings["Silk Binding"]); ((Component)toolsButton.transform.Find("States/Activated")).gameObject.SetActive(playerDataMod.bindings["Tools Binding"]); ((Component)maskButton.transform.Find("States/Activated")).gameObject.SetActive(playerDataMod.bindings["Mask Binding"]); ((Component)needleButton.transform.Find("States/Deactivated")).gameObject.SetActive(!playerDataMod.bindings["Needle Binding"]); ((Component)silkButton.transform.Find("States/Deactivated")).gameObject.SetActive(!playerDataMod.bindings["Silk Binding"]); ((Component)toolsButton.transform.Find("States/Deactivated")).gameObject.SetActive(!playerDataMod.bindings["Tools Binding"]); ((Component)maskButton.transform.Find("States/Deactivated")).gameObject.SetActive(!playerDataMod.bindings["Mask Binding"]); } } public static void ToggleBinding(GameObject bindingObj) { //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Expected O, but got Unknown PlayerDataMod playerDataMod = PlayerDataMod.instance; GameObject gameObject = ((Component)bindingObj.transform.Find("generic_flash_ui")).gameObject; Transform val = bindingObj.transform.Find("States"); if (playerDataMod.bindings["Needle Binding"] && playerDataMod.bindings["Silk Binding"] && playerDataMod.bindings["Tools Binding"] && playerDataMod.bindings["Mask Binding"]) { GameObject[] array = bindings; foreach (GameObject obj in array) { Transform val2 = obj.transform.Find("States"); GameObject gameObject2 = ((Component)obj.transform.Find("generic_flash_ui")).gameObject; gameObject2.SetActive(false); gameObject2.SetActive(true); foreach (Transform item in val2) { Transform val3 = item; if (((Object)val3).name == "Activated") { ((Component)val3).gameObject.SetActive(true); } else { ((Component)val3).gameObject.SetActive(false); } } } } if ((Object)(object)bindingObj == (Object)(object)needleButton) { bool flag = playerDataMod.bindings["Needle Binding"]; playerDataMod.bindings["Needle Binding"] = !flag; gameObject.SetActive(false); gameObject.SetActive(true); ((Component)((Component)val).transform.Find("Deactivated")).gameObject.SetActive(flag); ((Component)((Component)val).transform.Find("Activated")).gameObject.SetActive(!flag); } if ((Object)(object)bindingObj == (Object)(object)silkButton) { bool flag2 = playerDataMod.bindings["Silk Binding"]; playerDataMod.bindings["Silk Binding"] = !flag2; gameObject.SetActive(false); gameObject.SetActive(true); ((Component)((Component)val).transform.Find("Deactivated")).gameObject.SetActive(flag2); ((Component)((Component)val).transform.Find("Activated")).gameObject.SetActive(!flag2); } if ((Object)(object)bindingObj == (Object)(object)toolsButton) { bool flag3 = playerDataMod.bindings["Tools Binding"]; playerDataMod.bindings["Tools Binding"] = !flag3; gameObject.SetActive(false); gameObject.SetActive(true); ((Component)((Component)val).transform.Find("Deactivated")).gameObject.SetActive(flag3); ((Component)((Component)val).transform.Find("Activated")).gameObject.SetActive(!flag3); } if ((Object)(object)bindingObj == (Object)(object)maskButton) { bool flag4 = playerDataMod.bindings["Mask Binding"]; playerDataMod.bindings["Mask Binding"] = !flag4; gameObject.SetActive(false); gameObject.SetActive(true); ((Component)((Component)val).transform.Find("Deactivated")).gameObject.SetActive(flag4); ((Component)((Component)val).transform.Find("Activated")).gameObject.SetActive(!flag4); } audioSource.PlayOneShot(mainBindingsSoundSelect); if (playerDataMod.bindings["Needle Binding"] && playerDataMod.bindings["Silk Binding"] && playerDataMod.bindings["Tools Binding"] && playerDataMod.bindings["Mask Binding"]) { GameObject[] array = bindings; foreach (GameObject obj2 in array) { Transform val4 = obj2.transform.Find("States"); GameObject gameObject3 = ((Component)obj2.transform.Find("generic_flash_ui")).gameObject; gameObject3.SetActive(false); gameObject3.SetActive(true); foreach (Transform item2 in val4) { Transform val5 = item2; if (((Object)val5).name == "AllActivated") { ((Component)val5).gameObject.SetActive(true); } else { ((Component)val5).gameObject.SetActive(false); } } } audioSource.PlayOneShot(mainBindingsSoundFull); } GameCameras.instance.HUDOut(); GameCameras.instance.HUDIn(); GodsOfPharloomMod.instance.SaveModData(); } } public class PatchedFsm { public class CustomLogicFsm : FsmStateAction { public Action action; public Action updateAction; public float time; public bool finishOnEnter; public Fsm fsm; public override void OnEnter() { if (time == 0f) { action?.Invoke(fsm); } else { ((MonoBehaviour)BossSequence.sequenceController).StartCoroutine(DoActionWithDelay()); } if (updateAction == null && time == 0f) { ((FsmStateAction)this).Finish(); } if (finishOnEnter) { ((FsmStateAction)this).Finish(); } } public override void OnUpdate() { updateAction?.Invoke(); } public IEnumerator DoActionWithDelay() { yield return (object)new WaitForSeconds(time); action?.Invoke(fsm); ((FsmStateAction)this).Finish(); } public CustomLogicFsm(Fsm fsm, float time = 0f, bool finishOnEnter = false) { this.fsm = fsm; this.time = time; this.finishOnEnter = finishOnEnter; } } private class CustomWaitConditionFsm : FsmStateAction { } private class CustomTrigger : MonoBehaviour { public Action action; public FsmStateAction fsmAction; public Fsm fsm; private void OnTriggerStay2D(Collider2D collider) { action?.Invoke(fsm, fsmAction); Object.Destroy((Object)(object)((Component)this).gameObject); } private void OnTriggerEnter2D(Collider2D collider) { action?.Invoke(fsm, fsmAction); Object.Destroy((Object)(object)((Component)this).gameObject); } } public class FsmPatch { public string objName; public string fsmName; public int objNameHash; public int fsmNameHash; public Func method; public FsmPatch(string objName, string fsmName, Func method) { this.objName = objName; this.fsmName = fsmName; this.method = method; objNameHash = objName.GetHashCode(); fsmNameHash = fsmName.GetHashCode(); } } public static Func InvokeMethod = (object instance, MethodInfo method, object[] obj) => method.Invoke(instance, obj); public static MethodInfo activateChildOnTrigger = AccessTools.Method(typeof(ActivateChildrenOnContact), "OnTriggerEnter2D", (Type[])null, (Type[])null); public static string bossDeadEvent = "BOSS DEAD EVENT MOD"; public string sceneName; public int sceneNameHash; public FsmPatch[] fsms; public static PatchedFsm[] patchedFsms = new PatchedFsm[55] { new PatchedFsm("DontDestroyOnLoad", new FsmPatch[1] { new FsmPatch("Inventory", "Inventory Control", PatchFsm_InventoryControl) }), new PatchedFsm("Menu_Title", new FsmPatch[1] { new FsmPatch("Hero_Hornet(Clone)", "Superjump", PatchFsm_SuperJump) }), new PatchedFsm("GG_Pharloom_Atrium", new FsmPatch[2] { new FsmPatch("Detect Range", "Detect Hero", PatchFsm_DetectRangeBenchControl), new FsmPatch("RestBench(Clone)", "Bench Control", PatchFsm_BenchControl) }), new PatchedFsm(BossStatueInfo.hog_sceneName, new FsmPatch[4] { new FsmPatch("Detect Range", "Detect Hero", PatchFsm_DetectRangeBenchControl), new FsmPatch("RestBench(Clone)", "Bench Control", PatchFsm_BenchControl), new FsmPatch("thread_memory", "Deep Memory Pre Enter Effect", PatchFsm_ThreadMemoryPreEnterEffect), new FsmPatch("thread_memory", "FSM", PatchFsm_ThreadMemoryFSM) }), new PatchedFsm("GG_Rest_Scene", new FsmPatch[2] { new FsmPatch("Detect Range", "Detect Hero", PatchFsm_DetectRangeBenchControl), new FsmPatch("RestBench(Clone)", "Bench Control", PatchFsm_BenchControl) }), new PatchedFsm("Abyss_05", new FsmPatch[2] { new FsmPatch("thread_memory", "Deep Memory Pre Enter Effect", PatchFsm_ThreadMemoryPreEnterEffect), new FsmPatch("thread_memory", "FSM", PatchFsm_ThreadMemoryFSM) }), new PatchedFsm("Tut_03", new FsmPatch[4] { new FsmPatch("Mossbone Mother", "Control", PatchFsm_MossMother), new FsmPatch("Moss Vine Cluster", "Control", PatchFsm_MossMotherMossVineCluster), new FsmPatch("Moss Vine Cluster (1)", "Control", PatchFsm_MossMotherMossVineCluster), new FsmPatch("Mossbone Mother Corpse(Clone)", "Death", PatchFsm_MossMotherCorpseControl) }), new PatchedFsm("Weave_03", new FsmPatch[5] { new FsmPatch("Mossbone Mother A", "Control", PatchFsm_MossMotherDoubleA), new FsmPatch("Mossbone Mother B", "Control", PatchFsm_MossMotherDoubleB), new FsmPatch("Moss Vine Cluster (2)", "Control", PatchFsm_MossMotherMossVineCluster), new FsmPatch("Mossbone Mother Ambient Corpse(Clone)", "Death", PatchFsm_MossMotherDoubleCorpseControl), new FsmPatch("Mossbone Mother B Ambient Corpse(Clone)", "Death", PatchFsm_MossMotherDoubleCorpseControl) }), new PatchedFsm("Bone_05_boss", new FsmPatch[4] { new FsmPatch("Bone Beast", "Control", PatchFsm_BellBeast), new FsmPatch("Boss Scene", "Return State", PatchFsm_BellBeastReturnState), new FsmPatch("Return Battle", "Start Return Battle", PatchFsm_BellBeastStartReturnBattle), new FsmPatch("Bone Beast Corpse(Clone)", "Death", PatchFsm_BellBeastCorpseControl) }), new PatchedFsm("Bone_East_08_boss_golem", new FsmPatch[2] { new FsmPatch("song_golem", "Control", PatchFsm_FourthChorus), new FsmPatch("SG_head", "Phase Control", PatchFsm_FourthChorusSGHead) }), new PatchedFsm("Bone_East_08", new FsmPatch[1] { new FsmPatch("Boss Scene", "Control", PatchFsm_BoneEast08BossScene) }), new PatchedFsm("Coral_11", new FsmPatch[5] { new FsmPatch("Driller A", "Control", PatchFsm_GreatConchfliesDriller), new FsmPatch("Driller B", "Control", PatchFsm_GreatConchfliesDriller), new FsmPatch("Boss Scene", "Control", PatchFsm_GreatConchfliesBattleScene), new FsmPatch("Boss Scene", "Boss AI", PatchFsm_GreatConchfliesBattleSceneBossAI), new FsmPatch("Corpse Coral Conch Driller Giant(Clone)", "Death", PatchFsm_GreatConchfliesCorpseControl) }), new PatchedFsm("Bone_East_12", new FsmPatch[2] { new FsmPatch("Lace Boss1", "Control", PatchFsm_Lace1), new FsmPatch("Corpse Lace1(Clone)", "Control", PatchFsm_Lace1CorpseControl) }), new PatchedFsm("Coral_Judge_Arena", new FsmPatch[3] { new FsmPatch("Last Judge", "Control", PatchFsm_LastJudge), new FsmPatch("Boss Scene", "Control", PatchFsm_LastJudgeBattleScene), new FsmPatch("Corpse Last Judge(Clone)", "Control", PatchFsm_LastJudgeCorpseControl) }), new PatchedFsm("Greymoor_08_boss", new FsmPatch[3] { new FsmPatch("Vampire Gnat", "Control", PatchFsm_Moorwing), new FsmPatch("Tension Range", "Control", PatchFsm_MoorwingTensionAudio), new FsmPatch("Vampire Gnat Corpse(Clone)", "Death", PatchFsm_MoorwingCorpseControl) }), new PatchedFsm("Organ_01", new FsmPatch[2] { new FsmPatch("Phantom", "Control", PatchFsm_Phantom), new FsmPatch("Boss Scene", "Control", PatchFsm_PhantomBossScene) }), new PatchedFsm("Ant_19", new FsmPatch[3] { new FsmPatch("Bone Flyer Giant", "Control", PatchFsm_SavageBeastfly1), new FsmPatch("Boss Scene", "Control", PatchFsm_SavageBeastfly1BossScene), new FsmPatch("Corpse Giant Bone Flyer(Clone)", "Death", PatchFsm_SavageBeastfly1CorpseControl) }), new PatchedFsm("Shellwood_18", new FsmPatch[5] { new FsmPatch("Splinter Queen", "Control", PatchFsm_SisterSplinter), new FsmPatch("Boss Scene", "Battle Control", PatchFsm_SisterSplinterBossScene), new FsmPatch("Approaches", "Control", PatchFsm_SisterSplinterApproaches), new FsmPatch("Boss Return Scene", "Bud Control", PatchFsm_SisterSplinterBossReturnScene), new FsmPatch("Corpse Splinter Queen(Clone)", "Death", PatchFsm_SisterSplinterCorpseControl) }), new PatchedFsm("Bone_15", new FsmPatch[3] { new FsmPatch("Skull King", "Behaviour", PatchFsm_SkullTyrant), new FsmPatch("Corpse Skull King SkullFragment(Clone)", "Death", PatchFsm_SkullTyrantCorpseControl), new FsmPatch("Audio Loop Tension", "FSM", PatchFsm_SkullTyrantAudioTension) }), new PatchedFsm("Belltown_Shrine", new FsmPatch[3] { new FsmPatch("Spinner Boss", "Control", PatchFsm_Widow), new FsmPatch("Boss Scene", "Control", PatchFsm_WidowBossScene), new FsmPatch("Bell Shrine Lever", "Activate Delayed", PatchFsm_WidowLever) }), new PatchedFsm("Slab_16b", new FsmPatch[3] { new FsmPatch("Slab Fly Broodmother", "Control", PatchFsm_Broodmother), new FsmPatch("Corpse Slab Fly Broodmaster(Clone)", "Death", PatchFsm_BroodmotherCorpseControl), new FsmPatch("Battle Gate Slab (2)", "BG Control", PatchFsm_BroodmotherBGControl) }), new PatchedFsm("Cog_Dancers", new FsmPatch[1] { new FsmPatch("Boss Scene", "Sequence", PatchFsm_CogDancersBossScene) }), new PatchedFsm("Cog_Dancers_boss", new FsmPatch[3] { new FsmPatch("Dancer Control", "Control", PatchFsm_CogDancersDancerControl), new FsmPatch("Dancer A", "Control", PatchFsm_CogDancersDancerAB), new FsmPatch("Dancer B", "Control", PatchFsm_CogDancersDancerAB) }), new PatchedFsm("Dust_Chef", new FsmPatch[4] { new FsmPatch("Roachkeeper Chef (1)", "Control", PatchFsm_DustChef), new FsmPatch("kitchen_gong", "Tink Hit Force", PatchFsm_DustChefKitchenGong), new FsmPatch("Corpse Roachkeeper Chef(Clone)", "Death", PatchFsm_DustChefCorpseControl), new FsmPatch("Kitchen Pipe Gong", "Gong Hit Reaction", PatchFsm_DustChefGongHitReaction) }), new PatchedFsm("Belltown_08", new FsmPatch[2] { new FsmPatch("Wisp Pyre Effigy", "Summon Control", PatchFsm_FatherOfFlame), new FsmPatch("Battle Gate Swamp", "BG Control", PatchFsm_FatherOfFlameGateControl) }), new PatchedFsm("Slab_10b", new FsmPatch[4] { new FsmPatch("First Weaver", "Control", PatchFsm_FirstSinner), new FsmPatch("Shrine First Weaver", "Inspection", PatchFsm_FirstSinnerInspection), new FsmPatch("Boss Scene", "Outro", PatchFsm_FirstSinnerBossSceneOutro), new FsmPatch("Corpse First Weaver(Clone)", "Death", PatchFsm_FirstSinnerCorpseControl) }), new PatchedFsm("Dock_09", new FsmPatch[3] { new FsmPatch("Boss Scene", "Control", PatchFsm_ForebrothersSignisAndGronBossScene), new FsmPatch("Dock Guard Slasher", "Control", PatchFsm_ForebrothersSignisAndGronSlasher), new FsmPatch("Dock Guard Thrower", "Control", PatchFsm_ForebrothersSignisAndGronThrower) }), new PatchedFsm("Library_09", new FsmPatch[3] { new FsmPatch("Garmond Scene", "Control", PatchFsm_GarmondAndZazaSceneControl), new FsmPatch("Garmond Fighter", "Control", PatchFsm_GarmondAndZaza), new FsmPatch("Citadel Library NPC", "Dialogue", PatchFsm_GarmondAndZazaDestroyNPCComponent) }), new PatchedFsm("Cradle_03", new FsmPatch[6] { new FsmPatch("Silk Boss", "Control", PatchFsm_SilkBoss), new FsmPatch("Intro Sequence", "First Challenge", PatchFsm_SilkBossIntroSequence), new FsmPatch("Boss Title", "Title Control", PatchFsm_SilkBossTitleControl), new FsmPatch("Silk Boss", "Phase Control", PatchFsm_SilkBossPhaseControl), new FsmPatch("Challenge Region", "Challenge", PatchFsm_SilkBossChallengeControl), new FsmPatch("Death Sequence", "Control", PatchFsm_SilkBossDeathSequence) }), new PatchedFsm("Shadow_18", new FsmPatch[5] { new FsmPatch("Swamp Shaman", "Control", PatchFsm_GroalTheGreat), new FsmPatch("Battle Gate Swamp", "BG Control", PatchFsm_GroalTheGreatCloseGate), new FsmPatch("Battle Gate Swamp (1)", "BG Control", PatchFsm_GroalTheGreatCloseGate), new FsmPatch("Battle Gate Swamp (2)", "BG Control", PatchFsm_GroalTheGreatCloseGate), new FsmPatch("Battle Gate Swamp (3)", "BG Control", PatchFsm_GroalTheGreatCloseGate) }), new PatchedFsm("Song_Tower_01", new FsmPatch[5] { new FsmPatch("door_cutsceneEndLaceTower", "Travel Control", PatchFsm_Lace2door_cutsceneEndLaceTower), new FsmPatch("Lace Boss2 New", "Control", PatchFsm_Lace2BossControl), new FsmPatch("Corpse Lace2(Clone)", "Control", PatchFsm_Lace2CorpseControl), new FsmPatch("Lace Return Corpse", "Position", PatchFsm_Lace2ReturnCorpseDeactivate), new FsmPatch("song_tower_right_gate", "Control", PatchFsm_Lace2RightGate) }), new PatchedFsm("Coral_27", new FsmPatch[2] { new FsmPatch("Coral Conch Driller Giant Solo", "Control", PatchFsm_RagingConchfly), new FsmPatch("Corpse Coral Conch Driller Giant Solo(Clone)", "Death", PatchFsm_RagingConchflyCorpseControl) }), new PatchedFsm("Bone_East_08_boss_beastfly", new FsmPatch[2] { new FsmPatch("Bone Flyer Giant", "Control", PatchFsm_SavageBeastfly2), new FsmPatch("Corpse Giant Bone Flyer Quest(Clone)", "Death", PatchFsm_SavageBeastfly2CorpseControl) }), new PatchedFsm("Hang_17b", new FsmPatch[3] { new FsmPatch("Song Knight", "Control", PatchFsm_SecondSentielControl), new FsmPatch("Boss Scene - To Additive Load", "Control", PatchFsm_SecondSentielBossSceneControl), new FsmPatch("Corpse Song Knight(Clone)", "Death", PatchFsm_SecondSentielCorpseControl) }), new PatchedFsm("Greymoor_08_mapper", new FsmPatch[2] { new FsmPatch("Mapper Spar NPC", "Attack Enemies", PatchFsm_ShakraAttackEnemies), new FsmPatch("Mapper Call Pole", "Control", PatchFsm_ShakraCallPole) }), new PatchedFsm("Ward_02", new FsmPatch[1] { new FsmPatch("Pipe_Vent_Hatch", "Open At Battle End", PatchFsm_TheUnravelledPipeControl) }), new PatchedFsm("Ward_02_boss", new FsmPatch[2] { new FsmPatch("Boss Scene", "Control", PatchFsm_TheUnravelledBossScene), new FsmPatch("Conductor Boss", "Control", PatchFsm_TheUnravelledControl) }), new PatchedFsm("Library_13", new FsmPatch[4] { new FsmPatch("Trobbio", "Control", PatchFsm_TrobbioControl), new FsmPatch("Tormented Trobbio", "Control", PatchFsm_TormentedTrobbioControl), new FsmPatch("Corpse Tormented Trobbio(Clone)", "Control", PatchFsm_TormentedTrobbioCorpseControl), new FsmPatch("Grand Stage Scene", "Control", PatchFsm_TrobbioGrandStageSceneControl) }), new PatchedFsm("Coral_29", new FsmPatch[1] { new FsmPatch("Zap Core Enemy", "Control", PatchFsm_VoltvyrmControl) }), new PatchedFsm("Bellway_Centipede_Arena", new FsmPatch[1] { new FsmPatch("Centipede Control", "Control", PatchFsm_BellEaterControl) }), new PatchedFsm("Clover_10", new FsmPatch[5] { new FsmPatch("Dancer A", "Control", PatchFsm_CloverDancersDancerAB), new FsmPatch("Dancer B", "Control", PatchFsm_CloverDancersDancerAB), new FsmPatch("Green Prince Boss NPC", "Dialogue", PatchFsm_CloverDancersGreenPrinceBossNPC), new FsmPatch("Dancer Control", "Control", PatchFsm_CloverDancersDancerControl), new FsmPatch("Corpse Green Prince(Clone)", "Death", PatchFsm_CloverDancersCorpseControl) }), new PatchedFsm("Room_CrowCourt_02", new FsmPatch[3] { new FsmPatch("Crawfather", "Control", PatchFsm_CrawfatherControl), new FsmPatch("Battle Start", "Battle Start", PatchFsm_CrawfatherBattleStart), new FsmPatch("Corpse Crawfather(Clone)", "Death", PatchFsm_CrawfatherCorpseControl) }), new PatchedFsm("Memory_Coral_Tower", new FsmPatch[2] { new FsmPatch("Coral King", "Control", PatchFsm_CrustKingKhanControl), new FsmPatch("Boss Scene", "Control", PatchFsm_CrustKingKhanBossSceneControl) }), new PatchedFsm("Bone_East_18b", new FsmPatch[4] { new FsmPatch("Bone Hunter Trapper", "Control", PatchFsm_GurrTheOutcastControl), new FsmPatch("TrapBench", "Control", PatchFsm_GurrTheOutcastTrapBenchControl), new FsmPatch("Boss Scene", "Control", PatchFsm_GurrTheOutcastBossSceneControl), new FsmPatch("Corpse Bone Hunter Trapper(Clone)", "Death", PatchFsm_GurrTheOutcastCorpseControl) }), new PatchedFsm("Coral_33", new FsmPatch[2] { new FsmPatch("Garmond Black Threaded Fighter", "Control", PatchFsm_LostGarmondControl), new FsmPatch("Corpse Garmond BlackThreaded(Clone)", "Control", PatchFsm_LostGarmondCorpseControl) }), new PatchedFsm("Abyss_Cocoon", new FsmPatch[7] { new FsmPatch("Intro Control", "Control", PatchFsm_LostLaceIntroControl), new FsmPatch("Boss Title", "Title Control", PatchFsm_LostLaceBossTitle), new FsmPatch("Abyss_Cocoon_Silk", "Animate during lace death", PatchFsm_LostLaceGrandMother), new FsmPatch("Lost Lace Boss", "Control", PatchFsm_LostLaceBossControl), new FsmPatch("Lost Lace Boss", "Death Control", PatchFsm_LostLaceDeathControl), new FsmPatch("door_entry", "Control", PatchFsm_LostLaceDoorEntryControl), new FsmPatch("Corpse Lost Lace(Clone)", "Control", PatchFsm_LostLaceCorpseControl) }), new PatchedFsm("Shellwood_11b_Memory", new FsmPatch[3] { new FsmPatch("Boss Scene", "Control", PatchFsm_NylethBossSceneControl), new FsmPatch("Flower Queen Boss", "Control", PatchFsm_NylethControl), new FsmPatch("Corpse Flower Queen(Clone)", "Death", PatchFsm_NylethCorpseControl) }), new PatchedFsm("Clover_19", new FsmPatch[2] { new FsmPatch("Cloverstag White Boss", "Control", PatchFsm_PalestagControl), new FsmPatch("Corpse White Cloverstag(Clone)", "Disappear", PatchFsm_PalestagCorpseControl) }), new PatchedFsm("Peak_07", new FsmPatch[3] { new FsmPatch("Pinstress Boss", "Control", PatchFsm_PinstressBossControl), new FsmPatch("Pinstress Control", "Control", PatchFsm_PinstressControl), new FsmPatch("NPC", "NPC Control", PatchFsm_PinstressNPCControl) }), new PatchedFsm("Crawl_10", new FsmPatch[2] { new FsmPatch("Blue Assistant", "Control", PatchFsm_PlasmifiedZango), new FsmPatch("Blue Assistant", "Phase Control", PatchFsm_PlasmifiedZangoPhaseControl) }), new PatchedFsm("Shellwood_22", new FsmPatch[3] { new FsmPatch("Seth", "Control", PatchFsm_SethControl), new FsmPatch("Seth", "Phase Control", PatchFsm_SethPhaseControl), new FsmPatch("Corpse Seth(Clone)", "Death", PatchFsm_SethCorpseControl) }), new PatchedFsm("Memory_Ant_Queen", new FsmPatch[3] { new FsmPatch("Hunter Queen Boss", "Control", PatchFsm_SkarrsingerKarmelitaBossControl), new FsmPatch("Challenge Region", "Challenge", PatchFsm_SkarrsingerKarmelitaChallengeRegion), new FsmPatch("Corpse Hunter Queen(Clone)", "Death", PatchFsm_SkarrsingerKarmelitaCorpseControl) }), new PatchedFsm("Coral_39", new FsmPatch[3] { new FsmPatch("Coral Warrior Grey", "Control", PatchFsm_WatcherAtTheEdgeControl), new FsmPatch("Coral Warrior Grey", "Battle Music", PatchFsm_WatcherAtTheEdgeBattleMusic), new FsmPatch("Corpse Coral Warrior Grey(Clone)", "Control", PatchFsm_WatcherAtTheEdgeCorpseControl) }), new PatchedFsm("Hang_04", new FsmPatch[1] { new FsmPatch("Hang Battle Drop Lamp", "Drop Control", PatchFsm_ForumDropLampControl) }), new PatchedFsm("Hang_04_boss", new FsmPatch[2] { new FsmPatch("Start Range", "Control", PatchFsm_ForumStartRange), new FsmPatch("Song Handmaiden", "Control", PatchFsm_ForumHandmaidenControl) }) }; public static string[] bossesSceneName = new string[45] { "Tut_03", "Weave_03", "Bone_05", "Bone_East_08_Boss_Golem", "Coral_11", "Bone_East_12", "Coral_Judge_Arena", "Greymoor_08_boss", "Organ_01", "Ant_19", "Shellwood_18", "Bone_15", "Belltown_Shrine", "Slab_16b", "Cog_Dancers", "Dust_Chef", "Belltown_08", "Slab_10b", "Dock_09", "Library_09", "Cradle_03", "Shadow_18", "Song_Tower", "Coral_27", "Bone_East_08", "Hang_17b", "Greymoor_08", "Ward_02_Boss", "Library_13", "Coral_29", "Bellway_Centipede_Arena", "Clover_10", "Room_CrowCourt_02", "Memory_Coral_Tower", "Bone_East_18b", "Coral_33", "Abyss_Cocoon", "Shellwood_11b_Memory", "Clover_19", "Peak_07", "Crawl_10", "Shellwood_22", "Memory_Ant_Queen", "Library_13", "Coral_39" }; private PatchedFsm(string sceneName, FsmPatch[] fsms) { this.sceneName = sceneName; this.fsms = fsms; sceneNameHash = this.sceneName.GetHashCode(); } public static void SetTransitionToState(FsmState state, FsmState to, int transitionIndex) { state.Transitions[transitionIndex].ToState = to.Name; state.Transitions[transitionIndex].ToFsmState = to; } public static T[] InsertInArray(T[] array, T elem, int index) { List list = array.ToList(); list.Insert(index, elem); return list.ToArray(); } public static T[] RemoveFromArray(T[] array, int index) { List list = array.ToList(); list.RemoveAt(index); return list.ToArray(); } public static GameObject CreateTrigger(string sceneName) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown GameObject val = new GameObject("CustomTrigger"); SceneManager.MoveGameObjectToScene(val, SceneManager.GetSceneByName(sceneName)); val.layer = 13; BoxCollider2D obj = val.AddComponent(); ((Collider2D)obj).isTrigger = true; obj.size = new Vector2(25f, 18f); return val; } public static bool PatchFsm_SuperJump(Fsm fsm) { FsmState state = fsm.GetState("Start Delay"); FsmState state2 = fsm.GetState("Throw Needle"); FsmState state3 = fsm.GetState("Throw Wait"); FsmState state4 = fsm.GetState("Ground Charge"); float origSuperJumpSpeed = fsm.GetFsmFloat("Jump Speed").Value; float origWaitSuperJump = fsm.GetFsmFloat("Charge Time").Value; FsmStateAction origThrowNeedleWait = state2.Actions[9]; CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { val.FsmComponent.SendEvent("FINISHED"); }); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm, state2.Actions.Length); state3.Actions = InsertInArray(state3.Actions, (FsmStateAction)(object)customLogicFsm, state3.Actions.Length); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); FsmStateAction sendEventAction = state2.Actions[state2.Actions.Length - 1]; CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate(Fsm val) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); string activeScene2 = ((Scene)(ref activeScene)).name; CustomScene customScene = GodsOfPharloomMod.customScenes.Find((CustomScene item) => item.sceneName == activeScene2); if (customScene != null && customScene.isFastSuperJump) { val.GetFsmFloat("Jump Speed").Value = CustomScene.customSuperJumpSpeed; val.GetFsmFloat("Charge Time").Value = CustomScene.customWaitForSuperJump; origThrowNeedleWait.Enabled = false; sendEventAction.Enabled = true; } else { val.GetFsmFloat("Jump Speed").Value = origSuperJumpSpeed; val.GetFsmFloat("Charge Time").Value = origWaitSuperJump; origThrowNeedleWait.Enabled = true; sendEventAction.Enabled = false; } }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm2, 0); state4.Actions = InsertInArray(state4.Actions, state4.Actions[19], state4.Actions.Length); state4.Actions = RemoveFromArray(state4.Actions, 19); return true; } public static bool PatchFsm_ForInitModPreloads(Fsm fsm) { if (Preload.isInitialized) { return false; } Preload.afterAllPreloaded = (Action)Delegate.Combine(Preload.afterAllPreloaded, new Action(afterPreloaded)); Preload.Init(); return true; static void afterPreloaded() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) Scene sceneByName = SceneManager.GetSceneByName("Menu_Title"); GameObject[] rootGameObjects = ((Scene)(ref sceneByName)).GetRootGameObjects(); foreach (GameObject val in rootGameObjects) { if (((Object)val).name == "_SceneManager") { val.GetComponent().UpdateScene(); Preload.afterAllPreloaded = (Action)Delegate.Remove(Preload.afterAllPreloaded, new Action(afterPreloaded)); break; } } } } public static bool PatchFsm_DetectRangeBenchControl(Fsm fsm) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_003e: 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) fsm.GetState("Init"); FsmState state = fsm.GetState("Idle"); FsmState state2 = fsm.GetState("Close"); FsmColor val = new FsmColor(); val.Value = new Color(0f, 0f, 0f, 0f); ((SetMaterialColor)state.Actions[6]).color = val; state.Actions = RemoveFromArray(state.Actions, 5); state2.Actions = RemoveFromArray(state2.Actions, 6); state2.Actions = RemoveFromArray(state2.Actions, 5); state2.Actions = RemoveFromArray(state2.Actions, 3); state2.Actions = RemoveFromArray(state2.Actions, 2); return true; } public static bool PatchFsm_BenchControl(Fsm fsm) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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) fsm.GetState("Init"); FsmState state = fsm.GetState("Rest Burst"); FsmState state2 = fsm.GetState("Save Game"); _ = fsm.GetFsmVector3("Adjust Vector").Value; Scene scene = fsm.GameObject.scene; if (((Scene)(ref scene)).name == "GG_Rest_Scene") { state.Actions[9].Enabled = false; state.Actions[10].Enabled = false; state.Actions[11].Enabled = false; state2.Actions[4].Enabled = false; } return true; } public static bool PatchFsm_TrapBenchDestroy(Fsm fsm) { Object.Destroy((Object)(object)fsm.FsmComponent); return true; } public static bool PatchFsm_ThreadMemoryFSM(Fsm fsm) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown FsmState state = fsm.GetState("Collapse"); Wait elem = new Wait { time = FsmFloat.op_Implicit(0.5f), finishEvent = FsmEvent.GetFsmEvent("FINISHED") }; state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)elem, state.Actions.Length - 1); return true; } public static bool PatchFsm_InventoryControl(Fsm fsm) { BindingsMenu.InitBindingsMenu(); return true; } public static bool PatchFsm_ThreadMemoryPreEnterEffect(Fsm fsm) { //IL_005d: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); fsm.GetState("Idle"); FsmState state2 = fsm.GetState("In Zone"); FsmState preEnterEffect = fsm.GetState("Pre Enter Effect"); ((CreateObject)state.Actions[2]).gameObject = FsmGameObject.op_Implicit(Preload.preloads["Deep Memory Pre Enter Effect"]); Transform val = fsm.GameObject.transform.parent.Find("Deep_Memory_appear"); if ((Object)(object)val != (Object)null) { DeactivateIfPlayerdataFalse component = ((Component)val).GetComponent(); DeactivateIfPlayerdataTrue component2 = ((Component)val).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = false; } if (Object.op_Implicit((Object)(object)component2)) { ((Behaviour)component2).enabled = false; } ((Component)val).gameObject.SetActive(true); } GameObject effectObj = null; ParticleSystem roarEmitter = null; ParticleSystem burst2Particles = null; ParticleSystem burst3Particles = null; ParticleSystem burst4Particles = null; ParticleSystem burst5Particles = null; int origBurst2MaxParticles = 0; int origBurst4MaxParticles = 0; float timer = 0f; CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { roarEmitter.Stop(); }); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { roarEmitter.Play(); }); CustomLogicFsm customLogicFsm3 = new CustomLogicFsm(fsm); customLogicFsm3.action = (Action)Delegate.Combine(customLogicFsm3.action, (Action)delegate { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) timer = 0f; MainModule main = burst2Particles.main; MainModule main2 = burst4Particles.main; ((MainModule)(ref main)).maxParticles = origBurst2MaxParticles; ((MainModule)(ref main2)).maxParticles = origBurst4MaxParticles; }); CustomLogicFsm customLogicFsm4 = new CustomLogicFsm(fsm); customLogicFsm4.action = (Action)Delegate.Combine(customLogicFsm4.action, (Action)delegate(Fsm val2) { ((MonoBehaviour)val2.FsmComponent).StartCoroutine(enumerator()); }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm4, state.Actions.Length); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm, 0); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm3, 0); preEnterEffect.Actions = InsertInArray(preEnterEffect.Actions, (FsmStateAction)(object)customLogicFsm2, 0); return true; IEnumerator enumerator() { effectObj = fsm.GetFsmGameObject("Deep Memory Pre Enter Effect").Value; Vector3 position = effectObj.transform.position; effectObj.transform.position = new Vector3(10000f, 10000f, position.z); roarEmitter = Preload.FindObjectByPath((GameObject[])(object)new GameObject[1] { effectObj }, ((Object)effectObj).name + "/Roar Wave Emitter (2)").GetComponent(); burst2Particles = Preload.FindObjectByPath((GameObject[])(object)new GameObject[1] { effectObj }, ((Object)effectObj).name + "/Burst (2)").GetComponent(); burst3Particles = Preload.FindObjectByPath((GameObject[])(object)new GameObject[1] { effectObj }, ((Object)effectObj).name + "/Burst (3)").GetComponent(); burst4Particles = Preload.FindObjectByPath((GameObject[])(object)new GameObject[1] { effectObj }, ((Object)effectObj).name + "/Burst (4)").GetComponent(); burst5Particles = Preload.FindObjectByPath((GameObject[])(object)new GameObject[1] { effectObj }, ((Object)effectObj).name + "/Burst (5)").GetComponent(); MainModule mainBurst2 = burst2Particles.main; MainModule mainBurst4 = burst4Particles.main; origBurst2MaxParticles = ((MainModule)(ref mainBurst2)).maxParticles; origBurst4MaxParticles = ((MainModule)(ref mainBurst4)).maxParticles; while (true) { if (timer > 0f) { burst2Particles.Emit(1000); if (timer > 3f && ((MainModule)(ref mainBurst2)).maxParticles < 500) { ((MainModule)(ref mainBurst2)).maxParticles = ((MainModule)(ref mainBurst2)).maxParticles + 5; } } if (timer > 1.5f) { burst3Particles.Emit(1000); } if (timer > 1.5f) { burst4Particles.Emit(1000); if (timer > 5f) { ((MainModule)(ref mainBurst4)).maxParticles = ((MainModule)(ref mainBurst4)).maxParticles + 5; } } if (timer > 3.5f) { burst5Particles.Emit(1000); } if (fsm.ActiveState == preEnterEffect) { timer += Time.deltaTime; } yield return null; } } } public static bool PatchFsm_MossMother(Fsm fsm) { //IL_0091: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState dormantState = fsm.GetState("Dormant"); FsmState state2 = fsm.GetState("Return Ready"); FsmState state3 = fsm.GetState("Return Antic"); FsmState state4 = fsm.GetState("Roar"); fsm.GetState("Return In"); FsmState state5 = fsm.GetState("Return Pause"); ((Wait)state4.Actions[6]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state3.Actions[0]).time = FsmFloat.op_Implicit(0f); ((Wait)state5.Actions[0]).time = FsmFloat.op_Implicit(0f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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) Vector3 position = val.GameObject.transform.position; GameObject gameObject = ((Component)val.GameObject.transform.parent.parent).gameObject; BattleScene battleSceneComponent = gameObject.GetComponent(); battleSceneComponent.battleStartPause = 0f; GameObject obj2 = CreateTrigger("Tut_03"); _ = obj2.transform.position; obj2.transform.position = new Vector3(position.x, 13f, position.z); CustomTrigger customTrigger = obj2.AddComponent(); customTrigger.fsm = val; customTrigger.action = (Action)Delegate.Combine(customTrigger.action, (Action)delegate { battleSceneComponent.StartBattle(); }); }); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { string key = "Moss Mother"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; fsm.GameObject.GetComponent().hp = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; fsm.GetFsmInt("HP").Value = num; num -= phases[0].hp; fsm.GetFsmInt("HP P2").Value = num; num -= phases[1].hp; fsm.GetFsmInt("HP Call Buddy").Value = num; num -= phases[2].hp; fsm.GetFsmInt("HP Half").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm2, state.Actions.Length); FsmTransition? obj = ((IEnumerable)state.Transitions).FirstOrDefault((Func)((FsmTransition i) => i.ToState == dormantState.Name)); obj.ToState = state2.Name; obj.ToFsmState = state2; state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm, state2.Actions.Length); ((StartRoarEmitter)((IEnumerable)state4.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_MossMotherDoubleA(Fsm fsm) { //IL_00d3: 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_0109: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); fsm.GetState("Dormant"); fsm.GetState("Return Ready"); FsmState state2 = fsm.GetState("Return Ready 2"); FsmState state3 = fsm.GetState("Return Pause 2"); FsmState state4 = fsm.GetState("Return Antic 2"); FsmState returnIn2 = fsm.GetState("Return In 2"); fsm.GetState("Return Antic"); FsmState state5 = fsm.GetState("Roar"); fsm.GetState("Return In"); fsm.GetState("Return Pause"); ((Wait)state5.Actions[6]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state4.Actions[0]).time = FsmFloat.op_Implicit(0f); ((Wait)state3.Actions[0]).time = FsmFloat.op_Implicit(0f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = delegate(Fsm val) { ((Component)val.GameObject.transform.Find("Cocoon")).gameObject.SetActive(false); }; CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = delegate(Fsm val) { //IL_000d: 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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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_0081: Unknown result type (might be due to invalid IL or missing references) Vector2 value = ((SetPosition2D)returnIn2.Actions[3]).Vector.Value; Vector3 position = val.GameObject.transform.position; val.GameObject.transform.position = new Vector3(21.87f, value.y, position.z); Vector3 localScale = val.GameObject.transform.localScale; val.GameObject.transform.localScale = new Vector3(-1f, localScale.y, localScale.z); }; CustomLogicFsm customLogicFsm3 = new CustomLogicFsm(fsm); customLogicFsm3.action = (Action)Delegate.Combine(customLogicFsm3.action, (Action)delegate(Fsm val) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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) Vector3 position = val.GameObject.transform.position; GameObject gameObject = ((Component)val.GameObject.transform.parent.parent).gameObject; BattleScene battleSceneComponent = gameObject.GetComponent(); battleSceneComponent.battleStartPause = 0f; GameObject obj = CreateTrigger("Weave_03"); _ = obj.transform.position; obj.transform.position = new Vector3(position.x, 20f, position.z); CustomTrigger customTrigger = obj.AddComponent(); customTrigger.fsm = val; customTrigger.action = (Action)Delegate.Combine(customTrigger.action, (Action)delegate { battleSceneComponent.StartBattle(); }); }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length - 1); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm3, state2.Actions.Length); returnIn2.Actions = InsertInArray(returnIn2.Actions, (FsmStateAction)(object)customLogicFsm2, 4); CustomLogicFsm customLogicFsm4 = new CustomLogicFsm(fsm); customLogicFsm4.action = (Action)Delegate.Combine(customLogicFsm4.action, (Action)delegate { string key = "Moss Mother Double 1"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; fsm.GameObject.GetComponent().hp = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; fsm.GetFsmInt("HP").Value = num; num -= phases[0].hp; fsm.GetFsmInt("HP P2").Value = num; num -= phases[1].hp; fsm.GetFsmInt("HP Call Buddy").Value = num; num -= phases[2].hp; fsm.GetFsmInt("HP Half").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm4, state.Actions.Length); SetTransitionToState(state, state2, 0); ((StartRoarEmitter)((IEnumerable)state5.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_MossMotherDoubleB(Fsm fsm) { FsmState state = fsm.GetState("Init"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown foreach (Transform item in val.GameObject.transform) { Transform val2 = item; if (((Object)val2).name == "Mossbone Mother Ambient Corpse(Clone)") { ((Object)val2).name = "Mossbone Mother B Ambient Corpse(Clone)"; break; } } }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length - 1); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { string key = "Moss Mother Double 2"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; fsm.GameObject.GetComponent().hp = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; fsm.GetFsmInt("HP").Value = num; num -= phases[0].hp; fsm.GetFsmInt("HP P2").Value = num; num -= phases[1].hp; fsm.GetFsmInt("HP Call Buddy").Value = num; num -= phases[2].hp; fsm.GetFsmInt("HP Half").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm2, state.Actions.Length); return true; } public static bool PatchFsm_MossMotherMossVineCluster(Fsm fsm) { fsm.GameObject.SetActive(false); return true; } public static bool PatchFsm_MossMotherCorpseControl(Fsm fsm) { //IL_0036: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00ee: 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_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Expected O, but got Unknown FsmState state = fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); fsm.GetState("Wait Frame"); FsmState state3 = fsm.GetState("Stagger"); ((Wait)state.Actions[1]).time = FsmFloat.op_Implicit(0.01f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); Wait val = new Wait { time = FsmFloat.op_Implicit(BossScene.waitForBossDeathAnim), finishEvent = FsmEvent.GetFsmEvent("FINISHED") }; FsmState val2 = new FsmState(fsm); val2.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; FsmState val3 = new FsmState(fsm); val3.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)val }; val3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("FINISHED"), ToFsmState = val2 } }; state2.Actions[9].Enabled = false; state2.Transitions[0].ToFsmState = val3; SetTransitionToState(state3, state2, 0); return true; } public static bool PatchFsm_MossMotherDoubleCorpseControl(Fsm fsm) { //IL_005d: Unknown result type (might be due to invalid IL or missing references) fsm.GetState("Steam"); FsmState state = fsm.GetState("Blow"); fsm.GetState("Blow 2"); fsm.GetState("Wait Frame"); FsmState state2 = fsm.GetState("Stagger"); Transform transform = GameObject.Find("Bosses").transform; int num = 0; foreach (Transform item in transform) { if (((Component)item).gameObject.activeSelf) { num++; } } if (num > 1) { return false; } CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, 0); SetTransitionToState(state2, state, 0); return true; } public static bool PatchFsm_MossMotherBCorpseControl(Fsm fsm) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Expected O, but got Unknown //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown FsmState state = fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); fsm.GetState("Blow 2"); fsm.GetState("State 1"); FsmState state3 = fsm.GetState("Black Thread?"); ((Wait)state.Actions[1]).time = FsmFloat.op_Implicit(0.01f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); Wait val = new Wait { time = FsmFloat.op_Implicit(BossScene.waitForBossDeathAnim), finishEvent = FsmEvent.GetFsmEvent("FINISHED") }; FsmState val2 = new FsmState(fsm); val2.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; FsmState val3 = new FsmState(fsm); val3.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)val }; val3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("FINISHED"), ToFsmState = val2 } }; state2.Transitions[0].ToFsmState = val3; state2.Transitions[0].FsmEvent = FsmEvent.GetFsmEvent("FINISHED"); SetTransitionToState(state3, state2, 1); return true; } public static bool PatchFsm_BellBeast(Fsm fsm) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Submerged Init"); fsm.GetState("Emerge Antic C"); FsmState state2 = fsm.GetState("Init"); ((Wait)state.Actions[5]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { string key = "Bell Beast"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; fsm.GameObject.GetComponent().hp = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("Rage HP").Value = num; }); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm, state2.Actions.Length); return true; } public static bool PatchFsm_BellBeastReturnState(Fsm fsm) { FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Set Return State"); SetTransitionToState(state, state2, 0); return true; } public static bool PatchFsm_BellBeastStartReturnBattle(Fsm fsm) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) fsm.GetState("Init"); FsmState state = fsm.GetState("Scene Setup"); ((Wait)fsm.GetState("Start Battle").Actions[1]).time = FsmFloat.op_Implicit(0.5f); state.Actions = RemoveFromArray(state.Actions, 4); return true; } public static bool PatchFsm_BellBeastCorpseControl(Fsm fsm) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); fsm.GetState("State 1"); ((Wait)state2.Actions[1]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); Wait val = new Wait { time = FsmFloat.op_Implicit(BossScene.waitForBossDeathAnim), finishEvent = FsmEvent.GetFsmEvent("FINISHED") }; FsmState val2 = new FsmState(fsm); val2.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; FsmState val3 = new FsmState(fsm); val3.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)val }; val3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("FINISHED"), ToFsmState = val2 } }; state2.Transitions[0].ToFsmState = val3; state2.Transitions[0].FsmEvent = FsmEvent.GetFsmEvent("FINISHED"); SetTransitionToState(state, state2, 0); return true; } public static bool PatchFsm_FourthChorus(Fsm fsm) { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); fsm.GetState("Meet Roar 1"); FsmState state2 = fsm.GetState("Remeet Roar"); FsmState state3 = fsm.GetState("Roar Clamp"); FsmState state4 = fsm.GetState("Roar No Clamp"); fsm.GetState("Meet?"); FsmState state5 = fsm.GetState("Death Anim"); FsmState state6 = fsm.GetState("Explode"); fsm.GetState("Death Fall"); FsmState state7 = fsm.GetState("Death Land"); ((Wait)state4.Actions[11]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state3.Actions[11]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, 1f, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state6.Actions[8].Enabled = false; state7.Actions = InsertInArray(state7.Actions, (FsmStateAction)(object)customLogicFsm, 0); state7.Transitions = (FsmTransition[])(object)new FsmTransition[0]; SetTransitionToState(state, state2, 0); SetTransitionToState(state2, state4, 0); SetTransitionToState(state5, state6, 0); ((StartRoarEmitter)((IEnumerable)state4.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_FourthChorusSGHead(Fsm fsm) { FsmState state = fsm.GetState("Init"); FsmState HPCheck1 = fsm.GetState("HP Check 1"); FsmState HPCheck2 = fsm.GetState("HP Check 2"); FsmState HPCheck3 = fsm.GetState("HP Check 3"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { //IL_0077: 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_00c7: Unknown result type (might be due to invalid IL or missing references) string key = "Fourth Chorus"; string currentDifficultMode = BossSequence.currentDifficultMode; int num = EnemyHp.enemies[key].hpFullDict[currentDifficultMode]; fsm.GameObject.GetComponent().hp = EnemyHp.enemies[key].hpFullDict[currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; num -= phases[0].hp; ((CompareHP)HPCheck1.Actions[0]).integer2 = FsmInt.op_Implicit(num); num -= phases[1].hp; ((CompareHP)HPCheck2.Actions[0]).integer2 = FsmInt.op_Implicit(num); num -= phases[2].hp; ((CompareHP)HPCheck3.Actions[0]).integer2 = FsmInt.op_Implicit(num); }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, 0); return true; } public static bool PatchFsm_BoneEast08BossScene(Fsm fsm) { //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Expected O, but got Unknown //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Expected O, but got Unknown //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_034c: 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: Expected O, but got Unknown FsmState state = fsm.GetState("Init"); fsm.GetState("Meet Ready"); FsmState state2 = fsm.GetState("Remeet 1"); FsmState state3 = fsm.GetState("Remeet 2"); FsmState state4 = fsm.GetState("Remeet Ready"); FsmState state5 = fsm.GetState("Beastfly?"); if (BossSequence.currentSequenceScene == BossScene.bosses["Savage Beastfly in Far Fields"]) { foreach (Transform item in fsm.GameObject.transform) { Transform val = item; if (((Object)val).name == "Lava Plats" || ((Object)val).name == "Pre Activation Floor" || ((Object)val).name == "Battle End Floor") { ((Component)val).gameObject.SetActive(false); } } } ((Wait)state2.Actions[7]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state3.Actions[2]).time = FsmFloat.op_Implicit(0f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val4) { val4.FsmComponent.SendEvent("REMEET READY"); }); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate(Fsm val4) { val4.GetFsmGameObject("Big Drop Bomb").Value.SetActive(false); val4.GetFsmGameObject("Big Drop Bomb Return").Value.SetActive(false); if (BossSequence.currentSequenceScene == BossScene.bosses["Savage Beastfly in Far Fields"]) { val4.FsmComponent.SendEvent("DEFEATED"); } }); state4.Transitions[0].FsmEvent = FsmEvent.GetFsmEvent(TransitionPointInfo.eventName); state.Actions[16].Enabled = false; state.Actions[18].Enabled = false; state.Actions[19].Enabled = false; state5.Actions[0].Enabled = false; state5.Actions[1].Enabled = false; state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm2, 17); state5.Transitions = (FsmTransition[])(object)new FsmTransition[0]; if (BossSequence.currentSequenceScene == BossScene.bosses["Savage Beastfly in Far Fields"]) { SetTransitionToState(state, state5, 0); SetTransitionToState(state, state5, 1); SetTransitionToState(state, state5, 2); } GameObject val2 = new GameObject("Collider1", new Type[1] { typeof(BoxCollider2D) }); GameObject val3 = new GameObject("Collider2", new Type[1] { typeof(BoxCollider2D) }); SceneManager.MoveGameObjectToScene(val2, fsm.GameObject.scene); SceneManager.MoveGameObjectToScene(val3, fsm.GameObject.scene); val2.transform.position = new Vector3(66.4712f, 8.5f, -0.1f); val3.transform.position = new Vector3(96.0651f, 8.5f, -0.1f); BoxCollider2D component = val2.GetComponent(); BoxCollider2D component2 = val3.GetComponent(); component.size = new Vector2(1f, 50f); component2.size = new Vector2(1f, 50f); return true; } public static bool PatchFsm_GreatConchfliesBattleScene(Fsm fsm) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Arena Start"); FsmState state2 = fsm.GetState("Start Pause S"); FsmState state3 = fsm.GetState("State"); FsmState state4 = fsm.GetState("Restart Ready"); ((Wait)state2.Actions[0]).time = FsmFloat.op_Implicit(0f); SetTransitionToState(state, state2, 1); SetTransitionToState(state3, state4, 1); SetTransitionToState(state3, state4, 2); SetTransitionToState(state3, state4, 3); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) _ = val.GameObject.transform.position; GameObject obj = CreateTrigger("Coral_11"); _ = obj.transform.position; obj.transform.position = new Vector3(52.6f, 14.5f, 0f); CustomTrigger customTrigger = obj.AddComponent(); customTrigger.fsm = val; customTrigger.action = (Action)Delegate.Combine(customTrigger.action, (Action)delegate(Fsm val2, FsmStateAction fsmAction) { val2.FsmComponent.SendEvent("ENTER"); }); }); state4.Actions = InsertInArray(state4.Actions, (FsmStateAction)(object)customLogicFsm, state4.Actions.Length - 1); return true; } public static bool PatchFsm_GreatConchfliesBattleSceneBossAI(Fsm fsm) { FsmState state = fsm.GetState("Init"); FsmState idlePause = fsm.GetState("Idle Pause"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { //IL_007a: Unknown result type (might be due to invalid IL or missing references) string key = "Great Conchflies"; _ = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GetFsmGameObject("Driller A").Value.GetComponent(); component.hp = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; ((IntTestToBool)idlePause.Actions[1]).int2 = FsmInt.op_Implicit(phases[1].hp); }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); return true; } public static bool PatchFsm_GreatConchfliesDriller(Fsm fsm) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_0100: 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_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Dormant"); fsm.GetState("Intro R 1"); fsm.GetState("Intro G 1"); FsmState state2 = fsm.GetState("Intro R 2"); FsmState state3 = fsm.GetState("Intro G 2"); FsmState state4 = fsm.GetState("Intro R 3"); FsmState state5 = fsm.GetState("Intro G 3"); FsmState state6 = fsm.GetState("Roar G"); FsmState state7 = fsm.GetState("Roar R"); ((Wait)state2.Actions[1]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state3.Actions[1]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state4.Actions[2]).time = FsmFloat.op_Implicit(0f); ((Wait)state5.Actions[4]).time = FsmFloat.op_Implicit(0f); ((EaseFsmAction)(AnimatePositionTo)state3.Actions[0]).time = FsmFloat.op_Implicit(0.1f); ((EaseFsmAction)(AnimatePositionTo)state2.Actions[0]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state7.Actions[0]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state6.Actions[1]).time = FsmFloat.op_Implicit(0.1f); SetTransitionToState(state, state3, 0); SetTransitionToState(state, state2, 1); ((StartRoarEmitter)((IEnumerable)state6.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_GreatConchfliesCorpseControl(Fsm fsm) { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown //IL_0102: 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_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Expected O, but got Unknown FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); FsmState state3 = fsm.GetState("Land"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); Wait val = new Wait { time = FsmFloat.op_Implicit(BossScene.waitForBossDeathAnim), finishEvent = FsmEvent.GetFsmEvent("FINISHED") }; FsmState val2 = new FsmState(fsm); val2.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; FsmState val3 = new FsmState(fsm); val3.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)val }; val3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("FINISHED"), ToFsmState = val2 } }; state3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { ToFsmState = val3, FsmEvent = FsmEvent.GetFsmEvent("FINISHED") } }; state2.Actions[9].Enabled = false; SetTransitionToState(state, state2, 0); return true; } public static bool PatchFsm_Lace1(Fsm fsm) { FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Encountered?"); FsmState state3 = fsm.GetState("Refight"); FsmState state4 = fsm.GetState("Dormant"); state4.Actions[3].Enabled = false; SetTransitionToState(state2, state3, 0); state4.Transitions[0].FsmEvent = FsmEvent.GetFsmEvent(TransitionPointInfo.eventName); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { string key = "Lace in Deep Docks"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; num -= phases[0].hp; fsm.GetFsmInt("Rage HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); return true; } public static bool PatchFsm_Lace1CorpseControl(Fsm fsm) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); FsmState state3 = fsm.GetState("Land"); FsmState state4 = fsm.GetState("Jump Antic"); ((Wait)state3.Actions[3]).time = FsmFloat.op_Implicit(1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); SetTransitionToState(state, state2, 0); state4.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; state4.Transitions = (FsmTransition[])(object)new FsmTransition[0]; return true; } public static bool PatchFsm_LastJudge(Fsm fsm) { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Intro Roar"); FsmState state3 = fsm.GetState("Intro Fall Antic Q"); FsmState state4 = fsm.GetState("First Idle"); FsmState state5 = fsm.GetState("Idle"); ((Wait)state2.Actions[1]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state3.Actions[4]).time = FsmFloat.op_Implicit(0f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { val.FsmComponent.SendEvent("FINISHED"); }); state4.Actions = InsertInArray(state4.Actions, (FsmStateAction)(object)customLogicFsm, 4); SetTransitionToState(state4, state5, 0); SetTransitionToState(state4, state5, 1); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { string key = "The Last Judge"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; fsm.GetFsmInt("HP").Value = num; num -= phases[0].hp; fsm.GetFsmInt("HP P2").Value = num; num -= phases[1].hp; fsm.GetFsmInt("HP P3").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm2, state.Actions.Length); ((StartRoarEmitter)((IEnumerable)state2.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_LastJudgeBattleScene(Fsm fsm) { FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Encountered"); SetTransitionToState(state, state2, 0); SetTransitionToState(state, state2, 2); SetTransitionToState(state, state2, 3); return true; } public static bool PatchFsm_LastJudgeCorpseControl(Fsm fsm) { //IL_00a4: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Expected O, but got Unknown fsm.GetState("Steam 1"); fsm.GetState("Steam 2"); FsmState state = fsm.GetState("Explode"); FsmState state2 = fsm.GetState("Final Blow"); FsmState state3 = fsm.GetState("Land"); fsm.GetState("Break 1"); fsm.GetState("Break 2"); FsmState state4 = fsm.GetState("Break 3"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); Wait val = new Wait { time = FsmFloat.op_Implicit(BossScene.waitForBossDeathAnim), finishEvent = FsmEvent.GetFsmEvent("FINISHED") }; FsmState val2 = new FsmState(fsm); val2.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; FsmState val3 = new FsmState(fsm); val3.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)val }; val3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("FINISHED"), ToFsmState = val2 } }; state4.Actions = InsertInArray(state4.Actions, (FsmStateAction)(object)customLogicFsm, 0); SetTransitionToState(state, state2, 0); state3.Actions = RemoveFromArray(state3.Actions, 6); return true; } public static bool PatchFsm_Moorwing(Fsm fsm) { //IL_0048: 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_00e1: 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_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0111: 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_015e: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Roar"); FsmState state3 = fsm.GetState("Quick Roar"); ((Wait)state2.Actions[2]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state3.Actions[0]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { string key = "Moorwing"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); GameObject val = new GameObject("Collider1", new Type[1] { typeof(BoxCollider2D) }); SceneManager.MoveGameObjectToScene(val, fsm.GameObject.scene); val.transform.position = new Vector3(104.465f, 16f, -0.1f); val.GetComponent().size = new Vector2(1f, 100f); ((StartRoarEmitter)((IEnumerable)state2.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_MoorwingTensionAudio(Fsm fsm) { Object.Destroy((Object)(object)fsm.FsmComponent); return true; } public static bool PatchFsm_MoorwingCorpseControl(Fsm fsm) { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown //IL_00f1: 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_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: 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_013b: Expected O, but got Unknown FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); FsmState state3 = fsm.GetState("Land"); fsm.GetState("Land Check"); FsmState state4 = fsm.GetState("Fall"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); Wait val = new Wait { time = FsmFloat.op_Implicit(BossScene.waitForBossDeathAnim), finishEvent = FsmEvent.GetFsmEvent("FINISHED") }; FsmState val2 = new FsmState(fsm); val2.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; FsmState val3 = new FsmState(fsm); val3.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)val }; val3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("FINISHED"), ToFsmState = val2 } }; state3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { ToFsmState = val3, FsmEvent = FsmEvent.GetFsmEvent("FINISHED") } }; state2.Actions[5].Enabled = false; SetTransitionToState(state, state2, 0); SetTransitionToState(state2, state4, 0); SetTransitionToState(state3, val3, 0); return true; } public static bool PatchFsm_Phantom(Fsm fsm) { //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown FsmState state = fsm.GetState("Init"); fsm.GetState("Hornet L"); fsm.GetState("Hornet R"); FsmState state2 = fsm.GetState("Parry Ready"); fsm.GetState("Parry Facing"); fsm.GetState("Hornet Face L"); fsm.GetState("Hornet Face R"); FsmState state3 = fsm.GetState("Clash Cutscene"); FsmState state4 = fsm.GetState("Time Freeze"); FsmState state5 = fsm.GetState("DC Land"); FsmState state6 = fsm.GetState("Cross Slash End"); FsmState state7 = fsm.GetState("Blood Stream"); FsmState state8 = fsm.GetState("Death Steam"); FsmState state9 = fsm.GetState("Death Explode"); FsmState state10 = fsm.GetState("Fade To Black"); fsm.GetState("End Pause"); ((Wait)state3.Actions[14]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state4.Actions[4]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state6.Actions[4]).time = FsmFloat.op_Implicit(0.1f); AudioPlayRandomVoiceFromTableV2 elem = (AudioPlayRandomVoiceFromTableV2)state8.Actions[1]; CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { val.FsmComponent.SendEvent("PARRY"); }); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm, 0); state7.Actions = InsertInArray(state7.Actions, (FsmStateAction)(object)elem, state7.Actions.Length); state10.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm2 }; state5.Actions = RemoveFromArray(state5.Actions, 2); state8.Actions = RemoveFromArray(state8.Actions, 4); SetTransitionToState(state7, state9, 0); state10.Transitions = (FsmTransition[])(object)new FsmTransition[0]; CustomLogicFsm customLogicFsm3 = new CustomLogicFsm(fsm); customLogicFsm3.action = (Action)Delegate.Combine(customLogicFsm3.action, (Action)delegate { string key = "Phantom"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; num -= phases[0].hp; fsm.GetFsmInt("Dragoon HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("Rage HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm3, state.Actions.Length); return true; } public static bool PatchFsm_PhantomBossScene(Fsm fsm) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("BG Fog"); fsm.GetState("FG Antic"); FsmState state2 = fsm.GetState("Init"); FsmState state3 = fsm.GetState("Enter"); FsmState state4 = fsm.GetState("FG Column"); FsmState state5 = fsm.GetState("Organ Note"); fsm.GetState("Organ Hit"); ((Wait)state.Actions[0]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state3.Actions[3]).time = FsmFloat.op_Implicit(0f); ((Wait)state4.Actions[5]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state5.Actions[3]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_010e: 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_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0145: 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_0160: 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_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) FsmState state6 = val.GetState("Init"); FindNamedChild val2 = (FindNamedChild)state6.Actions[6]; FindChild val3 = (FindChild)state6.Actions[5]; FindChild val4 = (FindChild)state6.Actions[4]; FindNamedChild val5 = (FindNamedChild)state6.Actions[7]; FindChild val6 = (FindChild)state6.Actions[0]; GameObject value = val2.storeResult.Value; _ = val4.storeResult.Value; GameObject value2 = val5.storeResult.Value; GameObject value3 = val3.storeResult.Value; GameObject value4 = val6.storeResult.Value; int num = 15; value2.transform.position = new Vector3(value2.transform.position.x + (float)num, value2.transform.position.y, value2.transform.position.z); value.transform.position = new Vector3(value.transform.position.x + (float)num, value.transform.position.y, value.transform.position.z); value3.transform.position = new Vector3(value3.transform.position.x + (float)num, value3.transform.position.y, value3.transform.position.z); value4.transform.position = new Vector3(value4.transform.position.x + (float)num, value4.transform.position.y, value4.transform.position.z); }); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate(Fsm val) { val.FsmComponent.SendEvent("FINISHED"); }); List list = state.Actions.ToList(); list.Insert(list.Count - 1, (FsmStateAction)(object)customLogicFsm); state.Actions = list.ToArray(); state2.Actions = RemoveFromArray(state2.Actions, 9); return true; } public static bool PatchFsm_SavageBeastfly1(Fsm fsm) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_00df: 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_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: 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_01ae: Expected O, but got Unknown //IL_022f: Unknown result type (might be due to invalid IL or missing references) Vector3 position = fsm.GameObject.transform.position; fsm.GameObject.transform.position = new Vector3(61.76f, 39.5f, position.z); fsm.GetState("Init"); FsmState state = fsm.GetState("Set HP"); FsmState state2 = fsm.GetState("Choice"); fsm.GetState("Idly Fly Audio?"); FsmState state3 = fsm.GetState("Rematch?"); FsmState state4 = fsm.GetState("Intro Look"); FsmState state5 = fsm.GetState("Intro Roar"); state2.Transitions = RemoveFromArray(state2.Transitions, 3); ((WaitRandom)state4.Actions[5]).timeMin = FsmFloat.op_Implicit(0f); ((WaitRandom)state4.Actions[5]).timeMax = FsmFloat.op_Implicit(0f); ((Wait)state5.Actions[0]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) Vector3 position2 = val.GameObject.transform.position; GameObject obj = CreateTrigger("Ant_19"); _ = obj.transform.position; obj.transform.position = new Vector3(43.45f, 39.28f, position2.z); CustomTrigger customTrigger = obj.AddComponent(); customTrigger.fsm = val; customTrigger.action = (Action)Delegate.Combine(customTrigger.action, (Action)delegate(Fsm val2, FsmStateAction fsmAction) { val2.FsmComponent.SendEvent("TO INTRO LOOK"); }); }); state3.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; state3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("TO INTRO LOOK"), ToFsmState = state4 } }; CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown string key = "Savage Beastfly in Chapel of The Beast"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("P3 HP").Value = num; foreach (Transform item in fsm.GameObject.transform.parent.Find("Summon Enemies")) { Transform val = item; HealthManager component2 = ((Component)val).GetComponent(); if (!((Object)(object)component == (Object)null)) { if (((Object)val).name.StartsWith("Bone Crawler Smn")) { int num2 = (component2.hp = EnemyHp.enemies["Kilik"].hpFullDict[BossSequence.currentDifficultMode]); typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component2, num2); } else if (((Object)val).name.StartsWith("Bone Flyer Smn")) { int num3 = (component2.hp = EnemyHp.enemies["Beastfly"].hpFullDict[BossSequence.currentDifficultMode]); typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component2, num3); } else if (((Object)val).name.StartsWith("Bone Circler Vicious Smn")) { int num4 = (component2.hp = EnemyHp.enemies["Vicious Caranid"].hpFullDict[BossSequence.currentDifficultMode]); typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component2, num4); } } } }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm2, state.Actions.Length); ((StartRoarEmitter)((IEnumerable)state5.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_SavageBeastfly1BossScene(Fsm fsm) { fsm.GetState("Init"); fsm.GetState("Idle").Transitions[1].ToFsmState = null; return true; } public static bool PatchFsm_SavageBeastfly1CorpseControl(Fsm fsm) { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state = fsm.GetState("Blow"); fsm.GetState("Land"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); Wait val = new Wait { time = FsmFloat.op_Implicit(BossScene.waitForBossDeathAnim), finishEvent = FsmEvent.GetFsmEvent("FINISHED") }; FsmState val2 = new FsmState(fsm); val2.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; FsmState val3 = new FsmState(fsm); val3.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)val }; val3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("FINISHED"), ToFsmState = val2 } }; state.Actions[9].Enabled = false; SetTransitionToState(state, val3, 0); return true; } public static bool PatchFsm_SisterSplinter(Fsm fsm) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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_011e: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Intro Shake"); FsmState state3 = fsm.GetState("Emerge Antic"); FsmState state4 = fsm.GetState("Roar 4"); ((Wait)state2.Actions[1]).time = FsmFloat.op_Implicit(0f); ((Wait)state3.Actions[1]).time = FsmFloat.op_Implicit(0f); ((Wait)state4.Actions[4]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Expected O, but got Unknown string key = "Sister Splinter"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("P3 HP").Value = num; foreach (Transform item in fsm.GameObject.transform.parent.Find("Summons")) { Transform val = item; HealthManager component2 = ((Component)val).GetComponent(); if (!((Object)(object)component == (Object)null) && ((Object)val).name.StartsWith("Stick Insect Flyer")) { int num2 = (component2.hp = EnemyHp.enemies["Splinterbark"].hpFullDict[BossSequence.currentDifficultMode]); typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component2, num2); } } }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); ((StartRoarEmitter)((IEnumerable)state4.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_SisterSplinterBossScene(Fsm fsm) { FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Battle Start"); FsmState state3 = fsm.GetState("Idle"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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) BoxCollider2D component = ((FindNamedChild)val.GetState("Init").Actions[2]).storeResult.Value.GetComponent(); component.size = new Vector2(26.6f, component.size.y); }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, 3); SetTransitionToState(state, state3, 1); SetTransitionToState(state3, state2, 1); return true; } public static bool PatchFsm_SisterSplinterBossReturnScene(Fsm fsm) { Object.Destroy((Object)(object)fsm.GameObject); return true; } public static bool PatchFsm_SisterSplinterCorpseControl(Fsm fsm) { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00d4: 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); fsm.GetState("Land"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); Wait val = new Wait { time = FsmFloat.op_Implicit(BossScene.waitForBossDeathAnim), finishEvent = FsmEvent.GetFsmEvent("FINISHED") }; FsmState val2 = new FsmState(fsm); val2.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; FsmState val3 = new FsmState(fsm); val3.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { (FsmStateAction)val }; val3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("FINISHED"), ToFsmState = val2 } }; state2.Actions[10].Enabled = false; SetTransitionToState(state, state2, 0); SetTransitionToState(state2, val3, 0); return true; } public static bool PatchFsm_SisterSplinterApproaches(Fsm fsm) { fsm.GetState("Pause"); FsmState state = fsm.GetState("R"); FsmState state2 = fsm.GetState("L"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm fsm2) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_001a: 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_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("TriggerForStartBoss"); SceneManager.MoveGameObjectToScene(val, SceneManager.GetSceneByName("Shellwood_18")); val.transform.position = new Vector3(45f, 11f, 0f); val.layer = 13; BoxCollider2D val2 = val.AddComponent(); CustomTrigger customTrigger = val.AddComponent(); customTrigger.fsm = fsm2; ((Collider2D)val2).isTrigger = true; val2.size = new Vector2(28.3f, 18f); customTrigger.action = (Action)Delegate.Combine(customTrigger.action, (Action)delegate(Fsm val3, FsmStateAction fsmAction) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) FsmState state3 = val3.GetState("Pause"); GameObject value = ((FindNamedChild)state3.Actions[0]).storeResult.Value; GameObject value2 = ((FindNamedChild)state3.Actions[1]).storeResult.Value; foreach (Transform item in value.transform) { GameObject gameObject = ((Component)item).gameObject; if (!((Object)(object)gameObject.GetComponent() == (Object)null)) { ActivateChildrenOnContact component = gameObject.GetComponent(); ((UnityEvent)((object)component).GetType().GetField("onContact", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue(component)).Invoke(); InvokeMethod(component, activateChildOnTrigger, new object[1]); } } foreach (Transform item2 in value2.transform) { GameObject gameObject2 = ((Component)item2).gameObject; if (!((Object)(object)gameObject2.GetComponent() == (Object)null)) { ActivateChildrenOnContact component2 = gameObject2.GetComponent(); ((UnityEvent)((object)component2).GetType().GetField("onContact", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue(component2)).Invoke(); InvokeMethod(component2, activateChildOnTrigger, new object[1]); } } }); }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm, state2.Actions.Length); return true; } public static bool PatchFsm_SkullTyrant(Fsm fsm) { //IL_007c: 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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Expected O, but got Unknown //IL_01b8: 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_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: 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_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("State Check"); FsmState state3 = fsm.GetState("In Roof"); FsmState state4 = fsm.GetState("Wake Roar"); FsmState state5 = fsm.GetState("Rewake Pause"); FsmState state6 = fsm.GetState("Rewake Antic"); ((Wait)state4.Actions[4]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state5.Actions[1]).time = FsmFloat.op_Implicit(0f); ((Wait)state6.Actions[1]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val2) { val2.FsmComponent.SendEvent("WOKEN"); }); SetTransitionToState(state2, state3, 0); SetTransitionToState(state2, state3, 2); SetTransitionToState(state2, state3, 3); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm, 4); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { string key = "Skull Tyrant"; _ = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; _ = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm2, state.Actions.Length); GameObject val = (GameObject)Object.Instantiate((Object)(GameObject)Preload.bundleResources["Black"], fsm.GameObject.scene); val.AddComponent(); val.layer = 8; val.transform.position = new Vector3(24.2221f, 15f, -0.3f); val.transform.localScale = new Vector3(25.2948f, 31.931f, 1f); ((Renderer)val.GetComponent()).enabled = false; ((StartRoarEmitter)((IEnumerable)state4.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_SkullTyrantAudioTension(Fsm fsm) { ((Component)fsm.FsmComponent).gameObject.SetActive(false); return true; } public static bool PatchFsm_SkullTyrantCorpseControl(Fsm fsm) { FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); FsmState state3 = fsm.GetState("Land"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state2.Actions[6].Enabled = false; SetTransitionToState(state, state2, 0); state3.Actions = InsertInArray(state3.Actions, (FsmStateAction)(object)customLogicFsm, state3.Actions.Length - 1); return true; } public static bool PatchFsm_Widow(Fsm fsm) { //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Intro Scream"); fsm.GetState("Set Rage"); fsm.GetState("Death Stagger F"); FsmState state3 = fsm.GetState("Rage Scream 2"); FsmState state4 = fsm.GetState("Away"); FsmState state5 = fsm.GetState("Hornet Connect"); FsmState state6 = fsm.GetState("Can Bind"); FsmState state7 = fsm.GetState("Final Bind Burst"); FsmState state8 = fsm.GetState("Fade"); ((Wait)state2.Actions[3]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state3.Actions[1]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state4.Actions[1]).time = FsmFloat.op_Implicit(0.01f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { val.FsmComponent.SendEvent("BIND"); }); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { GameCameras.instance.HUDIn(); PlayerData.instance.disableInventory = false; PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state5.Actions = RemoveFromArray(state5.Actions, 10); state6.Actions = RemoveFromArray(state6.Actions, 1); SetTransitionToState(state6, state7, 0); state6.Actions = InsertInArray(state6.Actions, (FsmStateAction)(object)customLogicFsm, state6.Actions.Length); state8.Actions = InsertInArray(state8.Actions, (FsmStateAction)(object)customLogicFsm2, state8.Actions.Length); CustomLogicFsm customLogicFsm3 = new CustomLogicFsm(fsm); customLogicFsm3.action = (Action)Delegate.Combine(customLogicFsm3.action, (Action)delegate { string key = "Widow"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("P3 HP").Value = num; FSMUtility.LocateMyFSM(fsm.GameObject, "Fake Death").Fsm.GetFsmInt("P3 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm3, state.Actions.Length); ((StartRoarEmitter)((IEnumerable)state2.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); ((StartRoarEmitter)((IEnumerable)state3.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); ((FsmStateAction)(ClearHeroEffects)((IEnumerable)state5.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(ClearHeroEffects) == ((object)i).GetType()))).Enabled = false; return true; } public static bool PatchFsm_WidowBossScene(Fsm fsm) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) fsm.GetState("Init"); FsmState state = fsm.GetState("Spinner Look"); FsmState state2 = fsm.GetState("Spinner Away"); FsmState state3 = fsm.GetState("Check State"); FsmState state4 = fsm.GetState("State 1"); ((Wait)state.Actions[2]).time = FsmFloat.op_Implicit(0f); ((Wait)state2.Actions[0]).time = FsmFloat.op_Implicit(0.01f); SetTransitionToState(state3, state4, 0); SetTransitionToState(state3, state4, 2); return true; } public static bool PatchFsm_WidowLever(Fsm fsm) { fsm.GameObject.SetActive(false); return true; } public static bool PatchFsm_Broodmother(Fsm fsm) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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) fsm.GetState("Init"); FsmState state = fsm.GetState("Entry Antic"); FsmState state2 = fsm.GetState("Roar"); fsm.GetState("Dormant"); ((Wait)state.Actions[5]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state2.Actions[8]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { string key = "Broodmother"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; }); ((StartRoarEmitter)((IEnumerable)state2.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_BroodmotherCorpseControl(Fsm fsm) { FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); FsmState state3 = fsm.GetState("Land"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state2.Actions[7].Enabled = false; SetTransitionToState(state, state2, 0); state3.Actions = InsertInArray(state3.Actions, (FsmStateAction)(object)customLogicFsm, state3.Actions.Length); state3.Transitions = (FsmTransition[])(object)new FsmTransition[0]; return true; } public static bool PatchFsm_BroodmotherBGControl(Fsm fsm) { FsmState state = fsm.GetState("Opened"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_007f: 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_008b: Unknown result type (might be due to invalid IL or missing references) BattleScene component = ((Component)val.GameObject.transform.parent.parent).gameObject.GetComponent(); component.battleStartPause = 0f; component.waves.RemoveRange(0, 3); component.waves[0].startDelay = 0f; Vector3 position = val.GameObject.transform.position; GameObject obj = CreateTrigger("Slab_16b"); _ = obj.transform.position; obj.transform.position = new Vector3(position.x, position.y, position.z); CustomTrigger customTrigger = obj.AddComponent(); customTrigger.fsm = val; customTrigger.action = (Action)Delegate.Combine(customTrigger.action, (Action)delegate(Fsm val2, FsmStateAction fsmAction) { ((Component)val2.GameObject.transform.parent.parent).gameObject.GetComponent().StartBattle(); }); }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); return true; } public static bool PatchFsm_CogDancersDancerControl(Fsm fsm) { //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_014d: 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_0187: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: 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_01fb: 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_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Expected O, but got Unknown FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Dormant"); FsmState state3 = fsm.GetState("Gate Close"); FsmState state4 = fsm.GetState("Beat Start Pause"); FsmState state5 = fsm.GetState("Pendulum Prepare"); FsmState state6 = fsm.GetState("Beat Start"); FsmState state7 = fsm.GetState("Death Pause"); FsmState state8 = fsm.GetState("Return Dancers"); FsmState state9 = fsm.GetState("Dancers Stunned"); FsmState state10 = fsm.GetState("Light Open"); FsmState state11 = fsm.GetState("End"); FsmState state12 = fsm.GetState("Windup 4"); FsmState state13 = fsm.GetState("Final Kill"); ((EaseFsmAction)(EaseFloat)state10.Actions[3]).time = FsmFloat.op_Implicit(0.01f); ((SendEventByName)state2.Actions[1]).delay = FsmFloat.op_Implicit(0.01f); ((Wait)state3.Actions[2]).time = FsmFloat.op_Implicit(0.01f); ((WaitBool)state3.Actions[3]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state4.Actions[4]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state5.Actions[3]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state6.Actions[1]).time = FsmFloat.op_Implicit(0.01f); ((WaitBool)state6.Actions[2]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state7.Actions[2]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state8.Actions[4]).time = FsmFloat.op_Implicit(0.3f); ((Wait)state9.Actions[6]).time = FsmFloat.op_Implicit(0.3f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state13.Actions[2].Enabled = false; state11.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; state3.Actions = RemoveFromArray(state3.Actions, 2); state3.Actions = RemoveFromArray(state3.Actions, 2); List list = state12.Transitions.ToList(); list.Add(new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("FINISHED"), ToFsmState = state12 }); state12.Transitions = list.ToArray(); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm, 0.05f); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate(Fsm val) { val.FsmComponent.SendEvent("FINISHED"); }); CustomLogicFsm customLogicFsm3 = new CustomLogicFsm(fsm); customLogicFsm3.action = (Action)Delegate.Combine(customLogicFsm3.action, (Action)delegate(Fsm fsm2) { //IL_0010: 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) GameObject obj = CreateTrigger("Cog_Dancers_boss"); _ = obj.transform.position; obj.transform.position = new Vector3(37.14f, 4.6f, 0f); CustomTrigger customTrigger = obj.AddComponent(); customTrigger.fsm = fsm2; customTrigger.action = (Action)Delegate.Combine(customTrigger.action, (Action)delegate(Fsm val, FsmStateAction fsmAction) { val.FsmComponent.SendEvent("ENTER"); }); }); state2.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm3 }; state12.Actions = InsertInArray(state12.Actions, (FsmStateAction)(object)customLogicFsm2, state12.Actions.Length); CustomLogicFsm customLogicFsm4 = new CustomLogicFsm(fsm); customLogicFsm4.action = (Action)Delegate.Combine(customLogicFsm4.action, (Action)delegate { string key = "Cogwork Dancers"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; fsm.GameObject.GetComponent(); num = phases[0].hp; fsm.GetFsmInt("Phase 1 HP").Value = num; num = phases[1].hp; fsm.GetFsmInt("Phase 2 HP").Value = num; num = phases[2].hp; fsm.GetFsmInt("Phase 3 HP").Value = num; num = phases[3].hp; fsm.GetFsmInt("Phase 4 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm4, 0); return true; } public static bool PatchFsm_CogDancersDancerAB(Fsm fsm) { //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0124: 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_015d: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0198: 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_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: 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_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0242: 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) fsm.GetState("Init"); FsmState state = fsm.GetState("Do Roar"); FsmState state2 = fsm.GetState("Sub Roar"); FsmState state3 = fsm.GetState("Death Steam"); fsm.GetState("Stun Stagger"); fsm.GetState("Stun Out of Combo"); FsmState state4 = fsm.GetState("Death Stagger"); FsmState state5 = fsm.GetState("Windup"); FsmState state6 = fsm.GetState("Windup OB"); FsmState state7 = fsm.GetState("OB Pause"); FsmState state8 = fsm.GetState("Emerge"); fsm.GetState("Rest"); FsmState state9 = fsm.GetState("Return To Rest"); FsmState state10 = fsm.GetState("Return 2"); FsmState state11 = fsm.GetState("First Windup?"); FsmState state12 = fsm.GetState("First Windup? OB"); fsm.GetState("Death Blow"); ((IntCompare)state11.Actions[0]).integer2 = FsmInt.op_Implicit(1); ((IntCompare)state12.Actions[0]).integer2 = FsmInt.op_Implicit(1); ((SendEventByName)state3.Actions[5]).delay = FsmFloat.op_Implicit(0f); ((SendEventByName)state4.Actions[3]).delay = FsmFloat.op_Implicit(0f); ((SetRandomAudioClipFromTable)state3.Actions[7]).delay = FsmFloat.op_Implicit(0f); ((EaseFsmAction)(AnimatePositionTo)state9.Actions[7]).speed = FsmFloat.op_Implicit(10f); ((EaseFsmAction)(AnimatePositionTo)state10.Actions[0]).speed = FsmFloat.op_Implicit(10f); ((EaseFsmAction)(AnimatePositionTo)state8.Actions[11]).speed = FsmFloat.op_Implicit(2f); ((Wait)state.Actions[3]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state2.Actions[2]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state3.Actions[2]).time = FsmFloat.op_Implicit(0.4f); ((Wait)state5.Actions[3]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state6.Actions[3]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state7.Actions[0]).time = FsmFloat.op_Implicit(0f); state3.Actions = RemoveFromArray(state3.Actions, 4); state3.Actions = RemoveFromArray(state3.Actions, 3); state3.Actions = RemoveFromArray(state3.Actions, 2); ((StartRoarEmitter)((IEnumerable)state.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_CogDancersBossScene(Fsm fsm) { //IL_004e: 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) //IL_0084: Unknown result type (might be due to invalid IL or missing references) fsm.GetState("Init"); FsmState state = fsm.GetState("Gates Close"); FsmState state2 = fsm.GetState("Wait"); fsm.GetState("Rotation Sequence"); FsmState state3 = fsm.GetState("Check"); FsmState state4 = fsm.GetState("Undefeated"); ((Wait)state2.Actions[4]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state2.Actions[7]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state.Actions[2]).time = FsmFloat.op_Implicit(0.01f); SetTransitionToState(state3, state4, 0); return true; } public static bool PatchFsm_DustChef(Fsm fsm) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); fsm.GetState("Entry Roar"); ((Wait)fsm.GetState("Entry Antic").Actions[3]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { //IL_0012: 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_007c: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) BattleScene component = ((GetGrandParent)val.GetState("Init").Actions[0]).storeResult.Value.GetComponent(); component.battleStartPause = 0.25f; component.battleStartEventRegister = "BATTLE LOCK"; component.waves.RemoveAt(0); component.waves[0].startDelay = 0f; foreach (Transform item in ((Component)component).gameObject.transform) { Transform val2 = item; if (((Object)((Component)val2).gameObject).name == "Wave 1") { ((Component)val2).gameObject.SetActive(false); } if (((Object)((Component)val2).gameObject).name == "Roachkeeper Chef Tiny (2)") { ((Component)val2).gameObject.SetActive(false); } } GameObject obj = CreateTrigger("Dust_Chef"); Vector3 position = obj.transform.position; obj.transform.position = new Vector3(42.45f, 39.28f, position.z); CustomTrigger customTrigger = obj.AddComponent(); customTrigger.fsm = val; customTrigger.action = (Action)Delegate.Combine(customTrigger.action, (Action)delegate(Fsm val3, FsmStateAction fsmAction) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) BattleScene component2 = ((GetGrandParent)val3.GetState("Init").Actions[0]).storeResult.Value.GetComponent(); PlayMakerFSM.BroadcastEvent("BG CLOSE"); component2.StartBattle(); }); }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length - 1); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { string key = "Disgraced Chef Lugoli"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm2, state.Actions.Length); return true; } public static bool PatchFsm_DustChefCorpseControl(Fsm fsm) { FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); fsm.GetState("Land"); FsmState state3 = fsm.GetState("Splash In"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state2.Actions[3].Enabled = false; state3.Actions[2].Enabled = false; SetTransitionToState(state, state2, 0); state3.Actions = InsertInArray(state3.Actions, (FsmStateAction)(object)customLogicFsm, 0); return true; } public static bool PatchFsm_DustChefGongHitReaction(Fsm fsm) { FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Wait For Hit"); SetTransitionToState(state, state2, 1); return true; } public static bool PatchFsm_DustChefKitchenGong(Fsm fsm) { ((Component)fsm.GameObject.transform.parent).gameObject.SetActive(false); return true; } public static bool PatchFsm_FatherOfFlame(Fsm fsm) { //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_011b: 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_0156: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Set HP"); FsmState state3 = fsm.GetState("Intro"); fsm.GetState("Broken Pause"); FsmState state4 = fsm.GetState("Flare Up"); FsmState state5 = fsm.GetState("Body Burn"); FsmState state6 = fsm.GetState("Core Land"); FsmState state7 = fsm.GetState("Core Steam"); FsmState state8 = fsm.GetState("Core Explode"); FsmState state9 = fsm.GetState("Award"); ((Wait)state2.Actions[9]).time = FsmFloat.op_Implicit(0f); ((Wait)state3.Actions[3]).time = FsmFloat.op_Implicit(0.5f); ((Wait)state3.Actions[6]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state3.Actions[17]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state3.Actions[20]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state4.Actions[11]).time = FsmFloat.op_Implicit(0.5f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state3.Actions[9].Enabled = false; state8.Actions[11].Enabled = false; state.Actions = RemoveFromArray(state.Actions, 40); state5.Actions = RemoveFromArray(state5.Actions, 9); state6.Actions = RemoveFromArray(state6.Actions, 3); state7.Actions = RemoveFromArray(state7.Actions, 4); state8.Actions = RemoveFromArray(state8.Actions, 13); state9.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; state9.Transitions = (FsmTransition[])(object)new FsmTransition[0]; SetTransitionToState(state, state2, 1); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { string key = "Father of the Flame"; _ = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; fsm.GameObject.GetComponent(); FSMUtility.LocateMyFSM(fsm.GetFsmGameObject("Brazier Arm BL").Value, "wisp_brazier_arm").Fsm.GetFsmInt("HP").Value = phases[0].hp; FSMUtility.LocateMyFSM(fsm.GetFsmGameObject("Brazier Arm TL").Value, "wisp_brazier_arm").Fsm.GetFsmInt("HP").Value = phases[1].hp; FSMUtility.LocateMyFSM(fsm.GetFsmGameObject("Brazier Arm TR").Value, "wisp_brazier_arm").Fsm.GetFsmInt("HP").Value = phases[2].hp; FSMUtility.LocateMyFSM(fsm.GetFsmGameObject("Brazier Arm BR").Value, "wisp_brazier_arm").Fsm.GetFsmInt("HP").Value = phases[3].hp; int value = phases[0].hp + phases[1].hp + phases[2].hp + phases[3].hp; fsm.GetFsmInt("Lanterns Total HP").Value = value; fsm.GetFsmInt("Lanterns Half HP").Value = phases[4].hp; FSMUtility.LocateMyFSM(fsm.GameObject, "Take Damage").Fsm.GetFsmInt("HP").Value = phases[5].hp; }); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm2, 9); ((StartRoarEmitter)((IEnumerable)state3.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_FatherOfFlameGateControl(Fsm fsm) { FsmState state = fsm.GetState("Pause"); FsmState state2 = fsm.GetState("Close 1"); SetTransitionToState(state, state2, 0); return true; } public static bool PatchFsm_FirstSinner(Fsm fsm) { //IL_0094: 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_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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_0191: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); fsm.GetState("Dormant"); FsmState state2 = fsm.GetState("Intro Wave"); FsmState state3 = fsm.GetState("Intro Stand"); FsmState state4 = fsm.GetState("Roar"); FsmState state5 = fsm.GetState("P2 Tele Pause"); FsmState state6 = fsm.GetState("P2 Roar"); if (state == null) { return true; } ((Wait)state2.Actions[7]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state3.Actions[2]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state4.Actions[4]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state5.Actions[1]).time = FsmFloat.op_Implicit(0f); ((Wait)state6.Actions[5]).time = FsmFloat.op_Implicit(1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { string key = "First Sinner"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; fsm.GetFsmInt("Bind Heal Amount").Value = (int)((float)num * 0.1f); num -= phases[0].hp; fsm.GetFsmInt("Can Bind HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("P2 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, 13); ((StartRoarEmitter)((IEnumerable)state4.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_FirstSinnerBossSceneOutro(Fsm fsm) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) fsm.GetState("Init"); ((Wait)fsm.GetState("Pause").Actions[0]).time = FsmFloat.op_Implicit(0.01f); return true; } public static bool PatchFsm_FirstSinnerInspection(Fsm fsm) { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Expected O, but got Unknown FsmState init = fsm.GetState("Init"); fsm.GetState("Bind Start"); fsm.GetState("Blow Start"); fsm.GetState("Bind"); FsmState state = fsm.GetState("Break Out"); fsm.GetState("Intro Land"); FsmState state2 = fsm.GetState("Set Respawn"); ((Wait)state.Actions[16]).time = FsmFloat.op_Implicit(0.01f); CustomWaitConditionFsm waitEvent = new CustomWaitConditionFsm(); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm fsm2) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) ((FindChild)init.Actions[13]).storeResult.Value.SetActive(false); GameObject obj = CreateTrigger("Slab_10b"); Vector3 position = obj.transform.position; obj.transform.position = new Vector3(48.7f, 11f, position.z); CustomTrigger customTrigger = obj.AddComponent(); customTrigger.fsm = fsm2; customTrigger.action = (Action)Delegate.Combine(customTrigger.action, (Action)delegate { ((FsmStateAction)waitEvent).Finish(); }); }); init.Actions = InsertInArray(init.Actions, (FsmStateAction)(object)customLogicFsm, init.Actions.Length - 1); init.Actions = InsertInArray(init.Actions, (FsmStateAction)(object)waitEvent, init.Actions.Length - 1); state.Actions = RemoveFromArray(state.Actions, 12); state2.Actions = RemoveFromArray(state2.Actions, 1); init.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("FINISHED"), ToFsmState = state } }; Object.DestroyImmediate((Object)(object)((Component)fsm.FsmComponent).gameObject.GetComponent()); return true; } public static bool PatchFsm_FirstSinnerCorpseControl(Fsm fsm) { FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); FsmState state3 = fsm.GetState("Activate Spire NPC"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); SetTransitionToState(state, state2, 0); state2.Actions = RemoveFromArray(state2.Actions, 6); state3.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; state3.Transitions = (FsmTransition[])(object)new FsmTransition[0]; return true; } public static bool PatchFsm_ForebrothersSignisAndGronBossScene(Fsm fsm) { FsmState init = fsm.GetState("Init"); FsmState state = fsm.GetState("Battle Ready"); FsmState state2 = fsm.GetState("End Pause"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((FindNamedChild)init.Actions[11]).storeResult.Value.SetActive(false); }); state2.Actions[5].Enabled = false; init.Actions = InsertInArray(init.Actions, (FsmStateAction)(object)customLogicFsm, init.Actions.Length - 1); SetTransitionToState(init, state, 1); return true; } public static bool PatchFsm_ForebrothersSignisAndGronSlasher(Fsm fsm) { //IL_004f: 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_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Start Range Check"); FsmState state3 = fsm.GetState("Roar"); Vector3 localScale = fsm.GameObject.transform.localScale; fsm.GameObject.transform.localScale = new Vector3(1f, localScale.y, localScale.z); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_002d: 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_0056: Expected O, but got Unknown //IL_0078: 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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) Vector3 position = val.GameObject.transform.position; val.GameObject.transform.position = new Vector3(39f, position.y, position.z); foreach (Transform item in val.GameObject.transform) { Transform val2 = item; if (((Object)((Component)val2).gameObject).name == "Start Range") { Vector3 position2 = ((Component)val2).gameObject.transform.position; ((Component)val2).gameObject.transform.position = new Vector3(27f, position2.y, position2.z); break; } } }); ((Wait)state3.Actions[4]).time = FsmFloat.op_Implicit(0.1f); SetTransitionToState(state, state2, 0); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length - 1); fsm.GetState("Death Stagger"); FsmState state4 = fsm.GetState("Death Fly"); fsm.GetState("Lava Burst"); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate(Fsm val) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown foreach (Transform item2 in val.GameObject.transform.parent) { Transform val2 = item2; if (((Object)val2).name == "Dock Guard Thrower") { if (((Component)val2).gameObject.GetComponent().hp < 1) { PlayMakerFSM.BroadcastEvent(bossDeadEvent); } break; } } }); state4.Actions = InsertInArray(state4.Actions, (FsmStateAction)(object)customLogicFsm2, 0); CustomLogicFsm customLogicFsm3 = new CustomLogicFsm(fsm); customLogicFsm3.action = (Action)Delegate.Combine(customLogicFsm3.action, (Action)delegate { //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Expected O, but got Unknown //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Expected O, but got Unknown string key = "Forebrothers_Sigins"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("P3 HP").Value = num; num -= phases[2].hp; fsm.GetFsmInt("P4 HP").Value = num; Transform obj = fsm.GameObject.transform.parent.Find("Minions"); Transform val = fsm.GameObject.transform.parent.Find("Minions 2"); foreach (Transform item3 in obj) { Transform val2 = item3; HealthManager component2 = ((Component)val2).GetComponent(); if (!((Object)(object)component == (Object)null)) { if (((Object)val2).name.StartsWith("Dock Flyer")) { int num2 = (component2.hp = EnemyHp.enemies["Flintstone Flyer"].hpFullDict[BossSequence.currentDifficultMode]); typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component2, num2); } else if (((Object)val2).name.StartsWith("Shield Dockworker")) { int num3 = (component2.hp = EnemyHp.enemies["Smokerock Sifter"].hpFullDict[BossSequence.currentDifficultMode]); typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component2, num3); } } } foreach (Transform item4 in val) { Transform val3 = item4; HealthManager component3 = ((Component)val3).GetComponent(); if (!((Object)(object)component == (Object)null)) { if (((Object)val3).name.StartsWith("Dock Flyer")) { int num4 = (component3.hp = EnemyHp.enemies["Flintstone Flyer"].hpFullDict[BossSequence.currentDifficultMode]); typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component3, num4); } else if (((Object)val3).name.StartsWith("Shield Dockworker")) { int num5 = (component3.hp = EnemyHp.enemies["Smokerock Sifter"].hpFullDict[BossSequence.currentDifficultMode]); typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component3, num5); } } } }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm3, state.Actions.Length); ((StartRoarEmitter)((IEnumerable)state3.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_ForebrothersSignisAndGronThrower(Fsm fsm) { FsmState state = fsm.GetState("Init"); fsm.GetState("Death Stagger"); FsmState state2 = fsm.GetState("Death Fly"); fsm.GetState("Lava Burst"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown foreach (Transform item in val.GameObject.transform.parent) { Transform val2 = item; if (((Object)val2).name == "Dock Guard Slasher") { if (((Component)val2).gameObject.GetComponent().hp < 1) { PlayMakerFSM.BroadcastEvent(bossDeadEvent); } break; } } }); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm, 0); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { string key = "Forebrothers_Gron"; int hp = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; _ = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = hp; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm2, state.Actions.Length); return true; } public static bool PatchFsm_GarmondAndZaza(Fsm fsm) { //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_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Expected O, but got Unknown //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Expected O, but got Unknown //IL_0264: 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_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); fsm.GetState("Roar Antic"); fsm.GetState("Auto Target?"); fsm.GetState("Appear Range"); FsmState state2 = fsm.GetState("Cit NPC"); fsm.GetState("Citadel Remeet"); FsmState state3 = fsm.GetState("Enemy Roar"); FsmState state4 = fsm.GetState("Setup 1"); FsmState state5 = fsm.GetState("Setup 2"); FsmState state6 = fsm.GetState("Death Air"); fsm.GetState("Death Land"); ((Wait)state5.Actions[3]).time = FsmFloat.op_Implicit(0.001f); ((Wait)state3.Actions[3]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val3) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_002d: 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_004c: 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_0063: Unknown result type (might be due to invalid IL or missing references) Vector3 position = val3.GameObject.transform.position; val3.GameObject.transform.position = new Vector3(80.4f, position.y, position.z); GameObject obj = CreateTrigger("Library_09"); Vector3 position2 = obj.transform.position; obj.transform.position = new Vector3(80.7f, 15f, position2.z); CustomTrigger customTrigger = obj.AddComponent(); customTrigger.fsm = val3; customTrigger.action = (Action)Delegate.Combine(customTrigger.action, (Action)delegate(Fsm val4, FsmStateAction fsmAction) { val4.FsmComponent.SendEvent("BATTLE START"); }); }); bool isBossDeadEventSent = false; CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { if (!isBossDeadEventSent) { PlayMakerFSM.BroadcastEvent(bossDeadEvent); isBossDeadEventSent = true; } }); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm, state2.Actions.Length - 1); state6.Actions = InsertInArray(state6.Actions, (FsmStateAction)(object)customLogicFsm2, 0); state4.Actions = RemoveFromArray(state4.Actions, 2); CustomLogicFsm customLogicFsm3 = new CustomLogicFsm(fsm); customLogicFsm3.action = (Action)Delegate.Combine(customLogicFsm3.action, (Action)delegate { string key = "Garmond & Zaza"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; _ = EnemyHp.enemies[key].phases; HealthManager component3 = fsm.GameObject.GetComponent(); component3.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component3, num); }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm3, state.Actions.Length); GameObject val = new GameObject("Collider1", new Type[1] { typeof(BoxCollider2D) }); GameObject val2 = new GameObject("Collider2", new Type[1] { typeof(BoxCollider2D) }); SceneManager.MoveGameObjectToScene(val, fsm.GameObject.scene); SceneManager.MoveGameObjectToScene(val2, fsm.GameObject.scene); val.transform.position = new Vector3(60.3714f, 16f, -0.1f); val2.transform.position = new Vector3(90.1236f, 16f, -0.1f); BoxCollider2D component = val.GetComponent(); BoxCollider2D component2 = val2.GetComponent(); component.size = new Vector2(1f, 100f); component2.size = new Vector2(1f, 100f); return true; } public static bool PatchFsm_GarmondAndZazaSceneControl(Fsm fsm) { FsmState state = fsm.GetState("Idle"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { val.FsmComponent.SendEvent("SEEN"); }); state.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { customLogicFsm }; return true; } public static bool PatchFsm_GarmondAndZazaDestroyNPCComponent(Fsm fsm) { Object.Destroy((Object)(object)fsm.GameObject); return true; } public static bool PatchFsm_SilkBoss(Fsm fsm) { //IL_007b: 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_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Intro Up"); FsmState state3 = fsm.GetState("Intro Roar"); FsmState state4 = fsm.GetState("Title Up"); FsmState state5 = fsm.GetState("Move Stop"); FsmState state6 = fsm.GetState("Rerise Roar"); ((Wait)state.Actions[8]).time = FsmFloat.op_Implicit(0f); ((EaseFsmAction)(AnimatePositionBy)state2.Actions[7]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state2.Actions[8]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state3.Actions[4]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state4.Actions[2]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state5.Actions[1]).time = FsmFloat.op_Implicit(0f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { tk2dSpriteAnimator component = fsm.GameObject.GetComponent(); component.ClipFps *= 4f; }); state6.Actions = InsertInArray(state6.Actions, (FsmStateAction)(object)customLogicFsm, state6.Actions.Length); return true; } public static bool PatchFsm_SilkBossIntroSequence(Fsm fsm) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) FsmState init = fsm.GetState("Init"); FsmState state = fsm.GetState("Wait For Beat End"); fsm.GetState("Burst Anim"); FsmState state2 = fsm.GetState("Ready Wait"); FsmState state3 = fsm.GetState("Intro Shake"); FsmState state4 = fsm.GetState("Quick Start"); ((SendEventByName)state.Actions[1]).delay = FsmFloat.op_Implicit(0f); ((Wait)state2.Actions[1]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state3.Actions[1]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { //IL_000d: Unknown result type (might be due to invalid IL or missing references) GameObject value = ((FindNamedChild)init.Actions[5]).storeResult.Value; value.GetComponent().speed = 10f; value.SetActive(false); }); init.Actions = InsertInArray(init.Actions, (FsmStateAction)(object)customLogicFsm, init.Actions.Length); state.Actions = RemoveFromArray(state.Actions, 2); SetTransitionToState(state, state4, 0); return true; } public static bool PatchFsm_SilkBossDeathSequence(Fsm fsm) { //IL_00fc: 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_0138: 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_0174: 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) fsm.GetState("Init"); FsmState state = fsm.GetState("Death Slashes Up"); fsm.GetState("Death Start"); FsmState state2 = fsm.GetState("Bind Or Needolin"); fsm.GetState("Ready 1"); FsmState state3 = fsm.GetState("Ready 2"); FsmState state4 = fsm.GetState("Ready 3"); FsmState state5 = fsm.GetState("Ready 4"); fsm.GetState("Bind 1"); fsm.GetState("Bind 2"); fsm.GetState("Bind 3"); fsm.GetState("Bind 4"); FsmState state6 = fsm.GetState("Bind Burst 1"); FsmState state7 = fsm.GetState("Bind Burst 2"); FsmState state8 = fsm.GetState("Bind Burst 3"); FsmState state9 = fsm.GetState("Bind Burst 4"); FsmState state10 = fsm.GetState("Final Bind"); FsmState state11 = fsm.GetState("To Bind 2"); FsmState state12 = fsm.GetState("Hornet Attach"); FsmState state13 = fsm.GetState("Pre Bindable"); ((Wait)state12.Actions[1]).time = FsmFloat.op_Implicit(0f); ((SendEventToRegister)state7.Actions[12]).eventName = FsmString.op_Implicit(""); ((SendEventToRegister)state8.Actions[10]).eventName = FsmString.op_Implicit(""); ((SendEventToRegister)state9.Actions[12]).eventName = FsmString.op_Implicit(""); ((SendEventToRegister)state7.Actions[14]).eventName = FsmString.op_Implicit(""); ((SendEventToRegister)state10.Actions[9]).eventName = FsmString.op_Implicit(""); state13.Actions[1].Enabled = false; state13.Actions[2].Enabled = false; CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { val.FsmComponent.SendEvent("BIND"); }); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { PlayerData.instance.disableInventory = false; PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm, state2.Actions.Length); state3.Actions = InsertInArray(state3.Actions, (FsmStateAction)(object)customLogicFsm, state3.Actions.Length); state4.Actions = InsertInArray(state4.Actions, (FsmStateAction)(object)customLogicFsm, state4.Actions.Length); state5.Actions = InsertInArray(state5.Actions, (FsmStateAction)(object)customLogicFsm, state5.Actions.Length); state10.Actions = InsertInArray(state10.Actions, (FsmStateAction)(object)customLogicFsm2, 0); state6.Actions = RemoveFromArray(state6.Actions, 10); state7.Actions = RemoveFromArray(state7.Actions, 11); state8.Actions = RemoveFromArray(state8.Actions, 9); state9.Actions = RemoveFromArray(state9.Actions, 11); state6.Actions = RemoveFromArray(state6.Actions, 5); state7.Actions = RemoveFromArray(state7.Actions, 6); state8.Actions = RemoveFromArray(state8.Actions, 5); state9.Actions = RemoveFromArray(state9.Actions, 7); state.Actions = RemoveFromArray(state.Actions, 20); state11.Actions = RemoveFromArray(state11.Actions, 10); state10.Transitions = (FsmTransition[])(object)new FsmTransition[0]; CustomLogicFsm customLogicFsm3 = new CustomLogicFsm(fsm); customLogicFsm3.action = (Action)Delegate.Combine(customLogicFsm3.action, (Action)delegate { ToolItemManager.SetActiveState((ToolsActiveStates)0); }); state10.Actions = InsertInArray(state10.Actions, (FsmStateAction)(object)customLogicFsm3, 0); return true; } public static bool PatchFsm_SilkBossTitleControl(Fsm fsm) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) fsm.GetState("Init"); ((Wait)fsm.GetState("Title Up").Actions[1]).time = FsmFloat.op_Implicit(0.1f); return true; } public static bool PatchFsm_SilkBossPhaseControl(Fsm fsm) { //IL_009d: 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) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Stagger Pause"); fsm.GetState("Stagger Fall"); FsmState state3 = fsm.GetState("Stagger Hit"); fsm.GetState("Rubble M"); fsm.GetState("Rubble Sides"); FsmState state4 = fsm.GetState("Death Hit"); FsmState state5 = fsm.GetState("Start Death Sequence"); ((Wait)state2.Actions[1]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state3.Actions[14]).time = FsmFloat.op_Implicit(0f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { string key = "Grand Mother Silk"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); num = phases[0].hp; fsm.GetFsmInt("P1 HP").Value = num; num = phases[1].hp; fsm.GetFsmInt("P2 HP").Value = num; num = phases[2].hp; fsm.GetFsmInt("P3 HP").Value = num; num = phases[3].hp; fsm.GetFsmInt("P4 HP").Value = num; num = phases[4].hp; fsm.GetFsmInt("P5 HP").Value = num; num = phases[5].hp; fsm.GetFsmInt("P6 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); SetTransitionToState(state4, state5, 0); return true; } public static bool PatchFsm_SilkBossChallengeControl(Fsm fsm) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown fsm.GetState("Init"); FsmState state = fsm.GetState("Idle"); fsm.GetState("Hornet Voice"); FsmState state2 = fsm.GetState("In Region"); fsm.GetState("Straight Back?"); state.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent("START CHALLENGE MOD"), ToFsmState = state2 } }; CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { val.FsmComponent.SendEvent("SPECIAL CHALLENGE"); }); state2.Actions[1] = (FsmStateAction)(object)customLogicFsm; return true; } public static bool PatchFsm_GroalTheGreat(Fsm fsm) { //IL_00b5: 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_02a7: Unknown result type (might be due to invalid IL or missing references) FsmState init = fsm.GetState("Init"); fsm.GetState("Fake Battle End"); FsmState state = fsm.GetState("Entry Antic"); FsmState state2 = fsm.GetState("Entry Roar"); FsmState state3 = fsm.GetState("Dormant"); FsmState state4 = fsm.GetState("Chomp"); FsmState state5 = fsm.GetState("Death Hit"); FsmState state6 = fsm.GetState("Vomit Hornet"); FsmState state7 = fsm.GetState("Blow"); ((Wait)state2.Actions[2]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state.Actions[1]).time = FsmFloat.op_Implicit(0.01f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) GameObject value = ((GetGrandparent)init.Actions[5]).storeResult.Value; BattleScene component = value.GetComponent(); BoxCollider2D component2 = value.GetComponent(); component.battleStartPause = 0.25f; component.waves.RemoveRange(0, 5); component2.size = new Vector2(29.5f, component2.size.y); _ = val.GameObject.transform.position; GameObject obj = CreateTrigger("Shadow_18"); _ = obj.transform.position; obj.transform.position = new Vector3(55.8f, 10.8f, 0f); CustomTrigger customTrigger = obj.AddComponent(); customTrigger.fsm = val; customTrigger.action = (Action)Delegate.Combine(customTrigger.action, (Action)delegate(Fsm val2, FsmStateAction fsmAction) { ((Component)val2.GameObject.transform.parent.parent).gameObject.GetComponent().StartBattle(); }); }); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); CustomLogicFsm customLogicFsm3 = new CustomLogicFsm(fsm); customLogicFsm3.action = (Action)Delegate.Combine(customLogicFsm3.action, (Action)delegate { if (BossSequence.currentDifficultMode == "Ascended") { PlayerData instance = PlayerData.instance; if (instance.health + instance.healthBlue <= 2) { fsm.FsmComponent.SendEvent("UNGRAB"); } } if (BossSequence.currentDifficultMode == "Radiant") { fsm.FsmComponent.SendEvent("UNGRAB"); } }); state7.Actions[8].Enabled = false; init.Actions = InsertInArray(init.Actions, (FsmStateAction)(object)customLogicFsm, init.Actions.Length - 1); state7.Actions = InsertInArray(state7.Actions, (FsmStateAction)(object)customLogicFsm2, 0); state4.Actions = InsertInArray(state4.Actions, (FsmStateAction)(object)customLogicFsm3, 0); SetTransitionToState(state3, state, 0); SetTransitionToState(state5, state6, 0); state7.Transitions = (FsmTransition[])(object)new FsmTransition[0]; CustomLogicFsm customLogicFsm4 = new CustomLogicFsm(fsm); customLogicFsm4.action = (Action)Delegate.Combine(customLogicFsm4.action, (Action)delegate { string key = "Groal the Great"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; }); init.Actions = InsertInArray(init.Actions, (FsmStateAction)(object)customLogicFsm4, init.Actions.Length); ((StartRoarEmitter)((IEnumerable)state2.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_GroalTheGreatCloseGate(Fsm fsm) { FsmState state = fsm.GetState("Pause"); FsmState state2 = fsm.GetState("Close 1"); SetTransitionToState(state, state2, 0); return true; } public static bool PatchFsm_Lace2door_cutsceneEndLaceTower(Fsm fsm) { fsm.GameObject.SetActive(false); return true; } public static bool PatchFsm_Lace2BossControl(Fsm fsm) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Start Battle Wait"); FsmState state3 = fsm.GetState("Start Battle"); state2.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent(TransitionPointInfo.eventName), ToFsmState = state3 } }; SetTransitionToState(state, state2, 1); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { string key = "Lace in the Cradle"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("P3 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, 8); return true; } public static bool PatchFsm_Lace2CorpseControl(Fsm fsm) { FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); fsm.GetState("Set Talk Pos"); FsmState state3 = fsm.GetState("Land"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); SetTransitionToState(state, state2, 0); state3.Actions = InsertInArray(state3.Actions, (FsmStateAction)(object)customLogicFsm, 0); state3.Transitions = (FsmTransition[])(object)new FsmTransition[0]; return true; } public static bool PatchFsm_Lace2ReturnCorpseDeactivate(Fsm fsm) { fsm.GameObject.SetActive(false); return true; } public static bool PatchFsm_Lace2RightGate(Fsm fsm) { fsm.GetState("Init").Transitions = (FsmTransition[])(object)new FsmTransition[0]; fsm.GameObject.GetComponent().ForceClose(); return true; } public static bool PatchFsm_RagingConchfly(Fsm fsm) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Expected O, but got Unknown //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Dormant"); FsmState state3 = fsm.GetState("Start Pause"); FsmState state4 = fsm.GetState("Intro L"); FsmState state5 = fsm.GetState("Intro 2"); FsmState state6 = fsm.GetState("Roar"); ((Wait)state3.Actions[0]).time = FsmFloat.op_Implicit(0f); ((Wait)state4.Actions[11]).time = FsmFloat.op_Implicit(0.2f); ((EaseFsmAction)(AnimatePositionBy)state5.Actions[4]).time = FsmFloat.op_Implicit(0.01f); ((EaseFsmAction)(AnimatePositionBy)state4.Actions[9]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state6.Actions[1]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = ((Component)val.GameObject.transform.parent.parent).gameObject; BattleScene battleSceneComponent = gameObject.GetComponent(); gameObject.GetComponent(); battleSceneComponent.battleStartPause = 0f; GameObject obj = CreateTrigger("Coral_27"); _ = obj.transform.position; obj.transform.position = new Vector3(18.09f, 39f, 0f); CustomTrigger customTrigger = obj.AddComponent(); customTrigger.fsm = val; customTrigger.action = (Action)Delegate.Combine(customTrigger.action, (Action)delegate { battleSceneComponent.StartBattle(); }); }); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm, state2.Actions.Length); state.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent(TransitionPointInfo.eventName), ToFsmState = state2 } }; Vector3 position = fsm.GameObject.transform.position; fsm.GameObject.transform.position = new Vector3(position.x + 3f, position.y, position.z); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { string key = "Raging Conchfly"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm2, state.Actions.Length); return true; } public static bool PatchFsm_RagingConchflyCorpseControl(Fsm fsm) { FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); FsmState state3 = fsm.GetState("Land"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state2.Actions[9].Enabled = false; state3.Actions[5].Enabled = false; SetTransitionToState(state, state2, 0); state3.Actions = InsertInArray(state3.Actions, (FsmStateAction)(object)customLogicFsm, 0); return true; } public static bool PatchFsm_SavageBeastfly2(Fsm fsm) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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_0109: 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) foreach (Transform item in fsm.GameObject.transform) { Transform val = item; if (((Object)val).name == "Wake Range") { Vector3 position = val.position; val.position = new Vector3(77.5f, position.y, position.z); break; } } FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Set HP"); FsmState state3 = fsm.GetState("Rematch Pause"); FsmState state4 = fsm.GetState("Entry Antic"); fsm.GetState("Rematch Roar"); ((Wait)state.Actions[12]).time = FsmFloat.op_Implicit(0f); ((Wait)state3.Actions[2]).time = FsmFloat.op_Implicit(0f); ((Wait)state4.Actions[6]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown string key = "Savage Beastfly in Far Fields"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("P3 HP").Value = num; foreach (Transform item2 in fsm.GameObject.transform.parent.parent.parent.Find("Summon Enemies")) { Transform val2 = item2; HealthManager component2 = ((Component)val2).GetComponent(); if (!((Object)(object)component == (Object)null) && ((Object)val2).name.StartsWith("Bone Spitter")) { int num2 = (component2.hp = EnemyHp.enemies["Tarmite"].hpFullDict[BossSequence.currentDifficultMode]); typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component2, num2); } } }); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm, state2.Actions.Length); return true; } public static bool PatchFsm_SavageBeastfly2CorpseControl(Fsm fsm) { fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state = fsm.GetState("Blow"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state.Actions[11].Enabled = false; state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); return true; } public static bool PatchFsm_SecondSentielControl(Fsm fsm) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Encountered"); FsmState state3 = fsm.GetState("Enc Wake"); FsmState state4 = fsm.GetState("Become Active"); ((Wait)state3.Actions[3]).time = FsmFloat.op_Implicit(0f); ((Wait)state4.Actions[2]).time = FsmFloat.op_Implicit(0.01f); SetTransitionToState(state, state2, 1); SetTransitionToState(state, state2, 2); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { string key = "Second Sentiel"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length - 1); return true; } public static bool PatchFsm_SecondSentielBossSceneControl(Fsm fsm) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_0054: Expected O, but got Unknown fsm.GetState("Init"); FsmState state = fsm.GetState("Idle"); fsm.GetState("Arena Start"); FsmState state2 = fsm.GetState("Skip Arena"); state.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent(TransitionPointInfo.eventName), ToFsmState = state2 } }; return true; } public static bool PatchFsm_SecondSentielCorpseControl(Fsm fsm) { FsmState state = fsm.GetState("Death Hit"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); FsmState state3 = fsm.GetState("Land"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state3.Actions = InsertInArray(state3.Actions, (FsmStateAction)(object)customLogicFsm, state3.Actions.Length); SetTransitionToState(state, state2, 0); state3.Transitions = (FsmTransition[])(object)new FsmTransition[0]; return true; } public static bool PatchFsm_ShakraAttackEnemies(Fsm fsm) { //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Expected O, but got Unknown //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Expected O, but got Unknown //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Expected O, but got Unknown //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_043f: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); fsm.GetState("Idle"); FsmState state2 = fsm.GetState("Reset"); FsmState state3 = fsm.GetState("Start Away Pause"); FsmState state4 = fsm.GetState("Call Pause"); FsmState state5 = fsm.GetState("Start Away"); FsmState state6 = fsm.GetState("Mapper Enter"); FsmState state7 = fsm.GetState("Battle Cry Start"); FsmState state8 = fsm.GetState("Battle Cry 1"); FsmState state9 = fsm.GetState("Set Fighting Hero"); FsmState state10 = fsm.GetState("End Battle"); fsm.GetState("Defeat Start"); FsmState state11 = fsm.GetState("Defeat Land"); fsm.GetState("Defeat Shout 1"); FsmState state12 = fsm.GetState("Defeat Shout 2"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val3) { val3.FsmComponent.SendEvent("FINISHED"); }); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate(Fsm val3) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_0033: 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_003f: Unknown result type (might be due to invalid IL or missing references) Vector3 position = val3.GameObject.transform.position; GameObject obj = CreateTrigger("Greymoor_08_Mapper"); _ = obj.transform.position; obj.transform.position = new Vector3(position.x, position.y, position.z); CustomTrigger customTrigger = obj.AddComponent(); customTrigger.fsm = val3; customTrigger.action = (Action)Delegate.Combine(customTrigger.action, (Action)delegate(Fsm val4, FsmStateAction fsmAction) { val4.FsmComponent.SendEvent("MAPPER CALL"); }); }); CustomLogicFsm customLogicFsm3 = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm3.action = (Action)Delegate.Combine(customLogicFsm3.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state11.Actions = RemoveFromArray(state11.Actions, 5); state12.Actions = RemoveFromArray(state12.Actions, 3); state6.Actions = InsertInArray(state6.Actions, (FsmStateAction)(object)customLogicFsm, 1); state11.Actions = InsertInArray(state11.Actions, (FsmStateAction)(object)customLogicFsm3, 0); state5.Actions = InsertInArray(state5.Actions, (FsmStateAction)(object)customLogicFsm2, state5.Actions.Length); ((Wait)state.Actions[38]).time = FsmFloat.op_Implicit(0f); ((Wait)state3.Actions[0]).time = FsmFloat.op_Implicit(0f); ((Wait)state4.Actions[0]).time = FsmFloat.op_Implicit(0f); SetTransitionToState(state5, state6, 0); SetTransitionToState(state6, state2, 0); SetTransitionToState(state2, state9, 0); SetTransitionToState(state7, state8, 1); state3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent(TransitionPointInfo.eventName), ToFsmState = state5 } }; state12.Transitions = (FsmTransition[])(object)new FsmTransition[0]; state10.Actions = (FsmStateAction[])(object)new FsmStateAction[0]; state10.Transitions = (FsmTransition[])(object)new FsmTransition[0]; CustomLogicFsm customLogicFsm4 = new CustomLogicFsm(fsm); customLogicFsm4.action = (Action)Delegate.Combine(customLogicFsm4.action, (Action)delegate { string key = "Shakra"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; _ = EnemyHp.enemies[key].phases; HealthManager component3 = fsm.GameObject.GetComponent(); component3.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component3, num); }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm4, state.Actions.Length - 1); GameObject val = new GameObject("Collider1", new Type[1] { typeof(BoxCollider2D) }); GameObject val2 = new GameObject("Collider2", new Type[1] { typeof(BoxCollider2D) }); SceneManager.MoveGameObjectToScene(val, fsm.GameObject.scene); SceneManager.MoveGameObjectToScene(val2, fsm.GameObject.scene); val.transform.position = new Vector3(104.465f, 16f, -0.1f); val2.transform.position = new Vector3(7.571f, 16f, -0.1f); BoxCollider2D component = val.GetComponent(); BoxCollider2D component2 = val2.GetComponent(); component.size = new Vector2(1f, 100f); component2.size = new Vector2(1f, 100f); return true; } public static bool PatchFsm_ShakraCallPole(Fsm fsm) { fsm.GameObject.SetActive(false); return true; } public static bool PatchFsm_TheUnravelledBossScene(Fsm fsm) { //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0157: 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_017f: 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_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: 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_022c: 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_025d: Unknown result type (might be due to invalid IL or missing references) //IL_027a: 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_028a: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Expected O, but got Unknown fsm.GetState("Init"); FsmState state = fsm.GetState("Encountered Start"); FsmState state2 = fsm.GetState("Arena Start"); fsm.GetState("Boss Phase 1"); FsmState state3 = fsm.GetState("Spear Suck Pause"); FsmState state4 = fsm.GetState("Suck Spears"); FsmState state5 = fsm.GetState("P3 Shake 2"); FsmState state6 = fsm.GetState("Pos Suck Spears Pause"); FsmState state7 = fsm.GetState("P3 Shake"); FsmState state8 = fsm.GetState("Headpiece Antic"); FsmState state9 = fsm.GetState("Headpiece Pause"); FsmState state10 = fsm.GetState("Twin Slammers"); FsmState state11 = fsm.GetState("Slammer, Slasher"); FsmState state12 = fsm.GetState("Enemy Phase End Pause"); FsmState state13 = fsm.GetState("Headpiece Suck"); FsmState state14 = fsm.GetState("Death Explode"); ((Wait)state2.Actions[4]).time = FsmFloat.op_Implicit(0f); ((Wait)state.Actions[1]).time = FsmFloat.op_Implicit(0f); ((Wait)state5.Actions[2]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state4.Actions[1]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state7.Actions[3]).time = FsmFloat.op_Implicit(0.01f); ((FsmStateAction)(Wait)state8.Actions[3]).Enabled = false; ((FsmStateAction)(Wait)state9.Actions[0]).Enabled = false; ((FsmStateAction)(Wait)state13.Actions[0]).Enabled = false; ((Translate)state13.Actions[3]).y = FsmFloat.op_Implicit(-1000f); ((FsmStateAction)(Wait)state10.Actions[0]).Enabled = false; ((SendEventByName)state10.Actions[1]).delay = FsmFloat.op_Implicit(0f); ((SendEventByName)state10.Actions[2]).delay = FsmFloat.op_Implicit(0.5f); ((Wait)state3.Actions[0]).time = FsmFloat.op_Implicit(0f); ((FsmStateAction)(Wait)state6.Actions[0]).Enabled = false; ((FsmStateAction)(Wait)state11.Actions[1]).Enabled = false; ((SendEventByName)state11.Actions[2]).delay = FsmFloat.op_Implicit(0f); ((SendEventByName)state11.Actions[3]).delay = FsmFloat.op_Implicit(1f); ((FsmStateAction)(Wait)state12.Actions[0]).Enabled = false; Wait elem = new Wait { time = FsmFloat.op_Implicit(0.1f), finishEvent = FsmEvent.GetFsmEvent("FINISHED") }; state8.Actions = InsertInArray(state8.Actions, (FsmStateAction)(object)elem, state8.Actions.Length); state13.Actions = InsertInArray(state13.Actions, (FsmStateAction)(object)elem, state13.Actions.Length); SetTransitionToState(state2, state, 0); SetTransitionToState(state, state7, 0); state14.Transitions = (FsmTransition[])(object)new FsmTransition[0]; return true; } public static bool PatchFsm_TheUnravelledControl(Fsm fsm) { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Intro Roar"); FsmState state3 = fsm.GetState("Tele Antic Intro"); FsmState state4 = fsm.GetState("Die"); FsmState state5 = fsm.GetState("Death Blow"); ((Wait)state2.Actions[2]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state3.Actions[3]).time = FsmFloat.op_Implicit(0f); SetTransitionToState(state4, state5, 0); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state5.Actions[9].Enabled = false; state5.Actions = InsertInArray(state5.Actions, (FsmStateAction)(object)customLogicFsm, 0); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { string key = "The Unravelled"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("P3 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm2, state.Actions.Length - 1); ((StartRoarEmitter)((IEnumerable)state2.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_TheUnravelledPipeControl(Fsm fsm) { fsm.GetState("State 3").Transitions = (FsmTransition[])(object)new FsmTransition[0]; return true; } public static bool PatchFsm_TrobbioControl(Fsm fsm) { //IL_0109: 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_0143: Unknown result type (might be due to invalid IL or missing references) //IL_015e: 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_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Expected O, but got Unknown FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("State"); FsmState state3 = fsm.GetState("Wait Refight"); FsmState state4 = fsm.GetState("Start Pause"); FsmState state5 = fsm.GetState("Quick Entrance 1"); FsmState state6 = fsm.GetState("Quick Entrance 2"); FsmState state7 = fsm.GetState("Quick Entrance 3"); fsm.GetState("Stop Stream"); fsm.GetState("Death Air"); FsmState state8 = fsm.GetState("Death Pose"); FsmState state9 = fsm.GetState("Final Pose 1"); FsmState state10 = fsm.GetState("Final Pose 2"); FsmState state11 = fsm.GetState("Final Fireworks"); FsmState state12 = fsm.GetState("Collapse"); ((Wait)state5.Actions[0]).time = FsmFloat.op_Implicit(0f); ((Wait)state6.Actions[3]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state7.Actions[2]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state11.Actions[1]).time = FsmFloat.op_Implicit(0.5f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { val.FsmComponent.SendEvent("END"); }); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); SetTransitionToState(state2, state3, 0); SetTransitionToState(state4, state5, 0); SetTransitionToState(state8, state9, 0); state8.Actions = InsertInArray(state8.Actions, (FsmStateAction)(object)customLogicFsm, state8.Actions.Length); state12.Actions = InsertInArray(state12.Actions, (FsmStateAction)(object)customLogicFsm2, 0); state4.Actions = RemoveFromArray(state4.Actions, 0); state9.Actions = RemoveFromArray(state9.Actions, 8); state10.Actions = RemoveFromArray(state10.Actions, 1); state12.Transitions = (FsmTransition[])(object)new FsmTransition[0]; state3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent(TransitionPointInfo.eventName), ToFsmState = state4 } }; CustomLogicFsm customLogicFsm3 = new CustomLogicFsm(fsm); customLogicFsm3.action = (Action)Delegate.Combine(customLogicFsm3.action, (Action)delegate { string key = "Trobbio"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm3, state.Actions.Length); return true; } public static bool PatchFsm_TrobbioGrandStageSceneControl(Fsm fsm) { FsmState state = fsm.GetState("Act 2"); FsmState state2 = fsm.GetState("Act 3"); FsmState state3 = fsm.GetState("Trobbio Ready"); FsmState state4 = fsm.GetState("Trobbio Ready 2"); SetTransitionToState(state, state3, 1); SetTransitionToState(state2, state4, 1); SetTransitionToState(state2, state4, 2); state4.Transitions = (FsmTransition[])(object)new FsmTransition[0]; return true; } public static bool PatchFsm_VoltvyrmControl(Fsm fsm) { //IL_008c: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_0166: 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_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Expected O, but got Unknown //IL_0254: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Dormant"); FsmState state3 = fsm.GetState("Intro Pause"); FsmState state4 = fsm.GetState("Intro Antic"); FsmState state5 = fsm.GetState("Roar"); FsmState state6 = fsm.GetState("Death Hit"); FsmState state7 = fsm.GetState("Blow"); ((Wait)state3.Actions[0]).time = FsmFloat.op_Implicit(0f); ((Wait)state4.Actions[1]).time = FsmFloat.op_Implicit(0f); ((Wait)state5.Actions[13]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state7.Actions[10].Enabled = false; SetTransitionToState(state6, state7, 0); state7.Actions = InsertInArray(state7.Actions, (FsmStateAction)(object)customLogicFsm, 0); state7.Transitions = (FsmTransition[])(object)new FsmTransition[0]; state2.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent(TransitionPointInfo.eventName), ToFsmState = state3 } }; CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { GameObject gameObject = ((Component)((Component)fsm.GameObject.transform.parent).transform.Find("Tendrils")).gameObject; Object.Destroy((Object)(object)gameObject.GetComponent()); gameObject.SetActive(true); }); CustomLogicFsm customLogicFsm3 = new CustomLogicFsm(fsm); customLogicFsm3.action = (Action)Delegate.Combine(customLogicFsm3.action, (Action)delegate { string key = "Voltvyrm"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("P3 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm3, state.Actions.Length); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm2, state.Actions.Length); ((StartRoarEmitter)((IEnumerable)state5.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_BellEaterControl(Fsm fsm) { //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0137: 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_0170: 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_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Expected O, but got Unknown //IL_03b5: Unknown result type (might be due to invalid IL or missing references) fsm.GetState("Init"); FsmState state = fsm.GetState("Dormant"); FsmState state2 = fsm.GetState("Set HP"); FsmState state3 = fsm.GetState("Body R Up"); FsmState state4 = fsm.GetState("Intro Cam"); FsmState state5 = fsm.GetState("Body L Down"); FsmState state6 = fsm.GetState("Intro Roar"); FsmState state7 = fsm.GetState("Death Pause"); FsmState state8 = fsm.GetState("Death Head Antic"); FsmState state9 = fsm.GetState("Death Head Roar"); FsmState state10 = fsm.GetState("Bellbeast Jumps In"); FsmState state11 = fsm.GetState("Bell Beast Connect"); FsmState state12 = fsm.GetState("Yank Wall L"); FsmState state13 = fsm.GetState("Shake Sequence"); FsmState state14 = fsm.GetState("Spit Head Out"); ((Wait)state3.Actions[11]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state4.Actions[0]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state5.Actions[6]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state6.Actions[3]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state6.Actions[3]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state7.Actions[0]).time = FsmFloat.op_Implicit(0f); ((Wait)state8.Actions[5]).time = FsmFloat.op_Implicit(0f); ((Wait)state9.Actions[1]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state10.Actions[8]).time = FsmFloat.op_Implicit(0.5f); ((Wait)state11.Actions[9]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state12.Actions[1]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state14.Actions = InsertInArray(state14.Actions, (FsmStateAction)(object)customLogicFsm, 0); state13.Actions = RemoveFromArray(state13.Actions, 33); state13.Actions = RemoveFromArray(state13.Actions, 23); state13.Actions = RemoveFromArray(state13.Actions, 13); state13.Actions = RemoveFromArray(state13.Actions, 3); state.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent(TransitionPointInfo.eventName), ToFsmState = state2 } }; state14.Transitions = (FsmTransition[])(object)new FsmTransition[0]; CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { string key = "Bell Eater"; int value = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; fsm.GameObject.GetComponent(); GameObject value2 = fsm.GetFsmGameObject("Head").Value; GameObject value3 = fsm.GetFsmGameObject("Butt").Value; HealthManager component = value2.GetComponent(); HealthManager component2 = value3.GetComponent(); component.hp = phases[0].hp; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, phases[0].hp); component2.hp = phases[1].hp; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component2, phases[1].hp); fsm.GetFsmInt("P1 HP").Value = value; fsm.GetFsmInt("Head HP").Value = phases[0].hp; fsm.GetFsmInt("Butt HP").Value = phases[1].hp; int num = (fsm.GetFsmInt("Total HP").Value = phases[0].hp + phases[1].hp); int num3 = num; num3 -= phases[2].hp; fsm.GetFsmInt("P1 HP").Value = num3; num3 -= phases[3].hp; fsm.GetFsmInt("P2 HP").Value = num3; }); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm2, state2.Actions.Length); ((StartRoarEmitter)((IEnumerable)state6.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_CloverDancersGreenPrinceBossNPC(Fsm fsm) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) fsm.GetState("Init"); FsmState state = fsm.GetState("Encountered?"); FsmState state2 = fsm.GetState("Encountered Start"); ((Wait)state2.Actions[2]).time = FsmFloat.op_Implicit(0.01f); SetTransitionToState(state, state2, 0); return true; } public static bool PatchFsm_CloverDancersDancerControl(Fsm fsm) { //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); fsm.GetState("Dormant"); fsm.GetState("Gate Close"); fsm.GetState("Beat Start Pause"); fsm.GetState("Pendulum Prepare"); fsm.GetState("Beat Start"); fsm.GetState("Death Pause"); FsmState state2 = fsm.GetState("Return Dancers"); FsmState state3 = fsm.GetState("Dancers Stunned"); ((Wait)state2.Actions[4]).time = FsmFloat.op_Implicit(0.3f); ((Wait)state3.Actions[6]).time = FsmFloat.op_Implicit(0.3f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { string key = "Clover Dancers"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; fsm.GameObject.GetComponent(); HealthManager component = fsm.GetFsmGameObject("Dancer A").Value.GetComponent(); HealthManager component2 = fsm.GetFsmGameObject("Dancer B").Value.GetComponent(); component.hp = phases[0].hp; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, phases[0].hp); component2.hp = phases[0].hp; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component2, phases[0].hp); num = phases[0].hp; fsm.GetFsmInt("Phase 1 HP").Value = num; num = phases[1].hp; fsm.GetFsmInt("Phase 2 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); return true; } public static bool PatchFsm_CloverDancersDancerAB(Fsm fsm) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_00bb: Unknown result type (might be due to invalid IL or missing references) fsm.GetState("Init"); FsmState state = fsm.GetState("Clover Roar"); FsmState state2 = fsm.GetState("Clover Sub Roar"); FsmState state3 = fsm.GetState("C Roar"); FsmState state4 = fsm.GetState("C Roar 2"); ((Wait)state.Actions[0]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state2.Actions[2]).time = FsmFloat.op_Implicit(0.05f); ((Wait)state3.Actions[2]).time = FsmFloat.op_Implicit(((Wait)state3.Actions[2]).time.Value / 5f); ((Wait)state4.Actions[4]).time = FsmFloat.op_Implicit(((Wait)state4.Actions[4]).time.Value / 5f); return true; } public static bool PatchFsm_CloverDancersCorpseControl(Fsm fsm) { FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); FsmState state3 = fsm.GetState("Land"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state3.Actions = InsertInArray(state3.Actions, (FsmStateAction)(object)customLogicFsm, 0); SetTransitionToState(state, state2, 0); state3.Transitions = (FsmTransition[])(object)new FsmTransition[0]; return true; } public static bool PatchFsm_CrawfatherControl(Fsm fsm) { //IL_00af: 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_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: 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_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0131: 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014a: 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_015f: 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_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Expected O, but got Unknown //IL_02aa: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Emerge Announce"); FsmState state3 = fsm.GetState("Emerge"); FsmState state4 = fsm.GetState("Flap Down"); FsmState state5 = fsm.GetState("BG Idle"); FsmState state6 = fsm.GetState("BG Roar"); fsm.GetState("BG Peck 1"); FsmState state7 = fsm.GetState("BG Peck End"); FsmState state8 = fsm.GetState("Roar"); ((Wait)state2.Actions[2]).time = FsmFloat.op_Implicit(0f); ((Wait)state8.Actions[3]).time = FsmFloat.op_Implicit(0.1f); AnimateXPositionTo elem = new AnimateXPositionTo { GameObject = new FsmOwnerDefault { GameObject = FsmGameObject.op_Implicit(fsm.GameObject) }, ToValue = FsmFloat.op_Implicit(fsm.GameObject.transform.position.x + 6.5f), localSpace = false, time = FsmFloat.op_Implicit(0.4f), easeType = (EaseType)4, delay = FsmFloat.op_Implicit(0f), reverse = FsmBool.op_Implicit(false), speed = FsmFloat.op_Implicit(1f), realTime = false, BlocksFinish = true }; CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { //IL_000b: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) if (val.GameObject.transform.position.x > ((Component)HeroController.instance).gameObject.transform.position.x) { val.GameObject.transform.localScale = new Vector3(-1f, 1f, 1f); } else { val.GameObject.transform.localScale = new Vector3(1f, 1f, 1f); } }); state6.Transitions[0].FsmEvent.Name = "FINISHED"; state3.Actions = InsertInArray(state3.Actions, (FsmStateAction)(object)elem, 5); state4.Actions = InsertInArray(state4.Actions, (FsmStateAction)(object)customLogicFsm, 0); SetTransitionToState(state7, state2, 0); state5.Transitions = RemoveFromArray(state5.Transitions, 1); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) string key = "Crawfather"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; Transform transform = fsm.GetFsmGameObject("Pin Wielder").Value.transform; Transform transform2 = fsm.GetFsmGameObject("Dagger").Value.transform; Transform transform3 = fsm.GetFsmGameObject("Tinies").Value.transform; int num2 = EnemyHp.enemies["Pin Wielder Craw"].hpFullDict[BossSequence.currentDifficultMode]; foreach (Transform item in transform) { HealthManager component2 = ((Component)item).gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.hp = num2; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component2, num2); } } int num3 = EnemyHp.enemies["Dagger Craw"].hpFullDict[BossSequence.currentDifficultMode]; foreach (Transform item2 in transform2) { HealthManager component3 = ((Component)item2).gameObject.GetComponent(); if ((Object)(object)component3 != (Object)null) { component3.hp = num3; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component3, num3); } } int num4 = EnemyHp.enemies["Tinie Craw"].hpFullDict[BossSequence.currentDifficultMode]; foreach (Transform item3 in transform3) { HealthManager component4 = ((Component)item3).gameObject.GetComponent(); if ((Object)(object)component4 != (Object)null) { component4.hp = num4; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component4, num4); } } }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm2, state.Actions.Length); ((StartRoarEmitter)((IEnumerable)state8.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_CrawfatherBattleStart(Fsm fsm) { //IL_005b: 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_0092: 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_00ca: 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_0102: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Expected O, but got Unknown FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Idle"); FsmState state3 = fsm.GetState("Enter"); FsmState state4 = fsm.GetState("Start Wipe Audio"); FsmState state5 = fsm.GetState("Lights Up"); FsmState state6 = fsm.GetState("Crowd Roar"); FsmState state7 = fsm.GetState("Crowd Idle"); ((Wait)state3.Actions[3]).time = FsmFloat.op_Implicit(0f); ((Wait)state4.Actions[1]).time = FsmFloat.op_Implicit(0f); ((SendEventToRegisterDelay)state5.Actions[8]).delay = FsmFloat.op_Implicit(0f); ((EaseFsmAction)(EaseSpriteColor)state5.Actions[2]).time = FsmFloat.op_Implicit(0.001f); ((EaseFsmAction)(EaseFloat)state5.Actions[4]).time = FsmFloat.op_Implicit(0.001f); ((Wait)state5.Actions[6]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state6.Actions[4]).time = FsmFloat.op_Implicit(0f); ((Wait)state7.Actions[1]).time = FsmFloat.op_Implicit(0.05f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { BattleScene component = ((Component)val.GameObject.transform.parent).gameObject.GetComponent(); component.battleStartPause = 0.25f; List waves = component.waves; BattleWave val2 = waves[waves.Count - 1]; component.waves = new List { waves[waves.Count - 1] }; val2.startDelay = 0f; val.FsmComponent.SendEvent("ENTER"); }); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm, 0); state.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent(TransitionPointInfo.eventName), ToFsmState = state2 } }; SetTransitionToState(state2, state3, 1); state5.Actions = RemoveFromArray(state5.Actions, 8); state5.Actions = RemoveFromArray(state5.Actions, 7); state7.Actions = RemoveFromArray(state7.Actions, 1); return true; } public static bool PatchFsm_CrawfatherCorpseControl(Fsm fsm) { FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); FsmState state3 = fsm.GetState("Land"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state2.Actions[6].Enabled = false; state3.Actions = InsertInArray(state3.Actions, (FsmStateAction)(object)customLogicFsm, 0); SetTransitionToState(state, state2, 0); return true; } public static bool PatchFsm_CrustKingKhanControl(Fsm fsm) { //IL_0106: 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_013e: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Dormant"); FsmState state3 = fsm.GetState("Start Pos"); FsmState state4 = fsm.GetState("Intro Roar"); fsm.GetState("Refight Pos"); fsm.GetState("Refight Antic"); FsmState state5 = fsm.GetState("Air Roar"); FsmState state6 = fsm.GetState("Death Stagger"); FsmState state7 = fsm.GetState("Death Fall"); FsmState state8 = fsm.GetState("Get Item"); FsmState state9 = fsm.GetState("Grab Idle"); FsmState state10 = fsm.GetState("Yank"); FsmState state11 = fsm.GetState("Hornet Land"); fsm.GetState("Final Rumble"); ((Wait)state4.Actions[8]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state5.Actions[8]).time = FsmFloat.op_Implicit(0.1f); ((IntCompare)state10.Actions[2]).integer2 = FsmInt.op_Implicit(2); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate(Fsm val) { val.FsmComponent.SendEvent("YANK"); }); SetTransitionToState(state2, state3, 1); SetTransitionToState(state6, state7, 0); state11.Actions = InsertInArray(state11.Actions, (FsmStateAction)(object)customLogicFsm, 0); state9.Actions = InsertInArray(state9.Actions, (FsmStateAction)(object)customLogicFsm2, 0); state8.Actions = RemoveFromArray(state8.Actions, 1); CustomLogicFsm customLogicFsm3 = new CustomLogicFsm(fsm); customLogicFsm3.action = (Action)Delegate.Combine(customLogicFsm3.action, (Action)delegate { string key = "Crust King Khann"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); fsm.GetFsmInt("HP").Value = num; num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("P3 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm3, state.Actions.Length); ((StartRoarEmitter)((IEnumerable)state4.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_CrustKingKhanBossSceneControl(Fsm fsm) { //IL_005a: 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_0092: 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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Expected O, but got Unknown //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_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) FsmState init = fsm.GetState("Init"); FsmState state = fsm.GetState("Enter"); FsmState state2 = fsm.GetState("Pre Intro Roar"); fsm.GetState("Encountered Pause"); FsmState state3 = fsm.GetState("Throne Rumble"); FsmState state4 = fsm.GetState("Spears Up"); ((Wait)state.Actions[3]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state2.Actions[2]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state3.Actions[1]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state4.Actions[1]).time = FsmFloat.op_Implicit(0.1f); ((AudioPlayerOneShotSingle)state3.Actions[3]).delay = FsmFloat.op_Implicit(0f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { //IL_000d: Unknown result type (might be due to invalid IL or missing references) ((FindNamedChild)init.Actions[3]).storeResult.Value.SetActive(false); }); init.Actions = InsertInArray(init.Actions, (FsmStateAction)(object)customLogicFsm, init.Actions.Length - 1); SetTransitionToState(state, state3, 0); SetTransitionToState(state, state3, 1); GameObject val = new GameObject("Collider1", new Type[1] { typeof(BoxCollider2D) }); SceneManager.MoveGameObjectToScene(val, fsm.GameObject.scene); val.transform.position = new Vector3(21f, 253f, -0.1f); val.GetComponent().size = new Vector2(100f, 1f); val.layer = 8; return true; } public static bool PatchFsm_GurrTheOutcastControl(Fsm fsm) { //IL_00a0: 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_01cd: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Set HPs"); FsmState state3 = fsm.GetState("Pos Choice"); FsmState state4 = fsm.GetState("Pos 2"); FsmState state5 = fsm.GetState("Ambush Antic"); fsm.GetState("Burst Out"); FsmState state6 = fsm.GetState("Intro Roar"); FsmState state7 = fsm.GetState("Hiding"); ((Wait)state5.Actions[2]).time = FsmFloat.op_Implicit(0.01f); ((Wait)state6.Actions[3]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_0039: 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_004b: Unknown result type (might be due to invalid IL or missing references) Vector3 position = val.GameObject.transform.position; GameObject obj = CreateTrigger("Bone_East_18b"); _ = obj.transform.position; obj.transform.position = new Vector3(position.x - 10f, position.y - 5f, position.z); CustomTrigger customTrigger = obj.AddComponent(); customTrigger.fsm = val; customTrigger.action = (Action)Delegate.Combine(customTrigger.action, (Action)delegate(Fsm val2, FsmStateAction fsmAction) { PlayMakerFSM.BroadcastEvent("BG CLOSE"); val2.FsmComponent.SendEvent("START"); }); }); state7.Actions = InsertInArray(state7.Actions, (FsmStateAction)(object)customLogicFsm, 0); state.Actions = RemoveFromArray(state.Actions, 4); SetTransitionToState(state3, state4, 0); SetTransitionToState(state3, state4, 2); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { string key = "Gurr the Outcast"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); fsm.GetFsmInt("HP").Value = num; num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("Rage HP").Value = num; }); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm2, state2.Actions.Length); ((StartRoarEmitter)((IEnumerable)state6.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_GurrTheOutcastTrapBenchControl(Fsm fsm) { Object.Destroy((Object)(object)fsm.GameObject); return true; } public static bool PatchFsm_GurrTheOutcastBossSceneControl(Fsm fsm) { //IL_0047: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Encountered"); FsmState state3 = fsm.GetState("Idle"); FsmState state4 = fsm.GetState("Gate Sfx"); SetTransitionToState(state, state2, 0); SetTransitionToState(state, state2, 2); state3.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent(TransitionPointInfo.eventName), ToFsmState = state4 } }; return true; } public static bool PatchFsm_GurrTheOutcastCorpseControl(Fsm fsm) { FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); FsmState state3 = fsm.GetState("Land"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state2.Actions[11].Enabled = false; state3.Actions = InsertInArray(state3.Actions, (FsmStateAction)(object)customLogicFsm, 0); SetTransitionToState(state, state2, 0); state3.Transitions = (FsmTransition[])(object)new FsmTransition[0]; return true; } public static bool PatchFsm_LostGarmondControl(Fsm fsm) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0060: 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_012d: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = fsm.GameObject; Vector3 position = gameObject.transform.position; gameObject.transform.position = new Vector3(position.x + 12f, position.y, position.z); gameObject.transform.localScale = new Vector3(1f, 1f, 1f); FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Intro Roar"); ((Wait)fsm.GetState("Sting").Actions[2]).time = FsmFloat.op_Implicit(0.01f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { string key = "Lost Garmond"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; _ = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); ((StartRoarEmitter)((IEnumerable)state2.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_LostGarmondCorpseControl(Fsm fsm) { FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); FsmState state3 = fsm.GetState("Land"); FsmState state4 = fsm.GetState("Activate NPC"); state2.Actions[5].Enabled = false; CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state3.Actions = InsertInArray(state3.Actions, (FsmStateAction)(object)customLogicFsm, 0); state4.Actions = (FsmStateAction[])(object)new FsmStateAction[0]; SetTransitionToState(state, state2, 0); state4.Transitions = (FsmTransition[])(object)new FsmTransition[0]; return true; } public static bool PatchFsm_LostLaceIntroControl(Fsm fsm) { //IL_007a: 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_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) PlayerData.instance.EncounteredLostLace = true; FsmState init = fsm.GetState("Init"); fsm.GetState("Encountered"); FsmState state = fsm.GetState("Lace Re-emerge"); fsm.GetState("Check Encountered"); FsmState state2 = fsm.GetState("Lace Roar"); fsm.GetState("Silk Scream"); FsmState state3 = fsm.GetState("Title Up"); int laceAppearSpeed = 17; ((Wait)state.Actions[11]).time = FsmFloat.op_Implicit(((Wait)state.Actions[11]).time.Value / (float)laceAppearSpeed); ((Wait)state2.Actions[4]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state3.Actions[0]).time = FsmFloat.op_Implicit(0.01f); SetTransitionToState(state2, state3, 0); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { //IL_000d: Unknown result type (might be due to invalid IL or missing references) ((FindNamedChild)init.Actions[5]).storeResult.Value.GetComponent().speed = laceAppearSpeed; }); init.Actions = InsertInArray(init.Actions, (FsmStateAction)(object)customLogicFsm, init.Actions.Length - 1); return true; } public static bool PatchFsm_LostLaceBossTitle(Fsm fsm) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) fsm.GetState("Init"); ((Wait)fsm.GetState("Title Up").Actions[1]).time = FsmFloat.op_Implicit(0.5f); return true; } public static bool PatchFsm_LostLaceGrandMother(Fsm fsm) { fsm.GameObject.SetActive(false); return true; } public static bool PatchFsm_LostLaceBossControl(Fsm fsm) { //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) FsmState init = fsm.GetState("Init"); FsmState state = fsm.GetState("Stop"); fsm.GetState("Mid Cocoon Break"); fsm.GetState("Lock End"); fsm.GetState("Silk Scream"); FsmState state2 = fsm.GetState("Silk Fall"); fsm.GetState("Abyss Wave Start Init"); FsmState state3 = fsm.GetState("Set Roar Pos"); FsmState state4 = fsm.GetState("Wave Pause"); FsmState state5 = fsm.GetState("Antic Wave"); FsmState state6 = fsm.GetState("P3 Roar"); int laceAppearSpeed = 9; ((Wait)state3.Actions[5]).time = FsmFloat.op_Implicit(0f); ((Wait)state4.Actions[3]).time = FsmFloat.op_Implicit(0f); ((Wait)state5.Actions[5]).time = FsmFloat.op_Implicit(((Wait)state5.Actions[5]).time.Value / (float)laceAppearSpeed); ((Wait)state6.Actions[5]).time = FsmFloat.op_Implicit(0.5f); SetTransitionToState(state, state2, 0); CustomLogicFsm customActionSpeedUpAnimation = new CustomLogicFsm(fsm); CustomLogicFsm customLogicFsm = customActionSpeedUpAnimation; customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((Component)((FindNamedChild)init.Actions[42]).storeResult.Value.transform.GetChild(0)).gameObject.GetComponent().speed = laceAppearSpeed; ((FsmStateAction)customActionSpeedUpAnimation).Finish(); }); init.Actions = InsertInArray(init.Actions, (FsmStateAction)(object)customActionSpeedUpAnimation, init.Actions.Length - 1); state2.Actions = (FsmStateAction[])(object)new FsmStateAction[1] { state2.Actions[0] }; state4.Actions = RemoveFromArray(state4.Actions, 2); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { string key = "Lost Lace"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("P3 HP").Value = num; num -= phases[2].hp; fsm.GetFsmInt("P4 HP").Value = num; }); init.Actions = InsertInArray(init.Actions, (FsmStateAction)(object)customLogicFsm2, init.Actions.Length); return true; } public static bool PatchFsm_LostLaceDeathControl(Fsm fsm) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); ((Wait)fsm.GetState("Mid Death Splash").Actions[8]).time = FsmFloat.op_Implicit(0.2f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { string key = "Lost Lace"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("P3 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); return true; } public static bool PatchFsm_LostLaceDoorEntryControl(Fsm fsm) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Fall In"); FsmState state3 = fsm.GetState("Land"); ((Wait)state.Actions[19]).time = FsmFloat.op_Implicit(0f); state2.Actions = RemoveFromArray(state2.Actions, 7); state3.Actions = RemoveFromArray(state3.Actions, 1); state3.Actions = RemoveFromArray(state3.Actions, 1); state3.Actions = RemoveFromArray(state3.Actions, 2); return true; } public static bool PatchFsm_LostLaceCorpseControl(Fsm fsm) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); fsm.GetState("Air"); fsm.GetState("Splash In"); FsmState state3 = fsm.GetState("End"); FsmState state4 = fsm.GetState("Stagger"); ((Wait)state.Actions[1]).time = FsmFloat.op_Implicit(0.01f); CustomLogicFsm customActionSendEvent = new CustomLogicFsm(fsm); CustomLogicFsm customLogicFsm = customActionSendEvent; customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); ((FsmStateAction)customActionSendEvent).Finish(); }); state3.Actions = InsertInArray(state3.Actions, (FsmStateAction)(object)customActionSendEvent, 0); SetTransitionToState(state4, state2, 0); return true; } public static bool PatchFsm_NylethBossSceneControl(Fsm fsm) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_0144: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Unencountered"); FsmState state3 = fsm.GetState("Scream"); FsmState state4 = fsm.GetState("Floor Break"); FsmState state5 = fsm.GetState("Roof Up"); ((Wait)state3.Actions[9]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state4.Actions[8]).time = FsmFloat.op_Implicit(0.3f); ((Wait)state5.Actions[6]).time = FsmFloat.op_Implicit(0f); SetTransitionToState(state, state2, 2); state2.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent(TransitionPointInfo.eventName), ToFsmState = state3 } }; CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { val.Variables.FindFsmGameObject("Terrain Intro").Value.SetActive(false); }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, 5); ((StartRoarEmitter)((IEnumerable)state3.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_NylethControl(Fsm fsm) { FsmState state = fsm.GetState("Init"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { string key = "Nyleth"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); return true; } public static bool PatchFsm_NylethCorpseControl(Fsm fsm) { FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); FsmState state3 = fsm.GetState("Land"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm, 0); SetTransitionToState(state, state2, 0); state3.Transitions = (FsmTransition[])(object)new FsmTransition[0]; return true; } public static bool PatchFsm_PalestagControl(Fsm fsm) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) fsm.GameObject.transform.localScale = new Vector3(1f, 1f, 1f); FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Roar"); fsm.GetState("Rest").Transitions[0].FsmEvent = FsmEvent.GetFsmEvent(TransitionPointInfo.eventName); ((Wait)state2.Actions[11]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { string key = "Palestag"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); num = phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); ((StartRoarEmitter)((IEnumerable)state2.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_PalestagCorpseControl(Fsm fsm) { FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); FsmState state3 = fsm.GetState("Disappear"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm, 0); SetTransitionToState(state, state2, 0); state3.Actions = RemoveFromArray(state3.Actions, 6); state3.Actions = RemoveFromArray(state3.Actions, 5); return true; } public static bool PatchFsm_PinstressBossControl(Fsm fsm) { //IL_007b: 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_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Expected O, but got Unknown //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Expected O, but got Unknown //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Expected O, but got Unknown //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0221: 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_0261: 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_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Expected O, but got Unknown //IL_0312: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Roar Antic"); FsmState state3 = fsm.GetState("Roar"); FsmState state4 = fsm.GetState("Recover"); FsmState state5 = fsm.GetState("Recover End"); fsm.GetState("Ground Tele Return"); ((Wait)state3.Actions[4]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state4.Actions[1]).time = FsmFloat.op_Implicit(0f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state5.Actions = InsertInArray(state5.Actions, (FsmStateAction)(object)customLogicFsm, 0); state5.Actions = RemoveFromArray(state5.Actions, 5); state5.Actions = RemoveFromArray(state5.Actions, 4); state2.Actions = RemoveFromArray(state2.Actions, 3); state5.Transitions = (FsmTransition[])(object)new FsmTransition[0]; CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { string key = "Pinstress"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm2, state.Actions.Length); GameObject val = new GameObject("Collider1"); GameObject val2 = new GameObject("Collider2"); GameObject val3 = new GameObject("DamageCollider1"); SceneManager.MoveGameObjectToScene(val, fsm.GameObject.scene); SceneManager.MoveGameObjectToScene(val2, fsm.GameObject.scene); SceneManager.MoveGameObjectToScene(val3, fsm.GameObject.scene); val.transform.position = new Vector3(35.2f, 103f, -0.1f); val2.transform.position = new Vector3(59f, 95f, -0.1f); val3.transform.position = new Vector3(53.086f, 80f, -0.1f); val3.layer = 22; BoxCollider2D val4 = val.AddComponent(); BoxCollider2D val5 = val2.AddComponent(); BoxCollider2D val6 = val3.AddComponent(); DamageHero obj = val3.AddComponent(); val4.size = new Vector2(100f, 1f); val5.size = new Vector2(1f, 100f); val6.size = new Vector2(100f, 1f); obj.hazardType = (HazardType)2; obj.OnDamagedHero = new UnityEvent(); ((StartRoarEmitter)((IEnumerable)state3.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_PinstressControl(Fsm fsm) { fsm.GetState("Pause"); FsmState state = fsm.GetState("Check"); FsmState state2 = fsm.GetState("Pinstress"); SetTransitionToState(state, state2, 1); return true; } public static bool PatchFsm_PinstressNPCControl(Fsm fsm) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) fsm.GetState("Init"); FsmState state = fsm.GetState("Snow Sleep"); FsmState state2 = fsm.GetState("Wake 3"); FsmState state3 = fsm.GetState("Battle Start"); ((Wait)state2.Actions[3]).time = FsmFloat.op_Implicit(0f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_0033: 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_003f: Unknown result type (might be due to invalid IL or missing references) Vector3 position = val.GameObject.transform.position; GameObject obj = CreateTrigger("Peak_07"); _ = obj.transform.position; obj.transform.position = new Vector3(position.x, position.y, position.z); CustomTrigger customTrigger = obj.AddComponent(); customTrigger.fsm = val; customTrigger.action = (Action)Delegate.Combine(customTrigger.action, (Action)delegate(Fsm val2, FsmStateAction fsmAction) { val2.FsmComponent.SendEvent("TEST"); }); }); Object.Destroy((Object)(object)((Component)fsm.FsmComponent).gameObject.GetComponent()); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); SetTransitionToState(state2, state3, 0); return true; } public static bool PatchFsm_PlasmifiedZango(Fsm fsm) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: 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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0122: 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_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Expected O, but got Unknown //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0188: 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) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Roar"); FsmState state3 = fsm.GetState("Rest"); FsmState state4 = fsm.GetState("Walk Slow"); FsmState state5 = fsm.GetState("Record Journal Kill"); ((Wait)state2.Actions[5]).time = FsmFloat.op_Implicit(0.1f); ((SetScale)state3.Actions[1]).x = FsmFloat.op_Implicit(-1f); ((WalkLeftRight)state4.Actions[0]).startLeft = FsmBool.op_Implicit(true); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); SetTransitionToState(state, state3, 1); state5.Actions = InsertInArray(state5.Actions, (FsmStateAction)(object)customLogicFsm, 0); Vector3 position = fsm.GameObject.transform.position; fsm.GameObject.transform.position = new Vector3(position.x + 10f, position.y, position.z); GameObject val = new GameObject("Collider1", new Type[1] { typeof(BoxCollider2D) }); SceneManager.MoveGameObjectToScene(val, fsm.GameObject.scene); val.transform.position = new Vector3(40.5f, 8f, -0.1f); val.GetComponent().size = new Vector2(1f, 100f); ((StartRoarEmitter)((IEnumerable)state2.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_PlasmifiedZangoPhaseControl(Fsm fsm) { FsmState state = fsm.GetState("Init"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { string key = "Plasmified Zango"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); LifebloodState component2 = fsm.GameObject.GetComponent(); typeof(LifebloodState).GetField("maxHP", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component2, num); fsm.GetFsmInt("Init HP").Value = num; num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("P3 HP").Value = num; num -= phases[2].hp; fsm.GetFsmInt("P4 HP").Value = num; num -= phases[3].hp; fsm.GetFsmInt("P5 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); return true; } public static bool PatchFsm_SethControl(Fsm fsm) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007a: 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) //IL_0086: 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_00a5: 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_00f2: Unknown result type (might be due to invalid IL or missing references) fsm.GetState("Init"); FsmState state = fsm.GetState("Dormant"); FsmState state2 = fsm.GetState("Wake Antic"); FsmState state3 = fsm.GetState("Roar"); ((Wait)state3.Actions[6]).time = FsmFloat.op_Implicit(0.1f); state.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent(TransitionPointInfo.eventName), ToFsmState = state2 } }; GameObject val = new GameObject("Collider1"); SceneManager.MoveGameObjectToScene(val, fsm.GameObject.scene); val.transform.position = new Vector3(180f, 7f, -0.1f); val.AddComponent().size = new Vector2(1f, 100f); ((StartRoarEmitter)((IEnumerable)state3.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_SethPhaseControl(Fsm fsm) { FsmState state = fsm.GetState("Init"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { string key = "Shrine Guardian Seth"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("P3 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); return true; } public static bool PatchFsm_SethCorpseControl(Fsm fsm) { FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); FsmState state3 = fsm.GetState("Splash In"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state3.Actions = InsertInArray(state3.Actions, (FsmStateAction)(object)customLogicFsm, 0); SetTransitionToState(state, state2, 0); state3.Transitions = (FsmTransition[])(object)new FsmTransition[0]; return true; } public static bool PatchFsm_SkarrsingerKarmelitaBossControl(Fsm fsm) { //IL_007c: 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_0139: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Challenge Pause"); FsmState state3 = fsm.GetState("Launch In Antic"); FsmState state4 = fsm.GetState("Entry Pos"); FsmState state5 = fsm.GetState("Enter R"); FsmState state6 = fsm.GetState("Roar"); ((Wait)state2.Actions[1]).time = FsmFloat.op_Implicit(0f); ((Wait)state6.Actions[5]).time = FsmFloat.op_Implicit(0.1f); SetTransitionToState(state2, state3, 0); SetTransitionToState(state4, state5, 0); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { string key = "Skarrsinger Karmelita"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("P3 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); ((StartRoarEmitter)((IEnumerable)state6.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_SkarrsingerKarmelitaChallengeRegion(Fsm fsm) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) fsm.GetState("Init"); FsmState state = fsm.GetState("Idle"); fsm.GetState("In Region"); FsmState state2 = fsm.GetState("Hornet Voice"); ((Wait)fsm.GetState("Challenge 2").Actions[1]).time = FsmFloat.op_Implicit(0f); SetTransitionToState(state, state2, 0); return true; } public static bool PatchFsm_SkarrsingerKarmelitaCorpseControl(Fsm fsm) { FsmState state = fsm.GetState("Stagger"); fsm.GetState("Steam"); FsmState state2 = fsm.GetState("Blow"); FsmState state3 = fsm.GetState("Land"); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state3.Actions = InsertInArray(state3.Actions, (FsmStateAction)(object)customLogicFsm, 0); SetTransitionToState(state, state2, 0); state3.Transitions = (FsmTransition[])(object)new FsmTransition[0]; return true; } public static bool PatchFsm_TormentedTrobbioControl(Fsm fsm) { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: 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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0109: 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_0143: 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_0192: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Expected O, but got Unknown FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Wait"); FsmState state3 = fsm.GetState("State"); FsmState state4 = fsm.GetState("Start Pause"); FsmState state5 = fsm.GetState("Fog Start"); fsm.GetState("Drum Fade"); FsmState state6 = fsm.GetState("Trobbio Rise"); FsmState state7 = fsm.GetState("Rise End"); ((ConvertBoolToFloat)state6.Actions[6]).falseValue = FsmFloat.op_Implicit(0.3f); ((ConvertBoolToFloat)state6.Actions[6]).trueValue = FsmFloat.op_Implicit(0.3f); ((ConvertBoolToFloat)state5.Actions[6]).falseValue = FsmFloat.op_Implicit(0f); ((ConvertBoolToFloat)state5.Actions[6]).trueValue = FsmFloat.op_Implicit(0f); ((FadeAudio)state5.Actions[1]).time = FsmFloat.op_Implicit(0.2f); ((ConvertBoolToFloat)state7.Actions[1]).trueValue = FsmFloat.op_Implicit(0f); ((ConvertBoolToFloat)state7.Actions[1]).falseValue = FsmFloat.op_Implicit(0f); state4.Actions = RemoveFromArray(state4.Actions, 0); state7.Actions = RemoveFromArray(state7.Actions, 3); SetTransitionToState(state3, state4, 0); state2.Transitions = (FsmTransition[])(object)new FsmTransition[1] { new FsmTransition { FsmEvent = FsmEvent.GetFsmEvent(TransitionPointInfo.eventName), ToFsmState = state3 } }; CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { string key = "Tormented Trobbio"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); num -= phases[0].hp; fsm.GetFsmInt("CrossFlash HP").Value = num; num -= phases[1].hp; fsm.GetFsmInt("P2 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm, state.Actions.Length); return true; } public static bool PatchFsm_TormentedTrobbioCorpseControl(Fsm fsm) { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Stagger"); FsmState state2 = fsm.GetState("Blow"); fsm.GetState("Do Spin"); FsmState state3 = fsm.GetState("Interactable"); fsm.GetState("Death Pose 2"); FsmState state4 = fsm.GetState("Death Stream"); FsmState state5 = fsm.GetState("Leave Shake"); FsmState state6 = fsm.GetState("Leave"); FsmState state7 = fsm.GetState("Leave End"); float num = 3f; ((Wait)state4.Actions[4]).time = FsmFloat.op_Implicit(((Wait)state4.Actions[4]).time.Value / num); ((Wait)state5.Actions[1]).time = FsmFloat.op_Implicit(((Wait)state5.Actions[1]).time.Value / num); ((EaseFsmAction)(AnimatePositionBy)state6.Actions[0]).time = FsmFloat.op_Implicit(((EaseFsmAction)(AnimatePositionBy)state6.Actions[0]).time.Value / num); ((Wait)state7.Actions[5]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state7.Actions = InsertInArray(state7.Actions, (FsmStateAction)(object)customLogicFsm, 0); state7.Actions = RemoveFromArray(state7.Actions, 7); state7.Actions = RemoveFromArray(state7.Actions, 6); state3.Actions = RemoveFromArray(state3.Actions, 3); SetTransitionToState(state, state2, 0); state7.Transitions = (FsmTransition[])(object)new FsmTransition[0]; return true; } public static bool PatchFsm_WatcherAtTheEdgeControl(Fsm fsm) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Expected O, but got Unknown //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) Vector3 position = fsm.GameObject.transform.position; fsm.GameObject.transform.position = new Vector3(position.x + 10f, position.y, position.z); FsmState state = fsm.GetState("Init"); FsmState state2 = fsm.GetState("Start State"); FsmState state3 = fsm.GetState("Sleep"); FsmState state4 = fsm.GetState("Wake Antic"); fsm.GetState("Wake Roar 1"); FsmState state5 = fsm.GetState("Wake Roar 2"); ((Wait)state4.Actions[2]).time = FsmFloat.op_Implicit(0.1f); Wait val = (Wait)state5.Actions[5]; val.time = FsmFloat.op_Implicit(0.1f); state5.Actions = InsertInArray(state5.Actions, (FsmStateAction)(object)val, state5.Actions.Length); state5.Actions = RemoveFromArray(state5.Actions, 5); SetTransitionToState(state2, state3, 1); SetTransitionToState(state2, state3, 2); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate(Fsm val3) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_0033: 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_003f: Unknown result type (might be due to invalid IL or missing references) Vector3 position2 = val3.GameObject.transform.position; GameObject obj = CreateTrigger("Coral_39"); _ = obj.transform.position; obj.transform.position = new Vector3(position2.x, position2.y, position2.z); CustomTrigger customTrigger = obj.AddComponent(); customTrigger.fsm = val3; customTrigger.action = (Action)Delegate.Combine(customTrigger.action, (Action)delegate(Fsm val4, FsmStateAction fsmAction) { val4.FsmComponent.SendEvent("WAKE"); }); }); state3.Actions = InsertInArray(state3.Actions, (FsmStateAction)(object)customLogicFsm, state3.Actions.Length); CustomLogicFsm customLogicFsm2 = new CustomLogicFsm(fsm); customLogicFsm2.action = (Action)Delegate.Combine(customLogicFsm2.action, (Action)delegate { string key = "Watcher at the Edge"; int num = EnemyHp.enemies[key].hpFullDict[BossSequence.currentDifficultMode]; EnemyHp.PhaseHp[] phases = EnemyHp.enemies[key].phases; HealthManager component = fsm.GameObject.GetComponent(); component.hp = num; typeof(HealthManager).GetField("initHp", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(component, num); num -= phases[0].hp; fsm.GetFsmInt("P2 HP").Value = num; }); state.Actions = InsertInArray(state.Actions, (FsmStateAction)(object)customLogicFsm2, state.Actions.Length); GameObject val2 = new GameObject("Collider1", new Type[1] { typeof(BoxCollider2D) }); SceneManager.MoveGameObjectToScene(val2, fsm.GameObject.scene); val2.transform.position = new Vector3(174.5f, 8f, -0.1f); val2.GetComponent().size = new Vector2(1f, 100f); ((StartRoarEmitter)((IEnumerable)state5.Actions).FirstOrDefault((Func)((FsmStateAction i) => typeof(StartRoarEmitter) == ((object)i).GetType()))).roarBurst = FsmBool.op_Implicit(true); return true; } public static bool PatchFsm_WatcherAtTheEdgeBattleMusic(Fsm fsm) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("State 1"); fsm.GetState("Music Pause"); FsmState state2 = fsm.GetState("Music"); ((TransitionToAudioSnapshot)state2.Actions[1]).transitionTime = FsmFloat.op_Implicit(0.5f); SetTransitionToState(state, state2, 0); return true; } public static bool PatchFsm_WatcherAtTheEdgeCorpseControl(Fsm fsm) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) FsmState state = fsm.GetState("Land"); FsmState state2 = fsm.GetState("Eaten"); fsm.GetState("Roar Antic"); FsmState state3 = fsm.GetState("Roar"); FsmState state4 = fsm.GetState("Crust Pause"); fsm.GetState("Crust Up"); FsmState state5 = fsm.GetState("Fade Away"); FsmState state6 = fsm.GetState("Drop Sword"); ((Wait)state3.Actions[0]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state5.Actions[2]).time = FsmFloat.op_Implicit(0.1f); ((Wait)state.Actions[7]).time = FsmFloat.op_Implicit(0.1f); CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); state6.Actions = InsertInArray(state6.Actions, (FsmStateAction)(object)customLogicFsm, 0); state2.Actions = InsertInArray(state2.Actions, (FsmStateAction)(object)customLogicFsm, 0); state4.Actions = RemoveFromArray(state4.Actions, 0); return true; } public static bool PatchFsm_ForumDropLampControl(Fsm fsm) { FsmState state = fsm.GetState("Idle"); FsmState state2 = fsm.GetState("Wait 1"); state.Actions[0].Enabled = false; state.Actions[1].Enabled = false; SetTransitionToState(state, state2, 0); return true; } public static bool PatchFsm_ForumHandmaidenControl(Fsm fsm) { FsmState state = fsm.GetState("Burned?"); FsmState state2 = fsm.GetState("Wake"); SetTransitionToState(state, state2, 1); return true; } public static bool PatchFsm_ForumStartRange(Fsm fsm) { fsm.GetState("Pause"); FsmState state = fsm.GetState("Tension?"); FsmState state2 = fsm.GetState("Idle"); FsmState state3 = fsm.GetState("State"); FsmState state4 = fsm.GetState("Woken"); state.Actions[1].Enabled = false; state.Actions[2].Enabled = false; state.Actions[3].Enabled = false; CustomLogicFsm customLogicFsm = new CustomLogicFsm(fsm, BossScene.waitForBossDeathAnim, finishOnEnter: true); customLogicFsm.action = (Action)Delegate.Combine(customLogicFsm.action, (Action)delegate { PlayMakerFSM.BroadcastEvent(bossDeadEvent); }); BattleScene bossScene = ((Component)fsm.GameObject.transform.parent).GetComponent(); bossScene.setPDBoolOnEnd = ""; bossScene.battleStartPause = 0f; bossScene.battleEndPause = 5f; ((MonoBehaviour)fsm.FsmComponent).StartCoroutine(WaitForEndBattle()); Transform val = ((Component)bossScene).transform.Find("Shakra Fighter"); Transform val2 = ((Component)bossScene).transform.Find("Garmond Fighter"); if ((Object)(object)val != (Object)null) { ((Component)val).gameObject.SetActive(false); } if ((Object)(object)val2 != (Object)null) { ((Component)val2).gameObject.SetActive(false); } SetTransitionToState(state3, state4, 1); state2.Transitions[0].FsmEvent = FsmEvent.GetFsmEvent(TransitionPointInfo.eventName); return true; IEnumerator WaitForEndBattle() { ((object)bossScene).GetType().GetField("started", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo completed = ((object)bossScene).GetType().GetField("completed", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); while (!(bool)completed.GetValue(bossScene)) { yield return null; } yield return (object)new WaitForSeconds(2.5f); PlayMakerFSM.BroadcastEvent(bossDeadEvent); } } } [Serializable] public class PantheonInfo { public bool completedPantheon; public bool completedNeedleBinding; public bool completedSilkBinding; public bool completedToolsBinding; public bool completedMaskBinding; public bool completedNoHit; public bool completedAllBindings; public bool completedAllBindingsNoHit; } [Serializable] public class PlayerDataMod { public static PlayerDataMod instance; public Dictionary badges; public Dictionary bindings = new Dictionary { { "Needle Binding", false }, { "Silk Binding", false }, { "Tools Binding", false }, { "Mask Binding", false } }; public Dictionary pantheonsInfo = new Dictionary { { "Pantheon 1", new PantheonInfo() }, { "Pantheon 2", new PantheonInfo() }, { "Pantheon 3", new PantheonInfo() }, { "Pantheon 4", new PantheonInfo() }, { "Pantheon 5", new PantheonInfo() } }; public int previousHealthCount = 10; public int previousSilkSpoolCount = 18; public PlayerDataMod() { Dictionary dictionary = new Dictionary(); for (int i = 0; i < BossStatueInfo.bossStatues.Length; i++) { string bossName = BossStatueInfo.bossStatues[i].boss.bossName; dictionary[bossName] = new Badges(bossName); } badges = dictionary; instance = this; } } public class Preload { public struct ObjectPreloadInfo { public string objectName; public string path; public bool isActive; public Action afterObjectPreloaded; } public struct ScenePreloadInfo { public string sceneName; public ObjectPreloadInfo[] objectsInfo; } public static Action afterAllPreloaded; public static bool startedInitialization = false; public static bool isInitialized = false; public static int preloadedCount = 0; public static GameObject handler; public static Dictionary preloads = new Dictionary(); public static ScenePreloadInfo[] preloadsInfo = new ScenePreloadInfo[6] { new ScenePreloadInfo { sceneName = "Ant_17", objectsInfo = new ObjectPreloadInfo[1] { new ObjectPreloadInfo { objectName = "_SceneManager_Ant_17", path = "_SceneManager", isActive = false } } }, new ScenePreloadInfo { sceneName = "Song_10", objectsInfo = new ObjectPreloadInfo[4] { new ObjectPreloadInfo { objectName = "Surface Water Region", path = "Surface Water Region", isActive = true }, new ObjectPreloadInfo { objectName = "Spa Region", path = "Spa Region", isActive = true }, new ObjectPreloadInfo { objectName = "spa_water_small", path = "spa_water_small (1)", isActive = true }, new ObjectPreloadInfo { objectName = "StillWater", path = "StillWater", isActive = true } } }, new ScenePreloadInfo { sceneName = "Abyss_05", objectsInfo = new ObjectPreloadInfo[1] { new ObjectPreloadInfo { objectName = "_SceneManager_Abyss_05", path = "_SceneManager", isActive = false } } }, new ScenePreloadInfo { sceneName = "Peak_12", objectsInfo = new ObjectPreloadInfo[1] { new ObjectPreloadInfo { objectName = "RestBench", path = "RestBench (1)", isActive = true } } }, new ScenePreloadInfo { sceneName = "Memory_Ant_Queen", objectsInfo = new ObjectPreloadInfo[2] { new ObjectPreloadInfo { objectName = "Exit Edge Trigger_AntQueen", path = "Exit Edge Trigger", isActive = true }, new ObjectPreloadInfo { objectName = "door_wakeInMemory_AntQueen", path = "door_wakeInMemory", isActive = true } } }, new ScenePreloadInfo { sceneName = "Shellwood_11b", objectsInfo = new ObjectPreloadInfo[2] { new ObjectPreloadInfo { objectName = "door_wakeOnGround_FlowerQueen", path = "door_wakeOnGround", isActive = true }, new ObjectPreloadInfo { objectName = "Memory Group", path = "memory_font/Uncompleted/Memory Group", isActive = true, afterObjectPreloaded = delegate(GameObject go) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_00bb: Unknown result type (might be due to invalid IL or missing references) go.transform.position = new Vector3(45f, 53f, 0f); foreach (Transform item in go.transform) { Transform val = item; if (((Object)val).name == "thread_memory") { go = ((Component)val).gameObject; Object.Destroy((Object)(object)FindObjectByPath((GameObject[])(object)new GameObject[1] { go }, "thread_memory/fade/ghosts/glow (2)")); Object.Destroy((Object)(object)go.GetComponent()); PlayMakerFSM[] components = go.GetComponents(); foreach (PlayMakerFSM val2 in components) { if (val2.FsmName == "Deep Memory Pre Enter Effect") { GameObject val3 = Object.Instantiate(((CreateObject)val2.Fsm.GetState("Init").Actions[2]).gameObject.Value); val3.transform.SetParent(handler.transform); ((Object)val3).name = "Deep Memory Pre Enter Effect"; preloads[((Object)val3).name] = val3; break; } } } } } } } } }; public static Dictionary bundleResources = new Dictionary(); public static void Init() { ((MonoBehaviour)GodsOfPharloomMod.instance).StartCoroutine(EInit()); } private static IEnumerator EInit() { startedInitialization = true; handler = new GameObject("PreloadHandler_GodsOfPharloom"); handler.SetActive(false); Object.DontDestroyOnLoad((Object)(object)handler); ScenePreloadInfo[] array = preloadsInfo; foreach (ScenePreloadInfo preloadInfo in array) { yield return ((MonoBehaviour)GodsOfPharloomMod.instance).StartCoroutine(PreloadObjects(preloadInfo)); } while (preloadedCount < preloadsInfo.Length) { yield return null; } afterAllPreloaded?.Invoke(); isInitialized = true; } public static void AddToPreloads(GameObject obj, ObjectPreloadInfo objectInfo) { Object.DontDestroyOnLoad((Object)(object)obj); obj.transform.SetParent(handler.transform); ((Object)obj).name = objectInfo.objectName; obj.SetActive(objectInfo.isActive); preloads[((Object)obj).name] = obj; objectInfo.afterObjectPreloaded?.Invoke(obj); } public static IEnumerator PreloadObjects(ScenePreloadInfo preloadInfo) { AsyncOperationHandle op = Addressables.LoadSceneAsync((object)("Scenes/" + preloadInfo.sceneName), (LoadSceneMode)1, true, 100, (SceneReleaseMode)0); yield return ((MonoBehaviour)GodsOfPharloomMod.instance).StartCoroutine(PreloadScene(op)); SceneInstance result = op.Result; Scene scene = ((SceneInstance)(ref result)).Scene; GameObject[] rootGameObjects = ((Scene)(ref scene)).GetRootGameObjects(); ObjectPreloadInfo[] objectsInfo = preloadInfo.objectsInfo; for (int i = 0; i < objectsInfo.Length; i++) { ObjectPreloadInfo objectInfo = objectsInfo[i]; AddToPreloads(FindObjectByPath(rootGameObjects, objectInfo.path), objectInfo); } Addressables.UnloadSceneAsync(op, true); preloadedCount++; } public static GameObject FindObjectByPath(GameObject[] rootObjects, string path) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown string[] array = path.Split(new char[1] { '/' }); GameObject val = null; foreach (GameObject val2 in rootObjects) { if (((Object)val2).name == array[0]) { val = val2; break; } } if (array.Length == 1) { return val; } for (int j = 0; j < array.Length; j++) { foreach (Transform item in val.transform) { Transform val3 = item; if (((Object)val3).name == array[j]) { if (j == array.Length - 1) { return ((Component)val3).gameObject; } val = ((Component)val3).gameObject; break; } } } return null; } public static GameObject FindObjectByPath(GameObject parentObject, string path) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown string[] array = path.Split(new char[1] { '/' }); GameObject val = null; foreach (Transform item in parentObject.transform) { Transform val2 = item; if (((Object)val2).name == array[0]) { val = ((Component)val2).gameObject; break; } } if (array.Length == 1) { return val; } for (int i = 0; i < array.Length; i++) { foreach (Transform item2 in val.transform) { Transform val3 = item2; if (((Object)val3).name == array[i]) { if (i == array.Length - 1) { return ((Component)val3).gameObject; } val = ((Component)val3).gameObject; break; } } } return null; } private static IEnumerator PreloadScene(AsyncOperationHandle op) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) yield return op; SceneInstance result = op.Result; Scene scene = ((SceneInstance)(ref result)).Scene; GameObject[] rootGameObjects = ((Scene)(ref scene)).GetRootGameObjects(); for (int i = 0; i < rootGameObjects.Length; i++) { rootGameObjects[i].SetActive(false); } } } public class TransitionSequence { public static ParticleSystem transitionParticles; public static AudioSource transitionStartAudio; public static AudioSource transitionEndAudio; public static bool audioStarted; public static void Init() { ((MonoBehaviour)GodsOfPharloomMod.instance).StartCoroutine(IInit()); } private static IEnumerator IInit() { if ((Object)(object)transitionParticles != (Object)null) { Object.Destroy((Object)(object)transitionParticles); } GameCameras instance; while (true) { instance = GameCameras.instance; if ((Object)(object)instance != (Object)null) { break; } yield return null; } Transform transform = ((Component)instance.mainCamera).transform; Vector3 position = transform.position; GameObject obj = Object.Instantiate((GameObject)Preload.bundleResources["Transition Animation"], transform); obj.transform.position = new Vector3(position.x, position.y, -2f); transitionParticles = obj.GetComponent(); GameObject val = new GameObject(); Object.DontDestroyOnLoad((Object)val); transitionStartAudio = val.AddComponent(); transitionEndAudio = val.AddComponent(); transitionStartAudio.priority = 90; transitionEndAudio.priority = 90; transitionStartAudio.maxDistance = 9999f; transitionEndAudio.maxDistance = 9999f; transitionStartAudio.clip = (AudioClip)Preload.bundleResources["gg_room_transition"]; transitionEndAudio.clip = (AudioClip)Preload.bundleResources["gg_transition_out"]; } public static void FadeAudio(AudioSource audio, float time) { ((MonoBehaviour)GodsOfPharloomMod.instance).StartCoroutine(IFadeAudio(audio, time)); } public static IEnumerator IFadeAudio(AudioSource audio, float time) { float startVolume = audio.volume; while (audio.volume > 0f) { audio.volume -= startVolume * Time.unscaledDeltaTime / time; yield return null; } audio.volume = startVolume; audio.Stop(); } public static void Play() { if ((Object)(object)transitionParticles == (Object)null) { Init(); } else { transitionParticles.Play(); } } public static void Pause() { if ((Object)(object)transitionParticles == (Object)null) { Init(); } else { transitionParticles.Pause(true); } } public static void Stop(bool stopWithClear = false) { if ((Object)(object)transitionParticles == (Object)null) { Init(); } else if (stopWithClear) { transitionParticles.Stop(true, (ParticleSystemStopBehavior)0); } else { transitionParticles.Stop(true, (ParticleSystemStopBehavior)1); } } public static void SetVisible(bool val) { if ((Object)(object)transitionParticles == (Object)null) { Init(); } else { ((Renderer)((Component)transitionParticles).gameObject.GetComponent()).forceRenderingOff = !val; } } }