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 System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using BillionNemesis.Func; using Configgy; using Discord; using HarmonyLib; using Logic; using Microsoft.CodeAnalysis; using Steamworks; using TMPro; using ULTRAKILL.Cheats; using Unity.AI.Navigation; using UnityEngine; using UnityEngine.AI; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("BillionNemesis")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("0.3.0.0")] [assembly: AssemblyInformationalVersion("0.3.0+5a951ddcdc1c7f559a8f29e96b43156ef7901ff4")] [assembly: AssemblyProduct("Billion Nemesis")] [assembly: AssemblyTitle("BillionNemesis")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.3.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace BillionNemesis { [BepInPlugin("billy.billionnemesis", "Billion Nemesis", "0.3.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { private ConfigBuilder config; [Configgable("", "Enable Billion Nemesis", 0, "Lets you enable or disable the custom enemy encounters. If you're currently in a level, changing this will require a level restart")] public static ConfigToggle IsEnabled = new ConfigToggle(true); public static bool IsPatched = false; public static bool forceDefaultLevelPath = false; public static Dictionary objectsLookedUpThisScene = new Dictionary(); public const string NemesisColorHex = "ff00af"; private static readonly Harmony Harmony = new Harmony("billy.billionnemesis"); internal static ManualLogSource Logger; public void Awake() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown Logger = ((BaseUnityPlugin)this).Logger; Harmony.PatchAll(); Logger.LogInfo((object)"Plugin BillionNemesis is loaded!"); SceneManager.activeSceneChanged += LevelPatching.SceneManagerActiveSceneChanged; LevelAssets.GetAssets(); config = new ConfigBuilder("billy.billionnemesis", "Billion Nemesis"); ConfigToggle isEnabled = IsEnabled; ((ConfigValueElement)(object)isEnabled).OnValueChanged = (Action)Delegate.Combine(((ConfigValueElement)(object)isEnabled).OnValueChanged, new Action(EnabledValueChanged)); config.BuildAll(); Logger.LogInfo((object)"Plugin BillionNemesis is loadedest!"); } public static void EnabledValueChanged(bool v) { RankStuff.UpdateRanks(); } } public static class ChangedInfo { public static int[] ChangedLevels = new int[4] { 1, 2, 3, 4 }; public static string[] ChangedScenes = new string[4] { "Level 0-1", "Level 0-2", "Level 0-3", "Level 0-4" }; public static Dictionary NewLevelNames = new Dictionary { ["INTO THE FIRE"] = "UNTO THE CORE", ["THE MEATGRINDER"] = "THE BACKBURNER", ["DOUBLE DOWN"] = "UP THE ANTE", ["A ONE-MACHINE ARMY"] = "DELTA P", ["CERBERUS"] = "the Kiln" }; public static Dictionary PlainLevelNames = new Dictionary { ["UP THE ANTE"] = "UP THE ANTE" }; } [HarmonyPatch] public class DeadcaughtEnemyPatch { [HarmonyPrefix] [HarmonyPatch(typeof(Deathcatcher), "EnemyDeath")] public static bool EnemyDeathPrefix(EnemyIdentifier eid, Deathcatcher __instance) { //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Invalid comparison between Unknown and I4 //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_0165: 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_01ac: 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_01c2: Unknown result type (might be due to invalid IL or missing references) if (!Util.IsPatched()) { return true; } if ((Object)(object)eid == (Object)null) { Debug.LogWarning((object)"EnemyIdentifier is null. Cannot track death."); return false; } if ((Object)(object)((Component)eid).gameObject.GetComponent() != (Object)null) { return false; } Debug.Log((object)("EnemyDeath called for " + ((Object)eid).name)); if (!__instance.canRespawnIdols && (int)eid.enemyType == 21) { return false; } EnemyTracker instance = MonoSingleton.Instance; if ((Object)(object)instance == (Object)null) { Debug.LogWarning((object)"EnemyTracker instance not found. Cannot track enemy death."); return false; } if (!instance.spawnedEnemies.TryGetValue(((Object)eid).GetInstanceID(), out var value)) { Debug.LogWarning((object)("Enemy " + ((Object)eid).name + " not found in spawned enemies. Cannot track death.")); return false; } TeleportOnCondition teleportOnCondition = null; GameObject[] activateOnDeath = eid.activateOnDeath; foreach (GameObject val in activateOnDeath) { if (!(((Object)val).name != "TeleportOnCondition")) { teleportOnCondition = val.GetComponent(); } } CaughtEnemy val2 = new CaughtEnemy(eid, value); if (!__instance.deadCaughtEnemies.Contains(val2)) { Debug.Log((object)$"Tracking death of enemy {eid} at position {val2.position} with rotation {val2.rotation}"); __instance.deadCaughtEnemies.Add(val2); if ((Object)(object)teleportOnCondition != (Object)null && teleportOnCondition.onDeadcaught) { val2.position = TeleportOnCondition.CheckConditions(val2.position, teleportOnCondition.conditions, teleportOnCondition.returnOnFirstSuccess); } } return false; } [HarmonyPrefix] [HarmonyPatch(typeof(CaughtEnemy), "UpdatePuppet")] public static void UpdatePuppetPrefix(GameObject newPuppet, CaughtEnemy __instance) { ReaddComponents(newPuppet, __instance.original, __instance); } public static void ReaddComponents(GameObject puppet, EnemyIdentifier original, CaughtEnemy __instance) { //IL_00eb: 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_00d9: 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) GameObject[] activateOnDeath = original.activateOnDeath; foreach (GameObject val in activateOnDeath) { switch (((Object)val).name) { case "StopEnemyMovement": { StopEnemyMovement component2 = val.GetComponent(); StopEnemyMovement orAddComponent2 = GameObjectExtensions.GetOrAddComponent(puppet); component2.CopyValuesTo(orAddComponent2); break; } case "MoveTo": { MoveTo component3 = val.GetComponent(); MoveTo orAddComponent3 = GameObjectExtensions.GetOrAddComponent(puppet); component3.CopyValuesTo(orAddComponent3); break; } case "TeleportOnCondition": { TeleportOnCondition component = val.GetComponent(); TeleportOnCondition orAddComponent = GameObjectExtensions.GetOrAddComponent(puppet); component.CopyValuesTo(orAddComponent); if (orAddComponent.onDeadcaught) { TeleportOnCondition.ChangeAxisTargetsToPuppet(orAddComponent.conditions, puppet.transform); __instance.position = TeleportOnCondition.CheckConditions(__instance.position, orAddComponent.conditions, orAddComponent.returnOnFirstSuccess); } puppet.transform.position = __instance.position; break; } } } } } public class DontCatch : MonoBehaviour { } public class EnemyBlockBreakables : MonoBehaviour { public EnemyIdentifier eid; public void Awake() { eid = ((Component)this).GetComponent(); } public void Start() { BreakableAllower[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); BreakableAllower[] array2 = array; foreach (BreakableAllower breakableAllower in array2) { breakableAllower.enemyBlocks.Add(this); } } } [HarmonyPatch] public class GroundWavePatch { [HarmonyPatch(typeof(GroundWave), "FixedUpdate")] public static bool FixedUpdatePrefix(GroundWave __instance, bool __runOriginal) { //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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_007c: 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_0086: 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_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_012e: 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_017a: Unknown result type (might be due to invalid IL or missing references) if (!Util.IsPatched()) { return true; } if (!__instance.isTraversingLink || !__runOriginal) { return false; } Vector3 val = __instance.traversalVelocity * Time.fixedDeltaTime; Transform transform = ((Component)__instance).transform; transform.position += val; if (((Vector3)(ref __instance.traversalVelocity)).sqrMagnitude > 0.001f) { ((Component)__instance).transform.rotation = Quaternion.LookRotation(((Vector3)(ref __instance.traversalVelocity)).normalized, Vector3.up); } if (Object.op_Implicit((Object)(object)__instance.rb)) { __instance.rb.position = ((Component)__instance).transform.position; __instance.rb.rotation = ((Component)__instance).transform.rotation; } if (__instance.hasCrossed) { __instance.postTeleportDistance += ((Vector3)(ref val)).magnitude; if (__instance.postTeleportDistance >= 2f) { __instance.isTraversingLink = false; ((Behaviour)__instance.nma).enabled = true; __instance.nma.Warp(((Component)__instance).transform.position); __instance.nma.velocity = __instance.traversalVelocity; if ((Object)(object)__instance.nma != (Object)null && ((Behaviour)__instance.nma).enabled) { __instance.nma.SetDestination(__instance.target.GetNavPoint()); } } } return false; } } public class MoveTo : MonoBehaviour { public float speed = 20f; public Transform targetTransform = null; public bool removeOnDeath = true; public float delay = -1f; public float delayProgress = 0f; public bool moveX = true; public bool moveY = true; public bool moveZ = true; public float targetX = 0f; public float targetY = 0f; public float targetZ = 0f; public MoveTo MoveXYZ(bool moveX = true, bool moveY = true, bool moveZ = true) { this.moveX = moveX; this.moveY = moveY; this.moveZ = moveZ; return this; } public MoveTo TargetXYZ(float targetX = 0f, float targetY = 0f, float targetZ = 0f) { this.targetX = targetX; this.targetY = targetY; this.targetZ = targetZ; return this; } public void Update() { //IL_0046: 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_0062: 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_008f: 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)targetTransform == (Object)null)) { if (delayProgress < delay) { delayProgress += Time.deltaTime; return; } Vector3 position = targetTransform.position; targetTransform.position = new Vector3(moveX ? Mathf.MoveTowards(position.x, targetX, speed * Time.deltaTime) : position.x, moveY ? Mathf.MoveTowards(position.y, targetY, speed * Time.deltaTime) : position.y, moveZ ? Mathf.MoveTowards(position.z, targetZ, speed * Time.deltaTime) : position.z); } } public void Start() { SaveForPuppet(); } public void SaveForPuppet() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown EnemyIdentifier componentInChildren = ((Component)this).GetComponentInChildren(); if ((Object)(object)componentInChildren == (Object)null) { return; } GameObject[] activateOnDeath = componentInChildren.activateOnDeath; foreach (GameObject val in activateOnDeath) { if (((Object)val).name == "MoveTo") { return; } } GameObject val2 = new GameObject("MoveTo"); MoveTo newMover = val2.AddComponent(); CopyValuesTo(newMover); Util.ArrayAdd(ref componentInChildren.activateOnDeath, val2); } public void CopyValuesTo(MoveTo newMover) { newMover.speed = speed; newMover.targetTransform = targetTransform; newMover.removeOnDeath = removeOnDeath; newMover.MoveXYZ(moveX, moveY, moveZ); newMover.TargetXYZ(targetX, targetY, targetZ); } } [HarmonyPatch(typeof(EnemyIdentifier), "ProcessDeath")] public class DeathPatch { public static void Prefix(EnemyIdentifier __instance) { MoveTo component = ((Component)__instance).GetComponent(); if ((Object)(object)component != (Object)null && component.removeOnDeath) { Object.Destroy((Object)(object)component); } } } [HarmonyPatch(typeof(Power), "Awake")] public class PowerPatch { public static bool Prefix(Power __instance) { //IL_0046: 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_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_00a9: 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_0112: Unknown result type (might be due to invalid IL or missing references) if (!Util.IsPatched()) { return true; } __instance.anim = ((Component)__instance).GetComponent(); __instance.eid = ((Component)__instance).GetComponent(); __instance.rb = ((Component)__instance).GetComponent(); __instance.mach = ((Component)__instance).GetComponent(); __instance.environmentMask = LayerMaskDefaults.Get((LMD)1); __instance.ensims = ((Component)__instance).GetComponentsInChildren(); __instance.aud = ((Component)__instance).GetComponent(); if (__instance.voicePitch == -1f) { __instance.voicePitch = Random.Range(0.95f, 1.05f); } if (__instance.originalPosition == Vector3.zero) { __instance.originalPosition = ((Component)__instance).transform.position; } if (Object.op_Implicit((Object)(object)__instance.stabEffect)) { __instance.stabParticle = __instance.stabEffect.GetComponentInChildren(); __instance.stabTrail = __instance.stabEffect.GetComponentInChildren(); __instance.stabAudio = __instance.stabEffect.GetComponentInChildren(); } if ((Object)(object)__instance.physicsArm == (Object)null) { __instance.physicsArm = new GameObject("NemesisPhysicsArm").transform; } __instance.physicsArm.SetParent(((Component)__instance).transform.parent); return false; } } public class PowerStayClose : MonoBehaviour { public float distanceLimit = 22.5f; } [HarmonyPatch(typeof(Power), "FixedUpdate")] public class PowerStayClosePatch { public static void Postfix(Power __instance) { //IL_001b: 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) PowerStayClose component = ((Component)__instance).GetComponent(); if (!((Object)(object)component == (Object)null) && !(Vector3.Distance(((Component)__instance).transform.position, ((Component)MonoSingleton.Instance).transform.position) <= component.distanceLimit)) { __instance.Teleport(true, false, false, false, false, true); } } } public class StatueSpeed : MonoBehaviour { public float multiplier = 1.2f; } [HarmonyPatch(typeof(StatueFake), "Start")] public class StatueFakePatch { public static void Postfix(StatueFake __instance) { StatueSpeed component = ((Component)__instance).GetComponent(); if (!((Object)(object)component == (Object)null)) { Animator anim = __instance.anim; anim.speed *= component.multiplier; } } } public class StopEnemyMovement : MonoBehaviour { public bool stopWalking = false; public bool stopDashing = true; public NavMeshAgent nma; public static bool CheckDash(Component __instance) { StopEnemyMovement component = __instance.GetComponent(); if (component != null && ((Behaviour)component).enabled && component != null && component.stopDashing) { return false; } return true; } public void Awake() { nma = ((Component)this).GetComponent(); } public void Start() { SaveForPuppet(); } public void SaveForPuppet() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown EnemyIdentifier component = ((Component)this).GetComponent(); if ((Object)(object)component == (Object)null) { return; } GameObject[] activateOnDeath = component.activateOnDeath; foreach (GameObject val in activateOnDeath) { if (((Object)val).name == "StopEnemyMovement") { return; } } GameObject val2 = new GameObject("StopEnemyMovement"); StopEnemyMovement newStopper = val2.AddComponent(); CopyValuesTo(newStopper); Util.ArrayAdd(ref component.activateOnDeath, val2); } public void FixedUpdate() { if (stopWalking && (Object)(object)nma != (Object)null && ((Behaviour)nma).enabled) { ((Behaviour)nma).enabled = false; } } public void CopyValuesTo(StopEnemyMovement newStopper) { newStopper.stopWalking = stopWalking; newStopper.stopDashing = stopDashing; } } [HarmonyPatch(typeof(StatueBoss))] public class CerberusMovementPatch { [HarmonyPrefix] [HarmonyPatch(typeof(StatueBoss), "Tackle")] [HarmonyPriority(800)] public static bool TacklePrefix(StatueBoss __instance) { //IL_001e: 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) bool flag = StopEnemyMovement.CheckDash((Component)(object)__instance); if (!flag) { __instance.inAction = true; if (Vector3.Distance(((Component)__instance).transform.position, __instance.targetPlanePos) >= 9f) { __instance.Throw(); } else { __instance.Stomp(); } } return flag; } } [HarmonyPatch(typeof(Drone))] public class DroneMovementPatch { [HarmonyPrefix] [HarmonyPatch(typeof(Drone), "Dodge", new Type[] { typeof(Vector3) })] [HarmonyPriority(800)] public static bool DodgePrefix(Drone __instance) { return StopEnemyMovement.CheckDash((Component)(object)__instance); } [HarmonyPrefix] [HarmonyPatch(typeof(Drone), "ProcessTargeting")] [HarmonyPriority(800)] public static bool ProcessTargetingPrefix(Drone __instance) { return StopEnemyMovement.CheckDash((Component)(object)__instance); } } public class AddDeathANW : MonoBehaviour { public void Add() { ActivateNextWave component = ((Component)this).GetComponent(); component.deadEnemies++; } } [HarmonyPatch(typeof(SwordsMachine), "TeleportAway")] public class SwordsMachinePatch { public static bool Prefix(SwordsMachine __instance) { //IL_0029: 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_004f: 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_00f0: Unknown result type (might be due to invalid IL or missing references) if (!Util.IsPatched()) { return true; } BossHealthBar component = ((Component)__instance).GetComponent(); component.DisappearBar(); new Vector3(((Component)__instance).transform.position.x, ((Component)__instance).transform.position.y + 1.5f, ((Component)__instance).transform.position.z); __instance.teleportEffect.SetActive(true); __instance.teleportEffect.transform.SetParent((Transform)null, true); ((Component)__instance).gameObject.SetActive(false); SwordsMachine[] componentsInChildren = ((Component)__instance.secondPhasePosTarget).GetComponentsInChildren(); if (componentsInChildren.Length != 0) { SwordsMachine[] array = componentsInChildren; SwordsMachine[] array2 = array; foreach (SwordsMachine val in array2) { ((Component)val).gameObject.SetActive(false); Object.Destroy((Object)(object)((Component)val).gameObject); } } ((Component)__instance).transform.position = __instance.secondPhasePosTarget.position; ((Component)__instance).transform.parent = __instance.secondPhasePosTarget; __instance.eid.spawnIn = true; ((Component)__instance).gameObject.SetActive(true); ((Behaviour)component).enabled = true; __instance.secondPhasePosTarget = null; AddDeathANW[] array3 = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); AddDeathANW[] array4 = array3; foreach (AddDeathANW addDeathANW in array4) { addDeathANW.Add(); } CheckPointPatch.InheritCheckpointRooms(__instance.cpToReset); __instance.cpToReset.UpdateRooms(); return false; } } public class TeleportOnCondition : MonoBehaviour { public bool processPassively = false; public bool processIfEnemyDead = false; public bool onDeadcaught = true; public bool returnOnFirstSuccess = false; public TeleportCondition[] conditions = Array.Empty(); public EnemyIdentifier eid = null; public void Configure(bool processPassively = true, bool processIfEnemyDead = false, bool onDeadcaught = true, bool returnOnFirstSuccess = false) { this.processPassively = processPassively; this.processIfEnemyDead = processIfEnemyDead; this.onDeadcaught = onDeadcaught; this.returnOnFirstSuccess = returnOnFirstSuccess; } public TeleportCondition AddCondition(Vector3 moveVector, bool isMoveVectorAbsolute = false, bool ignoreAbsoluteMoveVectorZeroAxes = false) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("TeleportCondition" + conditions.Length); val.transform.SetParent(((Component)this).transform); TeleportCondition teleportCondition = new TeleportCondition(moveVector, isMoveVectorAbsolute, ignoreAbsoluteMoveVectorZeroAxes); Util.ArrayAdd(ref conditions, teleportCondition); return teleportCondition; } public void Awake() { eid = ((Component)this).GetComponentInChildren(); } public void Start() { SaveForPuppet(); } public void SaveForPuppet() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown if ((Object)(object)eid == (Object)null) { return; } GameObject[] activateOnDeath = eid.activateOnDeath; foreach (GameObject val in activateOnDeath) { if (((Object)val).name == "TeleportOnCondition") { return; } } GameObject val2 = new GameObject("TeleportOnCondition"); TeleportOnCondition newTeleport = val2.AddComponent(); CopyValuesTo(newTeleport); Util.ArrayAdd(ref eid.activateOnDeath, val2); } public void FixedUpdate() { //IL_0046: 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) bool flag = !processIfEnemyDead && ((Object)(object)eid == (Object)null || eid.dead); if (!(!processPassively || flag)) { ((Component)this).transform.position = CheckConditions(((Component)this).transform.position, conditions, returnOnFirstSuccess); } } public static Vector3 CheckConditions(Vector3 moveTargetPosition, TeleportCondition[] conditions, bool returnOnFirstSuccess = false) { //IL_0042: 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_0047: 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_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) //IL_0032: 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) foreach (TeleportCondition teleportCondition in conditions) { if (teleportCondition != null && teleportCondition.CheckCondition()) { moveTargetPosition = Teleport(teleportCondition, moveTargetPosition); if (returnOnFirstSuccess) { return moveTargetPosition; } } } return moveTargetPosition; } public static Vector3 Teleport(TeleportCondition condition, Vector3 moveTargetPosition) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: 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_0017: 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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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_0034: 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_0094: 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_0047: 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_006a: 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_0070: 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_007d: 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_0091: Unknown result type (might be due to invalid IL or missing references) Vector3 moveVector = condition.moveVector; if (!condition.isMoveVectorAbsolute) { moveTargetPosition += moveVector; return moveTargetPosition; } if (!condition.ignoreAbsoluteMoveVectorZeroAxes) { moveTargetPosition = moveVector; return moveTargetPosition; } ((Vector3)(ref moveTargetPosition))..ctor((moveVector.x != 0f) ? moveVector.x : moveTargetPosition.x, (moveVector.y != 0f) ? moveVector.y : moveTargetPosition.y, (moveVector.z != 0f) ? moveVector.z : moveTargetPosition.z); return moveTargetPosition; } public static void ChangeAxisTargetsToPuppet(TeleportCondition[] conditions, Transform puppet) { foreach (TeleportCondition teleportCondition in conditions) { TeleportConditionAxis[] conditionAxes = teleportCondition.conditionAxes; foreach (TeleportConditionAxis teleportConditionAxis in conditionAxes) { if (teleportConditionAxis.canChangeTargetToPuppet) { teleportConditionAxis.checkTarget = puppet; } } } } public void CopyValuesTo(TeleportOnCondition newTeleport) { newTeleport.Configure(processPassively, processIfEnemyDead, onDeadcaught, returnOnFirstSuccess); newTeleport.conditions = conditions; newTeleport.eid = eid; } } public class TeleportCondition { public TeleportConditionAxis[] conditionAxes = Array.Empty(); public Vector3 moveVector = Vector3.zero; public bool isMoveVectorAbsolute = false; public bool ignoreAbsoluteMoveVectorZeroAxes = false; public bool Success { get; private set; } public TeleportCondition(Vector3 moveVector, bool isMoveVectorAbsolute = false, bool ignoreAbsoluteMoveVectorZeroAxes = false) { //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_0035: 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) Success = false; this.moveVector = moveVector; this.isMoveVectorAbsolute = isMoveVectorAbsolute; this.ignoreAbsoluteMoveVectorZeroAxes = ignoreAbsoluteMoveVectorZeroAxes; } public TeleportConditionAxis AddAxis(Transform checkTarget, char axis = 'y', float value = -25f, bool greater = false, bool orEqual = false, bool useLastTargetPositionIfNull = true, bool canChangeTargetToPuppet = true) { TeleportConditionAxis teleportConditionAxis = new TeleportConditionAxis(checkTarget, axis, value, greater, orEqual, useLastTargetPositionIfNull, canChangeTargetToPuppet); Util.ArrayAdd(ref conditionAxes, teleportConditionAxis); return teleportConditionAxis; } public bool CheckCondition() { TeleportConditionAxis[] array = conditionAxes; foreach (TeleportConditionAxis teleportConditionAxis in array) { if (teleportConditionAxis != null && !teleportConditionAxis.CheckAxis()) { Success = false; return Success; } } Success = true; return Success; } } public class TeleportConditionAxis { public Transform checkTarget; public Vector3 lastTargetPosition; public char axis = 'y'; public float value = -25f; public bool greater = false; public bool orEqual = false; public bool useLastTargetPositionIfNull = true; public bool canChangeTargetToPuppet = true; public bool Success { get; private set; } public TeleportConditionAxis(Transform checkTarget, char axis = 'y', float value = -25f, bool greater = false, bool orEqual = false, bool useLastTargetPositionIfNull = true, bool canChangeTargetToPuppet = true) { Success = false; this.checkTarget = checkTarget; this.axis = axis; this.value = value; this.greater = greater; this.orEqual = orEqual; this.useLastTargetPositionIfNull = useLastTargetPositionIfNull; this.canChangeTargetToPuppet = canChangeTargetToPuppet; if (axis != 'x' && axis != 'y' && axis != 'z') { Plugin.Logger.LogWarning((object)$"(new) TeleportConditionAxis must have axis 'x', 'y' or 'z', not {axis}. Resetting to 'y'"); this.axis = 'y'; } } public bool CheckAxis() { //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) if ((Object)(object)checkTarget == (Object)null && !useLastTargetPositionIfNull) { return false; } if ((Object)(object)checkTarget != (Object)null) { lastTargetPosition = checkTarget.position; } bool success; switch (axis) { case 'x': success = CheckX(); break; case 'y': success = CheckY(); break; case 'z': success = CheckZ(); break; default: Plugin.Logger.LogWarning((object)$"(FixedUpdate) TeleportConditionAxis must have axis 'x', 'y' or 'z', not {axis}. Resetting to 'y'"); axis = 'y'; success = CheckY(); break; } Success = success; return Success; } public bool CheckX() { bool flag = ((!greater) ? (lastTargetPosition.x < value) : (lastTargetPosition.x > value)); if (orEqual) { flag = flag || lastTargetPosition.x == value; } return flag; } public bool CheckY() { bool flag = ((!greater) ? (lastTargetPosition.y < value) : (lastTargetPosition.y > value)); if (orEqual) { flag = flag || lastTargetPosition.y == value; } return flag; } public bool CheckZ() { bool flag = ((!greater) ? (lastTargetPosition.z < value) : (lastTargetPosition.z > value)); if (orEqual) { flag = flag || lastTargetPosition.z == value; } return flag; } } public class ArenaDelay : MonoBehaviour { public float delay = 0f; public ActivateArena target = null; } public class ArenaLink : MonoBehaviour { public ActivateArena[] linkedArenas = Array.Empty(); public bool delete = true; public bool activated = false; public ArenaLink unclonedSelf = null; public void Update() { if (activated) { return; } ActivateArena[] array = linkedArenas; foreach (ActivateArena val in array) { if ((Object)(object)val != (Object)null && val.activated) { OnArenaActivated(val); break; } } } public void OnArenaActivated(ActivateArena arenaActivated = null) { ActivateArena[] array = linkedArenas; foreach (ActivateArena val in array) { bool flag = (Object)(object)arenaActivated != (Object)null && (Object)(object)val == (Object)(object)arenaActivated; if (!((Object)(object)val == (Object)null || flag)) { if (delete) { Object.Destroy((Object)(object)val); } else { val.Activate(); } } } activated = true; if ((Object)(object)unclonedSelf != (Object)null && (Object)(object)unclonedSelf != (Object)(object)this) { unclonedSelf.OnArenaActivated(); } } } public class AudioOnEnable : MonoBehaviour { public AudioSource audioSource; public void OnEnable() { if (!((Object)(object)audioSource == (Object)null)) { audioSource.Play(); } } } public class BackAndForth : MonoBehaviour { public float speed = 10f; public float startZ = 0f; public float endZ = -40f; public bool forward = true; public void FixedUpdate() { //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) //IL_0056: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_001a: 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_0037: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) Vector3 localPosition = ((Component)this).transform.localPosition; Vector3 val = default(Vector3); if (forward) { ((Vector3)(ref val))..ctor(localPosition.x, localPosition.y, endZ); ((Component)this).transform.localPosition = Vector3.MoveTowards(localPosition, val, speed * Time.deltaTime); } else { ((Vector3)(ref val))..ctor(localPosition.x, localPosition.y, startZ); ((Component)this).transform.localPosition = Vector3.MoveTowards(localPosition, val, speed * Time.deltaTime); } if (((Component)this).transform.localPosition == val) { forward = !forward; } } public BackAndForth Configure(float speed = 10f, float startZ = 0f, float endZ = -40f) { this.speed = speed; this.startZ = startZ; this.endZ = endZ; return this; } } public class BeamDelayHelper : MonoBehaviour { public float chargeUpTimeToSubtract = 0f; public bool subtracted = false; public ObjectActivator objectActivator = null; public void Subtract() { if (!subtracted) { ObjectActivator obj = objectActivator; obj.delay -= chargeUpTimeToSubtract; subtracted = true; } } } public class BreakableAllower : MonoBehaviour { public Breakable breakable; public List enemyBlocks = new List(); public void FixedUpdate() { if ((Object)(object)breakable == (Object)null) { return; } List list = new List(); foreach (EnemyBlockBreakables enemyBlock in enemyBlocks) { if ((Object)(object)enemyBlock == (Object)null || !((Behaviour)enemyBlock).enabled || (Object)(object)enemyBlock.eid == (Object)null || enemyBlock.eid.Dead) { list.Add(enemyBlock); Object.Destroy((Object)(object)enemyBlock); } else if (!enemyBlock.eid.Dead) { breakable.broken = true; RemoveEnemyBlocks(list); return; } } breakable.broken = false; RemoveEnemyBlocks(list); } public void RemoveEnemyBlocks(List toRemove) { foreach (EnemyBlockBreakables item in toRemove) { enemyBlocks.Remove(item); } } } public class CheckPointActivator : MonoBehaviour { public CheckPoint checkpoint; public void OnEnable() { if (!((Object)(object)checkpoint == (Object)null)) { checkpoint.activated = false; checkpoint.SetForceOff(false); checkpoint.SetInvisibility(false); checkpoint.ActivateCheckPoint(); } } } public class CheckPointConstantOff : MonoBehaviour { public CheckPoint checkpoint; public void FixedUpdate() { if (!((Object)(object)checkpoint == (Object)null) && !checkpoint.forceOff) { checkpoint.SetForceOff(true); checkpoint.SetInvisibility(true); checkpoint.unteleportable = true; } } } public class CheckPointToUpdate : MonoBehaviour { public Dictionary rooms = new Dictionary(); } public class CheckPointTurnOn : MonoBehaviour { public CheckPoint checkpoint; public void OnEnable() { if (!((Object)(object)checkpoint == (Object)null)) { checkpoint.activated = false; checkpoint.SetForceOff(false); } } } public class DontManipulateLight : MonoBehaviour { public Light targetLight; } public class DoorAltarHelper : MonoBehaviour { public Door door = null; public ItemPlaceZone[] itemPlaceZones = Array.Empty(); public bool reversed = false; public bool playerInArena = false; public void Update() { if (!playerInArena && !((Object)(object)door == (Object)null)) { ProcessDoor(CheckShouldUnlock()); } } public bool CheckShouldUnlock() { bool flag = true; bool flag2 = true; ItemPlaceZone[] array = itemPlaceZones; foreach (ItemPlaceZone val in array) { bool flag3 = (val.acceptedItemPlaced && !reversed) || (!val.acceptedItemPlaced && reversed); if (flag2) { flag = flag3; flag2 = false; } else if (flag3 != flag) { flag = reversed; break; } } return flag; } public void ProcessDoor(bool shouldUnlock) { if (shouldUnlock && door.locked) { door.Unlock(); door.Open(false, true); } else if (!shouldUnlock && !door.locked) { door.Lock(); door.Close(false); } } } public class DoorConstantLocker : MonoBehaviour { public Door door; public bool unlockOnDisable = true; public void FixedUpdate() { if (!((Object)(object)door == (Object)null) && !door.locked) { door.Lock(); } } public void OnDisable() { if (!((Object)(object)door == (Object)null) && unlockOnDisable) { door.Unlock(); } } } public class InheritRoomExceptions : MonoBehaviour { public string[] roomNames = Array.Empty(); } public class LightManipulator : MonoBehaviour { public float multiplier = 0.125f; public int dimmedCounter = 0; public bool invertColors = true; public bool ignoreEnemies = true; public void OnEnable() { DimLights(); } public void DimLights(bool reversed = false) { //IL_0121: 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_012d: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_00e7: Unknown result type (might be due to invalid IL or missing references) Light[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); Light[] array2 = array; foreach (Light val in array2) { if (ignoreEnemies && ((Object)(object)((Component)val).GetComponentInChildren() != (Object)null || (Object)(object)((Component)val).GetComponentInParent() != (Object)null)) { continue; } DontManipulateLight component = ((Component)val).GetComponent(); if (!((Object)(object)component != (Object)null) || !((Behaviour)component).enabled || !((Object)(object)component.targetLight == (Object)(object)val)) { val.intensity *= ((!reversed) ? multiplier : (1f / multiplier)); if (invertColors) { val.color = new Color(1f - val.color.r, 1f - val.color.g, 1f - val.color.b); } } } dimmedCounter += ((!reversed) ? 1 : (-1)); if (invertColors) { Color fogColor = RenderSettings.fogColor; RenderSettings.fogColor = new Color(1f - fogColor.r, 1f - fogColor.g, 1f - fogColor.b); } } public LightManipulator Configure(float multiplier = 0.125f, bool invertColors = true, bool ignoreEnemies = true) { this.multiplier = multiplier; this.invertColors = invertColors; this.ignoreEnemies = ignoreEnemies; return this; } } public class MusicSlower : MonoBehaviour { public float multiplier = 0.1f; public int slowedCounter = 0; public bool isGradualPitch = false; public float gradualPitchSpeed = 0.2f; public float gradualPitchMultiplierTarget = 1.25f; public Dictionary gradualPitchOriginals = new Dictionary(); public bool gradualPitchOriginalsSet = false; public void OnEnable() { Slow(); } public void Slow(bool reversed = false) { if (!((Object)(object)MonoSingleton.Instance == (Object)null)) { AudioSource[] allThemes = MonoSingleton.Instance.allThemes; foreach (AudioSource val in allThemes) { float num = AudioSourceExtensions.GetPitch(val) * ((!reversed) ? multiplier : (1f / multiplier)); AudioSourceExtensions.SetPitch(val, num); } slowedCounter += ((!reversed) ? 1 : (-1)); } } public void Update() { if (!isGradualPitch || (Object)(object)MonoSingleton.Instance == (Object)null) { return; } bool flag = true; AudioSource[] allThemes = MonoSingleton.Instance.allThemes; foreach (AudioSource val in allThemes) { int key = Array.IndexOf(MonoSingleton.Instance.allThemes, val); if (!gradualPitchOriginalsSet) { gradualPitchOriginals[key] = AudioSourceExtensions.GetPitch(val); } float num = Mathf.MoveTowards(AudioSourceExtensions.GetPitch(val), gradualPitchOriginals[key] * gradualPitchMultiplierTarget, gradualPitchSpeed * Time.deltaTime); AudioSourceExtensions.SetPitch(val, num); if (AudioSourceExtensions.GetPitch(val) != gradualPitchOriginals[key] * gradualPitchMultiplierTarget) { flag = false; } } if (!gradualPitchOriginalsSet) { gradualPitchOriginalsSet = true; } if (flag) { isGradualPitch = false; } } public void GradualPitchChange(float gradualPitchMultiplierTarget = 1.25f, float gradualPitchSpeed = 0.2f) { isGradualPitch = true; this.gradualPitchMultiplierTarget = gradualPitchMultiplierTarget; this.gradualPitchSpeed = gradualPitchSpeed; gradualPitchOriginalsSet = false; } } public class SimpleScrollingText : MonoBehaviour { public TMP_Text text; public float secondsBetweenLetters = 0.025f; public int totalCharacters; public bool running = true; public bool finished = false; public float cooldown = 0f; public bool isLevelName = false; public string stringLevelName = null; public TMP_Text textLevelName; public void Start() { if (text == null) { text = ((Component)this).GetComponent(); } Reset(); } public void Reset() { text.ForceMeshUpdate(true, true); totalCharacters = text.textInfo.characterCount; text.maxVisibleCharacters = 0; } public void Update() { if (!((Component)this).gameObject.activeInHierarchy || !running || finished) { return; } cooldown += Time.deltaTime; if (!(cooldown < secondsBetweenLetters)) { cooldown -= secondsBetweenLetters; TMP_Text obj = text; obj.maxVisibleCharacters += 1; if (isLevelName) { int length = Mathf.Min(2 + GetLastVisibleLetterIndex(), stringLevelName.Length); textLevelName.text = stringLevelName.Substring(0, length); } if (text.maxVisibleCharacters >= totalCharacters) { finished = true; running = false; } } } public int GetLastVisibleLetterIndex() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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) int result = -1; for (int num = text.textInfo.characterCount - 1; num >= 0; num--) { TMP_CharacterInfo val = text.textInfo.characterInfo[num]; if (val.isVisible) { result = val.index; break; } } return result; } } public class SimpleScrollingTextActivator : MonoBehaviour { public SimpleScrollingText simpleScrollingText; public void OnEnable() { simpleScrollingText.running = true; } public void OnDisable() { simpleScrollingText.running = false; } } [HarmonyPatch(typeof(ActivateArena), "Activate")] public class ActivateArenaPatch { public static bool Prefix(ActivateArena __instance) { if (!Util.IsPatched()) { return true; } if (DisableEnemySpawns.DisableArenaTriggers || __instance.activated) { return false; } __instance.activated = true; if (!__instance.onlyWave && !__instance.forEnemy) { MonoSingleton.Instance.ArenaMusicStart(true); } float num = -1f; ArenaDelay[] components = ((Component)__instance).GetComponents(); ArenaDelay[] array = components; foreach (ArenaDelay arenaDelay in array) { if (!((Object)(object)arenaDelay.target != (Object)(object)__instance)) { num = arenaDelay.delay; break; } } if (__instance.doors.Length != 0) { Door[] doors = __instance.doors; Door[] array2 = doors; foreach (Door val in array2) { if ((Object)(object)val != (Object)null) { if (!((Component)val).gameObject.activeSelf) { ((Component)val).gameObject.SetActive(true); } DoorAltarHelper componentInChildren = ((Component)val).GetComponentInChildren(); if (componentInChildren != null) { componentInChildren.playerInArena = true; } val.Lock(); } } if (__instance.enemies.Length != 0) { if (num < 0f) { ((MonoBehaviour)__instance).Invoke("SpawnEnemy", 1f); } else { ((MonoBehaviour)__instance).Invoke("SpawnEnemy", num); } } else { Object.Destroy((Object)(object)__instance); } } else if (__instance.enemies.Length != 0) { if (num < 0f) { __instance.SpawnEnemy(); } else { ((MonoBehaviour)__instance).Invoke("SpawnEnemy", num); } } else { Object.Destroy((Object)(object)__instance); } return false; } } [HarmonyPatch(typeof(ActivateNextWave))] public class ActivateNextWavePatch { [HarmonyPrefix] [HarmonyPatch(typeof(ActivateNextWave), "FixedUpdate")] public static bool FixedUpdatePrefix(ActivateNextWave __instance) { if (!Util.IsPatched()) { return true; } if (__instance.deadEnemies < 0) { __instance.deadEnemies = 0; } if (__instance.activated || __instance.deadEnemies < __instance.enemyCount) { return false; } __instance.activated = true; if (__instance.lastWave) { ((MonoBehaviour)__instance).Invoke("EndWaves", (float)((!__instance.noActivationDelay) ? 1 : 0)); if (!__instance.forEnemies) { MonoSingleton.Instance.SlowDown(0.15f); } return false; } if (__instance.toActivate.Length != 0) { GameObject[] toActivate = __instance.toActivate; GameObject[] array = toActivate; foreach (GameObject val in array) { if (val != null) { val.SetActive(true); } } } if (__instance.doors.Length != 0) { Door[] doors = __instance.doors; Door[] array2 = doors; foreach (Door val2 in array2) { if (!((Object)(object)val2 != (Object)null)) { continue; } DoorAltarHelper componentInChildren = ((Component)val2).GetComponentInChildren(); if (componentInChildren != null) { componentInChildren.playerInArena = false; } val2.Unlock(); if (componentInChildren != null) { Door door = componentInChildren.door; if (door != null) { door.Open(false, true); } } } } ((MonoBehaviour)__instance).Invoke("SpawnEnemy", (float)((!__instance.noActivationDelay) ? 1 : 0)); return false; } [HarmonyPrefix] [HarmonyPatch(typeof(ActivateNextWave), "EndWaves")] public static bool EndWavesPrefix(ActivateNextWave __instance) { if (!Util.IsPatched()) { return true; } if (__instance.toActivate.Length != 0 && !__instance.objectsActivated) { GameObject[] toActivate = __instance.toActivate; GameObject[] array = toActivate; foreach (GameObject val in array) { if (val != null) { val.SetActive(true); } } __instance.objectsActivated = true; __instance.EndWaves(); } else if (__instance.currentDoor < __instance.doors.Length) { Door val2 = __instance.doors[__instance.currentDoor]; DoorAltarHelper componentInChildren = ((Component)val2).GetComponentInChildren(); if (componentInChildren != null) { componentInChildren.playerInArena = false; } val2.Unlock(); if ((Object)(object)val2 == (Object)(object)__instance.doorForward) { val2.Open(false, true); } else if (componentInChildren != null) { Door door = componentInChildren.door; if (door != null) { door.Open(false, true); } } __instance.currentDoor++; ((MonoBehaviour)__instance).Invoke("EndWaves", 0.1f); } else { if (!__instance.forEnemies) { MonoSingleton.Instance.ArenaMusicEnd(); __instance.slowDown = 1f; } if (__instance.killChallenge) { MonoSingleton.Instance.ChallengeDone(); } Object.Destroy((Object)(object)__instance); } return false; } } [HarmonyPatch(typeof(CheckPoint))] public class CheckPointPatch { [CompilerGenerated] private sealed class d__1 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public CheckPoint __instance; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; case 1: <>1__state = -1; __instance.i = 0; __instance.UpdateRooms(); <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 2; return true; case 2: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [HarmonyPostfix] [HarmonyPatch(typeof(CheckPoint), "Start")] public static void StartPostfix(CheckPoint __instance) { if (!Util.IsPatched()) { return; } InheritRoomExceptions component = ((Component)__instance).GetComponent(); if ((Object)(object)component != (Object)null) { string[] roomNames = component.roomNames; foreach (string item in roomNames) { if (__instance.inheritNames.Contains(item)) { int index = __instance.inheritNames.IndexOf(item); __instance.roomsToInherit.RemoveAt(index); __instance.inheritNames.RemoveAt(index); __instance.inheritParents.RemoveAt(index); break; } } } CheckPointToUpdate component2 = ((Component)__instance).GetComponent(); if ((Object)(object)component2 == (Object)null || __instance.defaultRooms.Count == 0) { return; } foreach (int key in component2.rooms.Keys) { __instance.defaultRooms[key] = component2.rooms[key]; } ((MonoBehaviour)__instance).StartCoroutine(UpdateRooms(__instance)); } [IteratorStateMachine(typeof(d__1))] public static IEnumerator UpdateRooms(CheckPoint __instance) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1(0) { __instance = __instance }; } [HarmonyPrefix] [HarmonyPatch(typeof(CheckPoint), "ResetRoom")] public static bool ResetRoomPrefix(CheckPoint __instance) { //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_00bb: 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_0223: Unknown result type (might be due to invalid IL or missing references) //IL_022e: 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_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0255: 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_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: 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_02b2: 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_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: 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) //IL_0302: 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_0399: Invalid comparison between Unknown and I4 //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_040f: 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_0446: Unknown result type (might be due to invalid IL or missing references) //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04c7: Invalid comparison between Unknown and I4 //IL_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_04f8: Unknown result type (might be due to invalid IL or missing references) //IL_0513: Unknown result type (might be due to invalid IL or missing references) //IL_053f: Unknown result type (might be due to invalid IL or missing references) if (!Util.IsPatched()) { return true; } if ((Object)(object)__instance.newRooms[__instance.i] != (Object)null && (Object)(object)__instance.defaultRooms[__instance.i] != (Object)null) { Vector3 position = __instance.newRooms[__instance.i].transform.position; __instance.newRooms[__instance.i].SetActive(false); Object.Destroy((Object)(object)__instance.newRooms[__instance.i]); __instance.newRooms[__instance.i] = Object.Instantiate(__instance.defaultRooms[__instance.i], position, __instance.defaultRooms[__instance.i].transform.rotation, __instance.defaultRooms[__instance.i].transform.parent); __instance.newRooms[__instance.i].SetActive(true); Bonus[] componentsInChildren = __instance.newRooms[__instance.i].GetComponentsInChildren(true); if (componentsInChildren != null && componentsInChildren.Length != 0) { Bonus[] array = componentsInChildren; for (int i = 0; i < array.Length; i++) { array[i].UpdateStatsManagerReference(); } } } if (__instance.i + 1 < __instance.defaultRooms.Count) { __instance.i++; __instance.ResetRoom(); return false; } if (Object.op_Implicit((Object)(object)__instance.toActivate)) { __instance.toActivate.SetActive(true); } UnityEvent onRestart = __instance.onRestart; if (onRestart != null) { onRestart.Invoke(); } if (!__instance.activated) { __instance.activated = true; if (Object.op_Implicit((Object)(object)__instance.graphic)) { __instance.graphic.SetActive(false); } } __instance.player.transform.position = ((Component)__instance).transform.position + ((Component)__instance).transform.up * 1.25f; Rigidbody component = __instance.player.GetComponent(); component.velocity = Vector3.zero; if ((Object)(object)__instance.nm == (Object)null) { __instance.nm = MonoSingleton.Instance; } CameraController cc = __instance.nm.cc; PhysicsExtensions.SetCustomGravityMode(__instance.nm.rb, false); cc.gravityRotation = Quaternion.identity; Vector3 gravity = Physics.gravity; cc.gravityVec = ((Vector3)(ref gravity)).normalized; cc.rotationOffset = Quaternion.identity; cc.transitionRotationZ = 0f; cc.transitionRotationZSmooth = 0f; cc.tiltRotationZ = 0f; cc.tiltRotationZSmooth = 0f; Quaternion rotation = ((Component)__instance).transform.rotation; float num = ((Quaternion)(ref rotation)).eulerAngles.y + 0.01f + __instance.additionalSpawnRotation; if (Object.op_Implicit((Object)(object)__instance.player) && Object.op_Implicit((Object)(object)__instance.player.transform.parent) && ((Component)__instance.player.transform.parent).gameObject.CompareTag("Moving")) { float num2 = num; rotation = __instance.player.transform.parent.rotation; num = num2 - ((Quaternion)(ref rotation)).eulerAngles.y; } if ((int)MonoSingleton.Instance.playerType == 0) { cc.ResetCamera(num, 0f); } else { MonoSingleton.Instance.ResetCamera(num, 0f); } cc.ApplyRotations(false); PhysicsExtensions.SetCustomGravity(__instance.nm.rb, __instance.gravity); PhysicsExtensions.SetCustomGravityMode(__instance.nm.rb, true); __instance.nm.gc.heavyFall = false; cc.Transform(Matrix4x4.identity, (Vector3?)__instance.gravity, (Quaternion?)null); MonoSingleton.Instance.activated = true; component.position = ((Component)__instance).transform.position + ((Component)__instance).transform.up * 1.25f; if (!((Behaviour)__instance.nm).enabled) { ((Behaviour)__instance.nm).enabled = true; } __instance.nm.Respawn(); __instance.nm.GetHealth(0, true, false, true); __instance.nm.cc.StopShake(); __instance.nm.ActivatePlayer(); if ((int)MonoSingleton.Instance.playerType == 1) { ((Component)MonoSingleton.Instance).transform.position = ((Component)__instance).transform.position; MonoSingleton.Instance.rb.velocity = Vector3.zero; MonoSingleton.Instance.playerModel.rotation = ((Component)__instance).transform.rotation; if (__instance.additionalSpawnRotation != 0f) { MonoSingleton.Instance.playerModel.Rotate(Vector3.up, __instance.additionalSpawnRotation); } ((Component)MonoSingleton.Instance).gameObject.SetActive(true); MonoSingleton.Instance.SnapCamera(); MonoSingleton.Instance.Respawn(); MonoSingleton.Instance.ResetUnsavedStuff(); } return false; } [HarmonyPrefix] [HarmonyPatch(typeof(CheckPoint), "UpdateRooms")] public static void UpdateRoomsPrefix(CheckPoint __instance) { if (!((Object)(object)__instance.defaultRooms[__instance.i].GetComponent() != (Object)null)) { if (__instance.i + 1 < __instance.defaultRooms.Count) { __instance.i++; __instance.UpdateRooms(); } else { __instance.i = 0; } } } [HarmonyPrefix] [HarmonyPatch(typeof(CheckPoint), "ActivateCheckPoint")] public static bool ActivateCheckPointPrefix(CheckPoint __instance) { //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_00de: 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) if (!Util.IsPatched()) { return true; } __instance.sm = MonoSingleton.Instance; __instance.inDuringResetSafety = false; if (Object.op_Implicit((Object)(object)__instance.sm.currentCheckPoint) && (Object)(object)__instance.sm.currentCheckPoint != (Object)(object)__instance) { MonoSingleton.Instance.sameCheckpointRestarts = 0; if (__instance.sm.currentCheckPoint.resetOnGetOtherCheckpoint) { __instance.sm.currentCheckPoint.ReactivateCheckpoint(); } } __instance.gravity = PhysicsExtensions.GetGravityVector(MonoSingleton.Instance.rb); __instance.sm.currentCheckPoint = __instance; __instance.activated = true; if (!__instance.invisible && __instance.activateEffect.RuntimeKeyIsValid()) { Object.Instantiate(AddressablesExtensions.ToAsset(__instance.activateEffect), MonoSingleton.Instance.GetPlayer().position, Quaternion.identity); } if (Object.op_Implicit((Object)(object)__instance.graphic)) { __instance.graphic.SetActive(false); } if (Object.op_Implicit((Object)(object)MonoSingleton.Instance)) { MonoSingleton.Instance.SaveStuff(); } if (Object.op_Implicit((Object)(object)MonoSingleton.Instance)) { MonoSingleton.Instance.StashStore(); } __instance.stylePoints = __instance.sm.stylePoints; __instance.restartKills = 0; if (Object.op_Implicit((Object)(object)MonoSingleton.Instance)) { __instance.challengeAlreadyFailed = MonoSingleton.Instance.challengeFailed; } if (Object.op_Implicit((Object)(object)MonoSingleton.Instance)) { __instance.challengeAlreadyDone = MonoSingleton.Instance.challengeDone; } if (!__instance.firstTime) { __instance.defaultRooms.Clear(); __instance.newRooms.Clear(); if (__instance.rooms.Length != 0) { GameObject[] rooms = __instance.rooms; GameObject[] array = rooms; foreach (GameObject val in array) { __instance.roomsToInherit.Add(val); __instance.inheritNames.Add(((Object)val).name); __instance.inheritParents.Add(val.transform.parent); } __instance.rooms = (GameObject[])(object)new GameObject[0]; } } if ((Object)(object)__instance.shud == (Object)null) { __instance.shud = MonoSingleton.Instance; } InheritCheckpointRooms(__instance); MonoSingleton.Instance.SaveBloodstains(); __instance.firstTime = false; return false; } public static void InheritCheckpointRooms(CheckPoint __instance) { if (__instance.roomsToInherit.Count == 0) { return; } for (int i = 0; i < __instance.roomsToInherit.Count; i++) { string text = __instance.inheritNames[i]; text = text.Replace("(Clone)", ""); GameObject val = null; if (!((Object)(object)__instance.inheritParents[i] == (Object)null)) { for (int num = __instance.inheritParents[i].childCount - 1; num >= 0; num--) { GameObject gameObject = ((Component)__instance.inheritParents[i].GetChild(num)).gameObject; if (((Object)gameObject).name.Replace("(Clone)", "") == text) { if ((Object)(object)val == (Object)null) { val = gameObject; } else { Object.Destroy((Object)(object)gameObject); } } } } if ((Object)(object)val != (Object)null && (Object)(object)val.GetComponent() != (Object)null) { __instance.InheritRoom(val); } } } } [HarmonyPatch(typeof(ItemPlaceZone))] public class ItemPlaceZonePatch { [HarmonyPrefix] [HarmonyPatch(typeof(ItemPlaceZone), "CheckItem")] public static bool CheckItemPrefix(bool prelim, ItemPlaceZone __instance) { //IL_0030: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0472: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Unknown result type (might be due to invalid IL or missing references) //IL_0503: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Unknown result type (might be due to invalid IL or missing references) if (!Util.IsPatched()) { return true; } ItemIdentifier componentInChildren = ((Component)__instance).GetComponentInChildren(); GameObject[] activateOnSuccess; Door[] doors; InstantiateObject[] altarElements; if ((Object)(object)componentInChildren != (Object)null) { if (componentInChildren.itemType == __instance.acceptedItemType) { if (!prelim && !__instance.hideEffects && !__instance.acceptedItemPlaced) { if (Object.op_Implicit((Object)(object)__instance.elementChangeEffect)) { __instance.elementChangeEffect.Play(); } if (Object.op_Implicit((Object)(object)__instance.soundOnActivated)) { Object.Instantiate(__instance.soundOnActivated, ((Component)__instance).transform.position, Quaternion.identity); } } __instance.acceptedItemPlaced = true; componentInChildren.ipz = __instance; if (!__instance.hideEffects) { ((Component)componentInChildren).SendMessage("OnCorrectUse", (SendMessageOptions)1); } activateOnSuccess = __instance.activateOnSuccess; for (int i = 0; i < activateOnSuccess.Length; i++) { activateOnSuccess[i].SetActive(true); } activateOnSuccess = __instance.deactivateOnSuccess; for (int j = 0; j < activateOnSuccess.Length; j++) { activateOnSuccess[j].SetActive(false); } doors = __instance.doors; foreach (Door val in doors) { DoorAltarHelper componentInChildren2 = ((Component)val).GetComponentInChildren(); if ((Object)(object)componentInChildren2 == (Object)null) { val.Open(false, true); } } doors = __instance.reverseDoors; foreach (Door val2 in doors) { DoorAltarHelper componentInChildren3 = ((Component)val2).GetComponentInChildren(); if ((Object)(object)componentInChildren3 == (Object)null) { val2.Close(false); } } if (!__instance.hideEffects) { altarElements = __instance.altarElements; InstantiateObject[] array = altarElements; foreach (InstantiateObject val3 in array) { ((Component)val3).gameObject.SetActive(true); if (!prelim && ((Component)val3).gameObject.activeInHierarchy) { val3.Instantiate(); } } } if (!prelim) { ArenaStatus[] arenaStatuses = __instance.arenaStatuses; foreach (ArenaStatus obj in arenaStatuses) { obj.currentStatus++; } arenaStatuses = __instance.reverseArenaStatuses; foreach (ArenaStatus obj2 in arenaStatuses) { obj2.currentStatus--; } } } else { activateOnSuccess = __instance.activateOnFailure; for (int num2 = 0; num2 < activateOnSuccess.Length; num2++) { activateOnSuccess[num2].SetActive(true); } } if (Object.op_Implicit((Object)(object)__instance.col)) { __instance.col.enabled = false; } return false; } if (Object.op_Implicit((Object)(object)__instance.col)) { __instance.col.enabled = true; } if (!prelim && !__instance.acceptedItemPlaced) { return false; } activateOnSuccess = __instance.activateOnSuccess; for (int num3 = 0; num3 < activateOnSuccess.Length; num3++) { activateOnSuccess[num3].SetActive(false); } activateOnSuccess = __instance.activateOnFailure; for (int num4 = 0; num4 < activateOnSuccess.Length; num4++) { activateOnSuccess[num4].SetActive(false); } activateOnSuccess = __instance.deactivateOnSuccess; for (int num5 = 0; num5 < activateOnSuccess.Length; num5++) { activateOnSuccess[num5].SetActive(true); } doors = __instance.doors; Door[] array2 = doors; foreach (Door val4 in array2) { DoorAltarHelper componentInChildren4 = ((Component)val4).GetComponentInChildren(); if ((Object)(object)componentInChildren4 == (Object)null && ((int)val4.doorType != 0 || ((Component)val4).transform.localPosition != val4.closedPos)) { val4.Close(false); } } doors = __instance.reverseDoors; Door[] array3 = doors; foreach (Door val5 in array3) { DoorAltarHelper componentInChildren5 = ((Component)val5).GetComponentInChildren(); if ((Object)(object)componentInChildren5 == (Object)null && ((int)val5.doorType != 0 || ((Component)val5).transform.localPosition != val5.closedPos + val5.openPos)) { val5.Open(false, true); } } if (!prelim) { __instance.acceptedItemPlaced = false; if (!__instance.hideEffects) { if (Object.op_Implicit((Object)(object)__instance.elementChangeEffect)) { __instance.elementChangeEffect.Play(); } if (Object.op_Implicit((Object)(object)__instance.soundOnDeactivated)) { Object.Instantiate(__instance.soundOnDeactivated, ((Component)__instance).transform.position, Quaternion.identity); } } ArenaStatus[] arenaStatuses2 = __instance.arenaStatuses; foreach (ArenaStatus obj3 in arenaStatuses2) { obj3.currentStatus--; } arenaStatuses2 = __instance.reverseArenaStatuses; foreach (ArenaStatus obj4 in arenaStatuses2) { obj4.currentStatus++; } } altarElements = __instance.altarElements; for (int num10 = 0; num10 < altarElements.Length; num10++) { ((Component)altarElements[num10]).gameObject.SetActive(false); } return false; } } [HarmonyPatch(/*Could not decode attribute arguments.*/)] public class LeaderboardPatch { public static bool Prefix(ref bool __result) { if (!Util.IsPatched()) { return true; } __result = false; return false; } } [HarmonyPatch(typeof(GetMissionName), "GetMissionNameOnly")] public class GetMissionNamePatch { public static void Postfix(int missionNum, ref string __result) { if (!Util.IsEnabled() || !ChangedInfo.ChangedLevels.Contains(missionNum)) { return; } __result += " (NEMESIS)"; foreach (string key in ChangedInfo.NewLevelNames.Keys) { if (!__result.Contains(key)) { continue; } __result = __result.Replace(key, ChangedInfo.NewLevelNames[key]); break; } } } [HarmonyPatch(typeof(MapInfoBase), "Awake")] public class MapInfoBasePatch { public static void Postfix(MapInfoBase __instance) { if (!Util.IsEnabled() || !ChangedInfo.ChangedScenes.Contains(SceneHelper.CurrentScene)) { return; } __instance.levelName += " (NEMESIS)"; foreach (string key in ChangedInfo.NewLevelNames.Keys) { if (!__instance.levelName.Contains(key)) { continue; } __instance.levelName = __instance.levelName.Replace(key, ChangedInfo.NewLevelNames[key]); break; } } } [HarmonyPatch(typeof(StockMapInfo), "Awake")] public class StockMapInfoPatch { public static void Postfix(StockMapInfo __instance) { if (!Util.IsEnabled() || !ChangedInfo.ChangedScenes.Contains(SceneHelper.CurrentScene)) { return; } __instance.assets.LargeText += " (NEMESIS)"; foreach (string key in ChangedInfo.NewLevelNames.Keys) { if (!__instance.assets.LargeText.Contains(key)) { continue; } __instance.assets.LargeText = __instance.assets.LargeText.Replace(key, ChangedInfo.NewLevelNames[key]); break; } } } [HarmonyPatch(typeof(LevelStats), "Start")] public class LevelStatsPatch { public static void Postfix(LevelStats __instance) { if (!Util.IsEnabled() || !ChangedInfo.ChangedScenes.Contains(SceneHelper.CurrentScene)) { return; } __instance.levelName.text = __instance.levelName.text.Replace("(NEMESIS)", "(NEMESIS)"); foreach (string key in ChangedInfo.NewLevelNames.Keys) { if (!__instance.levelName.text.Contains(key)) { continue; } __instance.levelName.text = __instance.levelName.text.Replace(key, ChangedInfo.NewLevelNames[key]); break; } } } [HarmonyPatch] public class LevelNamePopupPatch { [CompilerGenerated] private sealed class d__2 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public LevelNamePopup __instance; private SimpleScrollingText 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__2(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = ComponentExtensions.GetOrAddComponent((Component)(object)__instance.nameText); 5__1.running = false; 5__1.text = __instance.nameText; ((Component)5__1).GetComponent().text = __instance.nameString; 5__1.Reset(); 5__1.secondsBetweenLetters = 0.015f; __instance.countTime = true; __instance.currentLetter = 0; AudioSourceExtensions.Play(__instance.aud, true); 5__1.running = true; goto IL_00fb; case 1: <>1__state = -1; goto IL_00fb; case 2: { <>1__state = -1; __instance.fadingOut = true; __instance.nameAppearRoutine = null; return false; } IL_00fb: if (!5__1.finished) { <>2__current = (object)new WaitForSeconds(0.015f); <>1__state = 1; return true; } __instance.currentLetter = __instance.nameString.Length + 1; __instance.countTime = false; __instance.aud.Stop(); <>2__current = (object)new WaitForSeconds(3f); <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public LevelNamePopup __instance; private SimpleScrollingText 5__1; private GameObject 5__2; private TextMeshProUGUI 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_00b6: 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_017a: Expected O, but got Unknown //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = ComponentExtensions.GetOrAddComponent((Component)(object)__instance.nameText); 5__1.running = false; 5__1.isLevelName = true; 5__2 = new GameObject("Nemesis TextPlaceholder"); 5__2.transform.SetParent(((Component)__instance).transform); 5__3 = 5__2.AddComponent(); ((Graphic)5__3).color = new Color(1f, 1f, 1f, 0f); ((TMP_Text)5__3).text = __instance.nameString; 5__1.text = (TMP_Text)(object)5__3; 5__1.stringLevelName = __instance.nameString; 5__1.textLevelName = __instance.nameText; 5__1.Reset(); 5__1.secondsBetweenLetters = 0.015f; __instance.countTime = true; __instance.currentLetter = 0; AudioSourceExtensions.Play(__instance.aud, true); 5__1.running = true; goto IL_018b; case 1: <>1__state = -1; goto IL_018b; case 2: { <>1__state = -1; __instance.fadingOut = true; __instance.nameAppearRoutine = null; return false; } IL_018b: if (!5__1.finished) { <>2__current = (object)new WaitForSeconds(0.015f); <>1__state = 1; return true; } __instance.currentLetter = __instance.nameString.Length + 1; __instance.countTime = false; __instance.aud.Stop(); <>2__current = (object)new WaitForSeconds(3f); <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [HarmonyPrefix] [HarmonyPatch(typeof(LevelNamePopup), "ShowNameText")] public static bool ShowNameTextPrefix(LevelNamePopup __instance, ref IEnumerator __result) { if (!Util.IsPatched()) { return true; } __result = NewerShowNameText(__instance); return false; } [IteratorStateMachine(typeof(d__1))] public static IEnumerator NewerShowNameText(LevelNamePopup __instance) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1(0) { __instance = __instance }; } [IteratorStateMachine(typeof(d__2))] public static IEnumerator NewShowNameText(LevelNamePopup __instance) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__2(0) { __instance = __instance }; } } [HarmonyPatch(typeof(DiscordController), "FetchSceneActivity")] public class DiscordPatch { public static bool Prefix(string scene, DiscordController __instance) { //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_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_00ae: 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_0277: 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_0287: 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_0122: Unknown result type (might be due to invalid IL or missing references) if (!Util.IsPatched()) { return true; } if (!Object.op_Implicit((Object)(object)DiscordController.Instance) || DiscordController.Instance.disabled || DiscordController.Instance.discord == null) { return false; } __instance.ResetActivityCache(); if (SceneHelper.IsPlayingCustom) { __instance.cachedActivity.State = "Playing Custom Level"; __instance.cachedActivity.Assets = ((SerializedActivityAssets)(ref __instance.customLevelActivityAssets)).Deserialize(); } else { StockMapInfo instance = StockMapInfo.Instance; if (Object.op_Implicit((Object)(object)instance)) { __instance.cachedActivity.Assets = ((SerializedActivityAssets)(ref instance.assets)).Deserialize(); if (string.IsNullOrEmpty(__instance.cachedActivity.Assets.LargeImage)) { __instance.cachedActivity.Assets.LargeImage = ((SerializedActivityAssets)(ref __instance.missingActivityAssets)).Deserialize().LargeImage; } if (string.IsNullOrEmpty(__instance.cachedActivity.Assets.LargeText)) { __instance.cachedActivity.Assets.LargeText = ((SerializedActivityAssets)(ref __instance.missingActivityAssets)).Deserialize().LargeText; } } else { __instance.cachedActivity.Assets = ((SerializedActivityAssets)(ref __instance.missingActivityAssets)).Deserialize(); } foreach (string key in ChangedInfo.PlainLevelNames.Keys) { if (!__instance.cachedActivity.Assets.LargeText.Contains(key)) { continue; } __instance.cachedActivity.Assets.LargeText = __instance.cachedActivity.Assets.LargeText.Replace(key, ChangedInfo.PlainLevelNames[key]); break; } if (scene == "Main Menu") { __instance.cachedActivity.State = "Main Menu"; } else { __instance.cachedActivity.State = "(NEMESIS) "; ref string state = ref __instance.cachedActivity.State; state = state + "DIFFICULTY: " + MonoSingleton.Instance.diffNames[MonoSingleton.Instance.GetInt("difficulty", 0)]; } } DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); long start = (long)(DateTime.UtcNow - dateTime).TotalSeconds; __instance.cachedActivity.Timestamps = new ActivityTimestamps { Start = start }; __instance.SendActivity(); return false; } } [HarmonyPatch(typeof(SteamController), "FetchSceneActivity")] public static class SteamPatch { public static bool Prefix(string scene) { //IL_00e5: 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) if (!Util.IsPatched()) { return true; } if (!SteamClient.IsValid) { return false; } if (SceneHelper.IsPlayingCustom) { SteamFriends.SetRichPresence("steam_display", "#AtCustomLevel"); return false; } StockMapInfo instance = StockMapInfo.Instance; if (scene == "Main Menu") { SteamFriends.SetRichPresence("steam_display", "#AtMainMenu"); } else if (scene == "Endless") { SteamFriends.SetRichPresence("steam_display", "#AtCyberGrind"); SteamFriends.SetRichPresence("difficulty", MonoSingleton.Instance.diffNames[MonoSingleton.Instance.GetInt("difficulty", 0)]); SteamFriends.SetRichPresence("wave", "0"); } else if ((Object)(object)instance != (Object)null && !string.IsNullOrEmpty(((SerializedActivityAssets)(ref instance.assets)).Deserialize().LargeText)) { SteamFriends.SetRichPresence("steam_display", "#AtStandardLevel"); SteamFriends.SetRichPresence("difficulty", MonoSingleton.Instance.diffNames[MonoSingleton.Instance.GetInt("difficulty", 0)]); string text = ((SerializedActivityAssets)(ref instance.assets)).Deserialize().LargeText; foreach (string key in ChangedInfo.PlainLevelNames.Keys) { if (!text.Contains(key)) { continue; } text = text.Replace(key, ChangedInfo.PlainLevelNames[key]); break; } SteamFriends.SetRichPresence("level", text); } else { SteamFriends.SetRichPresence("steam_display", "#UnknownLevel"); } return false; } } [HarmonyPatch(/*Could not decode attribute arguments.*/)] public class GameProgressSaverPatch { [HarmonyPriority(0)] public static void Postfix(out string path, int lvl, bool returnNull, RankData __instance, ref RankData __result) { path = ((lvl < 0) ? GameProgressSaver.resolveCurrentLevelPath : GameProgressSaver.LevelProgressPath(lvl)); if (__result == null) { return; } int value = ((lvl < 0) ? MonoSingleton.Instance.levelNumber : lvl); if (ChangedInfo.ChangedLevels.Contains(value) && Util.IsEnabled()) { Plugin.forceDefaultLevelPath = true; string text = ((lvl < 0) ? GameProgressSaver.resolveCurrentLevelPath : GameProgressSaver.LevelProgressPath(lvl)); Plugin.forceDefaultLevelPath = false; string text2 = ((lvl < 0) ? GameProgressSaver.resolveCurrentLevelPath : GameProgressSaver.LevelProgressPath(lvl)); path = text2; object obj = GameProgressSaver.ReadFile(text); RankData val = (RankData)((obj is RankData) ? obj : null); if (val != null) { __result.challenge = val.challenge; } } } } [HarmonyPatch(typeof(GameProgressSaver), "LevelProgressPath")] public class LevelProgressPathPatch { [HarmonyPriority(0)] public static void Postfix(int lvl, ref string __result) { string[] array = Path.GetFileName(__result).Split("."); if (array.Length != 0) { if (!ChangedInfo.ChangedLevels.Contains(lvl) || !Util.IsEnabled() || Plugin.forceDefaultLevelPath) { array[0] = array[0].Replace("_nemesis", ""); __result = Path.Join(Path.GetDirectoryName(__result).AsSpan(), string.Join(".", array).AsSpan()); Plugin.forceDefaultLevelPath = false; } else if (!__result.Contains("_nemesis")) { array[0] += "_nemesis"; __result = Path.Join(Path.GetDirectoryName(__result).AsSpan(), string.Join(".", array).AsSpan()); } } } } [HarmonyPatch(/*Could not decode attribute arguments.*/)] public class RankDataConstructorPatch { public static void Postfix(StatsManager sman, RankData __instance) { Plugin.forceDefaultLevelPath = true; RankData rank = GameProgressSaver.GetRank(true, -1); Plugin.forceDefaultLevelPath = false; if (rank != null) { __instance.challenge = rank.challenge; } } } public static class LevelAssets { public static Dictionary Enemies = new Dictionary { ["Filth"] = null, ["Stray"] = null, ["Stalker"] = null, ["Schism"] = null, ["Soldier"] = null, ["Insurrectionist"] = null, ["Ferryman"] = null, ["MirrorReaper"] = null, ["Drone"] = null, ["Streetcleaner"] = null, ["Swordsmachine"] = null, ["Mindflayer"] = null, ["Sentry"] = null, ["Gutterman"] = null, ["Guttertank"] = null, ["RocketLauncher"] = null, ["RocketLauncherNoStand"] = null, ["Mortar"] = null, ["Tower"] = null, ["MaliciousFace"] = null, ["Cerberus"] = null, ["CerberusStatue"] = null, ["CerberusStatueWhite"] = null, ["Idol"] = null, ["Mannequin"] = null, ["MannequinPoser"] = null, ["Deathcatcher"] = null, ["DeathcatcherCase"] = null, ["DeathcatcherClosed"] = null, ["HideousMass"] = null, ["Virtue"] = null, ["Providence"] = null, ["Power"] = null, ["PowerNoEffect"] = null, ["Eye"] = null, ["EyeYellow"] = null, ["EyeMalicious"] = null, ["VeryCancerousRodent"] = null, ["BombSpawner"] = null, ["BombSpawnerBreaker"] = null, ["BombSpawnerGutterman"] = null, ["BombSpawnerGuttertank"] = null }; public static Dictionary Objects = new Dictionary { ["Checkpoint"] = null, ["CheckpointReusable"] = null, ["Altar"] = null, ["AltarBlue"] = null, ["AltarRed"] = null, ["AltarTorch"] = null, ["HookpointGreen"] = null, ["HookpointBlue"] = null, ["HookpointYellow"] = null, ["HookpointProvidence"] = null, ["JumpPad"] = null, ["JumpPadSmall"] = null, ["JumpPadSteam"] = null, ["ElectricityBox"] = null, ["TeslaCoils"] = null, ["SuicideTree"] = null, ["Terminal"] = null, ["TerminalTestament"] = null, ["TerminalPrime"] = null, ["TerminalPrime1"] = null, ["Plank"] = null, ["PlankBlocker"] = null, ["GlassFloor"] = null, ["GlassWall"] = null, ["GlassWall2"] = null, ["Speakers"] = null, ["SpeakersChime"] = null, ["Breakable"] = null, ["ScreenUsable"] = null, ["ScreenInteractive"] = null, ["ScreenInteractiveButton"] = null, ["ScreenInteractiveStand"] = null, ["ScreenPuzzle"] = null, ["ScreenPuzzle5x5"] = null, ["PierPlatform"] = null, ["PierSegment"] = null, ["PierStairs"] = null, ["Crusher"] = null, ["CrusherBad"] = null, ["Fan"] = null, ["Grinder"] = null, ["EnergyBeam"] = null, ["BrainBeam"] = null, ["BrainBeamObstacle"] = null }; public static Dictionary Particles = new Dictionary { ["Break"] = null, ["BreakBig"] = null, ["BreakMetal"] = null }; public static Dictionary DebugObjects = new Dictionary { ["AxisPoint"] = null }; public static Dictionary AudioClips = new Dictionary { ["Shutdown"] = null }; public static object[] Things = Array.Empty(); public static T Ass(string path) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Addressables.LoadAssetAsync((object)path).WaitForCompletion(); } public static GameObject AssGO(string path) { return Ass(path); } public static void GetAssets() { GetEnemiesHusks(); GetEnemiesMachines(); GetEnemiesDemons(); GetEnemiesAngels(); GetEnemiesOther(); GetObjectsMain(); GetObjectsSecondary(); GetObjectsObstacles(); GetParticles(); GetAudioClips(); GetDebugObjects(); } public static void GetEnemiesHusks() { Enemies["Filth"] = AssGO("Assets/Prefabs/Enemies/Filth.prefab"); Enemies["Stray"] = AssGO("Assets/Prefabs/Enemies/Stray.prefab"); Enemies["Stalker"] = AssGO("Assets/Prefabs/Enemies/Stalker.prefab"); Enemies["Schism"] = AssGO("Assets/Prefabs/Enemies/Schism.prefab"); Enemies["Soldier"] = AssGO("Assets/Prefabs/Enemies/Soldier.prefab"); Enemies["Insurrectionist"] = AssGO("Assets/Prefabs/Enemies/Sisyphus.prefab"); Enemies["Ferryman"] = AssGO("Assets/Prefabs/Enemies/Ferryman.prefab"); Enemies["MirrorReaper"] = AssGO("Assets/Prefabs/Enemies/MirrorReaperCyberGrind.prefab"); } public static void GetEnemiesMachines() { Enemies["Drone"] = AssGO("Assets/Prefabs/Enemies/Drone.prefab"); Enemies["Streetcleaner"] = AssGO("Assets/Prefabs/Enemies/Streetcleaner.prefab"); Enemies["Swordsmachine"] = AssGO("Assets/Prefabs/Enemies/SwordsMachine NonBoss.prefab"); Enemies["Mindflayer"] = AssGO("Assets/Prefabs/Enemies/Mindflayer.prefab"); Enemies["Sentry"] = AssGO("Assets/Prefabs/Enemies/Turret.prefab"); Enemies["Gutterman"] = AssGO("Assets/Prefabs/Enemies/Gutterman.prefab"); Enemies["Guttertank"] = AssGO("Assets/Prefabs/Enemies/Guttertank.prefab"); Enemies["RocketLauncher"] = AssGO("Assets/Prefabs/Enemies/CentaurRocketLauncherStand.prefab"); Enemies["RocketLauncherNoStand"] = AssGO("Assets/Prefabs/Enemies/CentaurRocketLauncher.prefab"); Enemies["Mortar"] = AssGO("Assets/Prefabs/Enemies/CentaurMortar.prefab"); Enemies["Tower"] = AssGO("Assets/Prefabs/Enemies/CentaurTower.prefab"); } public static void GetEnemiesDemons() { Enemies["MaliciousFace"] = AssGO("Assets/Prefabs/Enemies/Malicious Face.prefab"); Enemies["Cerberus"] = AssGO("Assets/Prefabs/Enemies/Cerberus.prefab"); Enemies["CerberusStatue"] = AssGO("Assets/Prefabs/Enemies/CerberusStatue.prefab"); Enemies["CerberusStatueWhite"] = AssGO("Assets/Prefabs/Enemies/CerberusStatueWhite.prefab"); Enemies["Idol"] = AssGO("Assets/Prefabs/Enemies/Idol.prefab"); Enemies["Mannequin"] = AssGO("Assets/Prefabs/Enemies/Mannequin.prefab"); Enemies["MannequinPoser"] = AssGO("Assets/Prefabs/Enemies/MannequinPoserWithEnemy.prefab"); Enemies["Deathcatcher"] = AssGO("Assets/Prefabs/Enemies/Deathcatcher.prefab"); Enemies["DeathcatcherCase"] = AssGO("Assets/Prefabs/Enemies/DeathcatcherCase.prefab"); Enemies["DeathcatcherClosed"] = AssGO("Assets/Prefabs/Enemies/DeathcatcherClosed.prefab"); Enemies["HideousMass"] = AssGO("Assets/Prefabs/Enemies/Mass.prefab"); } public static void GetEnemiesAngels() { Enemies["Virtue"] = AssGO("Assets/Prefabs/Enemies/Virtue.prefab"); Enemies["Providence"] = AssGO("Assets/Prefabs/Enemies/Providence.prefab"); Enemies["Power"] = AssGO("Assets/Prefabs/Enemies/PowerWithSpawnEffect.prefab"); Enemies["PowerNoEffect"] = AssGO("Assets/Prefabs/Enemies/Power.prefab"); } public static void GetEnemiesOther() { Enemies["Eye"] = ((Component)AssGO("Assets/Prefabs/Enemies/DroneFlesh.prefab").AddComponent()).gameObject; Enemies["EyeYellow"] = ((Component)AssGO("Assets/Prefabs/Enemies/DroneFleshCamera Variant.prefab").AddComponent()).gameObject; Enemies["EyeMalicious"] = ((Component)AssGO("Assets/Prefabs/Enemies/DroneSkull Variant.prefab").AddComponent()).gameObject; Enemies["VeryCancerousRodent"] = AssGO("Assets/Prefabs/Enemies/Very Cancerous Rodent.prefab"); Enemies["BombSpawner"] = AssGO("Assets/Prefabs/Enemies/Spawners/BombEnemySpawner.prefab"); Enemies["BombSpawnerBreaker"] = AssGO("Assets/Prefabs/Enemies/Spawners/BombEnemySpawnerBreaker Variant.prefab"); Enemies["BombSpawnerGutterman"] = AssGO("Assets/Prefabs/Enemies/Spawners/BombEnemySpawnerGutterman Variant.prefab"); Enemies["BombSpawnerGuttertank"] = AssGO("Assets/Prefabs/Enemies/Spawners/BombEnemySpawnerGuttertank Variant.prefab"); } public static void GetObjectsMain() { Objects["Checkpoint"] = AssGO("Assets/Prefabs/Levels/Checkpoint.prefab"); Objects["CheckpointReusable"] = AssGO("Assets/Prefabs/Levels/CheckpointReusable.prefab"); Objects["Altar"] = AssGO("Assets/Prefabs/Levels/Interactive/Altar.prefab"); Objects["AltarBlue"] = AssGO("Assets/Prefabs/Levels/Interactive/Altar (Blue).prefab"); Objects["AltarRed"] = AssGO("Assets/Prefabs/Levels/Interactive/Altar (Red).prefab"); Objects["AltarTorch"] = AssGO("Assets/Prefabs/Levels/Interactive/Altar (Torch) Variant.prefab"); Objects["HookpointGreen"] = AssGO("Assets/Prefabs/Levels/Interactive/GrapplePoint.prefab"); Objects["HookpointBlue"] = AssGO("Assets/Prefabs/Levels/Interactive/GrapplePointSlingshot Variant.prefab"); Objects["HookpointProvidence"] = AssGO("Assets/Prefabs/Levels/Interactive/GrapplePointSlingshotProvidence.prefab"); Objects["HookpointYellow"] = AssGO("Assets/Prefabs/Levels/Interactive/GrapplePoint Switch Variant.prefab"); Objects["JumpPad"] = AssGO("Assets/Prefabs/Levels/Interactive/JumpPad.prefab"); Objects["JumpPadSmall"] = AssGO("Assets/Prefabs/Levels/Interactive/JumpPadSmall Variant.prefab"); Objects["JumpPadSteam"] = AssGO("Assets/Prefabs/Levels/Interactive/JumpPadSteam Variant.prefab"); } public static void GetObjectsSecondary() { Objects["ElectricityBox"] = AssGO("Assets/Prefabs/Levels/Interactive/ElectricityBox.prefab"); Objects["TeslaCoils"] = AssGO("Assets/Prefabs/Levels/Interactive/Tesla Coils.prefab"); Objects["SuicideTree"] = AssGO("Assets/Prefabs/Levels/Decorations/SuicideTreeHungry.prefab"); Objects["Terminal"] = AssGO("Assets/Prefabs/Levels/Shop.prefab"); Objects["TerminalTestament"] = AssGO("Assets/Prefabs/Levels/Shop Testament.prefab"); Objects["TerminalPrime"] = AssGO("Assets/Prefabs/Levels/Shop Prime.prefab"); Objects["TerminalPrime1"] = AssGO("Assets/Prefabs/Levels/Shop Prime 1.prefab"); Objects["Plank"] = AssGO("Assets/Prefabs/Levels/Interactive/Plank.prefab"); Objects["PlankBlocker"] = AssGO("Assets/Prefabs/Levels/Interactive/Plank (Blocker) Variant.prefab"); Objects["GlassFloor"] = AssGO("Assets/Prefabs/Levels/Interactive/GlassFloor.prefab"); Objects["GlassWall"] = AssGO("Assets/Prefabs/Levels/Interactive/GlassWall.prefab"); Objects["GlassWall2"] = AssGO("Assets/Prefabs/Levels/Interactive/GlassWall2.prefab"); Objects["Speakers"] = AssGO("Assets/Prefabs/Levels/Interactive/Speakers.prefab"); Objects["SpeakersChime"] = AssGO("Assets/Prefabs/Levels/Interactive/Speakers Chime Variant.prefab"); Objects["Breakable"] = AssGO("Assets/Prefabs/Levels/Interactive/Breakable.prefab"); Objects["ScreenUsable"] = AssGO("Assets/Prefabs/Levels/Interactive/UsableScreen.prefab"); Objects["ScreenInteractive"] = AssGO("Assets/Prefabs/Levels/Interactive/InteractiveScreen.prefab"); Objects["ScreenInteractiveButton"] = AssGO("Assets/Prefabs/Levels/Interactive/InteractiveScreenButton.prefab"); Objects["ScreenInteractiveStand"] = AssGO("Assets/Prefabs/Levels/Interactive/InteractiveScreenWithStand.prefab"); Objects["ScreenPuzzle"] = AssGO("Assets/Prefabs/Levels/Interactive/PuzzleScreen.prefab"); Objects["ScreenPuzzle5x5"] = AssGO("Assets/Prefabs/Levels/Interactive/InteractiveScreenPuzzle5x5.prefab"); Objects["PierPlatform"] = AssGO("Assets/Prefabs/Levels/PierPlatform.prefab"); Objects["PierSegment"] = AssGO("Assets/Prefabs/Levels/PierSegment.prefab"); Objects["PierStairs"] = AssGO("Assets/Prefabs/Levels/PierStairs.prefab"); } public static void GetObjectsObstacles() { Objects["Crusher"] = AssGO("Assets/Prefabs/Levels/Obstacles/Crusher Symmetrical.prefab"); Objects["CrusherBad"] = AssGO("Assets/Prefabs/Levels/Obstacles/Crusher.prefab"); Objects["Fan"] = AssGO("Assets/Prefabs/Levels/Obstacles/Fan.prefab"); Objects["Grinder"] = AssGO("Assets/Prefabs/Levels/Obstacles/Grinders.prefab"); Objects["EnergyBeam"] = AssGO("Assets/Prefabs/Levels/Obstacles/EnergyBeamHuge.prefab"); Objects["BrainBeam"] = AssGO("Assets/Prefabs/Attacks and Projectiles/Hitscan Beams/Centaur Brain Beam.prefab"); Objects["BrainBeamObstacle"] = AssGO("Assets/Prefabs/Attacks and Projectiles/Hitscan Beams/Centaur Brain Beam Obstacle Variant.prefab"); } public static void GetParticles() { Particles["Break"] = AssGO("Assets/Particles/Breaks/BreakParticle.prefab"); Particles["BreakBig"] = AssGO("Assets/Particles/Breaks/BreakParticleBig.prefab"); Particles["BreakMetal"] = AssGO("Assets/Particles/Breaks/BreakParticleMetal.prefab"); } public static void GetAudioClips() { AudioClips["Shutdown"] = Ass("Assets/Sounds/Weapons/Bluezone-Autobots-shutdown-003.wav"); } public static void GetDebugObjects() { DebugObjects["AxisPoint"] = AssGO("Assets/Prefabs/Sandbox/Previews/Axis Point Variant.prefab"); } } public static class LevelPatching { public static void SceneManagerActiveSceneChanged(Scene arg0, Scene arg1) { Plugin.objectsLookedUpThisScene = new Dictionary(); Plugin.IsPatched = false; if (Util.IsEnabled()) { string currentScene = SceneHelper.CurrentScene; int? num = MonoSingleton.Instance?.levelNumber; if (currentScene != null && num.HasValue && num != 0) { RunLevelPatch(currentScene); } } } public static void RunLevelPatch(string sceneName) { string text = "Patch" + sceneName.Replace("-", "_").Replace(" ", ""); string text2 = "BillionNemesis.LevelPatches"; if (!(sceneName == "005a4f2ce549277458596ee0f0d6e88c")) { if (sceneName == "1f290c2101e628540bf9c6d1d2140750") { text = "PatchLevelP_2"; } } else { text = "PatchLevelP_1"; } string typeName = text2 + "." + text; Type type = Type.GetType(typeName); if (!(type == null)) { Plugin.Logger.LogInfo((object)("Level found, trying to patch: " + text)); MethodInfo method = type.GetMethod("Patch", BindingFlags.Static | BindingFlags.Public); if (method == null) { Plugin.Logger.LogWarning((object)("OOPS: Patch method not found for " + text)); return; } Plugin.Logger.LogInfo((object)"Patching..."); method.Invoke(null, null); Plugin.Logger.LogInfo((object)"Patched"); GetAndUpdateRankRequirements(type); Plugin.IsPatched = true; } } public static void GetAndUpdateRankRequirements(Type type) { FieldInfo field = type.GetField("killRanks", BindingFlags.Static | BindingFlags.Public); FieldInfo field2 = type.GetField("styleRanks", BindingFlags.Static | BindingFlags.Public); FieldInfo field3 = type.GetField("timeRanks", BindingFlags.Static | BindingFlags.Public); int[] killRanksNew; try { killRanksNew = (int[])field.GetValue(null); } catch { killRanksNew = null; } int[] styleRanksNew; try { styleRanksNew = (int[])field2.GetValue(null); } catch { styleRanksNew = null; } int[] timeRanksNew; try { timeRanksNew = (int[])field3.GetValue(null); } catch { timeRanksNew = null; } UpdateRankRequirements(killRanksNew, styleRanksNew, timeRanksNew); } public static void UpdateRankRequirements(int[] killRanksNew = null, int[] styleRanksNew = null, int[] timeRanksNew = null) { StatsManager instance = MonoSingleton.Instance; if (killRanksNew != null) { instance.killRanks = killRanksNew; } if (styleRanksNew != null) { instance.styleRanks = styleRanksNew; } if (timeRanksNew != null) { instance.timeRanks = timeRanksNew; } Plugin.Logger.LogInfo((object)"Updated rank requirements"); Plugin.Logger.LogInfo((object)string.Format("- killRanks {0}: {1}", (killRanksNew == null) ? "(UNCHANGED)" : "", string.Join(", ", instance.killRanks))); Plugin.Logger.LogInfo((object)string.Format("- styleRanks {0}: {1}", (styleRanksNew == null) ? "(UNCHANGED)" : "", string.Join(", ", instance.styleRanks))); Plugin.Logger.LogInfo((object)string.Format("- timeRanks {0}: {1}", (timeRanksNew == null) ? "(UNCHANGED)" : "", string.Join(", ", instance.timeRanks))); } } [HarmonyPatch(typeof(StatsManager), "GetFinalRank")] public class GetFinalRankPatch { public static void Postfix(StatsManager __instance) { //IL_005d: Unknown result type (might be due to invalid IL or missing references) if (Util.IsPatched() && __instance.rankScore == 12 && !__instance.asscon.cheatsEnabled) { ((Graphic)((Component)__instance.fr.totalRank.transform.parent).GetComponent()).color = new Color(1f, 0f, 0.686f, 1f); } } } [HarmonyPatch(typeof(ChapterSelectButton), "CheckScore")] public class ChapterRankPatch { public static void Postfix() { RankStuff.UpdateAllRankColors(); } } public static class RankStuff { public static void UpdateRanks() { ChapterSelectButton[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); ChapterSelectButton[] array2 = array; foreach (ChapterSelectButton val in array2) { val.CheckScore(); } } public static void UpdateAllRankColors() { //IL_0090: 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_0054: 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) LevelSelectPanel[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); LevelSelectPanel[] array2 = array; foreach (LevelSelectPanel val in array2) { if (!Util.IsEnabled() || !ChangedInfo.ChangedLevels.Contains(val.levelNumber)) { SetRankColors(val, new Color(1f, 0.686f, 0f, 1f), new Color(0.6f, 0.4f, 0f, 1f)); } else { SetRankColors(val, new Color(1f, 0f, 0.686f, 1f), new Color(0.6f, 0f, 0.4f, 1f)); } } } public static void SetRankColors(LevelSelectPanel level, Color color, Color colorChallenge, bool changeBg = false) { //IL_005b: 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_00b0: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = ((Component)((Component)level).transform.Find("Stats/Rank")).gameObject; TMP_Text val = ((gameObject != null) ? gameObject.GetComponentInChildren(true) : null); if ((Object)(object)val == (Object)null || !val.text.ToUpper().Contains("P")) { return; } Image component = gameObject.GetComponent(); if (component != null) { ((Graphic)component).color = color; } if (changeBg) { Image component2 = ((Component)level).GetComponent(); if (component2 != null) { ((Graphic)component2).color = ((Color)(ref color)).AlphaMultiplied(0.75f); } Transform obj = ((Component)level).transform.Find("Stats/Challenge"); TMP_Text val2 = ((obj != null) ? ((Component)obj).GetComponentInChildren(true) : null); if (val2 != null) { ((Graphic)val2).color = colorChallenge; } } } } public static class Util { public static bool IsEnabled() { return ((ConfigValueElement)(object)Plugin.IsEnabled).Value; } public static bool IsPatched() { return Plugin.IsPatched; } public static T[] ArrayAdd(ref T[] array, T element, int index = -1) { if (index == -1) { index = array.Length; } List list = array.ToList(); list.Insert(index, element); array = list.ToArray(); return array; } public static T[] ArrayAdd(ref T[] array, T[] elements, int index = -1) { if (index == -1) { index = array.Length; } int num = 0; int num2 = index; List list = array.ToList(); while (num < elements.Length) { list.Insert(num2, elements[num]); num++; num2++; } array = list.ToArray(); return array; } public static T[] ArrayRemove(ref T[] array, T element) { List list = array.ToList(); list.Remove(element); array = list.ToArray(); return array; } public static T[] ArrayRemove(ref T[] array, T[] elements) { List list = array.ToList(); foreach (T item in elements) { list.Remove(item); } array = list.ToArray(); return array; } } public static class MyPluginInfo { public const string PLUGIN_GUID = "BillionNemesis"; public const string PLUGIN_NAME = "Billion Nemesis"; public const string PLUGIN_VERSION = "0.3.0"; } } namespace BillionNemesis.Func { public static class ArenaFuncs { public static GameObject MakeTrigger(Transform roomTransform, string name, Vector3 corner, Vector3 oppositeCorner) { //IL_002f: 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_0042: 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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_0086: 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_0098: 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_00aa: 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_00c9: 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_00ff: Unknown result type (might be due to invalid IL or missing references) GameObject val = GeneralFuncs.MakeEmpty(roomTransform, "NemesisTrigger " + name); val.layer = LayerMask.NameToLayer("Invisible"); val.transform.position = new Vector3(0.5f * (corner.x + oppositeCorner.x), 0.5f * (corner.y + oppositeCorner.y), 0.5f * (corner.z + oppositeCorner.z)); val.transform.localScale = new Vector3(Mathf.Abs(corner.x - oppositeCorner.x), Mathf.Abs(corner.y - oppositeCorner.y), Mathf.Abs(corner.z - oppositeCorner.z)); BoxCollider val2 = val.AddComponent(); val2.center = Vector3.zero; val2.size = Vector3.one; ((Collider)val2).isTrigger = true; ((Collider)val2).contactOffset = 0.01f; ((Collider)val2).hasModifiableContacts = false; ((Collider)val2).excludeLayers = LayerMask.op_Implicit(0); ((Collider)val2).includeLayers = LayerMask.op_Implicit(0); ((Collider)val2).layerOverridePriority = 0; ((Collider)val2).providesContacts = false; ((Collider)val2).enabled = true; return val; } public static ActivateArena AddArena(GameObject trigger, Door[] doors, bool onlyWave = false) { ActivateArena val = trigger.AddComponent(); val.doors = doors; val.onlyWave = onlyWave; val.forEnemy = false; val.enemies = Array.Empty(); return val; } public static ArenaDelay SetArenaDelay(ActivateArena arena, float delay) { ArenaDelay arenaDelay = ((Component)arena).gameObject.AddComponent(); arenaDelay.target = arena; arenaDelay.delay = delay; return arenaDelay; } } public static class CheckpointFuncs { public static CheckPoint MakeCheckpoint(string name, Vector3 position, Quaternion rotation, GameObject toActivate, Door[] doorsToUnlock, GameObject[] rooms = null, List roomsToInherit = null, bool reusable = false, bool inheritAllRooms = false, bool forceOff = false, bool invisible = false, UnityEvent onRestart = null) { //IL_001b: 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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown CheckPoint component = Object.Instantiate(LevelAssets.Objects[(!reusable) ? "Checkpoint" : "CheckpointReusable"], position, rotation).GetComponent(); ((Object)component).name = "CheckpointNemesis " + name; component.toActivate = toActivate; component.doorsToUnlock = doorsToUnlock; component.rooms = rooms ?? Array.Empty(); component.roomsToInherit = roomsToInherit ?? new List(); component.inheritAllRooms = inheritAllRooms; component.startOff = forceOff; component.invisible = invisible; CheckPoint val = component; if (val.onRestart == null) { val.onRestart = new UnityEvent(); } ConfigureCheckpoint(component, disableDuringCombat: false, unlockAllDoors: false, Array.Empty()); return component; } public static CheckPoint ConfigureCheckpoint(CheckPoint checkpoint, bool disableDuringCombat = false, bool unlockAllDoors = false, Door[] doorsToIgnore = null) { checkpoint.disableDuringCombat = disableDuringCombat; checkpoint.unlockAllDoors = unlockAllDoors; checkpoint.doorsToIgnore = doorsToIgnore ?? Array.Empty(); return checkpoint; } public static InheritRoomExceptions AddInheritRoomExceptions(CheckPoint checkpoint, string[] roomNames = null) { if (roomNames == null) { roomNames = new string[0]; } if ((Object)(object)checkpoint == (Object)null) { return null; } InheritRoomExceptions orAddComponent = ComponentExtensions.GetOrAddComponent((Component)(object)checkpoint); Util.ArrayAdd(ref orAddComponent.roomNames, roomNames); return orAddComponent; } public static GameObject UpdateRoomInCheckpoint(Transform targetRoom, CheckPoint checkpoint) { for (int i = 0; i < checkpoint.rooms.Length; i++) { GameObject val = checkpoint.rooms[i]; if (!(((Object)val).name != ((Object)targetRoom).name)) { checkpoint.i = i; checkpoint.rooms[i] = ((Component)targetRoom).gameObject; CheckPointToUpdate orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)checkpoint).gameObject); orAddComponent.rooms[i] = ((Component)targetRoom).gameObject; return ((Component)targetRoom).gameObject; } } return null; } public static GameObject UpdateInheritedRoomInCheckpoint(Transform targetRoom, CheckPoint checkpoint) { for (int i = 0; i < checkpoint.roomsToInherit.Count; i++) { GameObject val = checkpoint.roomsToInherit[i]; if (!(((Object)val).name != ((Object)targetRoom).name)) { checkpoint.i = i; checkpoint.roomsToInherit[i] = ((Component)targetRoom).gameObject; return ((Component)targetRoom).gameObject; } } return null; } public static GameObject AddRoomToCheckpoint(Transform targetRoom, CheckPoint checkpoint) { int num = checkpoint.rooms.Length; Util.ArrayAdd(ref checkpoint.rooms, ((Component)targetRoom).gameObject, num); CheckPointToUpdate orAddComponent = GameObjectExtensions.GetOrAddComponent(((Component)checkpoint).gameObject); orAddComponent.rooms[num] = ((Component)targetRoom).gameObject; return ((Component)targetRoom).gameObject; } public static GameObject AddInheritedRoomToCheckpoint(Transform targetRoom, CheckPoint checkpoint) { int count = checkpoint.roomsToInherit.Count; checkpoint.roomsToInherit.Add(((Component)targetRoom).gameObject); return ((Component)targetRoom).gameObject; } public static void RemoveRoomFromCheckpoint(string roomNumber, CheckPoint checkpoint) { int num = 0; GameObject[] rooms = checkpoint.rooms; foreach (GameObject val in rooms) { if (((Object)val).name.StartsWith(roomNumber + " ")) { Util.ArrayRemove(ref checkpoint.rooms, val); break; } num++; } if (checkpoint.defaultRooms.Count > num && ((Object)checkpoint.defaultRooms[num]).name.StartsWith(roomNumber + " ")) { checkpoint.defaultRooms.RemoveAt(num); } if (checkpoint.newRooms.Count > num && ((Object)checkpoint.newRooms[num]).name.StartsWith(roomNumber + " ")) { checkpoint.newRooms.RemoveAt(num); } } public static CheckPointConstantOff AddCheckpointConstantOff(GameObject obj, CheckPoint checkpoint) { checkpoint.startOff = true; CheckPointConstantOff checkPointConstantOff = obj.AddComponent(); checkPointConstantOff.checkpoint = checkpoint; return checkPointConstantOff; } public static void ClearAndInheritAllRooms() { CheckPoint[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); CheckPoint[] array2 = array; foreach (CheckPoint val in array2) { val.rooms = Array.Empty(); val.roomsToInherit = new List(); val.inheritAllRooms = true; } } } public static class DeathMarkerFuncs { public static DeathMarker AddDeathMarker(Transform targetWave, ActivateNextWave anwActivator, ActivateNextWave[] anwsToAddEnemyCount = null) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) if (anwsToAddEnemyCount == null) { anwsToAddEnemyCount = (ActivateNextWave[])(object)new ActivateNextWave[0]; } GameObject val = new GameObject("Deathmarker"); val.transform.SetParent(targetWave); val.SetActive(false); val.transform.position = targetWave.position; Util.ArrayAdd(ref anwActivator.toActivate, val); ActivateNextWave[] array = anwsToAddEnemyCount; foreach (ActivateNextWave val2 in array) { val2.enemyCount++; } return val.AddComponent(); } public static DeathMarker AddDeathMarker(GameObject targetWave, ActivateNextWaveHP anwhActivator, ActivateNextWave[] anwsToAddEnemyCount = null) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) if (anwsToAddEnemyCount == null) { anwsToAddEnemyCount = (ActivateNextWave[])(object)new ActivateNextWave[0]; } GameObject val = new GameObject("Deathmarker"); val.transform.SetParent(targetWave.transform); val.SetActive(false); val.transform.position = targetWave.transform.position; Util.ArrayAdd(ref anwhActivator.toActivate, val); ActivateNextWave[] array = anwsToAddEnemyCount; foreach (ActivateNextWave val2 in array) { val2.enemyCount++; } return val.AddComponent(); } } public static class EnemyFuncs { public static Transform AddEnemy(Transform waveTransform, GameObject enemy, Vector3 position, Quaternion rotation, ActivateNextWave[] anwsToAddEnemyCount = null, ActivateArena[] arenaSources = null, bool spawnEffect = 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) if (anwsToAddEnemyCount == null) { anwsToAddEnemyCount = (ActivateNextWave[])(object)new ActivateNextWave[0]; } GameObject val = Object.Instantiate(enemy, position, rotation); val.transform.SetParent(waveTransform); val.SetActive(false); if (!spawnEffect) { EnemyIdentifier val2 = val.GetComponent(); if ((Object)(object)val2 == (Object)null) { val2 = val.GetComponentInChildren(); } val2.spawnIn = false; } ActivateNextWave[] array = anwsToAddEnemyCount; foreach (ActivateNextWave val3 in array) { val3.enemyCount++; } if (arenaSources == null) { arenaSources = ((Component)waveTransform).GetComponentsInChildren(true); } ActivateArena[] array2 = arenaSources; foreach (ActivateArena val4 in array2) { Util.ArrayAdd(ref val4.enemies, val); } return val.transform; } public static Transform AddEnemyNoTrigger(Transform waveTransform, GameObject enemy, Vector3 position, Quaternion rotation, ActivateNextWave[] anwsToAddEnemyCount = null, ActivateNextWave[] anwSources = null, ActivateNextWaveHP[] anwhSources = null, bool spawnEffect = true) { //IL_0026: 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) if (anwsToAddEnemyCount == null) { anwsToAddEnemyCount = (ActivateNextWave[])(object)new ActivateNextWave[0]; } if (anwSources == null) { anwSources = (ActivateNextWave[])(object)new ActivateNextWave[0]; } if (anwhSources == null) { anwhSources = (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[0]; } GameObject val = Object.Instantiate(enemy, position, rotation); val.transform.SetParent(waveTransform); val.SetActive(false); if (!spawnEffect) { EnemyIdentifier val2 = val.GetComponent(); if ((Object)(object)val2 == (Object)null) { val2 = val.GetComponentInChildren(); } val2.spawnIn = false; } ActivateNextWave[] array = anwsToAddEnemyCount; foreach (ActivateNextWave val3 in array) { val3.enemyCount++; } ActivateNextWave[] array2 = anwSources; foreach (ActivateNextWave val4 in array2) { Util.ArrayAdd(ref val4.nextEnemies, val); } ActivateNextWaveHP[] array3 = anwhSources; foreach (ActivateNextWaveHP val5 in array3) { Util.ArrayAdd(ref val5.nextEnemies, val); } return val.transform; } public static void SetIdolTarget(Transform idol, Transform targetEnemy) { ((Component)idol).GetComponent().overrideTarget = ((Component)targetEnemy).GetComponentInChildren(); } public static void ApplyRadiance(Transform enemyTransform, bool buffDamage = false, bool buffSpeed = true, bool buffHealth = true) { EnemyIdentifier componentInChildren = ((Component)enemyTransform).GetComponentInChildren(true); if (buffDamage) { componentInChildren.DamageBuff(); } if (buffSpeed) { componentInChildren.SpeedBuff(); } if (buffHealth) { componentInChildren.HealthBuff(); } } public static void ApplySand(Transform enemyTransform) { EnemyIdentifier componentInChildren = ((Component)enemyTransform).GetComponentInChildren(true); componentInChildren.Sandify(false); } public static MoveTo AddMover(GameObject parentObject, Transform targetTransform, float speed = 20f) { MoveTo moveTo = parentObject.AddComponent(); moveTo.targetTransform = targetTransform; moveTo.speed = speed; return moveTo; } public static StopEnemyMovement AddStopper(Transform enemyTransform, bool stopDashing = true, bool stopWalking = false) { StopEnemyMovement stopEnemyMovement = ((Component)((Component)enemyTransform).GetComponentInChildren()).gameObject.AddComponent(); stopEnemyMovement.stopDashing = stopDashing; stopEnemyMovement.stopWalking = stopWalking; return stopEnemyMovement; } public static TeleportOnCondition AddTeleportOnCondition(Transform enemyTransform, bool processPassively = true, bool processIfEnemyDead = false, bool onDeadcaught = true, bool breakOnFirstSuccess = false) { TeleportOnCondition teleportOnCondition = ((Component)enemyTransform).gameObject.AddComponent(); teleportOnCondition.processPassively = processPassively; teleportOnCondition.processIfEnemyDead = processIfEnemyDead; teleportOnCondition.onDeadcaught = onDeadcaught; teleportOnCondition.returnOnFirstSuccess = breakOnFirstSuccess; return teleportOnCondition; } public static void RemoveEnemyLogic(Transform enemyTransform) where T : Component { ((Behaviour)((Component)enemyTransform).GetComponentInChildren()).enabled = false; Object.Destroy((Object)(object)((Component)enemyTransform).GetComponentInChildren()); Object.Destroy((Object)(object)((Component)enemyTransform).GetComponentInChildren()); } public static Transform AddCerberusStatue(Transform waveTransform, Vector3 position, Quaternion rotation, ActivateNextWave[] anwsToAdd = null, ActivateArena[] arenaSources = null, float wakeUpSpeedMultiplier = 1f, bool quickSpawn = true) { //IL_001c: 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) if (anwsToAdd == null) { anwsToAdd = (ActivateNextWave[])(object)new ActivateNextWave[0]; } Transform val = AddEnemy(waveTransform, LevelAssets.Enemies["CerberusStatue"], position, rotation, anwsToAdd, Array.Empty()); GameObject gameObject = ((Component)val.Find("StatueActivator")).gameObject; foreach (ActivateArena val2 in arenaSources) { Util.ArrayAdd(ref val2.enemies, gameObject); } StatueFake componentInChildren = ((Component)val).GetComponentInChildren(true); componentInChildren.quickSpawn = quickSpawn; ((Component)componentInChildren).gameObject.AddComponent().multiplier = wakeUpSpeedMultiplier; ((Component)val).gameObject.SetActive(true); return val; } public static Transform AddBombSpawner(Transform waveTransform, GameObject bombSpawner, Vector3 position, Quaternion rotation) { //IL_0013: 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_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_004c: 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_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) GameObject val = GeneralFuncs.MakeEmpty(waveTransform, "BombSpawner"); val.transform.position = position; bombSpawner.transform.position = position; GameObject val2 = Object.Instantiate(bombSpawner, Vector3.zero, rotation); val2.transform.SetParent(val.transform); val2.transform.position = position + 200f * Vector3.up; return val2.transform; } } public static class GeneralFuncs { public static readonly Quaternion Quat_0 = Quaternion.Euler(0f, 0f, 0f); public static readonly Quaternion Quat_90 = Quaternion.Euler(0f, 90f, 0f); public static readonly Quaternion Quat_180 = Quaternion.Euler(0f, 180f, 0f); public static readonly Quaternion Quat_270 = Quaternion.Euler(0f, 270f, 0f); public static GameObject MakeEmpty(Transform parent, string name) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003a: 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) GameObject val = new GameObject(name); val.transform.SetParent(parent); if ((Object)(object)parent != (Object)null) { val.transform.position = parent.position; } else { val.transform.position = Vector3.zero; } return val; } public static GameObject FindInactive(string path) { if (string.IsNullOrEmpty(path)) { return null; } path = path.Trim('/'); if (Plugin.objectsLookedUpThisScene.ContainsKey(path)) { return Plugin.objectsLookedUpThisScene[path]; } string[] array = path.Split('/'); Transform[] source = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); IEnumerable enumerable = source.Where((Transform t) => (int)((Object)t).hideFlags == 0 && (Object)(object)t.parent == (Object)null); foreach (Transform item in enumerable) { if (((Object)item).name == path) { return ((Component)item).gameObject; } if (!(((Object)item).name != array[0])) { Transform val = FindChildByPath(item, path); if ((Object)(object)val != (Object)null) { Plugin.objectsLookedUpThisScene[path] = ((Component)val).gameObject; return ((Component)val).gameObject; } } } return null; } public static Transform FindChildByPath(Transform parent, string path) { string[] parts = path.Split('/'); Transform val = parent; int currentIndex; for (currentIndex = 1; currentIndex < parts.Length; currentIndex++) { if ((Object)(object)val == (Object)null) { return null; } val = ((IEnumerable)((Component)val).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform child) => ((Object)child).name == parts[currentIndex])); } return val; } public static void DontManipulateLights(Transform parent) { Light[] componentsInChildren = ((Component)parent).GetComponentsInChildren(true); foreach (Light val in componentsInChildren) { DontManipulateLight dontManipulateLight = ((Component)val).gameObject.AddComponent(); dontManipulateLight.targetLight = val; } } public static AudioOnEnable PlayAudioOnEnable(GameObject obj, AudioSource audioSource) { AudioOnEnable audioOnEnable = obj.AddComponent(); audioOnEnable.audioSource = audioSource; return audioOnEnable; } } public static class ObjectActivatorFuncs { public static ObjectActivator AddObjectActivator(GameObject trigger, UltrakillEvent ukEvent, float delay = 0f, bool oneTime = true, bool nonCollider = false) { ObjectActivator val = trigger.AddComponent(); val.events = ukEvent; val.delay = delay; val.oneTime = oneTime; val.nonCollider = nonCollider; ConfigureObjectActivator(val); return val; } public static ObjectActivator ConfigureObjectActivator(ObjectActivator activator, Collider[] ignoreColliders = null, bool notIfEnemiesDisabled = false, bool dontUseEventsIfEnemiesDisabled = false, bool disableOnExit = false, bool activateOnDisable = false) { activator.ignoreColliders = ignoreColliders; activator.notIfEnemiesDisabled = notIfEnemiesDisabled; activator.dontUseEventsIfEnemiesDisabled = dontUseEventsIfEnemiesDisabled; activator.disableOnExit = disableOnExit; activator.activateOnDisable = activateOnDisable; return activator; } public static UltrakillEvent MakeUltrakillEvent(GameObject[] toActivateObjects = null, GameObject[] toDisActivateObjects = null, UnityEvent onActivate = null, UnityEvent onDisActivate = null) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_001b: 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) UltrakillEvent val = new UltrakillEvent(); val.toActivateObjects = toActivateObjects; val.toDisActivateObjects = toDisActivateObjects; val.onActivate = (UnityEvent)(((object)onActivate) ?? ((object)new UnityEvent())); val.onDisActivate = (UnityEvent)(((object)onDisActivate) ?? ((object)new UnityEvent())); return val; } public static HudMessage AddHudMessage(GameObject obj, string message, bool timed = true, float timerTime = 5f, bool silent = false, bool colliderless = false, string message2 = "", bool notOneTime = false) { HudMessage val = obj.AddComponent(); val.message = message; val.timed = timed; val.timerTime = timerTime; val.silent = silent; val.colliderless = colliderless; val.message2 = message2; val.notOneTime = notOneTime; val.playerPref = ""; return val; } public static CheckPointActivator AddCheckpointActivator(GameObject obj, CheckPoint checkpoint) { CheckPointActivator checkPointActivator = obj.AddComponent(); checkPointActivator.checkpoint = checkpoint; return checkPointActivator; } public static CheckPointTurnOn AddCheckpointTurnOn(GameObject obj, CheckPoint checkpoint) { CheckPointTurnOn checkPointTurnOn = obj.AddComponent(); checkPointTurnOn.checkpoint = checkpoint; return checkPointTurnOn; } public static DoorConstantLocker AddDoorConstantLocker(GameObject obj, Door door, bool unlockOnDisable = true) { DoorConstantLocker doorConstantLocker = obj.AddComponent(); doorConstantLocker.door = door; doorConstantLocker.unlockOnDisable = unlockOnDisable; return doorConstantLocker; } public static BreakableAllower AddBreakableAllower(GameObject obj, Breakable breakable) { BreakableAllower breakableAllower = obj.AddComponent(); breakableAllower.breakable = breakable; return breakableAllower; } public static EnemyBlockBreakables AddEnemyBlockBreakables(Transform enemyTransform) { return ComponentExtensions.GetOrAddComponent((Component)(object)((Component)enemyTransform).GetComponentInChildren(true)); } } public static class ObjectFuncs { public static Transform PlaceTerminalTestament(Transform roomTransform, string message, Vector3 position, Quaternion rotation, bool hasMusic = false, float secondsBetweenLetters = 0.025f) { //IL_0010: 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) Transform transform = Object.Instantiate(LevelAssets.Objects["TerminalTestament"], position, rotation).transform; transform.SetParent(roomTransform); if (!hasMusic) { ((Component)transform.Find("Music")).gameObject.SetActive(false); ShopZone component = ((Component)transform).GetComponent(); ((ScreenZone)component).muteMusic = false; } ScrollingText componentInChildren = ((Component)transform).GetComponentInChildren(true); SimpleScrollingText simpleScrollingText = ((Component)componentInChildren).gameObject.AddComponent(); Object.Destroy((Object)(object)componentInChildren); simpleScrollingText.secondsBetweenLetters = secondsBetweenLetters; ((Component)simpleScrollingText).GetComponent().text = message; return transform; } public static SimpleScrollingTextActivator AddScrollingTextActivator(GameObject obj, SimpleScrollingText simpleScrollingText) { simpleScrollingText.running = false; SimpleScrollingTextActivator simpleScrollingTextActivator = obj.AddComponent(); simpleScrollingTextActivator.simpleScrollingText = simpleScrollingText; return simpleScrollingTextActivator; } public static Transform PlaceAltarRed(Transform roomTransform, bool hasSkull, Vector3 position, Quaternion rotation, Door[] doors = null, Door[] reverseDoors = null, GameObject[] activateOnSuccess = null, GameObject[] deactivateOnSuccess = null, GameObject[] activateOnFailure = null) { //IL_007a: 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_0052: 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_0139: Unknown result type (might be due to invalid IL or missing references) if (doors == null) { doors = (Door[])(object)new Door[0]; } if (reverseDoors == null) { reverseDoors = (Door[])(object)new Door[0]; } if (activateOnSuccess == null) { activateOnSuccess = (GameObject[])(object)new GameObject[0]; } if (deactivateOnSuccess == null) { deactivateOnSuccess = (GameObject[])(object)new GameObject[0]; } if (activateOnFailure == null) { activateOnFailure = (GameObject[])(object)new GameObject[0]; } Transform transform; if (hasSkull) { transform = Object.Instantiate(LevelAssets.Objects["AltarRed"], position, rotation).transform; transform.SetParent(roomTransform); } else { transform = Object.Instantiate(LevelAssets.Objects["Altar"], position, rotation).transform; transform.SetParent(roomTransform); Transform val = transform.Find("Altars"); ((Component)val.Find("Altar_Salt")).gameObject.SetActive(false); ((Component)val.Find("Altar_Sulfur")).gameObject.SetActive(true); } ItemPlaceZone componentInChildren = ((Component)transform).GetComponentInChildren(true); componentInChildren.doors = doors; componentInChildren.reverseDoors = reverseDoors; componentInChildren.activateOnSuccess = activateOnSuccess; componentInChildren.deactivateOnSuccess = deactivateOnSuccess; componentInChildren.activateOnFailure = activateOnFailure; componentInChildren.GetDoorBounds(doors, componentInChildren.doorsBounds); componentInChildren.GetDoorBounds(reverseDoors, componentInChildren.reverseDoorsBounds); AddDoorHelper(doors, componentInChildren); AddDoorHelper(reverseDoors, componentInChildren, reversed: true); if (!hasSkull) { componentInChildren.acceptedItemType = (ItemType)2; } return transform; } public static Transform PlaceAltarBlue(Transform roomTransform, bool hasSkull, Vector3 position, Quaternion rotation, Door[] doors = null, Door[] reverseDoors = null, GameObject[] activateOnSuccess = null, GameObject[] deactivateOnSuccess = null, GameObject[] activateOnFailure = null) { //IL_007a: 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_0052: 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_0139: Unknown result type (might be due to invalid IL or missing references) if (doors == null) { doors = (Door[])(object)new Door[0]; } if (reverseDoors == null) { reverseDoors = (Door[])(object)new Door[0]; } if (activateOnSuccess == null) { activateOnSuccess = (GameObject[])(object)new GameObject[0]; } if (deactivateOnSuccess == null) { deactivateOnSuccess = (GameObject[])(object)new GameObject[0]; } if (activateOnFailure == null) { activateOnFailure = (GameObject[])(object)new GameObject[0]; } Transform transform; if (hasSkull) { transform = Object.Instantiate(LevelAssets.Objects["AltarBlue"], position, rotation).transform; transform.SetParent(roomTransform); } else { transform = Object.Instantiate(LevelAssets.Objects["Altar"], position, rotation).transform; transform.SetParent(roomTransform); Transform val = transform.Find("Altars"); ((Component)val.Find("Altar_Salt")).gameObject.SetActive(false); ((Component)val.Find("Altar_Mercury")).gameObject.SetActive(true); } ItemPlaceZone componentInChildren = ((Component)transform).GetComponentInChildren(true); componentInChildren.doors = doors; componentInChildren.reverseDoors = reverseDoors; componentInChildren.activateOnSuccess = activateOnSuccess; componentInChildren.deactivateOnSuccess = deactivateOnSuccess; componentInChildren.activateOnFailure = activateOnFailure; componentInChildren.GetDoorBounds(doors, componentInChildren.doorsBounds); componentInChildren.GetDoorBounds(reverseDoors, componentInChildren.reverseDoorsBounds); AddDoorHelper(doors, componentInChildren); AddDoorHelper(reverseDoors, componentInChildren, reversed: true); if (!hasSkull) { componentInChildren.acceptedItemType = (ItemType)1; } return transform; } public static void AddDoorHelper(Door[] doors, ItemPlaceZone itemPlaceZone, bool reversed = false) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) foreach (Door val in doors) { Transform val2 = ((Component)val).transform.Find("NemesisDoorHelper"); if ((Object)(object)val2 == (Object)null) { val2 = new GameObject("NemesisDoorHelper").transform; val2.SetParent(((Component)val).transform); } DoorAltarHelper orAddComponent = ComponentExtensions.GetOrAddComponent((Component)(object)val2); Util.ArrayAdd(ref orAddComponent.itemPlaceZones, itemPlaceZone); orAddComponent.door = val; orAddComponent.reversed = reversed; } } public static Transform PlaceEnergyBeam(Transform roomTransform, Vector3 position, Quaternion rotation, float damage = 50f, AffectedSubjects affected = 1, float bounceForce = 200f, float chargeUpTime = 2f, float beamTime = 2f, float chargeDownTime = 2f) { //IL_0010: 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_003e: 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) Transform transform = Object.Instantiate(LevelAssets.Objects["EnergyBeam"], position, rotation).transform; transform.SetParent(roomTransform); HurtZone component = ((Component)transform.Find("Beam")).GetComponent(); component.setDamage = damage; component.affected = affected; component.bounceForce = bounceForce; Transform val = transform.Find("State"); ((Component)val.Find("ChargingUp")).GetComponent().delay = chargeUpTime; ((Component)val.Find("Beaming")).GetComponent().delay = beamTime; ((Component)val.Find("ChargingDown")).GetComponent().delay = chargeDownTime; return transform; } } public static class ObjectManipulationFuncs { public static void RebuildNavMesh() { NavMeshSurface[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); NavMeshSurface[] array2 = array; foreach (NavMeshSurface val in array2) { if (!((Object)(object)((Component)val).GetComponent() != (Object)null)) { val.BuildNavMesh(); } } } public static void FixCollisions(Transform room) { MeshCollider[] componentsInChildren = ((Component)room).GetComponentsInChildren(); foreach (MeshCollider val in componentsInChildren) { GameObject gameObject = ((Component)val).gameObject; if (LayerMask.LayerToName(gameObject.layer) == "Default") { gameObject.layer = LayerMask.NameToLayer("Environment"); } } } public static Breakable MakeObjectBreakable(GameObject obj, GameObject breakParticle = null, bool weak = false, bool breakOnTouch = false, GameObject[] activateOnBreak = null, GameObject[] destroyOnBreak = null, UltrakillEvent destroyEvent = null) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) Breakable val = obj.AddComponent(); val.breakParticle = breakParticle; val.weak = weak; val.breakOnTouch = breakOnTouch; val.activateOnBreak = (GameObject[])(((object)activateOnBreak) ?? ((object)new GameObject[0])); val.destroyOnBreak = (GameObject[])(((object)destroyOnBreak) ?? ((object)new GameObject[0])); val.destroyEvent = (UltrakillEvent)(((object)destroyEvent) ?? ((object)new UltrakillEvent())); ConfigureBreakable(val); ((Component)val).GetComponent().ignoreFromBuild = true; return val; } public static Breakable ConfigureBreakable(Breakable breakable, bool precisionOnly = false, bool ignoreExplosions = false, bool forceGroundSlammable = false, bool forceKnuckleblasterable = false, bool forceSawbladeable = false) { breakable.precisionOnly = precisionOnly; breakable.ignoreExplosions = ignoreExplosions; breakable.forceGroundSlammable = forceGroundSlammable; breakable.forceKnuckleblasterable = forceKnuckleblasterable; breakable.forceSawbladeable = forceSawbladeable; return breakable; } } public static class WaveFuncs { public static ActivateNextWave AddActivation(Transform waveTransform, Door[] doors, Door doorForward, bool lastWave = true, int enemyCount = -1, GameObject[] toActivate = null, bool noActivationDelay = false, bool forEnemies = false) { int num = 0; if (enemyCount == -1) { int num2 = 0; while (num2 < waveTransform.childCount) { Transform child = waveTransform.GetChild(num2); if ((Object)(object)((Component)child).GetComponent() != (Object)null) { num2++; continue; } num++; num2++; } enemyCount = num; } if (toActivate == null) { toActivate = (GameObject[])(object)new GameObject[0]; } ActivateNextWave val = ((Component)waveTransform).gameObject.AddComponent(); val.nextEnemies = (GameObject[])(object)new GameObject[0]; val.doors = doors; val.doorForward = doorForward; val.lastWave = lastWave; val.toActivate = toActivate; val.forEnemies = forEnemies; val.noActivationDelay = noActivationDelay; val.enemyCount = enemyCount; ActivateNextWave[] components = ((Component)waveTransform).GetComponents(); foreach (ActivateNextWave val2 in components) { val2.Awake(); } return val; } public static ActivateNextWaveHP AddActivationHP(Transform waveTransform, float health, Transform enemyTransform, Door[] doors, Door doorForward, bool lastWave = false, GameObject[] toActivate = null, bool forEnemies = false) { if (toActivate == null) { toActivate = (GameObject[])(object)new GameObject[0]; } ActivateNextWaveHP val = ((Component)waveTransform).gameObject.AddComponent(); val.nextEnemies = (GameObject[])(object)new GameObject[0]; val.health = health; val.target = ((Component)enemyTransform).GetComponentInChildren(true); val.doors = doors; val.doorForward = doorForward; val.lastWave = lastWave; val.toActivate = toActivate; val.forEnemies = forEnemies; return val; } public static void ClearWave(Transform waveTransform, ActivateNextWave[] anwsToSubtract = null, ActivateArena[] arenaSourcesToClear = null) { if (anwsToSubtract == null) { anwsToSubtract = (ActivateNextWave[])(object)new ActivateNextWave[0]; } if (arenaSourcesToClear == null) { arenaSourcesToClear = ((Component)waveTransform).GetComponentsInChildren(true); } for (int i = 0; i < waveTransform.childCount; i++) { RemoveEnemy(((Component)waveTransform.GetChild(i)).gameObject, arenaSourcesToClear); ActivateNextWave[] array = anwsToSubtract; foreach (ActivateNextWave val in array) { val.enemyCount--; } } } public static void ClearWaveNoTrigger(Transform waveTransform, ActivateNextWave[] anwsToSubtract = null, ActivateNextWave[] anwSourcesToClear = null, ActivateNextWaveHP[] anwhSourcesToClear = null) { if (anwsToSubtract == null) { anwsToSubtract = (ActivateNextWave[])(object)new ActivateNextWave[0]; } if (anwSourcesToClear == null) { anwSourcesToClear = (ActivateNextWave[])(object)new ActivateNextWave[0]; } if (anwhSourcesToClear == null) { anwhSourcesToClear = (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[0]; } for (int i = 0; i < waveTransform.childCount; i++) { RemoveEnemyNoTrigger(((Component)waveTransform.GetChild(i)).gameObject, anwSourcesToClear, anwhSourcesToClear); ActivateNextWave[] array = anwsToSubtract; foreach (ActivateNextWave val in array) { val.enemyCount--; } } } public static void RemoveEnemy(GameObject enemy, ActivateArena[] arenaSourcesToClear) { bool flag = (Object)(object)enemy.GetComponent() != (Object)null; bool flag2 = (Object)(object)enemy.GetComponent() != (Object)null; if (flag || flag2) { return; } foreach (ActivateArena val in arenaSourcesToClear) { List list = val.enemies.ToList(); if (list.Remove(enemy)) { val.enemies = list.ToArray(); Object.Destroy((Object)(object)enemy); } } if (arenaSourcesToClear.Length == 0) { Object.Destroy((Object)(object)enemy); } } public static void RemoveEnemyNoTrigger(GameObject enemy, ActivateNextWave[] anwSourcesToClear, ActivateNextWaveHP[] anwhSourcesToClear) { bool flag = (Object)(object)enemy.GetComponent() != (Object)null; bool flag2 = (Object)(object)enemy.GetComponent() != (Object)null; if (flag || flag2) { return; } foreach (ActivateNextWave val in anwSourcesToClear) { List list = val.nextEnemies.ToList(); if (list.Remove(enemy)) { val.nextEnemies = list.ToArray(); Object.Destroy((Object)(object)enemy); } } foreach (ActivateNextWaveHP val2 in anwhSourcesToClear) { List list2 = val2.nextEnemies.ToList(); if (list2.Remove(enemy)) { val2.nextEnemies = list2.ToArray(); Object.Destroy((Object)(object)enemy); } } if (anwSourcesToClear.Length == 0 && anwhSourcesToClear.Length == 0) { Object.Destroy((Object)(object)enemy); } } } } namespace BillionNemesis.LevelPatches { public static class PatchLevel0_1 { public static int[] killRanks = new int[4] { 24, 31, 45, 65 }; public static int[] styleRanks = new int[4] { 8500, 12500, 16000, 18500 }; public static int[] timeRanks = new int[4] { 420, 340, 280, 230 }; public static void Patch() { GunRoom(); TwistingCorridor(); GlassCorridor(); GlassBridge(); GlassBridgeTerminal(); StrayRoom(); BloodCorridor(); WeirdRoom(); PenultimateRoom(); PenultimateRoomSecret(); BossRoom(); AddTitle(); } public static void AddTitle() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: 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_00fd: 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_012b: Unknown result type (might be due to invalid IL or missing references) LevelStats val = Object.FindObjectsByType((FindObjectsSortMode)0).FirstOrDefault(); TMP_FontAsset font = val.kills.font; GameObject val2 = GeneralFuncs.FindInactive("Canvas/HurtScreen/Title Sound"); GameObject val3 = new GameObject("NemesisSubtitle"); val3.transform.SetParent(val2.transform); TextMeshProUGUI val4 = val3.AddComponent(); ((TMP_Text)val4).font = font; ((TMP_Text)val4).fontSize = 92f; ((TMP_Text)val4).horizontalAlignment = (HorizontalAlignmentOptions)2; ((TMP_Text)val4).enableWordWrapping = false; ((TMP_Text)val4).text = "BILLION NEMESIS"; ((TMP_Text)val4).outlineColor = Color32.op_Implicit(new Color(1f, 0.686f, 0.686f, 1f)); ((TMP_Text)val4).fontMaterial.SetFloat("_OutlineWidth", 0.16f); RectTransform component = val3.GetComponent(); component.anchorMin = new Vector2(0.5f, 0f); component.anchorMax = new Vector2(0.5f, 0.45f); component.pivot = new Vector2(0.5f, 0f); component.anchoredPosition = new Vector2(0f, 0f); component.sizeDelta = new Vector2(1000f, 50f); } public static void GunRoomExample() { //IL_007b: 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_00c5: 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_0149: 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_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) Transform transform = GameObject.Find("/3 - Gun Room/Enemies").transform; Transform val = transform.Find("Wave 1"); ActivateNextWave component = ((Component)val).GetComponent(); Transform val2 = transform.Find("Wave 2"); ActivateNextWave component2 = ((Component)val2).GetComponent(); Door[] doors = component2.doors; Door doorForward = component2.doorForward; WaveFuncs.ClearWave(val, (ActivateNextWave[])(object)new ActivateNextWave[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["MaliciousFace"], new Vector3(48f, -1.5f, 401f), Quaternion.Euler(0f, 225f, 0f), (ActivateNextWave[])(object)new ActivateNextWave[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Stray"], new Vector3(31.5f, -1.3f, 401.5f), Quaternion.Euler(0f, 135f, 0f), (ActivateNextWave[])(object)new ActivateNextWave[1] { component }); WaveFuncs.ClearWaveNoTrigger(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component }); GameObject[] toActivate = component2.toActivate; component2.toActivate = Array.Empty(); component2.lastWave = false; Transform enemyTransform = EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Schism"], new Vector3(40f, -2f, 405f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component }, null, spawnEffect: false); EnemyFuncs.ApplyRadiance(enemyTransform); ActivateNextWaveHP val3 = WaveFuncs.AddActivationHP(val2, 4.6f, enemyTransform, doors, doorForward); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Wave 3").transform; DeathMarkerFuncs.AddDeathMarker(transform2, component2); ActivateNextWave val4 = WaveFuncs.AddActivation(transform2, doors, doorForward, lastWave: true, -1, toActivate); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Virtue"], new Vector3(40f, 4f, 405f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, null, (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[1] { val3 }); } public static void GunRoom() { //IL_0085: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_010d: 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_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0195: 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_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: 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_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_0484: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("3 - Gun Room/Enemies").transform; Transform val = transform.Find("Wave 1"); ActivateArena component = ((Component)transform.Find("Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val).GetComponent(); Transform val2 = transform.Find("Wave 2"); ActivateNextWave component3 = ((Component)val2).GetComponent(); WaveFuncs.ClearWave(val, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Schism"], new Vector3(40f, -1.3f, 405f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Drone"], new Vector3(40f, 20f, 405f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Filth"], new Vector3(32.5f, -1.3f, 404f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Filth"], new Vector3(47.5f, -1.3f, 404f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Providence"], new Vector3(40f, 60f, 393f), Quaternion.Euler(90f, 180f, 0f), Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component }); Transform targetTransform = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Idol"], new Vector3(40f, -12.5f, 393f), Quaternion.identity, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component }); GameObject val3 = GeneralFuncs.MakeEmpty(val, "IdolMover"); val3.SetActive(false); EnemyFuncs.AddMover(val3, targetTransform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, -2.5f); Util.ArrayAdd(ref component3.toActivate, val3); WaveFuncs.ClearWaveNoTrigger(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Soldier"], new Vector3(27.5f, -1.3f, 385.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Filth"], new Vector3(27.5f, -1.7f, 390.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Filth"], new Vector3(27.5f, -1.7f, 395.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Filth"], new Vector3(27.5f, -1.3f, 400.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Soldier"], new Vector3(52.5f, -1.3f, 400.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Filth"], new Vector3(52.5f, -1.7f, 395.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Filth"], new Vector3(52.5f, -1.7f, 390.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Filth"], new Vector3(52.5f, -1.3f, 385.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); } public static void TwistingCorridor() { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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_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_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: 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_01d2: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("4 - Hallway/4 Stuff/Enemy").transform; Transform waveTransform = transform.Find("Wave 1"); ActivateArena component = ((Component)transform.Find("Trigger 1")).GetComponent(); Transform waveTransform2 = transform.Find("Wave 2"); ActivateArena component2 = ((Component)transform.Find("Trigger 2")).GetComponent(); CheckPoint component3 = GeneralFuncs.FindInactive("Checkpoint (3)").GetComponent(); WaveFuncs.ClearWave(waveTransform, null, (ActivateArena[])(object)new ActivateArena[1] { component }); WaveFuncs.ClearWave(waveTransform2, null, (ActivateArena[])(object)new ActivateArena[1] { component2 }); EnemyFuncs.AddEnemy(waveTransform2, LevelAssets.Enemies["Soldier"], new Vector3(40f, -1.7f, 462f), GeneralFuncs.Quat_180, null, (ActivateArena[])(object)new ActivateArena[1] { component2 }); EnemyFuncs.AddEnemy(waveTransform2, LevelAssets.Enemies["Eye"], new Vector3(52f, 1.5f, 456.5f), GeneralFuncs.Quat_90, null, (ActivateArena[])(object)new ActivateArena[1] { component2 }); EnemyFuncs.AddEnemy(waveTransform2, LevelAssets.Enemies["Eye"], new Vector3(40f, 1.5f, 452f), GeneralFuncs.Quat_90, null, (ActivateArena[])(object)new ActivateArena[1] { component2 }); EnemyFuncs.AddEnemy(waveTransform2, LevelAssets.Enemies["Soldier"], new Vector3(53.5f, -1.7f, 424f), GeneralFuncs.Quat_90, null, (ActivateArena[])(object)new ActivateArena[1] { component2 }); EnemyFuncs.AddEnemy(waveTransform2, LevelAssets.Enemies["Eye"], new Vector3(62f, 1.5f, 447f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component2 }); EnemyFuncs.AddEnemy(waveTransform2, LevelAssets.Enemies["Eye"], new Vector3(57f, 1.5f, 437f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component2 }); CheckpointFuncs.UpdateRoomInCheckpoint(transform.parent, component3); } public static void GlassCorridor() { //IL_00b0: 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_00f2: 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_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0168: 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) Transform transform = GeneralFuncs.FindInactive("6 - Glass Hallway/6 Content/Enemies").transform; Transform waveTransform = transform; ActivateArena component = ((Component)transform.Find("Trigger")).GetComponent(); Door component2 = GameObject.Find("/Door (Large) With Controllers (1)/Door (Large)").GetComponent(); Door component3 = GameObject.Find("/Door (Large) With Controllers (3)/Door (Large)").GetComponent(); Door[] array = (Door[])(object)new Door[2] { component2, component3 }; CheckPoint component4 = GeneralFuncs.FindInactive("Checkpoint").GetComponent(); component.doors = array; Util.ArrayAdd(ref component4.doorsToUnlock, array); WaveFuncs.ClearWave(waveTransform, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Virtue"], new Vector3(40f, 1f, 474f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component })); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Drone"], new Vector3(40f, -3f, 536f), GeneralFuncs.Quat_180, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Stray"], new Vector3(40f, -12f, 547f), GeneralFuncs.Quat_180, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Stray"], new Vector3(40f, -12f, 494f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component }); WaveFuncs.AddActivation(waveTransform, array, component3, lastWave: true, 4); CheckpointFuncs.UpdateRoomInCheckpoint(transform.parent, component4); } public static void GlassBridge() { //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_00db: 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_0116: 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_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //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) Transform transform = GeneralFuncs.FindInactive("7 - Fan Room/7 Content/Enemies").transform; Transform val = transform; ActivateArena component = ((Component)transform.Find("Cube")).GetComponent(); Door component2 = GameObject.Find("/Door (Large) With Controllers (3)/Door (Large)").GetComponent(); Door component3 = GameObject.Find("/Door (Large) With Controllers (4)/Door (Large)").GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component2, component3 }; CheckPoint component4 = GeneralFuncs.FindInactive("Checkpoint").GetComponent(); component.doors = doors; WaveFuncs.ClearWave(val, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["EyeYellow"], new Vector3(40f, 30f, 586f), GeneralFuncs.Quat_180, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Schism"], new Vector3(58.5f, -7f, 567f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Schism"], new Vector3(58.5f, -2f, 586f), GeneralFuncs.Quat_270, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Schism"], new Vector3(21.5f, 8f, 586f), GeneralFuncs.Quat_90, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Schism"], new Vector3(40f, 8f, 622f), GeneralFuncs.Quat_180, null, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform targetEnemy = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["EyeMalicious"], new Vector3(21.5f, 15f, 576f), GeneralFuncs.Quat_90, null, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform val2 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Idol"], new Vector3(40f, 8f, 632f), GeneralFuncs.Quat_180, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.SetIdolTarget(val2, targetEnemy); ActivateNextWave val3 = WaveFuncs.AddActivation(val, doors, component3, lastWave: true, 5); GameObject val4 = GeneralFuncs.MakeEmpty(val, "IdolMover"); val4.SetActive(false); EnemyFuncs.AddMover(val4, val2).MoveXYZ(moveX: false, moveY: false).TargetXYZ(0f, 0f, 622f); Util.ArrayAdd(ref val3.toActivate, val4); CheckpointFuncs.UpdateRoomInCheckpoint(transform.parent, component4); } public static void GlassBridgeTerminal() { //IL_0028: 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) Transform transform = GeneralFuncs.FindInactive("7 - Fan Room/7 Nonstuff").transform; string message = "NEMESIS COMMENTARY 1:\r\nSome encounters can try to bait you into using specific weapons\r\n\r\nLike trying to get you to use a Railcannon charge right before a Virtue, or making you choose between shooting a cannonball at a Cerberus or a Providence\r\n\r\nExperiment with different strategies and see what you like the most"; ObjectFuncs.PlaceTerminalTestament(transform, message, new Vector3(39.3f, 121.5f, 597f), Quaternion.Euler(0f, 90f, 180f)); } public static void StrayRoom() { //IL_00a8: 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_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_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_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_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_0215: 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_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("9 - Projectile Arena/9 Content/Enemies").transform; Transform val = transform.Find("Projectile Wave"); ActivateArena component = ((Component)transform.Find("Cube")).GetComponent(); ActivateNextWave component2 = ((Component)val).GetComponent(); Transform val2 = transform.Find("New Wave"); ActivateNextWave component3 = ((Component)val2).GetComponent(); Door[] doors = component3.doors; Door doorForward = component3.doorForward; CheckPoint component4 = GeneralFuncs.FindInactive("Checkpoint (4)").GetComponent(); WaveFuncs.ClearWave(val, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Guttertank"], new Vector3(139f, 28.2f, 640f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["MaliciousFace"], new Vector3(101f, 20.5f, 657f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["MaliciousFace"], new Vector3(101f, 20.5f, 623f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); WaveFuncs.ClearWaveNoTrigger(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Providence"], new Vector3(87f, 43f, 640f), GeneralFuncs.Quat_90, Array.Empty(), (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Mannequin"], new Vector3(88.5f, 28f, 617.5f), GeneralFuncs.Quat_90, Array.Empty(), (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Mannequin"], new Vector3(88.5f, 28f, 662.5f), GeneralFuncs.Quat_90, Array.Empty(), (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Streetcleaner"], new Vector3(128.5f, 28f, 622.5f), GeneralFuncs.Quat_270, Array.Empty(), (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Streetcleaner"], new Vector3(128.5f, 28f, 657.5f), GeneralFuncs.Quat_270, Array.Empty(), (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Streetcleaner"], new Vector3(140.5f, 28.2f, 640.5f), GeneralFuncs.Quat_270, Array.Empty(), (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); component3.lastWave = false; component3.enemyCount = 3; component3.doors = Array.Empty(); component3.doorForward = null; ActivateNextWave anwActivator = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 6); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Towers").transform; DeathMarkerFuncs.AddDeathMarker(transform2, anwActivator); ActivateNextWave val3 = WaveFuncs.AddActivation(transform2, doors, doorForward); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Tower"], new Vector3(93.5f, 18f, 623f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Tower"], new Vector3(93.5f, 18f, 657f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }); CheckpointFuncs.UpdateRoomInCheckpoint(transform.parent, component4); } public static void BloodCorridor() { //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_0121: 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_013d: 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_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("10 - Combo Hallway/10 Content/Enemies").transform; Transform waveTransform = transform.Find("Wave 1"); ActivateArena component = ((Component)transform.Find("Trigger 1")).GetComponent(); Transform waveTransform2 = transform.Find("Wave 2"); ActivateArena component2 = ((Component)transform.Find("Trigger 2")).GetComponent(); Door component3 = GameObject.Find("/Door (Large) With Controllers (6)/Door (Large)").GetComponent(); Door component4 = GameObject.Find("/Door (Large) With Controllers (7)/Door (Large)").GetComponent(); Door[] array = (Door[])(object)new Door[2] { component3, component4 }; CheckPoint component5 = GeneralFuncs.FindInactive("Checkpoint (1)").GetComponent(); component.doors = array; Util.ArrayAdd(ref component5.doorsToUnlock, array); WaveFuncs.ClearWave(waveTransform, null, (ActivateArena[])(object)new ActivateArena[1] { component }); ArenaFuncs.SetArenaDelay(component, 0f); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Stalker"], new Vector3(192f, 28f, 600f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform obj = EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Gutterman"], new Vector3(192f, 28f, 610f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component }); obj.localScale *= 0.9f; EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Swordsmachine"], new Vector3(195f, 28f, 640f), GeneralFuncs.Quat_180, null, (ActivateArena[])(object)new ActivateArena[1] { component }); WaveFuncs.AddActivation(waveTransform, array, component4, lastWave: true, 3); WaveFuncs.ClearWave(waveTransform2, null, (ActivateArena[])(object)new ActivateArena[1] { component2 }); CheckpointFuncs.UpdateRoomInCheckpoint(transform.parent, component5); } public static void WeirdRoom() { //IL_0144: 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_0186: 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_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: 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_01f1: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("11 - Projectile Zombies Room/11 Content/Enemies").transform; Transform val = transform.Find("Wave 1"); Transform val2 = val.Find("Filth"); Door component = GameObject.Find("/Door (Large) With Controllers (7)/Door (Large)").GetComponent(); Door component2 = GameObject.Find("/Door (Large) With Controllers (8)/Door (Large)").GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component, component2 }; CheckPoint component3 = GeneralFuncs.FindInactive("Checkpoint (1)").GetComponent(); ActivateArena component4 = ((Component)transform.Find("Trigger 1A")).GetComponent(); ActivateArena component5 = ((Component)transform.Find("Trigger 1B")).GetComponent(); ActivateArena component6 = ((Component)transform.Find("Trigger 2")).GetComponent(); ActivateArena[] array = (ActivateArena[])(object)new ActivateArena[3] { component4, component5, component6 }; ArenaLink arenaLink = ((Component)transform).gameObject.AddComponent(); arenaLink.linkedArenas = array; ActivateArena[] array2 = array; foreach (ActivateArena val3 in array2) { val3.doors = doors; ArenaFuncs.SetArenaDelay(val3, 0.75f); } ((Component)val2).GetComponent().dontActivateOnEnable = true; WaveFuncs.ClearWave(val, null, array); WaveFuncs.ClearWave(val2); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["RocketLauncher"], new Vector3(180.5f, 48f, 537.5f), Quaternion.Euler(0f, 315f, 0f), null, array); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Mannequin"], new Vector3(182f, 48.2f, 579f), GeneralFuncs.Quat_180, null, array); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Mannequin"], new Vector3(202f, 53f, 564f), GeneralFuncs.Quat_270, null, array); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Virtue"], new Vector3(202f, 59f, 599f), GeneralFuncs.Quat_180, null, array)); WaveFuncs.AddActivation(val, doors, component2, lastWave: true, 4); CheckpointFuncs.UpdateRoomInCheckpoint(transform.parent, component3); } public static void PenultimateRoom() { //IL_00b0: 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_00eb: 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_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028e: 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_02d6: 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_031e: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("12 - Boss Hallway/12 Content/Enemies").transform; Transform val = transform; ActivateArena component = ((Component)val.Find("Cube")).GetComponent(); Door component2 = GameObject.Find("/Door (Large) With Controllers (8)/Door (Large)").GetComponent(); Door component3 = GameObject.Find("/Door (Large) With Controllers (10)/Door (Large)").GetComponent(); Door[] array = (Door[])(object)new Door[2] { component2, component3 }; CheckPoint component4 = GeneralFuncs.FindInactive("Checkpoint (5)").GetComponent(); Util.ArrayAdd(ref component4.doorsToUnlock, array); component.doors = array; WaveFuncs.ClearWave(val, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Mortar"], new Vector3(168.5f, 55f, 486f), GeneralFuncs.Quat_90, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Mortar"], new Vector3(168.5f, 55f, 508f), GeneralFuncs.Quat_270, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Mindflayer"], new Vector3(202f, 58.5f, 482f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Deathcatcher"], new Vector3(202f, 53f, 445f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component }); ActivateNextWave val2 = WaveFuncs.AddActivation(val, Array.Empty(), null, lastWave: false, 1); ActivateNextWave anwActivator = WaveFuncs.AddActivation(val, Array.Empty(), null, lastWave: false, 3); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Wave 2").transform; DeathMarkerFuncs.AddDeathMarker(transform2, anwActivator); ActivateNextWave val3 = WaveFuncs.AddActivation(transform2, array, component3); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Cerberus"], new Vector3(202f, 53.1f, 529f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 })); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Eye"], new Vector3(202f, 87.5f, 463f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Eye"], new Vector3(168f, 87.5f, 497f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Eye"], new Vector3(202f, 87.5f, 531f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Eye"], new Vector3(234f, 87.5f, 497f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }); CheckpointFuncs.UpdateRoomInCheckpoint(transform.parent, component4); } public static void PenultimateRoomSecret() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("12 - Boss Hallway/12 Content/Secret Area").transform; Transform val = transform; ActivateArena component = ((Component)val.Find("Cube (2)")).GetComponent(); CheckPoint component2 = GeneralFuncs.FindInactive("Checkpoint (5)").GetComponent(); WaveFuncs.ClearWave(val, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Ferryman"], new Vector3(202f, 38.2f, 545f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component }); DeathZone component3 = GeneralFuncs.FindInactive("12 - Boss Hallway/12 Nonstuff/Bonus Area/Fan (1)").GetComponent(); component3.unaffectedEnemyTypes = (EnemyType[])(object)new EnemyType[1] { (EnemyType)26 }; CheckpointFuncs.UpdateRoomInCheckpoint(transform.parent, component2); } public static void BossRoom() { //IL_00cc: 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_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_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("13 - Malicious Face Arena/13 Content").transform; Transform val = transform.Find("Boss"); ActivateArena component = ((Component)transform.Find("Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val).GetComponent(); CheckPoint component3 = GeneralFuncs.FindInactive("Checkpoint (2)").GetComponent(); ActivateNextWave val2 = WaveFuncs.AddActivation(val, Array.Empty(), null, lastWave: false, 1, null, noActivationDelay: false, forEnemies: true); ActivateNextWave val3 = WaveFuncs.AddActivation(val, Array.Empty(), null, lastWave: false, 3, null, noActivationDelay: false, forEnemies: true); ActivateNextWave val4 = WaveFuncs.AddActivation(val, Array.Empty(), null, lastWave: false, 5, null, noActivationDelay: false, forEnemies: true); ActivateNextWave[] array = (ActivateNextWave[])(object)new ActivateNextWave[3] { val2, val3, val4 }; Idol[] array2 = Array.Empty(); for (int i = 0; i < 3; i++) { ActivateNextWave val5 = array[i]; Transform val6 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Idol"], new Vector3(202f, 42.5f, 416f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); Util.ArrayAdd(ref array2, ((Component)val6).GetComponent()); GameObject val7 = GeneralFuncs.MakeEmpty(val, "IdolMover"); val7.SetActive(false); EnemyFuncs.AddMover(val7, val6).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, 52.5f); Util.ArrayAdd(ref val5.toActivate, val7); } ArenaFuncs.SetArenaDelay(component, 0f); Transform val8 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Mannequin"], new Vector3(202f, 53.2f, 408.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform val9 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Mannequin"], new Vector3(209.5f, 53.2f, 413f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Mannequin"], new Vector3(194.5f, 53.2f, 413f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); array2[0].overrideTarget = ((Component)val9).GetComponent(); array2[1].overrideTarget = ((Component)val8).GetComponent(); array2[2].overrideTarget = ((Component)val.Find("Spider/Body")).GetComponent(); CheckpointFuncs.UpdateRoomInCheckpoint(transform.parent, component3); } } public static class PatchLevel0_2 { [CompilerGenerated] private static class <>O { public static UnityAction <0>__UndimLightsOnCheckpoint; } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__13_0; internal void b__13_0() { GeneralFuncs.FindInactive("5 - Crusher Tutorial").SetActive(true); } } public static int[] killRanks = new int[4] { 21, 34, 43, 57 }; public static int[] styleRanks = new int[4] { 9000, 13000, 16500, 19000 }; public static int[] timeRanks = new int[4] { 480, 410, 330, 260 }; public static void Patch() { StatueRoomTerminal(); SecretTerminal(); SmallCorridor(); GlassFloor(); BloodFallRoom(); RemoveSwordsmachine(); SidePathSplit(); SidePathInfightRoom(); SidePathCorridor(); CrusherTutorial(); CrusherRoom(); CrusherCorridor(); FourWayRoom(); WickedRoom(); AlarmRoom(); FinalRoom(); SecretSwordsmachine(); CheckpointFuncs.ClearAndInheritAllRooms(); } public static void StatueRoomTerminal() { //IL_0028: 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) Transform transform = GeneralFuncs.FindInactive("1A - First Room").transform; string message = "NEMESIS COMMENTARY 2.1:\r\nYou can find terminals hidden in different levels talking about Billion Nemesis and the thought process behind the mod. Some of these are placed close to secret orbs, and some can be more hidden\r\n\r\nMake sure to collect the secret orbs, because their encounters are changed too"; ObjectFuncs.PlaceTerminalTestament(transform, message, new Vector3(13.3f, 13.3f, 26f), Quaternion.Euler(345f, 270f, 180f)); } public static void SecretTerminal() { //IL_0028: 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_007d: 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) Transform transform = GeneralFuncs.FindInactive("7B - Bonus Platforming").transform; string message = "NEMESIS COMMENTARY 2.2:\r\nThis mod got way too complicated when I started trying to do more than just spawning enemies\r\n\r\nCount your days Hakita"; SimpleScrollingText componentInChildren = ((Component)ObjectFuncs.PlaceTerminalTestament(transform, message, new Vector3(-45f, -1f, 383f), Quaternion.Euler(0f, 180f, 180f))).GetComponentInChildren(true); GameObject val = GeneralFuncs.MakeEmpty(((Component)componentInChildren).transform, "SimpleScrollingTextActivator"); ObjectFuncs.AddScrollingTextActivator(val, componentInChildren); ObjectFuncs.PlaceAltarRed(transform, hasSkull: false, new Vector3(-45f, 10f, 374f), Quaternion.Euler(0f, 90f, 270f), null, null, (GameObject[])(object)new GameObject[1] { val }); } public static void SmallCorridor() { GameObject val = GeneralFuncs.FindInactive("1B - Projectiles Hallway/ArenaTrigger"); val.SetActive(false); } public static void GlassFloor() { //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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_0112: 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_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: 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_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("2 - Crusher Hallway/Enemies/Wave 1").transform; Transform waveTransform = transform; ActivateArena component = GeneralFuncs.FindInactive("2 - Crusher Hallway/FightTrigger").GetComponent(); Door component2 = GameObject.Find("Door (Large) With Controllers (1)/Door (Large)").GetComponent(); Door component3 = GameObject.Find("Door (Large) With Controllers (2)/Door (Large)").GetComponent(); Door[] array = (Door[])(object)new Door[2] { component2, component3 }; Util.ArrayAdd(ref component.doors, array); WaveFuncs.ClearWave(waveTransform, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Providence"], new Vector3(0f, 0f, 70f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Cerberus"], new Vector3(0f, -10f, 119f), GeneralFuncs.Quat_180, null, (ActivateArena[])(object)new ActivateArena[1] { component }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Drone"], new Vector3(0f, 7f, 72f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component })); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Drone"], new Vector3(0f, 7f, 92f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component })); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Drone"], new Vector3(0f, 7f, 112f), GeneralFuncs.Quat_180, null, (ActivateArena[])(object)new ActivateArena[1] { component })); WaveFuncs.AddActivation(waveTransform, array, component3, lastWave: true, 5); Transform transform2 = GeneralFuncs.FindInactive("2 - Crusher Hallway/FightTrigger").transform; Vector3 localScale = transform2.localScale; transform2.localScale = new Vector3(3f * localScale.x, 3f * localScale.y, 2f * localScale.z); } public static void BloodFallRoom() { //IL_011f: 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_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("3 - Blood Room/3 Stuff/Enemies").transform; Transform val = transform.Find("Wave 1"); ActivateArena component = ((Component)transform.Find("ArenaTrigger")).GetComponent(); ActivateArena component2 = ((Component)transform.Find("ArenaTrigger (1)")).GetComponent(); ActivateNextWave component3 = ((Component)val).GetComponent(); Door component4 = GeneralFuncs.FindInactive("Door (Large) With Controllers (9)/Door (Large)").GetComponent(); Door component5 = GeneralFuncs.FindInactive("Door (Large) With Controllers (2)/Door (Large)").GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component5, component4 }; GameObject element = GeneralFuncs.FindInactive("5 - Crusher Tutorial"); Util.ArrayAdd(ref component4.activatedRooms, element); component.doors = doors; Door component6 = GeneralFuncs.FindInactive("4 - Swordsmachine Hallway/Door (Large) With Controllers (10)/Door (Large)").GetComponent(); Util.ArrayAdd(ref component6.activatedRooms, element); component2.onlyWave = false; WaveFuncs.ClearWave(val, null, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Deathcatcher").transform; ActivateNextWave val2 = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false, 0); Transform val3 = EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Deathcatcher"], new Vector3(30f, -30f, 142f), Quaternion.Euler(45f, 270f, 0f), (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); ((Component)val3).GetComponent().canRespawnIdols = false; Transform enemyTransform = EnemyFuncs.AddCerberusStatue(val, new Vector3(-27.4055f, -7.2594f, 143.2597f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateArena[])(object)new ActivateArena[1] { component }, 1.25f); Transform val4 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Virtue"], new Vector3(20f, -5f, 143f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(val4); EnemyFuncs.AddTeleportOnCondition(val4, processPassively: false).AddCondition(new Vector3(0f, 20f, 0f)).AddAxis(val4, 'y', -25f, greater: false, orEqual: true); component3.lastWave = false; component3.doors = Array.Empty(); component3.doorForward = null; component3.enemyCount = 2; ActivateNextWaveHP val5 = WaveFuncs.AddActivationHP(val, 11f, enemyTransform, Array.Empty(), null); ActivateNextWaveHP val6 = WaveFuncs.AddActivationHP(val, 5f, val4, Array.Empty(), null); ActivateNextWaveHP[] anwhSources = (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[2] { val5, val6 }; GameObject val7 = GeneralFuncs.FindInactive("3 - Blood Room/3 Nonstuff/Decorations/Statue"); val7.SetActive(false); Transform val8 = val3.Find("Model"); ((Behaviour)((Component)val8).GetComponent()).enabled = false; val8.localRotation = GeneralFuncs.Quat_0; val3.localScale = 1.25f * Vector3.one; Transform transform3 = GeneralFuncs.MakeEmpty(transform, "Bitches").transform; ActivateNextWave val9 = WaveFuncs.AddActivation(transform3, doors, component4, lastWave: true, 0); Util.ArrayAdd(ref val9.doors, component6); DeathMarkerFuncs.AddDeathMarker(transform3, component3, (ActivateNextWave[])(object)new ActivateNextWave[1] { val9 }); DeathMarkerFuncs.AddDeathMarker(transform3, val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { val9 }); Transform targetEnemy = EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["MaliciousFace"], new Vector3(3f, -10f, 133f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val9 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, anwhSources); Transform targetEnemy2 = EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["MaliciousFace"], new Vector3(3f, -10f, 153f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val9 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, anwhSources); Transform idol = EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Idol"], new Vector3(-45f, -3f, 133f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val9 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, anwhSources); Transform idol2 = EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Idol"], new Vector3(-45f, -3f, 153f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val9 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, anwhSources); EnemyFuncs.SetIdolTarget(idol, targetEnemy); EnemyFuncs.SetIdolTarget(idol2, targetEnemy2); } public static void RemoveSwordsmachine() { GameObject val = GeneralFuncs.FindInactive("3 - Blood Room/3 Nonstuff/3B - Infight Area/Bonus Area/3B Enemies"); val.SetActive(false); GameObject val2 = GeneralFuncs.FindInactive("3 - Blood Room/3 Nonstuff/3B - Infight Area/Bonus Area/FakeGore"); Object.Destroy((Object)(object)val2.GetComponent()); GameObject val3 = GeneralFuncs.FindInactive("3 - Blood Room/3 Nonstuff/3B - Infight Area/Alt Room Changer"); val3.SetActive(false); GameObject val4 = GeneralFuncs.FindInactive("7 - Crusher Hallway/Alt Path Updater"); val4.SetActive(false); GameObject val5 = GeneralFuncs.FindInactive("4 - Swordsmachine Hallway/Invisible Wall"); val5.SetActive(false); GameObject val6 = GeneralFuncs.FindInactive("3 - Blood Room/3 Nonstuff/Swordsmachine Trigger"); val6.SetActive(false); GameObject val7 = GeneralFuncs.FindInactive("4B - Hallway/4B Nonstuff/4B Contents (2)"); val7.SetActive(false); Object.Destroy((Object)(object)val7.GetComponent()); GameObject val8 = GeneralFuncs.FindInactive("5B - Secret Arena/5B Nonstuff/Fake Enemies (1)"); val8.SetActive(false); Object.Destroy((Object)(object)val8.GetComponent()); GameObject val9 = GeneralFuncs.FindInactive("7 - Crusher Hallway/7 Contents/Enemies/Wave 2 Trigger"); val9.SetActive(false); GameObject val10 = GeneralFuncs.FindInactive("7 - Crusher Hallway/7 Nonstuff/Invisible Wall"); val10.SetActive(false); GameObject val11 = GeneralFuncs.FindInactive("8 - Sim Arena/8 Contents/8B Contents"); val11.SetActive(false); GameObject val12 = GeneralFuncs.FindInactive("8 - Sim Arena/8 Contents/8B Contents Alt"); val12.SetActive(false); Object.Destroy((Object)(object)val12.GetComponentInChildren()); Object.Destroy((Object)(object)GeneralFuncs.FindInactive("8 - Sim Arena/8 Contents/Alt Changer").GetComponent()); Object.Destroy((Object)(object)GeneralFuncs.FindInactive("8 - Sim Arena/8 Contents/Alt Changer 2").GetComponent()); Object.Destroy((Object)(object)GeneralFuncs.FindInactive("8 - Sim Arena/8 Contents/Alt Changer Disabler").GetComponent()); } public static void SidePathSplit() { //IL_0032: 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) Transform transform = GeneralFuncs.FindInactive("4 - Swordsmachine Hallway").transform; Door component = GeneralFuncs.FindInactive("Door (Large) With Controllers (14)/Door (Large)").GetComponent(); ObjectFuncs.PlaceAltarRed(transform, hasSkull: false, new Vector3(15f, -10f, 183f), GeneralFuncs.Quat_90, (Door[])(object)new Door[1] { component }); } public static void SidePathInfightRoom() { //IL_00a9: 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_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_014e: 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_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_031c: 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_0364: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_0454: 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_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_0527: Unknown result type (might be due to invalid IL or missing references) //IL_056a: Unknown result type (might be due to invalid IL or missing references) //IL_056f: Unknown result type (might be due to invalid IL or missing references) //IL_05b2: Unknown result type (might be due to invalid IL or missing references) //IL_05b7: Unknown result type (might be due to invalid IL or missing references) //IL_05fa: Unknown result type (might be due to invalid IL or missing references) //IL_05ff: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Unknown result type (might be due to invalid IL or missing references) //IL_0692: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06bf: Unknown result type (might be due to invalid IL or missing references) //IL_06ea: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_0712: Unknown result type (might be due to invalid IL or missing references) //IL_071c: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("3 - Blood Room/3 Nonstuff/3B - Infight Area/Bonus Area").transform; ObjectManipulationFuncs.FixCollisions(transform); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "NemesisStuff").transform; ComponentExtensions.GetOrAddComponent((Component)(object)transform2); Transform transform3 = GeneralFuncs.MakeEmpty(transform2, "Wave 1").transform; Door component = GameObject.Find("Door (Large) With Controllers (12)/Door (Large)").GetComponent(); Door component2 = GameObject.Find("Door (Large) With Controllers (13)/Door (Large)").GetComponent(); Door[] array = (Door[])(object)new Door[2] { component, component2 }; CheckPoint component3 = GeneralFuncs.FindInactive("Checkpoint").GetComponent(); Util.ArrayAdd(ref component3.doorsToUnlock, array); GameObject trigger = ArenaFuncs.MakeTrigger(transform2, "Wave 1", new Vector3(-60f, -4f, 163f), new Vector3(-80f, 5f, 183f)); ActivateArena val = ArenaFuncs.AddArena(trigger, array); ActivateNextWave val2 = WaveFuncs.AddActivation(transform3, Array.Empty(), null, lastWave: false); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(transform3, LevelAssets.Enemies["Sentry"], new Vector3(-44.5f, -5f, 168f), GeneralFuncs.Quat_270, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { val }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(transform3, LevelAssets.Enemies["Sentry"], new Vector3(-94.5f, -5f, 168f), GeneralFuncs.Quat_90, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { val }), stopDashing: true, stopWalking: true); Transform transform4 = ((Component)EnemyFuncs.AddEnemy(transform3, LevelAssets.Enemies["RocketLauncherNoStand"], new Vector3(-69f, 2f, 177.5f), GeneralFuncs.Quat_90, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { val })).transform; transform4.localScale *= 0.75f; ActivateNextWave anwActivator = WaveFuncs.AddActivation(transform3, Array.Empty(), null, lastWave: false, 3); val2.enemyCount = 1; Transform transform5 = GeneralFuncs.MakeEmpty(transform2, "Wave 2").transform; ActivateNextWave val3 = WaveFuncs.AddActivation(transform5, array, component2); DeathMarkerFuncs.AddDeathMarker(transform5, anwActivator, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform5, LevelAssets.Enemies["RocketLauncherNoStand"], new Vector3(-92f, 3f, 177f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }); EnemyFuncs.AddEnemyNoTrigger(transform5, LevelAssets.Enemies["RocketLauncherNoStand"], new Vector3(-46f, 3f, 177f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }); EnemyFuncs.AddEnemyNoTrigger(transform5, LevelAssets.Enemies["Soldier"], new Vector3(-51.5f, -3f, 178.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }); EnemyFuncs.AddEnemyNoTrigger(transform5, LevelAssets.Enemies["Soldier"], new Vector3(-51.5f, -3f, 167.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }); EnemyFuncs.AddEnemyNoTrigger(transform5, LevelAssets.Enemies["Soldier"], new Vector3(-87.5f, -3f, 167.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }); EnemyFuncs.AddEnemyNoTrigger(transform5, LevelAssets.Enemies["Soldier"], new Vector3(-87.5f, -3f, 178.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }); Transform targetRoom = transform2; transform2 = GeneralFuncs.MakeEmpty(transform, "NemesisStuff GoBack").transform; ComponentExtensions.GetOrAddComponent((Component)(object)transform2); Transform transform6 = GeneralFuncs.MakeEmpty(transform2, "GoBack Wave 1").transform; GameObject val4 = ArenaFuncs.MakeTrigger(transform2, "GoBack Wave 1", new Vector3(-60f, -4f, 163f), new Vector3(-80f, 5f, 183f)); val4.SetActive(false); GameObject trigger2 = ArenaFuncs.MakeTrigger(transform2, "Skull", new Vector3(-98f, -5f, 180f), new Vector3(-108f, 5f, 198f)); ObjectActivator val5 = ObjectActivatorFuncs.AddObjectActivator(trigger2, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { val4 })); CheckPoint val6 = CheckpointFuncs.MakeCheckpoint("RedSkull", new Vector3(-103f, -5f, 185f), GeneralFuncs.Quat_180, ((Component)transform).gameObject, component3.doorsToUnlock, (GameObject[])(object)new GameObject[1] { ((Component)transform2).gameObject }, new List()); ActivateArena val7 = ArenaFuncs.AddArena(val4, array); ActivateNextWave val8 = WaveFuncs.AddActivation(transform6, Array.Empty(), null, lastWave: false); Transform val9 = EnemyFuncs.AddEnemy(transform6, LevelAssets.Enemies["Providence"], new Vector3(-47f, 0f, 173f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val8 }, (ActivateArena[])(object)new ActivateArena[1] { val7 }); Transform val10 = EnemyFuncs.AddEnemy(transform6, LevelAssets.Enemies["Virtue"], new Vector3(-93f, 0f, 173f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val8 }, (ActivateArena[])(object)new ActivateArena[1] { val7 }); Transform idol = EnemyFuncs.AddEnemy(transform6, LevelAssets.Enemies["Idol"], new Vector3(-49.25f, -4f, 181.25f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val8 }, (ActivateArena[])(object)new ActivateArena[1] { val7 }); Transform idol2 = EnemyFuncs.AddEnemy(transform6, LevelAssets.Enemies["Idol"], new Vector3(-89.5f, -4f, 164.25f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val8 }, (ActivateArena[])(object)new ActivateArena[1] { val7 }); EnemyFuncs.AddStopper(val9); EnemyFuncs.AddStopper(val10); EnemyFuncs.SetIdolTarget(idol, val10); EnemyFuncs.SetIdolTarget(idol2, val9); Transform transform7 = GeneralFuncs.MakeEmpty(transform2, "GoBack Wave 2").transform; ActivateNextWave val11 = WaveFuncs.AddActivation(transform7, array, component); Transform obj = EnemyFuncs.AddEnemyNoTrigger(transform7, LevelAssets.Enemies["Mindflayer"], new Vector3(-51.5f, 0f, 173f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val11 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val8 }); obj.localScale *= 0.85f; Transform obj2 = EnemyFuncs.AddEnemyNoTrigger(transform7, LevelAssets.Enemies["Mindflayer"], new Vector3(-87f, 0f, 173f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val11 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val8 }); obj2.localScale *= 0.85f; CheckpointFuncs.AddInheritedRoomToCheckpoint(targetRoom, component3); } public static void SidePathCorridor() { //IL_0022: 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) Transform transform = GeneralFuncs.FindInactive("4B - Hallway/4B Nonstuff").transform; ObjectFuncs.PlaceAltarRed(transform, hasSkull: true, new Vector3(-45f, -11f, 193f), GeneralFuncs.Quat_180); } public static void CrusherTutorial() { //IL_0097: 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_00b7: 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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown Transform transform = GeneralFuncs.FindInactive("5 - Crusher Tutorial/5 Contents").transform; Transform waveTransform = transform.Find("Enemies"); ActivateArena component = ((Component)transform.Find("Cube (1)")).GetComponent(); Door component2 = GeneralFuncs.FindInactive("Door (Large) With Controllers (15)/Door (Large)").GetComponent(); Util.ArrayAdd(ref component2.activatedRooms, GeneralFuncs.FindInactive("4 - Swordsmachine Hallway")); CheckPoint component3 = GeneralFuncs.FindInactive("Checkpoint").GetComponent(); WaveFuncs.ClearWave(waveTransform, null, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform val = EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["PowerNoEffect"], new Vector3(15f, -6.2f, 220f), GeneralFuncs.Quat_180, null, (ActivateArena[])(object)new ActivateArena[1] { component }); val.localScale *= 0.85f; EnemyFuncs.RemoveEnemyLogic(val); CheckPoint val2 = component3; if (val2.onRestart == null) { val2.onRestart = new UnityEvent(); } UnityEvent onRestart = component3.onRestart; object obj = <>c.<>9__13_0; if (obj == null) { UnityAction val3 = delegate { GeneralFuncs.FindInactive("5 - Crusher Tutorial").SetActive(true); }; <>c.<>9__13_0 = val3; obj = (object)val3; } onRestart.AddListener((UnityAction)obj); CheckpointFuncs.UpdateRoomInCheckpoint(transform.parent, component3); } public static void CrusherRoom() { //IL_00a9: 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_00f4: 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_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_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) Transform transform = GeneralFuncs.FindInactive("6 - Crusher Arena/6 Contents/Enemies").transform; Transform val = transform.Find("Wave 2"); ActivateArena component = ((Component)transform.Find("Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val).GetComponent(); CheckPoint component3 = GeneralFuncs.FindInactive("Checkpoint").GetComponent(); Door[] doors = component2.doors; Door doorForward = component2.doorForward; component2.lastWave = false; component2.doors = Array.Empty(); component2.doorForward = null; WaveFuncs.ClearWave(val, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Virtue"], new Vector3(6f, 3f, 244f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component })); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Virtue"], new Vector3(24f, 3f, 244f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component })); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Virtue"], new Vector3(15f, 3f, 254f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component })); ActivateNextWave val2 = WaveFuncs.AddActivation(val, Array.Empty(), null, lastWave: false, 1, null, noActivationDelay: false, forEnemies: true); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Maurice").transform; ActivateNextWave val3 = WaveFuncs.AddActivation(transform2, doors, doorForward, lastWave: true, 0); DeathMarkerFuncs.AddDeathMarker(transform2, component2, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["MaliciousFace"], new Vector3(15f, -10f, 234f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }), stopDashing: true, stopWalking: true); CheckpointFuncs.UpdateRoomInCheckpoint(transform.parent, component3); } public static void CrusherCorridor() { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_00b6: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("7 - Crusher Hallway/7 Contents/Enemies").transform; Transform waveTransform = transform.Find("Wave 1"); ActivateArena component = ((Component)transform.Find("Wave 1 Trigger")).GetComponent(); CheckPoint component2 = GeneralFuncs.FindInactive("Checkpoint").GetComponent(); WaveFuncs.ClearWave(waveTransform, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Gutterman"], new Vector3(-50f, -11f, 277f), GeneralFuncs.Quat_90, null, (ActivateArena[])(object)new ActivateArena[1] { component }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Schism"], new Vector3(-45f, -10.9f, 282f), GeneralFuncs.Quat_90, null, (ActivateArena[])(object)new ActivateArena[1] { component }), stopDashing: true, stopWalking: true); CheckpointFuncs.UpdateRoomInCheckpoint(transform.parent, component2); } public static void FourWayRoom() { //IL_0188: 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_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Expected O, but got Unknown //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Expected O, but got Unknown Transform transform = GeneralFuncs.FindInactive("7 - Crusher Hallway/7 Contents").transform; GameObject val = GeneralFuncs.FindInactive("5B - Secret Arena/5B Contents"); Door component = GeneralFuncs.FindInactive("Door (Large) With Controllers (5)/Door (Large)").GetComponent(); Door component2 = GeneralFuncs.FindInactive("Door (Large) With Controllers (3)/Door (Large)").GetComponent(); Door component3 = GeneralFuncs.FindInactive("Door (Large) With Controllers (4)/Door (Large)").GetComponent(); Door component4 = GeneralFuncs.FindInactive("Door (Large) With Controllers (7)/Door (Large)").GetComponent(); Door component5 = GeneralFuncs.FindInactive("Door (Large) With Controllers (11)/Door (Large)").GetComponent(); CheckPoint component6 = GeneralFuncs.FindInactive("Checkpoint (1)").GetComponent(); Util.ArrayRemove(ref component6.doorsToUnlock, (Door[])(object)new Door[2] { component, component2 }); component6.roomsToInherit.Remove(val); CheckpointFuncs.AddCheckpointConstantOff(((Component)component6).gameObject, component6); CheckPoint component7 = GeneralFuncs.FindInactive("Checkpoint").GetComponent(); Util.ArrayRemove(ref component7.doorsToUnlock, (Door[])(object)new Door[2] { component, component2 }); Util.ArrayRemove(ref component7.rooms, (GameObject[])(object)new GameObject[1] { val }); Util.ArrayRemove(ref component7.rooms, ((Component)transform).gameObject); CheckPoint component8 = GeneralFuncs.FindInactive("Checkpoint (2)").GetComponent(); Util.ArrayRemove(ref component8.doorsToUnlock, (Door[])(object)new Door[2] { component, component2 }); CheckPoint component9 = GeneralFuncs.FindInactive("CheckpointNemesis RedSkull").GetComponent(); Util.ArrayRemove(ref component9.doorsToUnlock, (Door[])(object)new Door[2] { component, component2 }); component.Lock(); component2.Lock(); CheckPoint val2 = CheckpointFuncs.MakeCheckpoint("FourWay", new Vector3(-45f, -11f, 269f), GeneralFuncs.Quat_180, ((Component)transform.parent).gameObject, (Door[])(object)new Door[3] { component3, component4, component5 }, (GameObject[])(object)new GameObject[1] { val }, new List()); val2.onRestart = new UnityEvent(); UnityEvent onRestart = val2.onRestart; object obj = <>O.<0>__UndimLightsOnCheckpoint; if (obj == null) { UnityAction val3 = UndimLightsOnCheckpoint; <>O.<0>__UndimLightsOnCheckpoint = val3; obj = (object)val3; } onRestart.AddListener((UnityAction)obj); GameObject val4 = GeneralFuncs.MakeEmpty(((Component)component4).transform, "DoorConstantLocker"); ObjectActivatorFuncs.AddDoorConstantLocker(val4, component4); ObjectActivatorFuncs.AddObjectActivator(((Component)((Component)val2).transform.Find("Hitbox")).gameObject, ObjectActivatorFuncs.MakeUltrakillEvent(null, (GameObject[])(object)new GameObject[1] { val4 })); Breakable component10 = GeneralFuncs.FindInactive("9B - Swordsmachine Arena Hallway/9B Nonstuff/Vent").GetComponent(); Breakable component11 = GeneralFuncs.FindInactive("9B - Swordsmachine Arena Hallway/9B Nonstuff/Vent (1)").GetComponent(); Object.Destroy((Object)(object)component10); Object.Destroy((Object)(object)component11); } public static void UndimLightsOnCheckpoint() { LightManipulator lightManipulator = Object.FindFirstObjectByType((FindObjectsInactive)1); if (lightManipulator.dimmedCounter > 0) { lightManipulator.DimLights(reversed: true); } ((Component)lightManipulator).gameObject.SetActive(false); } public static void WickedRoom() { //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_00b4: 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_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_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: 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_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //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_04ca: Unknown result type (might be due to invalid IL or missing references) //IL_04cf: Unknown result type (might be due to invalid IL or missing references) //IL_050c: Unknown result type (might be due to invalid IL or missing references) //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("5B - Secret Arena/5B Contents").transform; Door component = GeneralFuncs.FindInactive("Door (Large) With Controllers (4)/Door (Large)").GetComponent(); Door component2 = GeneralFuncs.FindInactive("Door (Large) With Controllers (7)/Door (Large)").GetComponent(); Door component3 = GeneralFuncs.FindInactive("Door (Large) With Controllers (5)/Door (Large)").GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component, component2 }; CheckPoint component4 = GeneralFuncs.FindInactive("CheckpointNemesis FourWay").GetComponent(); Transform transform2 = Object.Instantiate(LevelAssets.Objects["TeslaCoils"], new Vector3(-45f, -11f, 244f), GeneralFuncs.Quat_0).transform; transform2.SetParent(transform); GameObject val = ArenaFuncs.MakeTrigger(transform, "Power", new Vector3(-60f, 20f, 256f), new Vector3(-30f, -10f, 216f)); val.SetActive(false); ObjectActivator component5 = ((Component)transform2.Find("Activated")).GetComponent(); Util.ArrayAdd(ref component5.events.toActivateObjects, val); CheckPoint val2 = CheckpointFuncs.MakeCheckpoint("Dimmed", new Vector3(-48.5f, -11f, 193f), GeneralFuncs.Quat_270, GeneralFuncs.FindInactive("4B - Hallway"), (Door[])(object)new Door[1] { component3 }, Array.Empty(), new List(), reusable: false, inheritAllRooms: false, forceOff: true); GeneralFuncs.DontManipulateLights(((Component)val2).transform); GameObject val3 = ArenaFuncs.MakeTrigger(transform, "Virtues", new Vector3(-60f, 20f, 256f), new Vector3(-30f, -10f, 216f)); val3.SetActive(false); Transform transform3 = val3.transform; transform3.localScale *= 2f; ObjectActivatorFuncs.AddObjectActivator(val3, ObjectActivatorFuncs.MakeUltrakillEvent(null, (GameObject[])(object)new GameObject[1] { val3 }), 0.5f); WaveFuncs.AddActivation(val3.transform, (Door[])(object)new Door[1] { component2 }, component2, lastWave: true, 0, null, noActivationDelay: true, forEnemies: true); ObjectActivatorFuncs.AddHudMessage(val3, "Oh no I better start running!", timed: true, 4f); GameObject val4 = GeneralFuncs.MakeEmpty(transform, "SoundPlayerActivator"); val4.SetActive(false); GameObject val5 = GeneralFuncs.MakeEmpty(null, "SoundPlayer"); val5.SetActive(false); AudioSource val6 = val5.AddComponent(); GeneralFuncs.PlayAudioOnEnable(val5, val6); val6.clip = LevelAssets.AudioClips["Shutdown"]; AudioSourceExtensions.SetSpatialBlend(val6, 0f); ObjectActivator val7 = ObjectActivatorFuncs.AddObjectActivator(val4, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { val5 }), 2f, oneTime: true, nonCollider: true); GameObject val8 = GeneralFuncs.MakeEmpty(transform, "LightManActivator"); val8.SetActive(false); GameObject val9 = GeneralFuncs.MakeEmpty(null, "LightMan"); val9.SetActive(false); LightManipulator lightManipulator = val9.AddComponent(); lightManipulator.Configure(); GameObject val10 = GeneralFuncs.MakeEmpty(((Component)val2).transform, "CheckpointTurnOn"); val10.SetActive(false); ObjectActivatorFuncs.AddCheckpointTurnOn(val10, val2); ObjectActivator val11 = ObjectActivatorFuncs.AddObjectActivator(val8, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[2] { val9, val10 }), 3.5f, oneTime: true, nonCollider: true); GameObject val12 = GeneralFuncs.MakeEmpty(transform, "VirtueActivator"); val12.SetActive(false); ObjectActivator val13 = ObjectActivatorFuncs.AddObjectActivator(val12, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { val3 }), 5f, oneTime: true, nonCollider: true); Transform transform4 = GeneralFuncs.MakeEmpty(transform, "Wave 1").transform; ActivateArena val14 = ArenaFuncs.AddArena(val, doors); ActivateNextWave val15 = WaveFuncs.AddActivation(transform4, (Door[])(object)new Door[1] { component3 }, null, lastWave: true, 0, (GameObject[])(object)new GameObject[3] { val4, val8, val12 }, noActivationDelay: false, forEnemies: true); ComponentExtensions.GetOrAddComponent((Component)(object)((Component)EnemyFuncs.AddEnemy(transform4, LevelAssets.Enemies["Power"], new Vector3(-45f, 3f, 236f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val15 }, (ActivateArena[])(object)new ActivateArena[1] { val14 })).GetComponentInChildren()).distanceLimit = 18.5f; ActivateArena val16 = ArenaFuncs.AddArena(val3, Array.Empty(), onlyWave: true); Transform transform5 = GeneralFuncs.MakeEmpty(transform, "Wave 2 idols").transform; WaveFuncs.AddActivation(transform5, (Door[])(object)new Door[1] { component }, component, lastWave: false, 2, null, noActivationDelay: false, forEnemies: true); Transform transform6 = GeneralFuncs.MakeEmpty(transform, "Wave 2").transform; WaveFuncs.AddActivation(transform6, (Door[])(object)new Door[1] { component }, component, lastWave: true, 2); Transform idol = EnemyFuncs.AddEnemy(transform5, LevelAssets.Enemies["Idol"], new Vector3(-45f, -11f, 274.5f), GeneralFuncs.Quat_90, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { val16 }); Transform idol2 = EnemyFuncs.AddEnemy(transform5, LevelAssets.Enemies["Idol"], new Vector3(-45f, -11f, 279.5f), GeneralFuncs.Quat_90, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { val16 }); Transform targetEnemy = EnemyFuncs.AddEnemy(transform6, LevelAssets.Enemies["Virtue"], new Vector3(-45f, 5f, 253.5f), GeneralFuncs.Quat_180, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { val16 }); Transform targetEnemy2 = EnemyFuncs.AddEnemy(transform6, LevelAssets.Enemies["Virtue"], new Vector3(-45f, 8f, 221f), GeneralFuncs.Quat_180, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { val16 }); EnemyFuncs.SetIdolTarget(idol, targetEnemy); EnemyFuncs.SetIdolTarget(idol2, targetEnemy2); Breakable component6 = GeneralFuncs.FindInactive("5B - Secret Arena/5B Contents/Cube").GetComponent(); Object.Destroy((Object)(object)component6); Door[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); foreach (Door val17 in array) { Util.ArrayAdd(ref val17.activatedRooms, GeneralFuncs.FindInactive("5B - Secret Arena")); } CheckpointFuncs.UpdateRoomInCheckpoint(transform, component4); } public static void ActivateCheckpointDimmed() { CheckPoint component = GeneralFuncs.FindInactive("CheckpointNemesis Dimmed").GetComponent(); component.SetForceOff(false); component.activated = false; } public static void AlarmRoom() { //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_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_01fc: 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) Transform transform = GeneralFuncs.FindInactive("8 - Sim Arena/8 Contents/Enemies").transform; Transform val = transform.Find("Wave 1"); ActivateArena component = ((Component)transform.parent.Find("Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val).GetComponent(); Door component3 = GeneralFuncs.FindInactive("Door (Large) With Controllers (5)/Door (Large)").GetComponent(); Door component4 = GeneralFuncs.FindInactive("Door (Large) With Controllers (11)/Door (Large)").GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component3, component4 }; CheckPoint component5 = GeneralFuncs.FindInactive("Checkpoint").GetComponent(); component.doors = doors; Transform val2 = transform.Find("Wave 2"); ActivateNextWave component6 = ((Component)val2).GetComponent(); component2.toActivate = component6.toActivate; ((Component)val2).gameObject.SetActive(false); component2.lastWave = true; component2.doors = doors; component2.doorForward = component4; Object.Destroy((Object)(object)((Component)component).GetComponent()); Object.Destroy((Object)(object)((Component)transform.parent.Find("AlarmLight")).GetComponent()); WaveFuncs.ClearWave(val, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Idol"], new Vector3(-72f, 5.25f, 277f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Idol"], new Vector3(-90f, 5.25f, 277f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Cerberus"], new Vector3(-91f, -11f, 277f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Sentry"], new Vector3(-81f, -11f, 269.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); CheckPoint component7 = GeneralFuncs.FindInactive("Checkpoint (2)").GetComponent(); component7.roomsToInherit.Remove(((Component)transform.parent).gameObject); CheckPoint component8 = GeneralFuncs.FindInactive("Checkpoint (1)").GetComponent(); component8.roomsToInherit.Remove(((Component)transform.parent).gameObject); CheckpointFuncs.RemoveRoomFromCheckpoint("8", component5); CheckpointFuncs.AddRoomToCheckpoint(transform.parent, GeneralFuncs.FindInactive("CheckpointNemesis Dimmed").GetComponent()); } public static void FinalRoom() { //IL_00c8: 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_0113: 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_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: 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_01d2: 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_0212: 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_0241: 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_0285: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03ff: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_048f: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_04d7: Unknown result type (might be due to invalid IL or missing references) //IL_04dc: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_056f: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("9 - Crushers Arena/9 Contents/Enemies").transform; Transform val = transform.Find("Wave 2"); ActivateArena component = ((Component)transform.parent.Find("ActivateArena")).GetComponent(); ActivateNextWave component2 = ((Component)val).GetComponent(); CheckPoint component3 = GeneralFuncs.FindInactive("Checkpoint").GetComponent(); Door[] doors = component2.doors; Door doorForward = component2.doorForward; GameObject[] toActivate = component2.toActivate; component2.doors = Array.Empty(); component2.doorForward = null; component2.toActivate = Array.Empty(); component2.lastWave = false; component2.forEnemies = true; WaveFuncs.ClearWave(val, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Schism"], new Vector3(-129f, -15.9f, 267f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Schism"], new Vector3(-129f, -15.9f, 287f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }), stopDashing: true, stopWalking: true); Transform val2 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Gutterman"], new Vector3(-119f, -14.5f, 286.7f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(val2, stopDashing: true, stopWalking: true); EnemyFuncs.ApplySand(val2); val2.localScale *= 0.85f; Transform val3 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Gutterman"], new Vector3(-119f, -14.5f, 266.7f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(val3, stopDashing: true, stopWalking: true); EnemyFuncs.ApplySand(val3); val3.localScale *= 0.85f; EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Drone"], new Vector3(-106f, -1f, 267f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Drone"], new Vector3(-106f, -1f, 287f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Schism"], new Vector3(-101f, -10.9f, 279.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }), stopDashing: true, stopWalking: true); ActivateNextWave val4 = WaveFuncs.AddActivation(val, Array.Empty(), null, lastWave: false, 2, null, noActivationDelay: false, forEnemies: true); ActivateNextWave val5 = WaveFuncs.AddActivation(val, Array.Empty(), null, lastWave: false, 4, null, noActivationDelay: false, forEnemies: true); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Secondary").transform; ActivateNextWave val6 = WaveFuncs.AddActivation(transform2, doors, doorForward, lastWave: true, 0, toActivate); DeathMarkerFuncs.AddDeathMarker(transform2, component2, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Mannequin"], new Vector3(-104f, -10.9f, 267f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Mannequin"], new Vector3(-104f, -10.9f, 287f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Idol"], new Vector3(-101.5f, -11.5f, 274.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Streetcleaner"], new Vector3(-104f, -10.9f, 267f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Streetcleaner"], new Vector3(-104f, -10.9f, 287f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["RocketLauncher"], new Vector3(-147f, -16f, 277f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Idol"], new Vector3(-137f, -26.5f, 277f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }); Piston[] componentsInChildren = ((Component)transform.parent).GetComponentsInChildren(true); foreach (Piston val7 in componentsInChildren) { DeathZone componentInChildren = ((Component)val7).GetComponentInChildren(); componentInChildren.affected = (AffectedSubjects)1; componentInChildren.enemyAffected = false; componentInChildren.enemiesCanDodge = true; } CheckPoint component4 = GeneralFuncs.FindInactive("Checkpoint (2)").GetComponent(); component4.roomsToInherit.Remove(((Component)transform.parent).gameObject); CheckPoint component5 = GeneralFuncs.FindInactive("Checkpoint (1)").GetComponent(); component5.roomsToInherit.Remove(((Component)transform.parent).gameObject); CheckpointFuncs.AddRoomToCheckpoint(transform.parent, GeneralFuncs.FindInactive("CheckpointNemesis Dimmed").GetComponent()); CheckpointFuncs.RemoveRoomFromCheckpoint("9", component3); } public static void SecretSwordsmachine() { //IL_0054: 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) Transform transform = GeneralFuncs.FindInactive("10B - Swordsmachine Arena/10B Contents").transform; Transform val = transform.Find("Enemies"); ActivateNextWave component = ((Component)val).GetComponent(); ObjectActivator component2 = ((Component)transform.Find("Trigger")).GetComponent(); Transform val2 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["PowerNoEffect"], new Vector3(-81f, 10f, 356.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component }); ComponentExtensions.GetOrAddComponent((Component)(object)((Component)val2).GetComponentInChildren()).distanceLimit = 18.5f; Util.ArrayAdd(ref component2.events.toActivateObjects, ((Component)val2).gameObject); } } public static class PatchLevel0_3 { [CompilerGenerated] private static class <>O { public static UnityAction <0>__ResetEnvironment; } public static int[] killRanks = new int[4] { 11, 19, 25, 28 }; public static int[] styleRanks = new int[4] { 8500, 11500, 13500, 15000 }; public static int[] timeRanks = new int[4] { 370, 310, 260, 220 }; public static void Patch() { TallRoom(); TallRoomSecret(); FourStrayRoom(); SchismRoom(); Staircase(); FirstSwordsmachineRoom(); OverpassRoom(); TightCorridor(); MultiHazardRoom(); TallRoomUpper(); PreSecondSwordsmachineTerminal(); SecondSwordsmachineRoom(); SetEnvironment(); AddAllCheckpointExceptions(); CheckpointFuncs.ClearAndInheritAllRooms(); } public static void SetEnvironment() { GameObject val = GeneralFuncs.MakeEmpty(null, "LightManipulator"); LightManipulator lightManipulator = val.AddComponent(); lightManipulator.Configure(); GameObject val2 = GeneralFuncs.MakeEmpty(null, "MusicSlower"); MusicSlower musicSlower = val2.AddComponent(); musicSlower.multiplier = 0.1f; } public static void AddAllCheckpointExceptions() { CheckPoint[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); foreach (CheckPoint val in array) { if (!(((Object)val.toActivate).name == "10B - Second Encounter")) { CheckpointFuncs.AddInheritRoomExceptions(val, new string[1] { "11 Contents" }); } } } public static void TallRoom() { //IL_00b4: 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_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_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("1 - Main Room - Floor 1/1 Content").transform; Transform val = transform.Find("Enemies"); ActivateArena component = ((Component)val.Find("Cube")).GetComponent(); Door component2 = GeneralFuncs.FindInactive("Door (Large) With Controllers/Door (Large)").GetComponent(); Door component3 = GeneralFuncs.FindInactive("Door (Large) With Controllers (1)/Door (Large)").GetComponent(); component.doors = (Door[])(object)new Door[2] { component2, component3 }; component.onlyWave = false; WaveFuncs.ClearWave(val, null, (ActivateArena[])(object)new ActivateArena[1] { component }); ActivateNextWave val2 = WaveFuncs.AddActivation(val, (Door[])(object)new Door[1] { component2 }, component2, lastWave: true, 0); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Ferryman"], new Vector3(0f, -10f, 307f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform transform2 = ((Component)EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Guttertank"], new Vector3(0f, 10f, 302.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component })).transform; transform2.localScale *= 0.9f; Transform transform3 = GeneralFuncs.FindInactive("10 - Main Room - Floor 2/10 Contents").transform; Glass[] componentsInChildren = ((Component)transform3).GetComponentsInChildren(); foreach (Glass val3 in componentsInChildren) { val3.broken = true; } } public static void TallRoomSecret() { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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) Transform val = GeneralFuncs.FindInactive("1 - Main Room - Floor 1/1 Content").transform.Find("Secret"); Transform waveTransform = val.Find("Enemies"); ActivateArena component = ((Component)val.Find("Trigger")).GetComponent(); ActivateNextWave val2 = WaveFuncs.AddActivation(waveTransform, Array.Empty(), null, lastWave: true, 2); WaveFuncs.ClearWave(waveTransform, null, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform transform = ((Component)EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Mindflayer"], new Vector3(-6f, -16f, 315f), GeneralFuncs.Quat_90, null, (ActivateArena[])(object)new ActivateArena[1] { component })).transform; transform.localScale *= 0.6f; Transform transform2 = ((Component)EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Mindflayer"], new Vector3(6f, -16f, 315f), GeneralFuncs.Quat_270, null, (ActivateArena[])(object)new ActivateArena[1] { component })).transform; transform2.localScale *= 0.6f; } public static void FourStrayRoom() { //IL_0073: 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_0080: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009b: 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_00fc: 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_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0181: 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_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Expected O, but got Unknown Transform transform = GeneralFuncs.FindInactive("2 - Side Hallway - Floor 1/2 Content").transform; Transform val = transform.Find("Enemies"); ActivateArena component = ((Component)val.Find("Cube (1)")).GetComponent(); Door component2 = GeneralFuncs.FindInactive("Door (Large) With Controllers/Door (Large)").GetComponent(); Door component3 = GeneralFuncs.FindInactive("Door (Large) With Controllers (1)/Door (Large)").GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component2, component3 }; ((Component)component).gameObject.SetActive(false); Vector3 localScale = ((Component)component).transform.localScale; ((Component)component).transform.localScale = new Vector3(localScale.x, localScale.y, 20f * localScale.z); component.onlyWave = false; component.doors = doors; WaveFuncs.ClearWave(val, null, (ActivateArena[])(object)new ActivateArena[1] { component }); ActivateNextWave val2 = WaveFuncs.AddActivation(val, doors, component3, lastWave: true, 0); Transform obj = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Cerberus"], new Vector3(-11f, 15f, 346f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); obj.localScale *= 0.9f; Transform obj2 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Cerberus"], new Vector3(11f, 15f, 346f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); obj2.localScale *= 0.9f; EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Mannequin"], new Vector3(0f, 10f, 356f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform transform2 = Object.Instantiate(LevelAssets.Objects["TeslaCoils"], new Vector3(0f, 10f, 346f), GeneralFuncs.Quat_0).transform; transform2.SetParent(transform); ObjectActivator component4 = ((Component)transform2.Find("Activated")).GetComponent(); component4.delay = 1.5f; UnityEvent onActivate = component4.events.onActivate; object obj3 = <>O.<0>__ResetEnvironment; if (obj3 == null) { UnityAction val3 = ResetEnvironment; <>O.<0>__ResetEnvironment = val3; obj3 = (object)val3; } onActivate.AddListener((UnityAction)obj3); Util.ArrayAdd(ref component4.events.toActivateObjects, ((Component)component).gameObject); } public static void ResetEnvironment() { LightManipulator component = GameObject.Find("LightManipulator").GetComponent(); component.DimLights(reversed: true); MusicSlower component2 = GameObject.Find("MusicSlower").GetComponent(); component2.Slow(reversed: true); component2.GradualPitchChange(1.25f, 0.06f); } public static void SchismRoom() { //IL_00a7: 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_00e7: 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_014a: 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_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0239: 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_0280: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: 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_0308: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("3 - Side Arena - Floor 1/3 Content").transform; Transform val = transform.Find("Enemies/Wave 1"); ActivateArena component = ((Component)transform.Find("Enemies/Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val).GetComponent(); Transform val2 = transform.Find("Enemies/Wave 2"); ActivateNextWave component3 = ((Component)val2).GetComponent(); Door component4 = GeneralFuncs.FindInactive("Door (Large) With Controllers (1)/Door (Large)").GetComponent(); Door component5 = GeneralFuncs.FindInactive("Door (Large) With Controllers (2)/Door (Large)").GetComponent(); WaveFuncs.ClearWave(val, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform idol = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Idol"], new Vector3(18f, 29.5f, 389.5f), GeneralFuncs.Quat_180, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component }); Transform val3 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Guttertank"], new Vector3(-12.5f, 10f, 369.5f), Quaternion.Euler(0f, 45f, 0f), Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(val3, stopDashing: true, stopWalking: true); EnemyFuncs.SetIdolTarget(idol, val3); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Guttertank"], new Vector3(12.5f, 10f, 394.5f), Quaternion.Euler(0f, 225f, 0f), Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component }), stopDashing: true, stopWalking: true); component2.enemyCount = 1; ActivateNextWave anwActivator = WaveFuncs.AddActivation(val, Array.Empty(), null, lastWave: false, 3, null, noActivationDelay: false, forEnemies: true); WaveFuncs.ClearWaveNoTrigger(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); DeathMarkerFuncs.AddDeathMarker(val2, anwActivator, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Soldier"], new Vector3(10f, 10f, 382f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Soldier"], new Vector3(-10f, 10f, 382f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Soldier"], new Vector3(0f, 10f, 397f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); CheckPoint val4 = CheckpointFuncs.MakeCheckpoint("SchismRoom", new Vector3(0f, 10f, 363.5f), GeneralFuncs.Quat_0, ((Component)transform.parent).gameObject, (Door[])(object)new Door[2] { component4, component5 }, null, null, reusable: false, inheritAllRooms: true); Transform val5 = ObjectFuncs.PlaceEnergyBeam(transform.parent.Find("3 Nonstuff"), new Vector3(0f, 18f, 382f), Quaternion.Euler(270f, 0f, 0f), 40f, (AffectedSubjects)1, 200f, 0f, 2f, 0f); val5.localScale = new Vector3(1.2f, 1.2f, 1f); val5.Find("Receiver").position = new Vector3(-6f, 39.5f, 387.7f); val5.Find("Firer").position = new Vector3(-6f, 8.5f, 387.7f); Transform val6 = val5.Find("Beam"); val6.localScale = new Vector3(1f, 1.8f, 1f); val6.position = new Vector3(0f, 24.5f, 382f); val6.localPosition = new Vector3(0f, 0f, 6.5f); val6.localRotation = Quaternion.Euler(90f, 0f, 0f); MainModule main = ((Component)val6.Find("Particle System")).GetComponent().main; ((MainModule)(ref main)).startLifetimeMultiplier = 6f; } public static void Staircase() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("4 - Side Stairway - Floor 1-2/4 Stuff").transform; Door component = GeneralFuncs.FindInactive("Door (Large) With Controllers (3)/Door (Large)").GetComponent(); Door component2 = GeneralFuncs.FindInactive("Door (Large) With Controllers (2)/Door (Large)").GetComponent(); ObjectFuncs.PlaceAltarBlue(transform.parent.Find("4 Nonstuff"), hasSkull: false, new Vector3(7.5f, 50f, 416f), GeneralFuncs.Quat_90, (Door[])(object)new Door[1] { component }); GameObject element = GeneralFuncs.FindInactive("7 - Path 2 - Menacing Room"); Util.ArrayAdd(ref component2.activatedRooms, element); Door component3 = GeneralFuncs.FindInactive("Door (Large) With Controllers (6)/Door (Large)").GetComponent(); Util.ArrayAdd(ref component3.activatedRooms, ((Component)transform.parent).gameObject); } public static void FirstSwordsmachineRoom() { //IL_009a: 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_00e3: 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_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: 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_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("6 - Path 1 - Boss Arena/Boss Arena Contents").transform; Door component = GeneralFuncs.FindInactive("Door (Large) With Controllers (5)/Door (Large)").GetComponent(); Door[] doors = (Door[])(object)new Door[1] { component }; ObjectActivator component2 = ((Component)transform.Find("Cube (1)")).GetComponent(); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Nemesis Wave 1").transform; ActivateArena val = ArenaFuncs.AddArena(((Component)component2).gameObject, doors); ActivateNextWave val2 = WaveFuncs.AddActivation(transform, doors, component, lastWave: true, 1); ((Component)val2).gameObject.AddComponent(); Transform val3 = EnemyFuncs.AddBombSpawner(transform2, LevelAssets.Enemies["BombSpawnerBreaker"], new Vector3(-122f, -15f, 420.5f), GeneralFuncs.Quat_90); ((Component)val3).gameObject.SetActive(false); Transform val4 = EnemyFuncs.AddEnemy(val3.Find("Enemy"), LevelAssets.Enemies["Swordsmachine"], new Vector3(-122f, -15f, 420.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }); val4.localPosition = new Vector3(0f, 0f, 0f); ((Component)val4).gameObject.SetActive(true); ObjectActivator val5 = ObjectActivatorFuncs.AddObjectActivator(((Component)component2).gameObject, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { ((Component)val3).gameObject }), 2f); Transform val6 = ObjectFuncs.PlaceAltarBlue(transform.parent.Find("6 Nonstuff"), hasSkull: true, new Vector3(-93f, -15f, 413f), GeneralFuncs.Quat_180); ((Component)val6).gameObject.SetActive(false); Util.ArrayAdd(ref val2.toActivate, ((Component)val6).gameObject); Transform transform3 = GeneralFuncs.MakeEmpty(transform.parent.Find("6 Nonstuff"), "BeamRotator").transform; transform3.position = new Vector3(-112f, -7f, 413f); ((Component)transform3).gameObject.AddComponent().speed = 20f; int @int = MonoSingleton.Instance.GetInt("difficulty", 0); if (1 == 0) { } float num = @int switch { 4 => 20f, 3 => 15f, 2 => 12.5f, 1 => 7.5f, 0 => 5f, _ => 25f, }; if (1 == 0) { } float speed = num; Transform transform4 = GeneralFuncs.MakeEmpty(transform3, "BeamBackAndForth").transform; ((Component)transform4).gameObject.AddComponent().Configure(speed); Transform val7 = ObjectFuncs.PlaceEnergyBeam(transform4, new Vector3(-112f, -7f, 433f), Quaternion.Euler(270f, 0f, 0f), 40f, (AffectedSubjects)1, 200f, 0f, 2f, 0f); val7.localPosition = new Vector3(0f, 0f, 20f); val7.Find("Receiver").position = new Vector3(-117f, 40f, 437.75f); Transform val8 = val7.Find("Beam"); val8.localScale = new Vector3(1f, 3.5f, 1f); val8.position = new Vector3(-112f, 40f, 433f); val8.localPosition = new Vector3(0f, 0f, 19f); MainModule main = ((Component)val8.Find("Particle System")).GetComponent().main; ((MainModule)(ref main)).startLifetimeMultiplier = 8f; CheckPoint[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); foreach (CheckPoint val9 in array) { if (((Object)val9.toActivate).name == "5 - Path 1 - First Encounter") { Util.ArrayAdd(ref val9.doorsToUnlock, component); } } } public static void OverpassRoom() { //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_015f: 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_01a5: 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_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023d: 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_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("7 - Path 2 - Menacing Room/Most of the Stuff/Enemies").transform; Transform waveTransform = transform.Find("First Wave"); ActivateArena component = ((Component)transform.Find("Trigger")).GetComponent(); Transform val = transform.Find("Second Wave"); ActivateArena component2 = ((Component)transform.Find("Trigger (1)")).GetComponent(); Transform waveTransform2 = transform.Find("Third Wave"); ActivateArena component3 = ((Component)transform.Find("Trigger (2)")).GetComponent(); Door component4 = GeneralFuncs.FindInactive("Door (Large) With Controllers (3)/Door (Large)").GetComponent(); Door component5 = GeneralFuncs.FindInactive("Door (Large) With Controllers (6)/Door (Large)").GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component4, component5 }; WaveFuncs.ClearWave(waveTransform, null, (ActivateArena[])(object)new ActivateArena[1] { component }); WaveFuncs.ClearWave(val, null, (ActivateArena[])(object)new ActivateArena[1] { component2 }); WaveFuncs.ClearWave(waveTransform2, null, (ActivateArena[])(object)new ActivateArena[1] { component3 }); component2.doors = doors; component2.onlyWave = false; ActivateNextWave val2 = WaveFuncs.AddActivation(val, doors, component5, lastWave: true, 0); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["MaliciousFace"], new Vector3(89f, 40f, 424f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component2 }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["MaliciousFace"], new Vector3(89f, 40f, 403f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component2 }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Schism"], new Vector3(116f, 50f, 443f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component2 }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Schism"], new Vector3(65f, 40.2f, 413f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component2 }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Virtue"], new Vector3(74f, 67.5f, 413f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component2 })); Transform val3 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Idol"], new Vector3(116f, 34.5f, 412.5f), GeneralFuncs.Quat_270, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component2 }); Transform targetEnemy = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Sentry"], new Vector3(128.5f, 45f, 413f), GeneralFuncs.Quat_270, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component2 }); EnemyFuncs.SetIdolTarget(val3, targetEnemy); GameObject val4 = GeneralFuncs.MakeEmpty(val, "IdolMover"); val4.SetActive(false); EnemyFuncs.AddMover(val4, val3).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, 44.5f); Util.ArrayAdd(ref val2.toActivate, val4); GameObject gameObject = ((Component)transform.Find("Trigger (3)")).gameObject; gameObject.SetActive(false); Door component6 = GeneralFuncs.FindInactive("Door (Large) With Controllers (8)/Door (Large)").GetComponent(); CheckPoint[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); foreach (CheckPoint val5 in array) { if (((Object)val5.toActivate).name == "7 - Path 2 - Menacing Room") { Util.ArrayAdd(ref val5.doorsToUnlock, component6); } } } public static void TightCorridor() { Transform transform = GeneralFuncs.FindInactive("8 - Path 2 - Menacing Hallway/8 Contents/Enemies").transform; GameObject gameObject = ((Component)transform.Find("Cube")).gameObject; gameObject.SetActive(false); } public static void MultiHazardRoom() { //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: 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_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: 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_026b: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Expected O, but got Unknown //IL_045c: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("9 - Windtunnel/9 Contents/Enemies").transform; Transform waveTransform = transform.Find("Wave 1"); Transform waveTransform2 = transform.Find("Wave 2"); ActivateArena component = ((Component)transform.Find("Trigger (1)")).GetComponent(); Transform waveTransform3 = transform.Find("Wave 3"); ActivateArena component2 = ((Component)transform.Find("Trigger (2)")).GetComponent(); Transform waveTransform4 = transform.Find("Wave 4"); ActivateArena component3 = ((Component)transform.Find("Trigger (3)")).GetComponent(); Door component4 = GeneralFuncs.FindInactive("Door (Large) With Controllers (8)/Door (Large)").GetComponent(); Door component5 = GeneralFuncs.FindInactive("Door (Large) With Controllers (9)/Door (Large)").GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component4, component5 }; ActivateArena component6 = ((Component)transform.Find("Trigger")).GetComponent(); ActivateArena component7 = ((Component)transform.Find("TriggerB")).GetComponent(); ActivateArena[] array = (ActivateArena[])(object)new ActivateArena[2] { component6, component7 }; ArenaLink arenaLink = ((Component)transform).gameObject.AddComponent(); arenaLink.linkedArenas = array; WaveFuncs.ClearWave(waveTransform, null, array); WaveFuncs.ClearWave(waveTransform2, null, (ActivateArena[])(object)new ActivateArena[1] { component }); WaveFuncs.ClearWave(waveTransform3, null, (ActivateArena[])(object)new ActivateArena[1] { component2 }); WaveFuncs.ClearWave(waveTransform4, null, (ActivateArena[])(object)new ActivateArena[1] { component3 }); component6.doors = doors; component7.doors = doors; component6.onlyWave = false; component7.onlyWave = false; ActivateNextWave val = WaveFuncs.AddActivation(waveTransform, Array.Empty(), null, lastWave: false, 2, null, noActivationDelay: false, forEnemies: true); ActivateNextWave val2 = WaveFuncs.AddActivation(waveTransform, doors, component5, lastWave: true, 0); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Gutterman"], new Vector3(-2f, 47.2f, 367f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, array), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Providence"], new Vector3(35f, 57f, 367f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, array)); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Mannequin"], new Vector3(28.5f, 50.1f, 390f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, array); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Mannequin"], new Vector3(28.5f, 50.1f, 383f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, array); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["EyeMalicious"], new Vector3(38f, 55f, 384f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, array)); EnemyFuncs.AddEnemyNoTrigger(waveTransform, LevelAssets.Enemies["Cerberus"], new Vector3(68f, 47.2f, 367f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val }); Transform[] array2 = Array.Empty(); for (int i = 0; i < 6; i++) { Transform val3 = ObjectFuncs.PlaceEnergyBeam(transform.parent.parent.Find("9 Nonstuff"), new Vector3(80f - (float)i * 18f, 56f, 367f), Quaternion.Euler(270f, 0f, 0f), 25f, (AffectedSubjects)1, 100f, 2f + (float)i, 1f); val3.localScale = new Vector3(2f, 2f, 1.12f); ObjectActivator component8 = ((Component)val3.Find("State/ChargingUp")).GetComponent(); BeamDelayHelper beamDelayHelper = ((Component)component8).gameObject.AddComponent(); beamDelayHelper.chargeUpTimeToSubtract = i; beamDelayHelper.objectActivator = component8; component8.events.onActivate.AddListener(new UnityAction(beamDelayHelper.Subtract)); Util.ArrayAdd(ref array2, val3); } DeathZone[] componentsInChildren = GeneralFuncs.FindInactive("9 - Windtunnel/9 Nonstuff/Hazards").GetComponentsInChildren(); DeathZone[] array3 = componentsInChildren; foreach (DeathZone val4 in array3) { if (((Object)val4).name.Contains("Fan")) { val4.affected = (AffectedSubjects)1; val4.enemiesCanDodge = true; val4.enemyAffected = false; } } } public static void TallRoomUpper() { Transform transform = GeneralFuncs.FindInactive("10 - Main Room - Floor 2/10 Contents/Enemies").transform; GameObject gameObject = ((Component)transform.Find("Trigger")).gameObject; GameObject gameObject2 = ((Component)transform.Find("Trigger (1)")).gameObject; GameObject gameObject3 = ((Component)transform.Find("Trigger (2)")).gameObject; gameObject.SetActive(false); gameObject2.SetActive(false); gameObject3.SetActive(false); } public static void PreSecondSwordsmachineTerminal() { //IL_0028: 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) Transform transform = GeneralFuncs.FindInactive("10B - Second Encounter/5 Nonstuff").transform; string message = "NEMESIS COMMENTARY 3:\r\nThe reason you see Idols so often in these levels is because they're good at dealing with what I think is a pretty important flaw that Ultrakill has: the fact that knowing a few simple strategies lets you easily nullify a lot of arenas without engaging with them\r\n\r\nIdols directly combat that by not letting you kill specific enemies, and this opens up many possibilites for arenas that wouldn't work otherwise"; ObjectFuncs.PlaceTerminalTestament(transform, message, new Vector3(-18f, 73f, 307.5f), Quaternion.Euler(0f, 270f, 180f), hasMusic: false, 0.02f); } public static void SecondSwordsmachineRoom() { //IL_0054: 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_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_00db: 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_0129: 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_0189: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("11 - Boss Arena - Floor 2/11 Contents").transform; Transform val = transform.Find("Boss"); ActivateArena component = ((Component)transform.Find("Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val).GetComponent(); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["RocketLauncherNoStand"], new Vector3(-107.5f, 110f, 300.25f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["RocketLauncherNoStand"], new Vector3(-107.5f, 110f, 329.75f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform transform2 = Object.Instantiate(LevelAssets.Objects["Fan"], new Vector3(-107f, 102f, 314.75f), Quaternion.Euler(0f, 180f, 180f)).transform; transform2.SetParent(transform.parent.Find("11 Nonstuff")); transform2.localScale = new Vector3(52f, 1f, 52f); transform2.Find("Cylinder").localScale = new Vector3(0.015f, 1f, 0.015f); Object.Destroy((Object)(object)((Component)transform2).GetComponent()); Object.Destroy((Object)(object)((Component)transform2).GetComponent()); DeathZone component3 = ((Component)transform2).GetComponent(); component3.damage = 50; component3.affected = (AffectedSubjects)1; component3.enemyAffected = false; component3.enemiesCanDodge = true; component3.respawnTarget = new Vector3(-84.5f, 91.5f, 315f); } } public static class PatchLevel0_4 { public static int[] killRanks = new int[4] { 14, 21, 32, 44 }; public static int[] styleRanks = new int[4] { 9000, 11500, 14000, 16000 }; public static int[] timeRanks = new int[4] { 420, 350, 290, 240 }; public static void Patch() { HazardCorridorCheckpoint(); FirstRoom(); FirstRoomGoBack(); HazardCorridor(); SideRoom(); ShowerTerminal(); DumbfuckTerminal(); FinalRoom(); MakeGlassDoorsBreakOnTouch(); CheckpointFuncs.ClearAndInheritAllRooms(); } public static void MakeGlassDoorsBreakOnTouch() { SubDoor[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); foreach (SubDoor val in array) { Breakable component = ((Component)val).GetComponent(); if (component != null) { component.breakOnTouch = true; } } } public static void HazardCorridorCheckpoint() { //IL_0050: 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) GameObject toActivate = GeneralFuncs.FindInactive("5 - Tube Hallways"); Door component = GeneralFuncs.FindInactive("Door (Large) With Controllers (5)/Door (Large)").GetComponent(); Door component2 = GeneralFuncs.FindInactive("Door (Large) With Controllers (6)/Door (Large)").GetComponent(); Door component3 = GeneralFuncs.FindInactive("Door (Large) With Controllers (4)/Door (Large)").GetComponent(); CheckpointFuncs.MakeCheckpoint("Main", new Vector3(0f, 12.5f, 503f), GeneralFuncs.Quat_0, toActivate, (Door[])(object)new Door[3] { component, component2, component3 }, null, null, reusable: true, inheritAllRooms: true).disableDuringCombat = true; } public static void FirstRoom() { //IL_00fb: 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_0140: 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_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: 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_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: 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_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_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_0496: 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_0523: Unknown result type (might be due to invalid IL or missing references) //IL_0528: Unknown result type (might be due to invalid IL or missing references) //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_0570: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("2 - Arena/2 Stuff/Enemies").transform; ActivateArena component = ((Component)transform.parent.Find("Trigger")).GetComponent(); Transform val = transform.Find("Wave 1A"); ActivateNextWave component2 = ((Component)val).GetComponent(); Transform val2 = transform.Find("Wave 1B"); ActivateNextWave component3 = ((Component)val2).GetComponent(); Transform val3 = transform.Find("Wave 2"); ActivateNextWave component4 = ((Component)val3).GetComponent(); WaveFuncs.ClearWave(val, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); WaveFuncs.ClearWave(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); WaveFuncs.ClearWaveNoTrigger(val3, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }, (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, component3 }); component4.enemyCount = 2; ActivateNextWave val4 = WaveFuncs.AddActivation(val, Array.Empty(), null, lastWave: false, 3, null, noActivationDelay: false, forEnemies: true); Transform idol = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Idol"], new Vector3(0f, 1.5f, 388.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform idol2 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Idol"], new Vector3(27f, 0f, 353.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform idol3 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Idol"], new Vector3(0f, 10.5f, 338f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform idol4 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Idol"], new Vector3(-22.5f, 4f, 351.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform targetEnemy = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Providence"], new Vector3(-12.5f, 12f, 378.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform targetEnemy2 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Providence"], new Vector3(12.5f, 12f, 378.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.SetIdolTarget(idol, targetEnemy); EnemyFuncs.SetIdolTarget(idol2, targetEnemy2); EnemyFuncs.SetIdolTarget(idol3, targetEnemy); EnemyFuncs.SetIdolTarget(idol4, targetEnemy2); EnemyFuncs.AddEnemyNoTrigger(val3, LevelAssets.Enemies["Tower"], new Vector3(22.5f, -5f, 353.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(val3, LevelAssets.Enemies["Streetcleaner"], new Vector3(0f, -10f, 338.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); component4.enemyCount--; component4.lastWave = false; Door[] doors = component4.doors; Door doorForward = component4.doorForward; component4.doors = Array.Empty(); component4.doorForward = null; Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Wave 3").transform; ActivateNextWave val5 = WaveFuncs.AddActivation(transform2, doors, doorForward, lastWave: true, 0); ActivateNextWave anwActivator = WaveFuncs.AddActivation(val3, Array.Empty(), null, lastWave: false, 4, null, noActivationDelay: false, forEnemies: true); DeathMarkerFuncs.AddDeathMarker(transform2, anwActivator, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }); DeathMarkerFuncs.AddDeathMarker(transform2, component2, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }); Transform idol5 = EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Idol"], new Vector3(22.5f, -2f, 378f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }); Transform idol6 = EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Idol"], new Vector3(-27.5f, 24.5f, 347f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }); Transform idol7 = EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Idol"], new Vector3(25f, 30.5f, 335.75f), Quaternion.Euler(0f, 0f, 180f), (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }); Transform targetEnemy3 = EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["EyeMalicious"], new Vector3(0f, 22f, 360f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Drone"], new Vector3(0f, 23.5f, 339f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Drone"], new Vector3(-12f, 10f, 373.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }); EnemyFuncs.SetIdolTarget(idol5, targetEnemy3); EnemyFuncs.SetIdolTarget(idol6, targetEnemy3); EnemyFuncs.SetIdolTarget(idol7, targetEnemy3); } public static void FirstRoomGoBack() { //IL_0071: 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_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_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_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("2 - Arena").transform; Transform transform2 = GeneralFuncs.MakeEmpty(transform.Find("2 Stuff"), "NemesisStuff GoBack").transform; Door component = GeneralFuncs.FindInactive("Door (Large) With Controllers (4)/Door (Large)").GetComponent(); Door component2 = GeneralFuncs.FindInactive("Door (Large) With Controllers/Door (Large)").GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component2, component }; GameObject val = ArenaFuncs.MakeTrigger(transform2, "GoBack", new Vector3(30f, -10f, 385f), new Vector3(-30f, 27f, 340f)); val.SetActive(false); Transform transform3 = GeneralFuncs.MakeEmpty(transform2, "Wave 1").transform; ActivateArena val2 = ArenaFuncs.AddArena(val, doors); ActivateNextWave val3 = WaveFuncs.AddActivation(transform3, doors, component, lastWave: true, 0); ArenaFuncs.SetArenaDelay(val2, 1.75f); GameObject trigger = GeneralFuncs.MakeEmpty(transform2, "GoBack Enabler"); ObjectActivator val4 = ObjectActivatorFuncs.AddObjectActivator(trigger, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { val }), 0f, oneTime: true, nonCollider: true); ObjectActivationCheck obac = GeneralFuncs.MakeEmpty(transform, "GoBack Obac").AddComponent(); val4.obac = obac; Transform enemyTransform = EnemyFuncs.AddEnemy(transform3, LevelAssets.Enemies["MirrorReaper"], new Vector3(0f, -10f, 337f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); ActivateNextWaveHP val5 = WaveFuncs.AddActivationHP(transform3, 55f, enemyTransform, Array.Empty(), null, lastWave: false, null, forEnemies: true); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Virtue"], new Vector3(0f, 16f, 338.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, null, (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[1] { val5 }); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["RocketLauncher"], new Vector3(27.4f, 0f, 353.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, null, (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[1] { val5 }); ActivateNextWaveHP val6 = WaveFuncs.AddActivationHP(transform3, 35f, enemyTransform, Array.Empty(), null, lastWave: false, null, forEnemies: true); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Virtue"], new Vector3(-27f, 9.5f, 384f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, null, (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[1] { val6 }); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Virtue"], new Vector3(27f, 9.5f, 384f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, null, (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[1] { val6 }); Transform val7 = ObjectFuncs.PlaceAltarBlue(transform.Find("2 Nonstuff"), hasSkull: true, new Vector3(0f, 2f, 387f), GeneralFuncs.Quat_90); ((Component)val7).gameObject.SetActive(false); Transform val8 = GeneralFuncs.FindInactive("CheckpointNemesis Main").transform.Find("Reactivator"); Util.ArrayAdd(ref val3.toActivate, (GameObject[])(object)new GameObject[2] { ((Component)val7).gameObject, ((Component)val8).gameObject }); } public static void HazardCorridor() { //IL_00dd: 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_00ef: 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_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_01ee: 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_0239: 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) //IL_02a3: 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) //IL_02ed: 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_0337: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_041f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Expected O, but got Unknown //IL_0544: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("5 - Tube Hallways/5 Content/Enemies").transform; Transform val = transform.Find("Wave 2"); ActivateArena component = ((Component)transform.Find("Wave 2 Trigger")).GetComponent(); Door component2 = GeneralFuncs.FindInactive("Door (Large) With Controllers (8)/Door (Large)").GetComponent(); Door component3 = GeneralFuncs.FindInactive("Door (Large) With Controllers (5)/Door (Large)").GetComponent(); Door component4 = GeneralFuncs.FindInactive("Door (Large) With Controllers (6)/Door (Large)").GetComponent(); Door component5 = GeneralFuncs.FindInactive("Door (Large) With Controllers (4)/Door (Large)").GetComponent(); Door component6 = GeneralFuncs.FindInactive("Door (Large) With Controllers (9)/Door (Large)").GetComponent(); Util.ArrayAdd(ref component3.activatedRooms, GeneralFuncs.FindInactive("6 - Pipes Hallway")); Util.ArrayAdd(ref component4.activatedRooms, GeneralFuncs.FindInactive("6 - Pipes Hallway")); Util.ArrayAdd(ref component6.activatedRooms, ((Component)transform.parent.parent).gameObject); Vector3 localScale = ((Component)component).transform.localScale; ((Component)component).transform.localScale = new Vector3(4f * localScale.x, localScale.y, localScale.z); component.doors = (Door[])(object)new Door[2] { component4, component5 }; component.onlyWave = false; ArenaFuncs.SetArenaDelay(component, 0f); ActivateNextWave val2 = WaveFuncs.AddActivation(val, (Door[])(object)new Door[2] { component4, component5 }, null, lastWave: true, 0); ((Component)transform.Find("Wave 1 Trigger")).gameObject.SetActive(false); WaveFuncs.ClearWave(val, null, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Wave Idol").transform; ActivateNextWave val3 = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false, -1, null, noActivationDelay: true, forEnemies: true); ActivateNextWave val4 = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false, -1, null, noActivationDelay: false, forEnemies: true); DeathMarkerFuncs.AddDeathMarker(val, val4, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }); Transform val5 = EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Idol"], new Vector3(0f, 1.5f, 394.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[2] { val3, val4 }, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform val6 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Virtue"], new Vector3(15f, 27f, 503f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(val6); EnemyFuncs.SetIdolTarget(val5, val6); ObjectActivatorFuncs.AddEnemyBlockBreakables(val5); ObjectActivatorFuncs.AddEnemyBlockBreakables(val6); ObjectActivatorFuncs.AddEnemyBlockBreakables(EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Stray"], new Vector3(7.5f, 12f, 510.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component })); ObjectActivatorFuncs.AddEnemyBlockBreakables(EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Stray"], new Vector3(-7f, 12f, 510.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component })); ObjectActivatorFuncs.AddEnemyBlockBreakables(EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Stray"], new Vector3(0f, 12f, 528f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component })); ObjectActivatorFuncs.AddEnemyBlockBreakables(EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Mannequin"], new Vector3(0f, 12.15f, 433f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 })); ObjectActivatorFuncs.AddEnemyBlockBreakables(EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Mannequin"], new Vector3(0f, 7.5f, 422.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 })); Transform transform3 = Object.Instantiate(LevelAssets.Objects["ElectricityBox"], new Vector3(-20f, 26f, 510.5f), GeneralFuncs.Quat_180).transform; transform3.SetParent(transform.parent.parent.Find("5 Nonstuff")); DoorOpener componentInChildren = ((Component)transform3).GetComponentInChildren(true); if (componentInChildren != null) { ((Behaviour)componentInChildren).enabled = false; } ObjectActivator component7 = ((Component)transform3.Find("Broken")).GetComponent(); Breakable componentInChildren2 = ((Component)transform3).GetComponentInChildren(true); GameObject obj = GeneralFuncs.MakeEmpty(((Component)componentInChildren2).transform, "BreakableAllower"); ObjectActivatorFuncs.AddBreakableAllower(obj, componentInChildren2); GameObject val7 = GeneralFuncs.MakeEmpty(transform3, "HudMessage"); val7.SetActive(false); ObjectActivatorFuncs.AddHudMessage(val7, "Huh Maybe I Should go check the first room.? That seems like a good idea", timed: true, 4f, silent: false, colliderless: true); Util.ArrayAdd(ref component7.events.toActivateObjects, (GameObject[])(object)new GameObject[1] { val7 }); ObjectActivationCheck arenaTriggerObac = GeneralFuncs.FindInactive("2 - Arena/GoBack Obac").GetComponent(); component7.events.onActivate.AddListener((UnityAction)delegate { arenaTriggerObac.readyToActivate = true; }); ObjectFuncs.PlaceAltarBlue(transform.parent.parent.Find("5 Nonstuff"), hasSkull: false, new Vector3(-3f, 12f, 531f), GeneralFuncs.Quat_90, (Door[])(object)new Door[1] { component2 }); ObjectFuncs.PlaceAltarRed(transform.parent.parent.Find("5 Nonstuff"), hasSkull: false, new Vector3(3f, 12f, 531f), GeneralFuncs.Quat_90, (Door[])(object)new Door[1] { component2 }); } public static void SideRoom() { //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_00d7: 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_0120: 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_0169: 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_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: 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_0261: 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) Transform transform = GeneralFuncs.FindInactive("5B - Bonus Arena/5B Content/Enemies").transform; Transform val = transform; ActivateArena component = ((Component)val.Find("Cube")).GetComponent(); ActivateNextWave component2 = ((Component)val).GetComponent(); Door component3 = GeneralFuncs.FindInactive("Door (Large) With Controllers (6)/Door (Large)").GetComponent(); component.onlyWave = false; component2.doorForward = component3; ActivateNextWave val2 = WaveFuncs.AddActivation(val, Array.Empty(), null, lastWave: false, 0, null, noActivationDelay: false, forEnemies: true); WaveFuncs.ClearWave(val, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Deathcatcher"], new Vector3(12.5f, 22f, 502.5f), GeneralFuncs.Quat_90, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Mindflayer"], new Vector3(42.5f, 26f, 503f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, val2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Sentry"], new Vector3(48f, 22.1f, 510.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, val2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Sentry"], new Vector3(48f, 22.1f, 495.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, val2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform val3 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Sentry"], new Vector3(24f, 22.1f, 503f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, val2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemyNoTrigger(val, LevelAssets.Enemies["Power"], new Vector3(36f, 30f, 503f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }); ((Component)((Component)val3).GetComponentInChildren()).gameObject.AddComponent(); component2.enemyCount = 5; Transform val4 = ObjectFuncs.PlaceAltarRed(transform.parent.parent.Find("5 Nonstuff"), hasSkull: true, new Vector3(48f, 22f, 503f), GeneralFuncs.Quat_180); ((Component)val4).gameObject.SetActive(false); Transform val5 = GeneralFuncs.FindInactive("CheckpointNemesis Main").transform.Find("Reactivator"); Util.ArrayAdd(ref component2.toActivate, (GameObject[])(object)new GameObject[2] { ((Component)val4).gameObject, ((Component)val5).gameObject }); } public static void ShowerTerminal() { //IL_0028: 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) Transform transform = GeneralFuncs.FindInactive("6 - Pipes Hallway/6 Nonstuff").transform; string message = "NEMESIS COMMENTARY 4.1:\r\nGiven the \"experimental\" nature of the enemy arenas, it's obvious that you wouldn't enjoy all of them equally (and neither do I lol). But I see this as a good thing, since having arenas designed in diverse ways is more fun\r\n\r\nBut even if I can't always succed in making encounters that do interesting things with their environment, I still try to give the rooms some amount of substance (for example like what Commentary 2 talks about). So those rooms may still have meaningful impact"; ObjectFuncs.PlaceTerminalTestament(transform, message, new Vector3(9.5f, 21.8f, 537f), Quaternion.Euler(0f, 270f, 180f), hasMusic: false, 0.02f); } public static void DumbfuckTerminal() { //IL_0028: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.FindInactive("7 - 2 Floor Arena/7 Nonstuff").transform; string message = "NEMESIS COMMENTARY 4.2:\r\nI'm not sure what to do for the layer boss levels since the mod is specifically not about bosses, so if you have ideas you can dm me on discord lmao"; ObjectFuncs.PlaceTerminalTestament(transform, message, new Vector3(0f, 7f, 547.5f), Quaternion.Euler(0f, 0f, 180f)).localScale = 0.75f * Vector3.one; } public static void FinalRoom() { //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_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_0134: 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) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: 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_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: 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) Transform transform = GeneralFuncs.FindInactive("7 - 2 Floor Arena/7 Contents/Enemies").transform; Transform val = transform.Find("Wave 1"); ActivateArena component = ((Component)transform.Find("Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val).GetComponent(); Transform val2 = transform.Find("Wave 2"); ActivateNextWave component3 = ((Component)val2).GetComponent(); ActivateNextWave val3 = WaveFuncs.AddActivation(val, Array.Empty(), null, lastWave: false, 2, null, noActivationDelay: false, forEnemies: true); ActivateNextWave val4 = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 2, null, noActivationDelay: false, forEnemies: true); WaveFuncs.ClearWave(val, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Providence"], new Vector3(17f, 40.5f, 562f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Providence"], new Vector3(-17f, 40.5f, 562f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Gutterman"], new Vector3(0f, 7f, 605f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Streetcleaner"], new Vector3(-17.5f, 17f, 588f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Streetcleaner"], new Vector3(-17.5f, 17f, 588f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemyNoTrigger(val, LevelAssets.Enemies["Mindflayer"], new Vector3(0f, 20f, 570f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); WaveFuncs.ClearWaveNoTrigger(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Swordsmachine"], new Vector3(-17.5f, 22f, 558f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Swordsmachine"], new Vector3(17.5f, 22f, 558f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Cerberus"], new Vector3(0f, 12.1f, 588f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Sentry"], new Vector3(21.5f, 32f, 573f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Sentry"], new Vector3(-21.5f, 32f, 573f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Virtue"], new Vector3(0f, 30f, 605f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 })); } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }