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 SpawnerArmExtras; using Steamworks; using TMPro; using ULTRAKILL.Cheats; using ULTRAKILL.Enemy; using ULTRAKILL.Portal; using ULTRAKILL.Portal.Geometry; using Unity.AI.Navigation; using UnityEngine; using UnityEngine.AI; using UnityEngine.AddressableAssets; using UnityEngine.Animations.Rigging; 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("1.2.0.0")] [assembly: AssemblyInformationalVersion("1.2.0+226148a6e036e54b0ef5078efa0cfa518c16aceb")] [assembly: AssemblyProduct("Billion Nemesis")] [assembly: AssemblyTitle("BillionNemesis")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.2.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", "1.2.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [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 const string NemesisColorHex = "ff00af"; public static bool ForceDefaultLevelPath = false; public static Dictionary ObjectsLookedUpThisScene = new Dictionary(); public static bool DisableEnemyVertexLighting = false; private static readonly Harmony Harmony = new Harmony("billy.billionnemesis"); internal static ManualLogSource Logger; public void Awake() { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown Logger = ((BaseUnityPlugin)this).Logger; Harmony.PatchAll(); Logger.LogInfo((object)"Plugin BillionNemesis is almost loaded!"); SceneManager.activeSceneChanged += SceneManagerActiveSceneChanged; SceneManager.sceneLoaded += SceneManagerSceneLoaded; 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.UpdateRanksAndColors(); ChangeMainMenuTitle(); } public static void SceneManagerActiveSceneChanged(Scene arg0, Scene arg1) { ResetSceneVariables(); if (Util.IsEnabled()) { LevelPatching.TryRunLevelPatch(); } } public static void ResetSceneVariables() { IsPatched = false; ObjectsLookedUpThisScene = new Dictionary(); DisableEnemyVertexLighting = false; TeleportOnCondition.GlobalConditions = new Dictionary>(); VariableDelay.AllDelays = new Dictionary(); } public static void SceneManagerSceneLoaded(Scene scene, LoadSceneMode mode) { ChangeMainMenuTitle(); if (SceneHelper.CurrentScene != "Bootstrap" && SceneHelper.CurrentScene != "Intro" && SceneHelper.CurrentScene != "Main Menu") { SpawnMenuPatch.MakeAllSpawnables(); } LevelAssets.SetUpCustomEnemyPlaceholders(); } public static void ChangeMainMenuTitle() { if (SceneHelper.CurrentScene != "Main Menu") { return; } string text = "\n(NEMESIS)"; Transform val = GeneralFuncs.FindInactive("Canvas/Chapter Select/Title (2)"); TextMeshProUGUI val2 = ((val != null) ? ((Component)val).GetComponent() : null); if ((Object)(object)val2 == (Object)null) { return; } if (Util.IsEnabled()) { if (!((TMP_Text)val2).text.Contains(text)) { ((TMP_Text)val2).text = ((TMP_Text)val2).text + text; ((TMP_Text)val2).verticalAlignment = (VerticalAlignmentOptions)256; } } else { ((TMP_Text)val2).text = ((TMP_Text)val2).text.Replace(text, ""); ((TMP_Text)val2).verticalAlignment = (VerticalAlignmentOptions)512; } } } public static class ChangedInfo { public static string[] ChangedChapters = new string[1] { "Prelude" }; public static string[] ChangedLayers = new string[2] { "Overture", "Layer 1 Limbo" }; public static int[] ChangedLevels = new int[9] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; public static string[] ChangedLevelScenes = new string[9] { "Level 0-1", "Level 0-2", "Level 0-3", "Level 0-4", "Level 0-5", "Level 1-1", "Level 1-2", "Level 1-3", "Level 1-4" }; public static int[] LevelsWithoutSecrets = new int[2] { 5, 9 }; public static Dictionary LevelTitleLineSpacing = new Dictionary(); 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", ["HEART OF THE SUNRISE"] = "HARMED TO DEMISE", ["THE BURNING WORLD"] = "BLOOD ON THE LEAVES", ["HALLS OF SACRED REMAINS"] = "DANCE OF THE KNIGHTS", ["CLAIR DE LUNE"] = "O FORTUNA" }; public static Dictionary PlainLevelNames = new Dictionary { ["UP THE ANTE"] = "UP THE ANTE" }; } public class DontCatch : MonoBehaviour { } public class DontEnrage : MonoBehaviour { } [HarmonyPatch(typeof(Drone), "Enrage")] public class DroneDontEnragePatch { public static bool Prefix(Drone __instance) { DontEnrage component = ((Component)__instance).GetComponent(); if ((Object)(object)component != (Object)null && ((Behaviour)component).enabled) { return false; } return true; } } [HarmonyPatch(typeof(V2), "Enrage", new Type[] { typeof(string) })] public class V2DontEnragePatch { public static bool Prefix(string enrageName, V2 __instance) { DontEnrage component = ((Component)__instance).GetComponent(); if ((Object)(object)component != (Object)null && ((Behaviour)component).enabled) { return false; } return true; } } 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); } } } 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); } } } public class NemesisEnemy { private Transform _transform; public EnemyIdentifier eid = null; public Enemy enemy = null; public Transform transform { get { return _transform; } set { _transform = value; name = ((Object)value).name; UpdateEidAndEnemy(); } } public GameObject gameObject { get { return ((Component)_transform).gameObject; } set { transform = value.transform; } } public Transform parent { get { return _transform.parent; } set { _transform.parent = value; } } public string name { get { return ((Object)_transform).name; } set { ((Object)_transform).name = value; } } public NemesisEnemy(Transform newTransform) { transform = newTransform; } public NemesisEnemy(GameObject newGameObject) { gameObject = newGameObject; } public void UpdateEidAndEnemy() { eid = ((Component)transform).GetComponentInChildren(true); enemy = ((Component)transform).GetComponentInChildren(true); } } public class ParentPuppetTo : MonoBehaviour { public string objectName = ""; 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 == "ParentPuppetTo") { return; } } GameObject val2 = new GameObject("ParentPuppetTo"); ParentPuppetTo parentPuppetTo = val2.AddComponent(); parentPuppetTo.objectName = objectName; Util.ArrayAdd(ref componentInChildren.activateOnDeath, val2); } } 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(700)] 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(700)] public static bool DodgePrefix(Drone __instance) { return StopEnemyMovement.CheckDash((Component)(object)__instance); } [HarmonyPrefix] [HarmonyPatch(typeof(Drone), "ProcessTargeting")] [HarmonyPriority(700)] public static bool ProcessTargetingPrefix(Drone __instance) { return StopEnemyMovement.CheckDash((Component)(object)__instance); } } 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 int globalConditionKey = -1; public static Dictionary> GlobalConditions = new Dictionary>(); 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_0001: Unknown result type (might be due to invalid IL or missing references) TeleportCondition teleportCondition = new TeleportCondition(moveVector, isMoveVectorAbsolute, ignoreAbsoluteMoveVectorZeroAxes); Util.ArrayAdd(ref conditions, teleportCondition); if (globalConditionKey != -1) { if (!GlobalConditions.ContainsKey(globalConditionKey)) { GlobalConditions[globalConditionKey] = new List(); } GlobalConditions[globalConditionKey].Add(teleportCondition); } return teleportCondition; } public void Awake() { eid = ((Component)this).GetComponentInChildren(); ReaddConditionsToClonedEnemy(); } public void ReaddConditionsToClonedEnemy() { if (globalConditionKey != -1 && GlobalConditions.ContainsKey(globalConditionKey) && GlobalConditions[globalConditionKey] != null) { Util.ArrayAdd(ref conditions, GlobalConditions[globalConditionKey].ToArray()); ChangeAxisTargetsToPuppet(conditions, ((Component)this).transform); } } 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 = true, 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 = true; 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 = true, 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 TeleportToPlayer : MonoBehaviour { public bool onSpawn = true; } [HarmonyPatch(typeof(EnemyIdentifier), "Start")] public class TeleportToPlayerPatch { public static void Postfix(EnemyIdentifier __instance) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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_0087: 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) TeleportToPlayer component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null || !component.onSpawn) { return; } ((Component)__instance).transform.position = ((Component)MonoSingleton.Instance).transform.position; Power component2 = ((Component)__instance).GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.sinceLastVision = TimeSince.op_Implicit(0f); TargetDataRef val = default(TargetDataRef); if (component2.vision.TrySee(component2.targetQuery, ref val)) { component2.lastTargetData = TargetDataExtensions.ToData(val); component2.targetHandle = component2.lastTargetData.handle; } else { component2.targetHandle = null; } } } } public class V2Common : MonoBehaviour { public bool bossVersion = false; } [HarmonyPatch(typeof(V2))] public class V2CommonPatch { [HarmonyPostfix] [HarmonyPatch(typeof(V2), "Start")] public static void StartPostfix(V2 __instance) { V2Common component = ((Component)__instance).GetComponent(); if (!((Object)(object)component == (Object)null)) { __instance.bossVersion = component.bossVersion; } } [HarmonyPrefix] [HarmonyPatch(typeof(V2), "BeginEscape")] public static void BeginEscapePrefix(V2 __instance) { V2Common component = ((Component)__instance).GetComponent(); if ((Object)(object)component == (Object)null) { return; } Enemy component2 = ((Component)__instance).GetComponent(); if (!((Object)(object)component2 == (Object)null)) { ActivateNextWave componentInParent = ((Component)component2).GetComponentInParent(); if (componentInParent != null) { componentInParent.AddDeadEnemy(); } } } } [HarmonyPatch(typeof(CancerousRodent))] public class CancerousRodentPatch { [HarmonyPrefix] [HarmonyPatch(typeof(CancerousRodent), "DeathEnd")] public static bool DeathEndPrefix(CancerousRodent __instance) { if (!Util.IsPatched()) { return true; } if (__instance.enemy.musicRequested) { MonoSingleton.Instance.PlayCleanMusic(); } if ((Object)(object)((Component)__instance).gameObject != (Object)null) { Object.Destroy((Object)(object)((Component)__instance).gameObject); } return false; } [HarmonyPrefix] [HarmonyPatch(typeof(CancerousRodent), "OnDisable")] public static void OnDisablePrefix(CancerousRodent __instance) { __instance.enemy = ((Component)__instance).GetComponent(); } } [HarmonyPatch] public class DeadcaughtEnemyPatch { [HarmonyPrefix] [HarmonyPatch(typeof(Deathcatcher), "EnemyDeath")] public static bool EnemyDeathPrefix(EnemyIdentifier eid, Deathcatcher __instance) { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Invalid comparison between Unknown and I4 //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Expected O, but got Unknown //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: 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; } DontCatch component = ((Component)eid).gameObject.GetComponent(); if ((Object)(object)component != (Object)null && ((Behaviour)component).enabled) { 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) { if (!Util.IsPatched()) { return; } if (newPuppet != null) { Transform parent = newPuppet.transform.parent; if (((parent != null) ? new bool?(((Object)parent).name.Contains("DeathcatcherCase")) : null).GetValueOrDefault()) { Transform parent2 = newPuppet.transform.parent; if ((Object)(object)((parent2 != null) ? parent2.parent : null) != (Object)null) { newPuppet.transform.SetParent(newPuppet.transform.parent.parent); } } } ReaddComponents(newPuppet, __instance.original, __instance); if (((Object)newPuppet).name.Contains("Very Cancerous Rodent")) { ScreenDistortionField componentInChildren = newPuppet.GetComponentInChildren(true); if (componentInChildren != null) { ((Component)componentInChildren).gameObject.SetActive(false); } Rigidbody component = newPuppet.GetComponent(); if (component != null) { component.isKinematic = true; } } } public static void ReaddComponents(GameObject puppet, EnemyIdentifier original, CaughtEnemy __instance) { //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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0169: 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_0181: 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 "ParentPuppetTo": { ParentPuppetTo component2 = val.GetComponent(); ParentPuppetTo orAddComponent2 = GameObjectExtensions.GetOrAddComponent(puppet); orAddComponent2.objectName = component2.objectName; if (orAddComponent2.objectName != "") { Vector3 localScale = puppet.transform.localScale; Transform val2 = puppet.transform.parent.Find(orAddComponent2.objectName); if ((Object)(object)val2 != (Object)null) { puppet.transform.SetParent(val2); } puppet.transform.localScale = localScale; } break; } case "StopEnemyMovement": { StopEnemyMovement component3 = val.GetComponent(); StopEnemyMovement orAddComponent3 = GameObjectExtensions.GetOrAddComponent(puppet); component3.CopyValuesTo(orAddComponent3); break; } case "MoveTo": { MoveTo component4 = val.GetComponent(); MoveTo orAddComponent4 = GameObjectExtensions.GetOrAddComponent(puppet); component4.CopyValuesTo(orAddComponent4); 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; } } } } } [HarmonyPatch(typeof(HurtZone), "Start")] public class GoopCloudPatch { public static void Postfix(HurtZone __instance) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (Util.IsPatched() && (Object)(object)((Component)__instance).transform.parent != (Object)null && ((Object)((Component)__instance).transform.parent).name.Contains("GoopCloud")) { __instance.affected = (AffectedSubjects)1; } } } [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; } } [HarmonyPatch(typeof(MirrorReaper), "Death")] public class MirrorReaperPatch { public static void Prefix(MirrorReaper __instance) { if (Util.IsPatched()) { ((Behaviour)((Component)__instance).GetComponent()).enabled = false; } } } [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("Nemesis PowerPhysicsArm").transform; } __instance.physicsArm.SetParent(((Component)__instance).transform.parent); return false; } } [HarmonyPatch(typeof(PhysicalShockwave), "CreatePortalReplicas")] public class ShockwavePatch { public static bool Prefix(PhysicalShockwave __instance) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Invalid comparison between Unknown and I4 if (Util.IsPatched() && (int)__instance.enemyType == 2) { return false; } return true; } } public class SwordsmachineAddANW : 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; SwordsmachineAddANW[] array3 = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); SwordsmachineAddANW[] array4 = array3; foreach (SwordsmachineAddANW swordsmachineAddANW in array4) { swordsmachineAddANW.Add(); } CheckPointPatch.InheritCheckpointRooms(__instance.cpToReset); __instance.cpToReset.UpdateRooms(); return false; } } public class ActionOnEnable : MonoBehaviour { public UnityEvent unityEvent = new UnityEvent(); public bool activated = false; public bool oneTime = true; public void OnEnable() { if (!oneTime || !activated) { UnityEvent obj = unityEvent; if (obj != null) { obj.Invoke(); } activated = true; if (!oneTime) { ((Component)this).gameObject.SetActive(false); } } } } public class ArenaDelay : MonoBehaviour { public float delay = 1f; 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 ArenaStatusNotInParent : MonoBehaviour { public ArenaStatus astat = null; public void Awake() { ActivateArena component = ((Component)this).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.astat == (Object)null) { component.astat = astat; } } } public class ArenaStatusUpdater : MonoBehaviour { public int statusValue = 1; public bool isAdditive = false; public ArenaStatus arenaStatus = null; public bool oneTime = true; public bool activated = false; public void OnEnable() { if (!((Object)(object)arenaStatus == (Object)null) && (!oneTime || !activated)) { if (isAdditive) { ArenaStatus obj = arenaStatus; obj.currentStatus += statusValue; } else { arenaStatus.currentStatus = statusValue; } activated = true; } } } 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 BreakParticlePlaceholder : MonoBehaviour { public void OnEnable() { Object.Destroy((Object)(object)((Component)this).gameObject); } } 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 void OnDisable() { if (!((Object)(object)checkpoint == (Object)null)) { checkpoint.SetForceOff(true); } } } public class InheritRoomExceptions : MonoBehaviour { public string[] roomNames = Array.Empty(); } 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 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 DontManipulateLight : MonoBehaviour { public Light targetLight; } 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 GravitySwitcher : MonoBehaviour { public Vector3 direction = new Vector3(0f, -40f, 0f); public bool instant = false; public bool transformCamera = true; public bool oneTime = true; public bool activated = false; public void OnEnable() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!activated || !oneTime) { NewMovement instance = MonoSingleton.Instance; if (instance != null) { instance.SwitchGravity(direction, instant, transformCamera); } activated = true; } } } public class NoElectricityChecker : MonoBehaviour { public GameObject toActivate = null; public void OnTriggerEnter(Collider other) { if (Util.IsPatched() && ((Component)other).gameObject.CompareTag("Player") && !GeneralFuncs.PlayerHasElectricWeapon()) { toActivate.SetActive(true); ((Component)this).gameObject.SetActive(false); AttributeChecker componentInChildren = ((Component)((Component)this).transform.parent).GetComponentInChildren(); if (componentInChildren != null) { ((Component)componentInChildren).gameObject.SetActive(false); } } } } public class NoElectricityCheckerSetup : MonoBehaviour { public bool finished = false; public void Start() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) if (!finished) { GameObject toActivate = ((Component)this).GetComponent().toActivate; GameObject val = Object.Instantiate(((Component)this).gameObject, ((Component)this).transform.parent); val.transform.localPosition = new Vector3(0f, 2.5f, 0f); GameObjectExtensions.GetOrAddComponent(val).toActivate = toActivate; val.layer = LayerMask.NameToLayer("Invisible"); ((Object)val).name = "NoElectricityChecker"; Object.Destroy((Object)(object)val.GetComponent()); finished = true; } } } public class NoOcclusionCulling : MonoBehaviour { public void Start() { NewMovement instance = MonoSingleton.Instance; if (instance != null) { instance.cc.cam.useOcclusionCulling = false; } } } [HarmonyPatch(typeof(NewMovement), "Respawn")] public class NoOcclusionCullingPatch { public static void Postfix(NewMovement __instance) { NoOcclusionCulling component = ((Component)__instance).GetComponent(); if (!((Object)(object)component == (Object)null)) { __instance.cc.cam.useOcclusionCulling = false; } } } public class ObacReadier : MonoBehaviour { public ObjectActivationCheck obac; public bool makeReady = true; public bool undoOnDisable = false; public void OnEnable() { ObjectActivationCheck obj = obac; if (obj != null) { obj.readyToActivate = makeReady; } } public void OnDisable() { if (undoOnDisable) { ObjectActivationCheck obj = obac; if (obj != null) { obj.readyToActivate = !makeReady; } } } } public class PortalBlocker : MonoBehaviour { public bool unblock = false; public string portalPath = "Portal In"; public bool entry = true; public bool exit = true; public void OnEnable() { Block(unblock); } public void Block(bool unblock = false) { Transform obj = GeneralFuncs.FindInactive(portalPath); Portal val = ((obj != null) ? ((Component)obj).GetComponent() : null); if (entry) { PortalFuncs.SetPortalEntry(val, unblock, unblock); } if (exit) { PortalFuncs.SetPortalExit(val, unblock, unblock); } if (entry && exit) { ((Component)val).gameObject.SetActive(unblock); ((Component)val.exit).gameObject.SetActive(unblock); } } } 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; } } public class VariableDelay : MonoBehaviour { public static Dictionary AllDelays = new Dictionary(); public Component targetComponent = null; public string delayName = ""; public void Activate() { Component val = targetComponent; Component val2 = val; if (!(val2 is ArenaDelay arenaDelay)) { ObjectActivator val3 = (ObjectActivator)(object)((val2 is ObjectActivator) ? val2 : null); if (val3 != null) { val3.delay = AllDelays[delayName]; } } else { arenaDelay.delay = AllDelays[delayName]; } } public static void ActivateAll(string delayName) { VariableDelay[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); VariableDelay[] array2 = array; foreach (VariableDelay variableDelay in array2) { if (!(variableDelay.delayName != delayName)) { variableDelay.Activate(); } } } } [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 && (Object)(object)__instance.doorForward != (Object)null) { val2.Open(false, true); } else if ((Object)(object)componentInChildren?.door == (Object)(object)val2) { val2.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(StatsManager), "SendInfo")] public class SendInfoPatch { public static void Postfix() { Plugin.Logger.LogWarning((object)("Score submitted: " + LeaderboardController.CanSubmitScores)); } } [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.ChangedLevelScenes.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.ChangedLevelScenes.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.ChangedLevelScenes.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.IsEnabled()) { 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(DifficultyTitle), "Check")] public class MainMenuTitlePatch { [HarmonyPriority(100)] public static void Postfix(DifficultyTitle __instance) { if (Util.IsEnabled() && !(SceneHelper.CurrentScene != "Main Menu") && !(((Object)__instance).name != "Title (2)")) { string text = "\n(NEMESIS)"; TMP_Text txt = __instance.txt2; txt.text += text; __instance.txt2.verticalAlignment = (VerticalAlignmentOptions)256; } } } [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 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(100)] 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(100)] 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, ["Gabriel"] = null, ["Gabriel2"] = null, ["Gabriel3"] = null, ["V2"] = null, ["V2.2"] = null, ["BigJohninator"] = null, ["Minotaur"] = null, ["MinosPrime"] = null, ["SisyphusPrime"] = null, ["LuciferPrime"] = null, ["Watchtower"] = null, ["BlackHoleLauncher"] = 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, ["Book"] = null, ["Plank"] = null, ["PlankBlocker"] = null, ["GlassFloor"] = null, ["GlassWall"] = null, ["GlassWall2"] = null, ["Crusher"] = null, ["Fan"] = null, ["Grinder"] = null, ["EnergyBeam"] = null, ["BrainBeam"] = null, ["BrainBeamObstacle"] = null }; public static Dictionary Particles = new Dictionary { ["SpawnHeavy"] = null, ["Break"] = null, ["BreakBig"] = null, ["BreakMetal"] = null }; public static Dictionary AudioClips = new Dictionary { ["Shutdown"] = null }; public static Dictionary Textures = new Dictionary { ["final door2L"] = null, ["final door2LB 2"] = null, ["final door2LB"] = null, ["finalframeL2"] = null, ["finalframeL2B"] = null, ["finalframeL3"] = null, ["finalframeT 1"] = null, ["finalframeT"] = null, ["finalframeTB"] = null, ["batch 0-1"] = null, ["batch 0-2"] = null, ["batch 0-3"] = null, ["batch 0-4"] = null, ["batch 0-5"] = null, ["batch 1-1"] = null, ["batch 1-2"] = null, ["batch 1-4"] = null }; public static Dictionary DebugObjects = new Dictionary { ["AxisPoint"] = null }; 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(); GetEnemiesBosses(); GetObjectsMain(); GetObjectsSecondary(); GetObjectsObstacles(); GetParticles(); GetAudioClips(); GetTextures(); GetDebugObjects(); } public static void GetEnemiesHusks() { Plugin.Logger.LogInfo((object)"Getting husk enemy assets... (1/13)"); 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() { Plugin.Logger.LogInfo((object)"Getting machine enemy assets... (2/13)"); 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() { Plugin.Logger.LogInfo((object)"Getting demon enemy assets... (3/13)"); 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() { Plugin.Logger.LogInfo((object)"Getting angel enemy assets... (4/13)"); 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() { Plugin.Logger.LogInfo((object)"Getting other enemy assets... (5/13)"); Enemies["Eye"] = AssGO("Assets/Prefabs/Enemies/DroneFlesh.prefab"); Enemies["EyeYellow"] = AssGO("Assets/Prefabs/Enemies/DroneFleshCamera Variant.prefab"); Enemies["EyeMalicious"] = AssGO("Assets/Prefabs/Enemies/DroneSkull Variant.prefab"); 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 GetEnemiesBosses() { Plugin.Logger.LogInfo((object)"Getting boss enemy assets... (6/13)"); Enemies["Gabriel"] = AssGO("Assets/Prefabs/Enemies/Gabriel.prefab"); Enemies["Gabriel2"] = AssGO("Assets/Prefabs/Enemies/Gabriel 2nd.prefab"); Enemies["V2"] = AssGO("Assets/Prefabs/Enemies/V2.prefab"); Enemies["V2.2"] = AssGO("Assets/Prefabs/Enemies/V2 Green Arm Variant.prefab"); Enemies["BigJohninator"] = AssGO("Assets/Prefabs/Enemies/Big Johninator.prefab"); Enemies["Minotaur"] = AssGO("Assets/Prefabs/Enemies/Minotaur.prefab"); Enemies["MinosPrime"] = AssGO("Assets/Prefabs/Enemies/MinosPrime.prefab"); Enemies["SisyphusPrime"] = AssGO("Assets/Prefabs/Enemies/SisyphusPrime.prefab"); } public static void SetUpCustomEnemyPlaceholders() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown bool flag = (Object)(object)Enemies["Watchtower"] == (Object)null; bool flag2 = (Object)(object)Enemies["BlackHoleLauncher"] == (Object)null; if (flag || flag2) { Plugin.Logger.LogInfo((object)"Setting up custom enemy assets..."); } if (flag) { GameObject val = new GameObject("Watchtower NemesisPlaceholder"); Object.DontDestroyOnLoad((Object)(object)val); Enemies["Watchtower"] = val; } if (flag2) { GameObject val2 = new GameObject("BlackHoleLauncher NemesisPlaceholder"); Object.DontDestroyOnLoad((Object)(object)val2); Enemies["BlackHoleLauncher"] = val2; } } public static void GetObjectsMain() { Plugin.Logger.LogInfo((object)"Getting object assets... (7/13)"); 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() { Plugin.Logger.LogInfo((object)"Getting secondary object assets... (8/13)"); Objects["ElectricityBox"] = AssGO("Assets/Prefabs/Levels/Interactive/ElectricityBox.prefab"); Objects["TeslaCoils"] = AssGO("Assets/Prefabs/Levels/Interactive/Tesla Coils.prefab"); FixUpTeslaCoils(); 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["Book"] = AssGO("Assets/Prefabs/Items/Book.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"); } public static void GetObjectsObstacles() { Plugin.Logger.LogInfo((object)"Getting obstacle object assets... (9/13)"); Objects["Crusher"] = AssGO("Assets/Prefabs/Levels/Obstacles/Crusher Symmetrical.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 FixUpTeslaCoils() { if (!((Object)(object)Objects["TeslaCoils"] == (Object)null)) { ComponentExtensions.GetOrAddComponent((Component)(object)Objects["TeslaCoils"].transform.Find("ActivationZone")); } } public static void GetParticles() { Plugin.Logger.LogInfo((object)"Getting particle assets... (10/13)"); Particles["SpawnHeavy"] = AssGO("Assets/Particles/Spawn Effects/SpawnEffect Heavy.prefab"); 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() { Plugin.Logger.LogInfo((object)"Getting audio assets... (11/13)"); AudioClips["Shutdown"] = Ass("Assets/Sounds/Weapons/Bluezone-Autobots-shutdown-003.wav"); } public static void GetTextures() { Plugin.Logger.LogInfo((object)"Getting hellevator textures... (12/13)"); Textures["final door2L"] = Util.LoadEmbeddedTexture("BillionNemesis.Assets.final door2L.png", "final door2L"); Textures["final door2LB 2"] = Util.LoadEmbeddedTexture("BillionNemesis.Assets.final door2LB 2.png", "final door2LB 2"); Textures["final door2LB"] = Util.LoadEmbeddedTexture("BillionNemesis.Assets.final door2LB.png", "final door2LB"); Textures["finalframeL2"] = Util.LoadEmbeddedTexture("BillionNemesis.Assets.finalframeL2.png", "finalframeL2"); Textures["finalframeL2B"] = Util.LoadEmbeddedTexture("BillionNemesis.Assets.finalframeL2B.png", "finalframeL2B"); Textures["finalframeL3"] = Util.LoadEmbeddedTexture("BillionNemesis.Assets.finalframeL3.png", "finalframeL3"); Textures["finalframeT 1"] = Util.LoadEmbeddedTexture("BillionNemesis.Assets.finalframeT 1.png", "finalframeT 1"); Textures["finalframeT"] = Util.LoadEmbeddedTexture("BillionNemesis.Assets.finalframeT.png", "finalframeT"); Textures["finalframeTB"] = Util.LoadEmbeddedTexture("BillionNemesis.Assets.finalframeTB.png", "finalframeTB"); Plugin.Logger.LogInfo((object)"Getting batch hellevator textures... (12.5/13)"); string[] array = Textures.Keys.ToArray(); foreach (string text in array) { if (text.StartsWith("batch ")) { Textures[text] = Util.LoadEmbeddedTexture("BillionNemesis.Assets.BatchMaterialEnvironment." + text + ".png", text); } } } public static void GetDebugObjects() { Plugin.Logger.LogInfo((object)"Getting debug object assets... (13/13)"); DebugObjects["AxisPoint"] = AssGO("Assets/Prefabs/Sandbox/Previews/Axis Point Variant.prefab"); } } public static class LevelPatching { [CompilerGenerated] private sealed class d__5 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__5(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; case 1: <>1__state = -1; RecolorRooms(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static string[] batchExcludedLevels = new string[1] { "1-3" }; public static string levelNumberText = ""; public static void TryRunLevelPatch() { int? num = MonoSingleton.Instance?.levelNumber; if (SceneHelper.CurrentScene != null && num.HasValue && num != 0) { levelNumberText = GetMissionName.GetMissionNumberOnly(SceneHelper.CurrentLevelNumber); RunLevelPatch(SceneHelper.CurrentScene); } } public static void RunLevelPatch(string sceneName) { string text = "Patch" + sceneName.Replace("-", "_").Replace(" ", ""); string text2 = "BillionNemesis.LevelPatches"; switch (sceneName) { case "005a4f2ce549277458596ee0f0d6e88c": text = "PatchLevelP_1"; break; case "1f290c2101e628540bf9c6d1d2140750": text = "PatchLevelP_2"; break; case "blah blah blah": text = "PatchLevelP_3"; break; } string text3 = text2 + "." + text; Type type = Type.GetType(text3); if (type == null) { Plugin.Logger.LogInfo((object)("Level patch class not found: " + text3)); return; } Plugin.Logger.LogInfo((object)("Level found, trying to patch: " + text3)); MethodInfo method = type.GetMethod("Patch", BindingFlags.Static | BindingFlags.Public); if (method == null) { Plugin.Logger.LogWarning((object)("OOPS: .Patch() method not found for class " + text3)); return; } Plugin.Logger.LogInfo((object)"Patching..."); method.Invoke(null, null); Plugin.Logger.LogInfo((object)"Patched"); UpdateMusic(type); ((MonoBehaviour)MonoSingleton.Instance).StartCoroutine(RecolorRoomsDelayed()); GetAndUpdateRankRequirements(type); Plugin.IsPatched = true; } public static void UpdateMusic(Type type) { MethodInfo method = type.GetMethod("Music", BindingFlags.Static | BindingFlags.Public); if (!(method == null)) { FieldInfo field = type.GetField("MusicName", BindingFlags.Static | BindingFlags.Public); string text = (string)field.GetValue(null); if (text == null) { text = "???"; } Plugin.Logger.LogInfo((object)("Getting music: " + text)); method.Invoke(null, null); Plugin.Logger.LogInfo((object)"Got music"); } } [IteratorStateMachine(typeof(d__5))] public static IEnumerator RecolorRoomsDelayed() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__5(0); } public static void RecolorRooms() { Plugin.Logger.LogInfo((object)"Recoloring first and final rooms..."); FinalDoor[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); FinalDoor[] array2 = array; foreach (FinalDoor val in array2) { val.onMaterials = RecolorRoomMaterials(val.onMaterials); val.offMaterials = RecolorRoomMaterials(val.offMaterials); } FirstRoomPrefab[] array3 = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); FinalRoom[] array4 = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); Component[] array5 = (Component[])(object)array3; Component[] first = array5; array5 = (Component[])(object)array4; Component[] array6 = first.Concat(array5).ToArray(); Component[] array7 = array6; foreach (Component val2 in array7) { MeshRenderer[] componentsInChildren = val2.GetComponentsInChildren(true); MeshRenderer[] array8 = componentsInChildren; foreach (MeshRenderer val3 in array8) { ((Renderer)val3).materials = RecolorRoomMaterials(((Renderer)val3).materials); } } Plugin.Logger.LogInfo((object)"Recolored first and final rooms"); } public static Material[] RecolorRoomMaterials(Material[] materials) { for (int i = 0; i < materials.Length; i++) { Material val = materials[i]; if (!((Object)(object)val.mainTexture == (Object)null)) { string name = ((Object)val.mainTexture).name; bool flag = LevelAssets.Textures.ContainsKey(name) && (Object)(object)LevelAssets.Textures[name] != (Object)null; bool flag2 = ((Object)val).name.Contains("Batch Material Environment") && !batchExcludedLevels.Contains(levelNumberText) && LevelAssets.Textures.ContainsKey("batch " + levelNumberText) && (Object)(object)LevelAssets.Textures["batch " + levelNumberText] != (Object)null; if (flag) { Material val2 = Object.Instantiate(val); val2.mainTexture = (Texture)(object)LevelAssets.Textures[name]; materials[i] = val2; } else if (flag2) { Material val3 = Object.Instantiate(val); val3.mainTexture = (Texture)(object)LevelAssets.Textures["batch " + levelNumberText]; materials[i] = val3; } } } return materials; } public static void GetAndUpdateRankRequirements(Type type) { Plugin.Logger.LogInfo((object)"Updating rank requirements..."); 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(ChapterSelectButton __instance) { RankStuff.UpdateChapterColor(__instance); } } [HarmonyPatch(typeof(LayerSelect), "CheckScore")] public class LayerRankPatch { public static void Postfix(LayerSelect __instance) { RankStuff.UpdateLayerColor(__instance); } } [HarmonyPatch(typeof(LevelSelectPanel), "CheckScore")] public class LevelRankPatch { public static void Postfix(LevelSelectPanel __instance) { RankStuff.UpdateLevelColor(__instance); if (ChangedInfo.LevelTitleLineSpacing.ContainsKey(__instance.levelNumber)) { TextMeshProUGUI component = ((Component)((Component)__instance).transform.Find("Name")).GetComponent(); ((TMP_Text)component).lineSpacing = ChangedInfo.LevelTitleLineSpacing[__instance.levelNumber]; } if (ChangedInfo.LevelsWithoutSecrets.Contains(__instance.levelNumber)) { Image[] secretIcons = __instance.secretIcons; foreach (Image val in secretIcons) { ((Behaviour)val).enabled = false; } } } } public static class RankStuff { public static Color colorGold = new Color(1f, 0.686f, 0f, 1f); public static Color colorPink = new Color(1f, 0f, 0.686f, 1f); public static void UpdateRanksAndColors() { ChapterSelectButton[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); ChapterSelectButton[] array2 = array; foreach (ChapterSelectButton val in array2) { val.CheckScore(); } } public static void UpdateChapterColor(ChapterSelectButton chapter) { //IL_003a: 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 = Util.IsEnabled() && ChangedInfo.ChangedChapters.Contains(((Object)chapter).name); bool flag2 = chapter.allPerfects == chapter.layersInChapter.Length; if (flag && flag2) { ((Graphic)chapter.rankButton).color = colorPink; } else if (!flag && flag2) { ((Graphic)chapter.rankButton).color = colorGold; } } public static void UpdateLayerColor(LayerSelect layer) { //IL_0032: 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) bool flag = Util.IsEnabled() && ChangedInfo.ChangedLayers.Contains(((Object)layer).name); if (flag && layer.allPerfects) { ((Graphic)layer.rankImage).color = colorPink; } else if (!flag && layer.allPerfects) { ((Graphic)layer.rankImage).color = colorGold; } } public static void UpdateLevelColor(LevelSelectPanel level) { //IL_004a: 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_0022: 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) if (Util.IsEnabled() && ChangedInfo.ChangedLevels.Contains(level.levelNumber)) { SetLevelRankColors(level, colorPink, new Color(0.6f, 0f, 0.4f, 1f)); } else { SetLevelRankColors(level, colorGold, new Color(0.6f, 0.4f, 0f, 1f)); } } public static void SetLevelRankColors(LevelSelectPanel level, Color color, Color colorChallenge, bool changeBg = false) { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_013a: 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) { return; } 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); RankData rank = GameProgressSaver.GetRank(level.levelNumber, false); if (rank == null) { return; } if (!rank.challenge) { if (val2 != null) { ((Graphic)val2).color = Color.white; } return; } int @int = MonoSingleton.Instance.GetInt("difficulty", 0); if (rank.ranks[@int] != 12 || (!level.allSecrets && rank.secretsAmount != 0)) { if (val2 != null) { ((Graphic)val2).color = Color.black; } } else 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 = index; List list = array.ToList(); for (int i = 0; i < elements.Length; i++) { list.Insert(num, elements[i]); num++; } 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 Texture2D LoadEmbeddedTexture(string resourceName, string textureName) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown Assembly executingAssembly = Assembly.GetExecutingAssembly(); using Stream stream = executingAssembly.GetManifestResourceStream(resourceName); if (stream == null) { Plugin.Logger.LogError((object)("Embedded resource '" + resourceName + "' not found")); return null; } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); Texture2D val = new Texture2D(2, 2); if (ImageConversion.LoadImage(val, array)) { ((Object)val).name = textureName; return val; } Plugin.Logger.LogError((object)"Failed to load embedded texture"); return null; } public static AudioClip MakeClip(string resourceName) { return WavToAudioClip(LoadEmbeddedWav(resourceName)); } public static byte[] LoadEmbeddedWav(string resourceName) { Assembly executingAssembly = Assembly.GetExecutingAssembly(); using Stream stream = executingAssembly.GetManifestResourceStream(resourceName); if (stream == null) { return null; } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); return array; } public static AudioClip WavToAudioClip(byte[] wavBytes, string name = "wav") { if (wavBytes.Length < 44) { return null; } short num = BitConverter.ToInt16(wavBytes, 22); int num2 = BitConverter.ToInt32(wavBytes, 24); short num3 = BitConverter.ToInt16(wavBytes, 34); int num4 = 44; int num5 = 0; for (int i = 12; i < wavBytes.Length - 7; i += 8) { if (wavBytes[i] == 100 && wavBytes[i + 1] == 97 && wavBytes[i + 2] == 116 && wavBytes[i + 3] == 97) { num4 = i + 8; num5 = BitConverter.ToInt32(wavBytes, i + 4); break; } } if (num5 == 0 || num4 + num5 > wavBytes.Length) { Plugin.Logger.LogWarning((object)"Invalid WAV, no data chunk found"); return null; } int num6 = num3 / 8; int num7 = num5 / num6 / num; float[] array = new float[num7 * num]; for (int j = 0; j < num5 / 2; j++) { short num8 = BitConverter.ToInt16(wavBytes, num4 + j * 2); array[j] = (float)num8 / 32768f; } AudioClip val = AudioClip.Create(name, num7, (int)num, num2, false); val.SetData(array, 0); return val; } } public static class MyPluginInfo { public const string PLUGIN_GUID = "BillionNemesis"; public const string PLUGIN_NAME = "Billion Nemesis"; public const string PLUGIN_VERSION = "1.2.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) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0133: 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_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_0157: 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) 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; Vector3[] array = (Vector3[])(object)new Vector3[2] { corner, oppositeCorner }; foreach (Vector3 val3 in array) { GameObject val4 = Object.Instantiate(LevelAssets.DebugObjects["AxisPoint"], val3, Quaternion.identity); val4.transform.SetParent(val.transform); val4.SetActive(false); } return val; } public static ActivateArena AddArena(GameObject trigger, Door[] doors, bool onlyWave = false, ArenaStatus arenaStatus = null, int targetStatusValue = 0) { ActivateArena val = trigger.AddComponent(); val.doors = doors; val.onlyWave = onlyWave; val.forEnemy = false; val.enemies = Array.Empty(); val.astat = arenaStatus; val.waitForStatus = targetStatusValue; if ((Object)(object)arenaStatus == (Object)null) { return val; } bool flag = false; ArenaStatus[] componentsInParent = ((Component)val).GetComponentsInParent(true); foreach (ArenaStatus val2 in componentsInParent) { if ((Object)(object)val2 == (Object)(object)arenaStatus) { flag = true; break; } } if (!flag) { ComponentExtensions.GetOrAddComponent((Component)(object)val).astat = arenaStatus; } 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); 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 CheckPoint FindCheckpointByRoom(string checkpointName, Transform room) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); return (from obj in ((Scene)(ref activeScene)).GetRootGameObjects() where ((Object)obj.transform.root).name == checkpointName && (Object)(object)obj.GetComponentInChildren().toActivate == (Object)(object)((Component)room).gameObject select obj).First().GetComponentInChildren(); } 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 void UpdateAllRoomsInCheckpoints() { CheckPoint[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); CheckPoint[] array2 = array; foreach (CheckPoint val in array2) { GameObject[] rooms = val.rooms; foreach (GameObject obj in rooms) { UpdateRoomInCheckpoint(((Component)GeneralFuncs.FindInactive(GeneralFuncs.GetPath(obj))).transform, val); } } } } 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 { private static Shader masterShader; private static string[] masterShaderKeywords; public static Shader MasterShader { get { if ((Object)(object)masterShader == (Object)null) { SkinnedMeshRenderer componentInChildren = LevelAssets.Enemies["Filth"].GetComponentInChildren(); masterShader = ((Renderer)componentInChildren).material.shader; } return masterShader; } set { masterShader = value; } } public static string[] MasterShaderKeywords { get { if (masterShaderKeywords == null) { SkinnedMeshRenderer componentInChildren = LevelAssets.Enemies["Filth"].GetComponentInChildren(); masterShaderKeywords = ((Renderer)componentInChildren).material.shaderKeywords; } return masterShaderKeywords; } set { masterShaderKeywords = value; } } public static NemesisEnemy InstantiateEnemy(GameObject enemyObject, Vector3 position, Quaternion rotation, Transform waveTransform) { //IL_0046: 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_0085: 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_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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_011c: 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_0147: Unknown result type (might be due to invalid IL or missing references) bool flag = ((Object)enemyObject).name.Contains("Very Cancerous Rodent"); bool flag2 = ((Object)enemyObject).name == "Watchtower NemesisPlaceholder"; bool flag3 = ((Object)enemyObject).name == "BlackHoleLauncher NemesisPlaceholder"; if (!(flag || flag2 || flag3)) { GameObject val = Object.Instantiate(enemyObject, position, rotation); val.transform.SetParent(waveTransform); return new NemesisEnemy(val); } NemesisEnemy nemesisEnemy = null; if (flag) { GameObject val2 = Object.Instantiate(LevelAssets.Enemies["VeryCancerousRodent"], position, rotation); val2.transform.SetParent(waveTransform); nemesisEnemy = new NemesisEnemy(val2); MakeEnemyScale(nemesisEnemy, 0.67f * Vector3.one, "Rodent"); } else if (flag2) { GameObject val3 = Object.Instantiate(LevelAssets.Enemies["Tower"], position, rotation); val3.transform.SetParent(waveTransform); ((Object)val3).name = "WatchtowerSpawned(Clone)"; nemesisEnemy = new NemesisEnemy(val3); MakeEnemyScale(nemesisEnemy, new Vector3(1.5f, 2f, 1.5f), "Watchtower"); } else if (flag3) { GameObject val4 = Object.Instantiate(LevelAssets.Enemies["Mortar"], position, rotation); val4.transform.SetParent(waveTransform); ((Object)val4).name = "BlackHoleLauncherSpawned(Clone)"; nemesisEnemy = new NemesisEnemy(val4); } return nemesisEnemy; } public static NemesisEnemy MakeEnemyScale(NemesisEnemy nemesisEnemy, Vector3 localScale, string scaleName) { //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_002a: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) Vector3 localScale2 = nemesisEnemy.transform.localScale; Transform transform = GeneralFuncs.MakeEmpty(nemesisEnemy.parent, scaleName + "Scale").transform; transform.localScale = localScale; transform.position = nemesisEnemy.transform.position; nemesisEnemy.transform.SetParent(transform); nemesisEnemy.transform.localPosition = Vector3.zero; nemesisEnemy.transform.localScale = localScale2; AddParentPuppetTo(nemesisEnemy, scaleName + "Scale"); return nemesisEnemy; } public static NemesisEnemy AddEnemy(Transform waveTransform, GameObject enemyObject, Vector3 position, Quaternion rotation, ActivateNextWave[] anwsToAddEnemyCount = null, ActivateArena[] arenaSources = null, bool spawnEffect = true, bool bossBar = false) { //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]; } NemesisEnemy nemesisEnemy = InstantiateEnemy(enemyObject, position, rotation, waveTransform); nemesisEnemy.eid.spawnIn = spawnEffect; nemesisEnemy.eid.BossBar(bossBar); FixUpEnemy(nemesisEnemy); nemesisEnemy.gameObject.SetActive(false); ActivateNextWave[] array = anwsToAddEnemyCount; foreach (ActivateNextWave val in array) { val.enemyCount++; } if (arenaSources == null) { arenaSources = ((Component)waveTransform).GetComponentsInChildren(true); } ActivateArena[] array2 = arenaSources; foreach (ActivateArena val2 in array2) { Util.ArrayAdd(ref val2.enemies, nemesisEnemy.gameObject); } return nemesisEnemy; } public static NemesisEnemy AddEnemyNoTrigger(Transform waveTransform, GameObject enemyObject, Vector3 position, Quaternion rotation, ActivateNextWave[] anwsToAddEnemyCount = null, ActivateNextWave[] anwSources = null, ActivateNextWaveHP[] anwhSources = null, bool spawnEffect = true, bool bossBar = false) { //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]; } NemesisEnemy nemesisEnemy = InstantiateEnemy(enemyObject, position, rotation, waveTransform); nemesisEnemy.eid.spawnIn = spawnEffect; nemesisEnemy.eid.BossBar(bossBar); FixUpEnemy(nemesisEnemy); nemesisEnemy.gameObject.SetActive(false); ActivateNextWave[] array = anwsToAddEnemyCount; foreach (ActivateNextWave val in array) { val.enemyCount++; } ActivateNextWave[] array2 = anwSources; foreach (ActivateNextWave val2 in array2) { Util.ArrayAdd(ref val2.nextEnemies, nemesisEnemy.gameObject); } ActivateNextWaveHP[] array3 = anwhSources; foreach (ActivateNextWaveHP val3 in array3) { Util.ArrayAdd(ref val3.nextEnemies, nemesisEnemy.gameObject); } return nemesisEnemy; } public static void FixUpEnemy(NemesisEnemy nemesisEnemy) { //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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) if (nemesisEnemy.name.Contains("Power") && !nemesisEnemy.name.Contains("WithSpawnEffect")) { Transform transform = Object.Instantiate(LevelAssets.Particles["SpawnHeavy"], nemesisEnemy.transform.position, Quaternion.identity).transform; transform.SetParent(nemesisEnemy.transform); transform.localScale = new Vector3(3f, 7f, 3f); transform.localPosition -= transform.up; nemesisEnemy.eid.spawnEffect = ((Component)transform).gameObject; } else if (nemesisEnemy.name.Contains("Very Cancerous Rodent")) { SetEnemyHealth(nemesisEnemy, 40f); ((Component)nemesisEnemy.transform.Find("Radiation")).gameObject.SetActive(false); MeshRenderer component = ((Component)nemesisEnemy.transform.Find("VeryCancerousRodent")).GetComponent(); ((Renderer)component).material.shader = MasterShader; ((Renderer)component).material.shaderKeywords = MasterShaderKeywords; ((Renderer)component).material.EnableKeyword("ENEMY"); ((Renderer)component).material.EnableKeyword("_FOG_ON"); ((Renderer)component).material.EnableKeyword("PORTAL_CLIP_PLANE"); } else if (nemesisEnemy.name.Contains("V2")) { V2 component2 = ((Component)nemesisEnemy.eid).GetComponent(); component2.dontDie = true; component2.bossVersion = false; nemesisEnemy.enemy.dontDie = false; ComponentExtensions.GetOrAddComponent((Component)(object)component2); } FixUpVertexLighting(nemesisEnemy.gameObject); } public static void FixUpVertexLighting(GameObject enemyObject) { if (!Plugin.DisableEnemyVertexLighting) { return; } SkinnedMeshRenderer[] componentsInChildren = enemyObject.GetComponentsInChildren(true); foreach (SkinnedMeshRenderer val in componentsInChildren) { Material[] materials = ((Renderer)val).materials; foreach (Material val2 in materials) { val2.DisableKeyword("VERTEX_LIGHTING"); } } MeshRenderer[] componentsInChildren2 = enemyObject.GetComponentsInChildren(true); foreach (MeshRenderer val3 in componentsInChildren2) { Material[] materials2 = ((Renderer)val3).materials; foreach (Material val4 in materials2) { val4.DisableKeyword("VERTEX_LIGHTING"); } } } public static void SetIdolTarget(NemesisEnemy targetEnemy, NemesisEnemy idol) { idol.eid.idol.overrideTarget = targetEnemy.eid; } public static void SetIdolTarget(NemesisEnemy targetEnemy, NemesisEnemy[] idols) { foreach (NemesisEnemy nemesisEnemy in idols) { nemesisEnemy.eid.idol.overrideTarget = targetEnemy.eid; } } public static NemesisEnemy ApplyRadiance(NemesisEnemy nemesisEnemy, bool buffSpeed = false, bool buffHealth = false, bool buffDamage = false, float? speedMult = null, float? healthMult = null, float? damageMult = null) { EnemyIdentifier eid = nemesisEnemy.eid; eid.speedBuff = buffSpeed; eid.healthBuff = buffHealth; eid.damageBuff = buffDamage; if (speedMult.HasValue) { eid.speedBuffModifier = speedMult.Value; } if (healthMult.HasValue) { eid.healthBuffModifier = healthMult.Value; } if (damageMult.HasValue) { eid.damageBuffModifier = damageMult.Value; } return nemesisEnemy; } public static NemesisEnemy ApplySand(NemesisEnemy nemesisEnemy) { nemesisEnemy.eid.Sandify(false); return nemesisEnemy; } public static NemesisEnemy SetEnemyName(NemesisEnemy nemesisEnemy, string newName) { nemesisEnemy.eid.overrideFullName = newName; UpdateEnemyHealthbar(nemesisEnemy.eid); return nemesisEnemy; } public static NemesisEnemy SetEnemyHealth(NemesisEnemy nemesisEnemy, float newHealth) { nemesisEnemy.eid.health = newHealth; nemesisEnemy.enemy.health = newHealth; nemesisEnemy.enemy.originalHealth = newHealth; UpdateEnemyHealthbar(nemesisEnemy.eid); return nemesisEnemy; } public static EnemyIdentifier UpdateEnemyHealthbar(EnemyIdentifier eid) { BossHealthBar component = ((Component)eid).GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); ((Component)eid).gameObject.AddComponent(); } return eid; } 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(NemesisEnemy nemesisEnemy, bool stopDashing = true, bool stopWalking = false) { StopEnemyMovement stopEnemyMovement = ((Component)nemesisEnemy.eid).gameObject.AddComponent(); stopEnemyMovement.stopDashing = stopDashing; stopEnemyMovement.stopWalking = stopWalking; return stopEnemyMovement; } public static TeleportOnCondition AddTeleportOnCondition(NemesisEnemy nemesisEnemy, bool processPassively = true, bool processIfEnemyDead = false, bool onDeadcaught = true, bool breakOnFirstSuccess = false) { TeleportOnCondition teleportOnCondition = nemesisEnemy.gameObject.AddComponent(); teleportOnCondition.processPassively = processPassively; teleportOnCondition.processIfEnemyDead = processIfEnemyDead; teleportOnCondition.onDeadcaught = onDeadcaught; teleportOnCondition.returnOnFirstSuccess = breakOnFirstSuccess; teleportOnCondition.globalConditionKey = TeleportOnCondition.GlobalConditions.Count; return teleportOnCondition; } public static NemesisEnemy RemoveEnemyLogic(NemesisEnemy nemesisEnemy) where T : Component { ((Behaviour)nemesisEnemy.eid).enabled = false; Object.Destroy((Object)(object)nemesisEnemy.enemy); Object.Destroy((Object)(object)((Component)nemesisEnemy.transform).GetComponentInChildren()); return nemesisEnemy; } public static DontCatch AddDontCatch(NemesisEnemy nemesisEnemy) { return ComponentExtensions.GetOrAddComponent((Component)(object)nemesisEnemy.eid); } public static DontEnrage AddDontEnrage(NemesisEnemy nemesisEnemy) { return ComponentExtensions.GetOrAddComponent((Component)(object)nemesisEnemy.eid); } public static ParentPuppetTo AddParentPuppetTo(NemesisEnemy nemesisEnemy, string objectName) { ParentPuppetTo parentPuppetTo = ((Component)nemesisEnemy.eid).gameObject.AddComponent(); parentPuppetTo.objectName = objectName; return parentPuppetTo; } public static NemesisEnemy 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]; } NemesisEnemy nemesisEnemy = AddEnemy(waveTransform, LevelAssets.Enemies["CerberusStatue"], position, rotation, anwsToAdd, Array.Empty(), spawnEffect: false); GameObject gameObject = ((Component)nemesisEnemy.transform.Find("StatueActivator")).gameObject; foreach (ActivateArena val in arenaSources) { Util.ArrayAdd(ref val.enemies, gameObject); } StatueFake componentInChildren = ((Component)nemesisEnemy.transform).GetComponentInChildren(true); componentInChildren.quickSpawn = quickSpawn; ((Component)componentInChildren).gameObject.AddComponent().multiplier = wakeUpSpeedMultiplier; nemesisEnemy.gameObject.SetActive(true); return nemesisEnemy; } 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 Transform 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 item; } if (!(((Object)item).name != array[0])) { Transform val = FindChildByPath(item, path); if ((Object)(object)val != (Object)null) { Plugin.ObjectsLookedUpThisScene[path] = val; return val; } } } return null; } public static Transform FindChildByPath(Transform parent, string path) { string[] parts = path.Split('/'); int currentIndex; for (currentIndex = 1; currentIndex < parts.Length; currentIndex++) { if ((Object)(object)parent == (Object)null) { return null; } parent = ((IEnumerable)((Component)parent).GetComponentsInChildren(true)).FirstOrDefault((Func)((Transform child) => ((Object)child).name == parts[currentIndex] && (Object)(object)child.parent == (Object)(object)parent)); } return parent; } public static string GetPath(GameObject obj) { string text = ((Object)obj).name; Transform parent = obj.transform.parent; while ((Object)(object)parent != (Object)null) { text = ((Object)parent).name + "/" + text; parent = parent.parent; } return text; } public static bool PlayerHasElectricWeapon() { int @int = MonoSingleton.Instance.GetInt("weapon.nai2", 0); int int2 = MonoSingleton.Instance.GetInt("weapon.rai0", 0); return @int != 0 || int2 != 0; } public static Door FindDoorByRoom(string doorName, Transform room) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); return (from obj in ((Scene)(ref activeScene)).GetRootGameObjects() where ((Object)obj.transform.root).name == doorName && obj.GetComponentInChildren().activatedRooms.Contains(((Component)room).gameObject) select obj).First().GetComponentInChildren(); } 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 MusicChanger AddMusicChanger(GameObject trigger, AudioClip battle = null, AudioClip clean = null, AudioClip boss = null, bool match = false, bool onEnable = false, bool oneTime = false, float pitch = 1f, bool startBattleVersion = false, bool dontStart = false, bool forceOn = false) { MusicChanger val = trigger.AddComponent(); val.battle = battle; val.clean = clean; val.boss = boss; val.match = match; val.onEnable = onEnable; val.oneTime = oneTime; val.pitch = pitch; val.dontStart = dontStart; val.forceOn = forceOn; val.startBattleVersion = startBattleVersion; return val; } public static VariableDelay AddVariableDelay(Component targetComponent, string delayName, float delayValue = 1f) { VariableDelay variableDelay = targetComponent.gameObject.AddComponent(); variableDelay.targetComponent = targetComponent; variableDelay.delayName = delayName; if (!VariableDelay.AllDelays.ContainsKey(delayName)) { VariableDelay.AllDelays.Add(delayName, delayValue); } return variableDelay; } } public static class ObjectActivatorFuncs { public static ObjectActivator AddObjectActivator(GameObject trigger, UltrakillEvent ukEvent, float delay = 0f, bool oneTime = true, bool nonCollider = false, ObjectActivationCheck obac = null) { ObjectActivator val = trigger.AddComponent(); val.events = ukEvent; val.delay = delay; val.oneTime = oneTime; val.nonCollider = nonCollider; val.obac = obac; 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 trigger, string message, bool timed = true, float timerTime = 5f, bool silent = false, bool colliderless = false, string message2 = "", bool notOneTime = false, bool deactivating = false) { HudMessage val = trigger.AddComponent(); val.message = message; val.timed = timed; val.timerTime = timerTime; val.silent = silent; val.colliderless = colliderless; val.message2 = message2; val.notOneTime = notOneTime; val.deactivating = deactivating; 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 ArenaStatusUpdater AddArenaStatusUpdater(GameObject obj, ArenaStatus arenaStatus, int statusValue = 1, bool isAdditive = false, bool oneTime = true) { ArenaStatusUpdater arenaStatusUpdater = obj.AddComponent(); arenaStatusUpdater.arenaStatus = arenaStatus; arenaStatusUpdater.statusValue = statusValue; arenaStatusUpdater.isAdditive = isAdditive; arenaStatusUpdater.oneTime = oneTime; return arenaStatusUpdater; } public static ObacReadier AddObacReadier(GameObject obj, ObjectActivationCheck obac, bool makeReady = true, bool undoOnDisable = false) { ObacReadier obacReadier = obj.AddComponent(); obacReadier.obac = obac; obacReadier.makeReady = makeReady; obacReadier.undoOnDisable = undoOnDisable; return obacReadier; } public static BreakableAllower AddBreakableAllower(GameObject obj, Breakable breakable) { BreakableAllower breakableAllower = obj.AddComponent(); breakableAllower.breakable = breakable; return breakableAllower; } public static EnemyBlockBreakables AddEnemyBlockBreakables(NemesisEnemy nemesisEnemy) { return ComponentExtensions.GetOrAddComponent((Component)(object)nemesisEnemy.eid); } public static PortalBlocker AddPortalBlocker(GameObject obj, string portalPath, bool unblock = false, bool entry = true, bool exit = true) { PortalBlocker portalBlocker = obj.AddComponent(); portalBlocker.portalPath = portalPath; portalBlocker.unblock = unblock; portalBlocker.entry = entry; portalBlocker.exit = exit; return portalBlocker; } public static GravitySwitcher AddGravitySwitcher(GameObject obj, Vector3 direction, bool instant = false, bool transformCamera = true, bool oneTime = true) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) GravitySwitcher gravitySwitcher = obj.AddComponent(); gravitySwitcher.direction = direction; gravitySwitcher.instant = instant; gravitySwitcher.transformCamera = transformCamera; gravitySwitcher.oneTime = oneTime; return gravitySwitcher; } } public static class ObjectFuncs { public static Readable PlaceBook(Transform parent, string text, Vector3 position, Quaternion rotation, bool instantScan = false) { //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_0026: Unknown result type (might be due to invalid IL or missing references) Transform transform = Object.Instantiate(LevelAssets.Objects["Book"], position, rotation).transform; transform.SetParent(parent); transform.rotation = rotation; Readable component = ((Component)transform).GetComponent(); component.content = text; component.instantScan = instantScan; return component; } 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 Transform PlaceTerminalPrime(Transform roomTransform, string message, Vector3 position, Quaternion rotation, bool hasMusic = false) { //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["TerminalPrime"], position, rotation).transform; transform.SetParent(roomTransform); if (!hasMusic) { ((Component)transform.Find("Music")).gameObject.SetActive(false); ShopZone component = ((Component)transform).GetComponent(); ((ScreenZone)component).muteMusic = false; } TextMeshProUGUI component2 = ((Component)transform.Find("Canvas/Background/Main Window/Scroll View/Viewport/Text")).GetComponent(); ((TMP_Text)component2).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 Transform PlaceAltarTorch(Transform roomTransform, bool hasTorch, Vector3 position, Quaternion rotation, Door[] doors = null, Door[] reverseDoors = null, GameObject[] activateOnSuccess = null, GameObject[] deactivateOnSuccess = null, GameObject[] activateOnFailure = null) { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_0068: 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) 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 (hasTorch) { transform = Object.Instantiate(LevelAssets.Objects["AltarTorch"], position, rotation).transform; transform.SetParent(roomTransform); transform.localRotation = rotation; } else { transform = Object.Instantiate(LevelAssets.Objects["Altar"], position, rotation).transform; transform.SetParent(roomTransform); transform.localRotation = rotation; } 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 (!hasTorch) { componentInChildren.acceptedItemType = (ItemType)5; } 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); NavMeshModifier component = ((Component)val).GetComponent(); if (component != null) { component.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 PortalFuncs { public static Transform MakePortalSide(Transform parent, Vector3 position, Quaternion rotation) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) Transform transform = GeneralFuncs.MakeEmpty(parent, "Portal").transform; transform.position = position; transform.rotation = rotation; ((Component)transform).gameObject.layer = LayerMask.NameToLayer("Portal"); return transform; } public static Portal MakePortal(string portalName, Transform sideIn, Transform sideOut, Vector2 size) { //IL_003f: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0060: 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) ((Object)sideIn).name = ((Object)sideIn).name + " In - " + portalName; ((Object)sideOut).name = ((Object)sideOut).name + " Out - " + portalName; Portal val = ((Component)sideIn).gameObject.AddComponent(); PlaneShape val2 = default(PlaneShape); val2.width = size.x; val2.height = size.y; PlaneShape val3 = val2; val.shape = (IPortalShape)(object)val3; val.entry = sideIn; val.exit = sideOut; SetPortalGravity(val); SetPortalVisibility(val); SetPortalEntry(val, true); SetPortalExit(val, true); return val; } public static Portal SetPortalGravity(Portal portal, bool changeGravityEntry = false, bool changeGravityExit = false, bool snapGravityEntry = false, bool snapGravityExit = false) { portal.usePerceivedGravityOnEnter = changeGravityEntry; portal.usePerceivedGravityOnExit = changeGravityExit; portal.forceOrthogonalGravityOnEnter = snapGravityEntry; portal.forceOrthogonalGravityOnExit = snapGravityExit; return portal; } public static Portal SetPortalVisibility(Portal portal, bool isPlayerVisible = true, bool canSeeItself = true, bool appearsInRecursions = true, int maxRecursions = 3, bool supportInfiniteRecursion = false, bool mirror = false) { portal.canSeePortalLayer = isPlayerVisible; portal.canSeeItself = canSeeItself; portal.appearsInRecursions = appearsInRecursions; portal.maxRecursions = maxRecursions; portal.supportInfiniteRecursion = supportInfiniteRecursion; portal.mirror = mirror; return portal; } public static Portal BlockPortal(Portal portal, bool unblock = false, bool entry = true, bool exit = true) { if (entry) { SetPortalEntry(portal, unblock, unblock); } if (exit) { SetPortalExit(portal, unblock, unblock); } if (entry && exit) { ((Component)portal).gameObject.SetActive(unblock); ((Component)portal.exit).gameObject.SetActive(unblock); } return portal; } public static Portal SetPortalEntry(Portal portal, bool? visible = true, bool? setAll = null, bool player = true, bool playerProjectile = true, bool enemy = true, bool enemyProjectile = true, bool other = true) { if (visible.HasValue) { ConfigurePortalRender(portal, (PortalSideFlags)2, visible.Value); } if (setAll.HasValue) { player = setAll.Value; playerProjectile = setAll.Value; enemy = setAll.Value; enemyProjectile = setAll.Value; other = setAll.Value; } ConfigurePortalEntryTravel(portal, (PortalTravellerFlags)2, player); ConfigurePortalEntryTravel(portal, (PortalTravellerFlags)4, playerProjectile); ConfigurePortalEntryTravel(portal, (PortalTravellerFlags)8, enemy); ConfigurePortalEntryTravel(portal, (PortalTravellerFlags)16, enemyProjectile); ConfigurePortalEntryTravel(portal, (PortalTravellerFlags)32, other); return portal; } public static Portal SetPortalExit(Portal portal, bool? visible = true, bool? setAll = null, bool player = true, bool playerProjectile = true, bool enemy = true, bool enemyProjectile = true, bool other = true) { if (visible.HasValue) { ConfigurePortalRender(portal, (PortalSideFlags)4, visible.Value); } if (setAll.HasValue) { player = setAll.Value; playerProjectile = setAll.Value; enemy = setAll.Value; enemyProjectile = setAll.Value; other = setAll.Value; } ConfigurePortalExitTravel(portal, (PortalTravellerFlags)2, player); ConfigurePortalExitTravel(portal, (PortalTravellerFlags)4, playerProjectile); ConfigurePortalExitTravel(portal, (PortalTravellerFlags)8, enemy); ConfigurePortalExitTravel(portal, (PortalTravellerFlags)16, enemyProjectile); ConfigurePortalExitTravel(portal, (PortalTravellerFlags)32, other); return portal; } private static Portal ConfigurePortalRender(Portal portal, PortalSideFlags flag, bool visible) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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) portal.renderSettings = (PortalSideFlags)(visible ? (portal.renderSettings | flag) : (portal.renderSettings & ~flag)); return portal; } private static Portal ConfigurePortalEntryTravel(Portal portal, PortalTravellerFlags flag, bool canTravel) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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) portal.entryTravelFlags = (PortalTravellerFlags)(canTravel ? (portal.entryTravelFlags | flag) : (portal.entryTravelFlags & ~flag)); return portal; } private static Portal ConfigurePortalExitTravel(Portal portal, PortalTravellerFlags flag, bool canTravel) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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) portal.exitTravelFlags = (PortalTravellerFlags)(canTravel ? (portal.exitTravelFlags | flag) : (portal.exitTravelFlags & ~flag)); return portal; } } 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) { for (int i = 0; i < waveTransform.childCount; i++) { Transform child = waveTransform.GetChild(i); if ((Object)(object)((Component)child).GetComponent() != (Object)null) { i++; } else { num++; } } 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, NemesisEnemy nemesisEnemy, 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 = nemesisEnemy.eid; 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 enemyObject, ActivateArena[] arenaSourcesToClear) { bool flag = (Object)(object)enemyObject.GetComponent() != (Object)null; bool flag2 = (Object)(object)enemyObject.GetComponent() != (Object)null; if (flag || flag2) { return; } foreach (ActivateArena val in arenaSourcesToClear) { List list = val.enemies.ToList(); if (list.Remove(enemyObject)) { val.enemies = list.ToArray(); Object.Destroy((Object)(object)enemyObject); } } if (arenaSourcesToClear.Length == 0) { Object.Destroy((Object)(object)enemyObject); } } public static void RemoveEnemyNoTrigger(GameObject enemyObject, ActivateNextWave[] anwSourcesToClear, ActivateNextWaveHP[] anwhSourcesToClear) { bool flag = (Object)(object)enemyObject.GetComponent() != (Object)null; bool flag2 = (Object)(object)enemyObject.GetComponent() != (Object)null; if (flag || flag2) { return; } foreach (ActivateNextWave val in anwSourcesToClear) { List list = val.nextEnemies.ToList(); if (list.Remove(enemyObject)) { val.nextEnemies = list.ToArray(); Object.Destroy((Object)(object)enemyObject); } } foreach (ActivateNextWaveHP val2 in anwhSourcesToClear) { List list2 = val2.nextEnemies.ToList(); if (list2.Remove(enemyObject)) { val2.nextEnemies = list2.ToArray(); Object.Destroy((Object)(object)enemyObject); } } if (anwSourcesToClear.Length == 0 && anwhSourcesToClear.Length == 0) { Object.Destroy((Object)(object)enemyObject); } } } } namespace BillionNemesis.LevelPatches { public static class PatchLevel0_1 { [CompilerGenerated] private sealed class d__6 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; case 1: <>1__state = -1; RecolorPits(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static 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 const string MusicName = "(0-1) Oxygen Red"; public static void Patch() { GunRoom(); TwistingCorridor(); GlassCorridor(); GlassBridge(); GlassBridgeTerminal(); StrayRoom(); BloodCorridor(); WeirdRoom(); PenultimateRoom(); PenultimateRoomSecret(); BossRoom(); AddTitle(); ((MonoBehaviour)MonoSingleton.Instance).StartCoroutine(RecolorPitsDelayed()); } 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_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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) LevelStats val = Object.FindObjectsByType((FindObjectsSortMode)0).FirstOrDefault(); TMP_FontAsset font = val.kills.font; Transform parent = GeneralFuncs.FindInactive("Canvas/HurtScreen/Title Sound/Image"); GameObject val2 = new GameObject("NemesisSubtitle"); val2.transform.SetParent(parent); TextMeshProUGUI val3 = val2.AddComponent(); ((TMP_Text)val3).font = font; ((TMP_Text)val3).fontSize = 92f; ((TMP_Text)val3).horizontalAlignment = (HorizontalAlignmentOptions)2; ((TMP_Text)val3).enableWordWrapping = false; ((TMP_Text)val3).text = "BILLION NEMESIS"; ((TMP_Text)val3).outlineColor = Color32.op_Implicit(new Color(1f, 0.686f, 0.686f, 1f)); ((TMP_Text)val3).fontMaterial.SetFloat("_OutlineWidth", 0.16f); RectTransform component = val2.GetComponent(); component.anchorMin = new Vector2(0.5f, 0.5f); component.anchorMax = new Vector2(0.5f, 0.325f); component.pivot = new Vector2(0.5f, 0.5f); component.anchoredPosition = Vector2.zero; component.sizeDelta = Vector2.zero; } [IteratorStateMachine(typeof(d__6))] public static IEnumerator RecolorPitsDelayed() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__6(0); } public static void RecolorPits() { Transform val = GeneralFuncs.FindInactive("1Alt - Short Starting Room/Pit (4)"); MeshRenderer[] componentsInChildren = ((Component)val).GetComponentsInChildren(true); MeshRenderer[] array = componentsInChildren; foreach (MeshRenderer val2 in array) { ((Renderer)val2).materials = LevelPatching.RecolorRoomMaterials(((Renderer)val2).materials); } } 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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_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 = 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; NemesisEnemy nemesisEnemy = 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(nemesisEnemy); ActivateNextWaveHP val3 = WaveFuncs.AddActivationHP(val2, 4.6f, nemesisEnemy, 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_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_00c1: 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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_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_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_0299: 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_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03be: 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_0406: Unknown result type (might be due to invalid IL or missing references) //IL_0449: Unknown result type (might be due to invalid IL or missing references) //IL_044e: Unknown result type (might be due to invalid IL or missing references) //IL_0491: 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) Transform val = GeneralFuncs.FindInactive("3 - Gun Room/Enemies"); Transform val2 = val.Find("Wave 1"); ActivateArena component = ((Component)val.Find("Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val2).GetComponent(); Transform val3 = val.Find("Wave 2"); ActivateNextWave component3 = ((Component)val3).GetComponent(); WaveFuncs.ClearWave(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Idol"], new Vector3(40f, -12.5f, 393f), Quaternion.identity, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Providence"], new Vector3(40f, 60f, 393f), Quaternion.Euler(90f, 180f, 0f), Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, 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(val2, 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(val2, 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(val2, 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 }); GameObject val4 = GeneralFuncs.MakeEmpty(val2, "IdolMover"); val4.SetActive(false); EnemyFuncs.AddMover(val4, nemesisEnemy.transform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, -2.5f); Util.ArrayAdd(ref component3.toActivate, val4); WaveFuncs.ClearWaveNoTrigger(val3, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val3, 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(val3, 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(val3, 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(val3, 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(val3, 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(val3, 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(val3, 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(val3, 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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_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) //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_0153: 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_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_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 val = GeneralFuncs.FindInactive("4 - Hallway/4 Stuff/Enemy"); Transform waveTransform = val.Find("Wave 1"); ActivateArena component = ((Component)val.Find("Trigger 1")).GetComponent(); Transform waveTransform2 = val.Find("Wave 2"); ActivateArena component2 = ((Component)val.Find("Trigger 2")).GetComponent(); CheckPoint component3 = ((Component)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(val.parent, component3); } public static void GlassCorridor() { //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("6 - Glass Hallway/6 Content/Enemies"); Transform waveTransform = val; ActivateArena component = ((Component)val.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 = ((Component)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(val.parent, component4); } public static void GlassBridge() { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_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_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("7 - Fan Room/7 Content/Enemies"); Transform val2 = val; ActivateArena component = ((Component)val.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 = ((Component)GeneralFuncs.FindInactive("Checkpoint")).GetComponent(); component.doors = doors; WaveFuncs.ClearWave(val2, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["EyeYellow"], new Vector3(40f, 30f, 586f), GeneralFuncs.Quat_180, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Schism"], new Vector3(58.5f, -7f, 567f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Schism"], new Vector3(58.5f, -2f, 586f), GeneralFuncs.Quat_270, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Schism"], new Vector3(21.5f, 8f, 586f), GeneralFuncs.Quat_90, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Schism"], new Vector3(40f, 8f, 622f), GeneralFuncs.Quat_180, null, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Idol"], new Vector3(40f, 8f, 632f), GeneralFuncs.Quat_180, null, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy targetEnemy = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["EyeMalicious"], new Vector3(21.5f, 15f, 576f), GeneralFuncs.Quat_90, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.SetIdolTarget(targetEnemy, nemesisEnemy); ActivateNextWave val3 = WaveFuncs.AddActivation(val2, doors, component3, lastWave: true, 5); GameObject val4 = GeneralFuncs.MakeEmpty(val2, "IdolMover"); val4.SetActive(false); EnemyFuncs.AddMover(val4, nemesisEnemy.transform).MoveXYZ(moveX: false, moveY: false).TargetXYZ(0f, 0f, 622f); Util.ArrayAdd(ref val3.toActivate, val4); CheckpointFuncs.UpdateRoomInCheckpoint(val.parent, component4); } public static void GlassBridgeTerminal() { //IL_0023: 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 roomTransform = GeneralFuncs.FindInactive("7 - Fan Room/7 Nonstuff"); 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(roomTransform, message, new Vector3(39.3f, 121.5f, 597f), Quaternion.Euler(0f, 90f, 180f)); } public static void StrayRoom() { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: 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_01d3: 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_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_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0299: 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_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_0384: 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_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("9 - Projectile Arena/9 Content/Enemies"); Transform val2 = val.Find("Projectile Wave"); ActivateArena component = ((Component)val.Find("Cube")).GetComponent(); ActivateNextWave component2 = ((Component)val2).GetComponent(); Transform val3 = val.Find("New Wave"); ActivateNextWave component3 = ((Component)val3).GetComponent(); Door[] doors = component3.doors; Door doorForward = component3.doorForward; CheckPoint component4 = ((Component)GeneralFuncs.FindInactive("Checkpoint (4)")).GetComponent(); WaveFuncs.ClearWave(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, 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(val2, 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(val2, 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(val3, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val3, LevelAssets.Enemies["Providence"], new Vector3(87f, 43f, 640f), GeneralFuncs.Quat_90, Array.Empty(), (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val3, LevelAssets.Enemies["Mannequin"], new Vector3(88.5f, 28f, 617.5f), GeneralFuncs.Quat_90, Array.Empty(), (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val3, LevelAssets.Enemies["Mannequin"], new Vector3(88.5f, 28f, 662.5f), GeneralFuncs.Quat_90, Array.Empty(), (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val3, LevelAssets.Enemies["Streetcleaner"], new Vector3(128.5f, 28f, 622.5f), GeneralFuncs.Quat_270, Array.Empty(), (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val3, LevelAssets.Enemies["Streetcleaner"], new Vector3(128.5f, 28f, 657.5f), GeneralFuncs.Quat_270, Array.Empty(), (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val3, 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(val3, Array.Empty(), null, lastWave: false, 6); Transform transform = GeneralFuncs.MakeEmpty(val, "Towers").transform; DeathMarkerFuncs.AddDeathMarker(transform, anwActivator); ActivateNextWave val4 = WaveFuncs.AddActivation(transform, doors, doorForward); EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Tower"], new Vector3(93.5f, 18f, 623f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }); EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Tower"], new Vector3(93.5f, 18f, 657f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }); CheckpointFuncs.UpdateRoomInCheckpoint(val.parent, component4); } public static void BloodCorridor() { //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_013f: 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_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("10 - Combo Hallway/10 Content/Enemies"); Transform waveTransform = val.Find("Wave 1"); ActivateArena component = ((Component)val.Find("Trigger 1")).GetComponent(); Transform waveTransform2 = val.Find("Wave 2"); ActivateArena component2 = ((Component)val.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 = ((Component)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 transform = EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Gutterman"], new Vector3(192f, 28f, 610f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component }).transform; transform.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(val.parent, component5); } public static void WeirdRoom() { //IL_013f: 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_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_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) Transform val = GeneralFuncs.FindInactive("11 - Projectile Zombies Room/11 Content/Enemies"); Transform val2 = val.Find("Wave 1"); Transform val3 = val2.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 = ((Component)GeneralFuncs.FindInactive("Checkpoint (1)")).GetComponent(); ActivateArena component4 = ((Component)val.Find("Trigger 1A")).GetComponent(); ActivateArena component5 = ((Component)val.Find("Trigger 1B")).GetComponent(); ActivateArena component6 = ((Component)val.Find("Trigger 2")).GetComponent(); ActivateArena[] array = (ActivateArena[])(object)new ActivateArena[3] { component4, component5, component6 }; ArenaLink arenaLink = ((Component)val).gameObject.AddComponent(); arenaLink.linkedArenas = array; ActivateArena[] array2 = array; foreach (ActivateArena val4 in array2) { val4.doors = doors; ArenaFuncs.SetArenaDelay(val4, 0.75f); } ((Component)val3).GetComponent().dontActivateOnEnable = true; WaveFuncs.ClearWave(val2, null, array); WaveFuncs.ClearWave(val3); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["RocketLauncher"], new Vector3(180.5f, 48f, 537.5f), Quaternion.Euler(0f, 315f, 0f), null, array); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Mannequin"], new Vector3(182f, 48.2f, 579f), GeneralFuncs.Quat_180, null, array); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Mannequin"], new Vector3(202f, 53f, 564f), GeneralFuncs.Quat_270, null, array); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Virtue"], new Vector3(202f, 59f, 599f), GeneralFuncs.Quat_180, null, array)); WaveFuncs.AddActivation(val2, doors, component2, lastWave: true, 4); CheckpointFuncs.UpdateRoomInCheckpoint(val.parent, component3); } public static void PenultimateRoom() { //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_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_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_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_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: 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_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0324: 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_038a: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("12 - Boss Hallway/12 Content/Enemies"); Transform val2 = val; ActivateArena component = ((Component)val2.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 = ((Component)GeneralFuncs.FindInactive("Checkpoint (5)")).GetComponent(); Util.ArrayAdd(ref component4.doorsToUnlock, array); component.doors = array; WaveFuncs.ClearWave(val2, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Mortar"], new Vector3(168.5f, 55f, 486f), GeneralFuncs.Quat_90, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Mortar"], new Vector3(168.5f, 55f, 508f), GeneralFuncs.Quat_270, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Mindflayer"], new Vector3(202f, 58.5f, 482f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Deathcatcher"], new Vector3(202f, 53f, 445f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component }); ActivateNextWave val3 = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 1); ActivateNextWave anwActivator = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 3); Transform transform = GeneralFuncs.MakeEmpty(val, "Wave 2").transform; DeathMarkerFuncs.AddDeathMarker(transform, anwActivator); ActivateNextWave val4 = WaveFuncs.AddActivation(transform, array, component3); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Cerberus"], new Vector3(202f, 53.1f, 529f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 })); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Eye"], new Vector3(202f, 87.5f, 463f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Eye"], new Vector3(168f, 87.5f, 497f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); NemesisEnemy nemesisEnemy3 = EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Eye"], new Vector3(202f, 87.5f, 531f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); NemesisEnemy nemesisEnemy4 = EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Eye"], new Vector3(234f, 87.5f, 497f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddDontCatch(nemesisEnemy); EnemyFuncs.AddDontCatch(nemesisEnemy2); EnemyFuncs.AddDontCatch(nemesisEnemy3); EnemyFuncs.AddDontCatch(nemesisEnemy4); Transform val5 = GeneralFuncs.FindInactive("12 - Boss Hallway/12 Nonstuff/Fan"); val5.position = new Vector3(val5.position.x, 158.25f, val5.position.z); CheckpointFuncs.UpdateRoomInCheckpoint(val.parent, component4); } public static void PenultimateRoomSecret() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("12 - Boss Hallway/12 Content/Secret Area"); Transform val2 = val; ActivateArena component = ((Component)val2.Find("Cube (2)")).GetComponent(); CheckPoint component2 = ((Component)GeneralFuncs.FindInactive("Checkpoint (5)")).GetComponent(); WaveFuncs.ClearWave(val2, null, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Ferryman"], new Vector3(202f, 38.2f, 545f), GeneralFuncs.Quat_0, null, (ActivateArena[])(object)new ActivateArena[1] { component }); DeathZone component3 = ((Component)GeneralFuncs.FindInactive("12 - Boss Hallway/12 Nonstuff/Bonus Area/Fan (1)")).GetComponent(); component3.enemyAffected = false; component3.enemiesCanDodge = true; component3.affected = (AffectedSubjects)1; component3.unaffectedEnemyTypes = (EnemyType[])(object)new EnemyType[1] { (EnemyType)26 }; CheckpointFuncs.UpdateRoomInCheckpoint(val.parent, component2); } public static void BossRoom() { //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("13 - Malicious Face Arena/13 Content"); Transform val2 = val.Find("Boss"); ActivateArena component = ((Component)val.Find("Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val2).GetComponent(); CheckPoint component3 = ((Component)GeneralFuncs.FindInactive("Checkpoint (2)")).GetComponent(); ActivateNextWave val3 = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 1, null, noActivationDelay: false, forEnemies: true); ActivateNextWave val4 = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 3, null, noActivationDelay: false, forEnemies: true); ActivateNextWave val5 = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 5, null, noActivationDelay: false, forEnemies: true); ActivateNextWave[] array = (ActivateNextWave[])(object)new ActivateNextWave[3] { val3, val4, val5 }; Idol[] array2 = Array.Empty(); for (int i = 0; i < 3; i++) { ActivateNextWave val6 = array[i]; NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(val2, 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, nemesisEnemy.eid.idol); GameObject val7 = GeneralFuncs.MakeEmpty(val2, "IdolMover"); val7.SetActive(false); EnemyFuncs.AddMover(val7, nemesisEnemy.transform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, 52.5f); Util.ArrayAdd(ref val6.toActivate, val7); } ArenaFuncs.SetArenaDelay(component, 0f); NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemy(val2, 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 }); NemesisEnemy nemesisEnemy3 = EnemyFuncs.AddEnemy(val2, 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(val2, 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 = nemesisEnemy3.eid; array2[1].overrideTarget = nemesisEnemy2.eid; array2[2].overrideTarget = ((Component)val2.Find("Spider/Body")).GetComponent(); CheckpointFuncs.UpdateRoomInCheckpoint(val.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__12_0; internal void b__12_0() { ((Component)GeneralFuncs.FindInactive("5 - Crusher Tutorial")).gameObject.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(); SmallCorridor(); GlassFloor(); BloodFallRoom(); RemoveSwordsmachine(); SidePathSplit(); SidePathInfightRoom(); SidePathCorridor(); CrusherTutorial(); CrusherRoom(); CrusherCorridor(); FourWayRoom(); SecretTerminal(); WickedRoom(); AlarmRoom(); FinalRoom(); SecretSwordsmachine(); CheckpointFuncs.ClearAndInheritAllRooms(); } public static void StatueRoomTerminal() { //IL_0023: 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 roomTransform = GeneralFuncs.FindInactive("1A - First Room"); 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(roomTransform, message, new Vector3(13.3f, 13.3f, 26f), Quaternion.Euler(345f, 270f, 180f)); } public static void SmallCorridor() { Transform val = GeneralFuncs.FindInactive("1B - Projectiles Hallway/ArenaTrigger"); ((Component)val).gameObject.SetActive(false); } public static void GlassFloor() { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_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_010f: 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_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_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_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 val = GeneralFuncs.FindInactive("2 - Crusher Hallway/Enemies/Wave 1"); Transform waveTransform = val; ActivateArena component = ((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 transform = ((Component)GeneralFuncs.FindInactive("2 - Crusher Hallway/FightTrigger")).transform; Vector3 localScale = transform.localScale; transform.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_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_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_037b: 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_03c6: 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_0411: 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_045c: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("3 - Blood Room/3 Stuff/Enemies"); Transform val2 = val.Find("Wave 1"); ActivateArena component = ((Component)val.Find("ArenaTrigger")).GetComponent(); ActivateArena component2 = ((Component)val.Find("ArenaTrigger (1)")).GetComponent(); ActivateNextWave component3 = ((Component)val2).GetComponent(); Door component4 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (9)/Door (Large)")).GetComponent(); Door component5 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (2)/Door (Large)")).GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component5, component4 }; GameObject gameObject = ((Component)GeneralFuncs.FindInactive("5 - Crusher Tutorial")).gameObject; Util.ArrayAdd(ref component4.activatedRooms, gameObject); component.doors = doors; Door component6 = ((Component)GeneralFuncs.FindInactive("4 - Swordsmachine Hallway/Door (Large) With Controllers (10)/Door (Large)")).GetComponent(); Util.ArrayAdd(ref component6.activatedRooms, gameObject); component2.onlyWave = false; WaveFuncs.ClearWave(val2, null, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform transform = GeneralFuncs.MakeEmpty(val, "Deathcatcher").transform; ActivateNextWave val3 = WaveFuncs.AddActivation(transform, Array.Empty(), null, lastWave: false, 0); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(transform, LevelAssets.Enemies["Deathcatcher"], new Vector3(30f, -30f, 142f), Quaternion.Euler(45f, 270f, 0f), (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); nemesisEnemy.eid.dcatch.canRespawnIdols = false; NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddCerberusStatue(val2, 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); NemesisEnemy nemesisEnemy3 = EnemyFuncs.AddEnemy(val2, 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(nemesisEnemy3); EnemyFuncs.AddTeleportOnCondition(nemesisEnemy3, processPassively: false).AddCondition(new Vector3(20f, -5f, 143f), isMoveVectorAbsolute: true).AddAxis(nemesisEnemy3.transform); component3.lastWave = false; component3.doors = Array.Empty(); component3.doorForward = null; component3.enemyCount = 2; ActivateNextWaveHP val4 = WaveFuncs.AddActivationHP(val2, 11f, nemesisEnemy2, Array.Empty(), null); ActivateNextWaveHP val5 = WaveFuncs.AddActivationHP(val2, 5f, nemesisEnemy3, Array.Empty(), null); ActivateNextWaveHP[] anwhSources = (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[2] { val4, val5 }; Transform val6 = GeneralFuncs.FindInactive("3 - Blood Room/3 Nonstuff/Decorations/Statue"); ((Component)val6).gameObject.SetActive(false); Transform val7 = nemesisEnemy.transform.Find("Model"); ((Behaviour)((Component)val7).GetComponent()).enabled = false; val7.localRotation = GeneralFuncs.Quat_0; nemesisEnemy.transform.localScale = 1.25f * Vector3.one; Transform transform2 = GeneralFuncs.MakeEmpty(val, "Bitches").transform; ActivateNextWave val8 = WaveFuncs.AddActivation(transform2, doors, component4, lastWave: true, 0); Util.ArrayAdd(ref val8.doors, component6); DeathMarkerFuncs.AddDeathMarker(transform2, component3, (ActivateNextWave[])(object)new ActivateNextWave[1] { val8 }); DeathMarkerFuncs.AddDeathMarker(transform2, val3, (ActivateNextWave[])(object)new ActivateNextWave[1] { val8 }); NemesisEnemy idol = EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Idol"], new Vector3(-45f, -3f, 133f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val8 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, anwhSources); NemesisEnemy idol2 = EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Idol"], new Vector3(-45f, -3f, 153f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val8 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, anwhSources); NemesisEnemy targetEnemy = EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["MaliciousFace"], new Vector3(3f, -10f, 133f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val8 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, anwhSources); NemesisEnemy targetEnemy2 = EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["MaliciousFace"], new Vector3(3f, -10f, 153f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val8 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, anwhSources); EnemyFuncs.SetIdolTarget(targetEnemy, idol); EnemyFuncs.SetIdolTarget(targetEnemy2, idol2); } public static void RemoveSwordsmachine() { Transform val = GeneralFuncs.FindInactive("3 - Blood Room/3 Nonstuff/3B - Infight Area/Bonus Area/3B Enemies"); ((Component)val).gameObject.SetActive(false); Transform val2 = GeneralFuncs.FindInactive("3 - Blood Room/3 Nonstuff/3B - Infight Area/Bonus Area/FakeGore"); Object.Destroy((Object)(object)((Component)val2).GetComponent()); Transform val3 = GeneralFuncs.FindInactive("3 - Blood Room/3 Nonstuff/3B - Infight Area/Alt Room Changer"); ((Component)val3).gameObject.SetActive(false); Transform val4 = GeneralFuncs.FindInactive("7 - Crusher Hallway/Alt Path Updater"); ((Component)val4).gameObject.SetActive(false); Transform val5 = GeneralFuncs.FindInactive("4 - Swordsmachine Hallway/Invisible Wall"); ((Component)val5).gameObject.SetActive(false); Transform val6 = GeneralFuncs.FindInactive("3 - Blood Room/3 Nonstuff/Swordsmachine Trigger"); ((Component)val6).gameObject.SetActive(false); Transform val7 = GeneralFuncs.FindInactive("4B - Hallway/4B Nonstuff/4B Contents (2)"); ((Component)val7).gameObject.SetActive(false); Object.Destroy((Object)(object)((Component)val7).GetComponent()); Transform val8 = GeneralFuncs.FindInactive("5B - Secret Arena/5B Nonstuff/Fake Enemies (1)"); ((Component)val8).gameObject.SetActive(false); Object.Destroy((Object)(object)((Component)val8).GetComponent()); Transform val9 = GeneralFuncs.FindInactive("7 - Crusher Hallway/7 Contents/Enemies/Wave 2 Trigger"); ((Component)val9).gameObject.SetActive(false); Transform val10 = GeneralFuncs.FindInactive("7 - Crusher Hallway/7 Nonstuff/Invisible Wall"); ((Component)val10).gameObject.SetActive(false); Transform val11 = GeneralFuncs.FindInactive("8 - Sim Arena/8 Contents/8B Contents"); ((Component)val11).gameObject.SetActive(false); Transform val12 = GeneralFuncs.FindInactive("8 - Sim Arena/8 Contents/8B Contents Alt"); ((Component)val12).gameObject.SetActive(false); Object.Destroy((Object)(object)((Component)val12).GetComponentInChildren()); Object.Destroy((Object)(object)((Component)GeneralFuncs.FindInactive("8 - Sim Arena/8 Contents/Alt Changer")).GetComponent()); Object.Destroy((Object)(object)((Component)GeneralFuncs.FindInactive("8 - Sim Arena/8 Contents/Alt Changer 2")).GetComponent()); Object.Destroy((Object)(object)((Component)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 = ((Component)GeneralFuncs.FindInactive("4 - Swordsmachine Hallway")).transform; Door component = ((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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0194: 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_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_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0324: 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_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Unknown result type (might be due to invalid IL or missing references) //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_0574: Unknown result type (might be due to invalid IL or missing references) //IL_0579: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05c2: Unknown result type (might be due to invalid IL or missing references) //IL_0606: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_069a: Unknown result type (might be due to invalid IL or missing references) //IL_069f: Unknown result type (might be due to invalid IL or missing references) //IL_06c8: Unknown result type (might be due to invalid IL or missing references) //IL_06d2: Unknown result type (might be due to invalid IL or missing references) //IL_06fd: Unknown result type (might be due to invalid IL or missing references) //IL_0702: Unknown result type (might be due to invalid IL or missing references) //IL_072b: Unknown result type (might be due to invalid IL or missing references) //IL_0735: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("3 - Blood Room/3 Nonstuff/3B - Infight Area/Bonus Area"); ObjectManipulationFuncs.FixCollisions(val); Transform transform = GeneralFuncs.MakeEmpty(val, "NemesisStuff").transform; ComponentExtensions.GetOrAddComponent((Component)(object)transform); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "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 = ((Component)GeneralFuncs.FindInactive("Checkpoint")).GetComponent(); Util.ArrayAdd(ref component3.doorsToUnlock, array); GameObject trigger = ArenaFuncs.MakeTrigger(transform, "Wave 1", new Vector3(-60f, -4f, 163f), new Vector3(-80f, 5f, 183f)); ActivateArena val2 = ArenaFuncs.AddArena(trigger, array); ActivateNextWave val3 = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Sentry"], new Vector3(-44.5f, -5f, 168f), GeneralFuncs.Quat_270, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { val2 }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Sentry"], new Vector3(-94.5f, -5f, 168f), GeneralFuncs.Quat_90, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { val2 }), stopDashing: true, stopWalking: true); Transform transform3 = EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["RocketLauncherNoStand"], new Vector3(-69f, 2f, 177.5f), GeneralFuncs.Quat_90, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { val2 }).transform; transform3.localScale *= 0.75f; ActivateNextWave anwActivator = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false, 3); val3.enemyCount = 1; Transform transform4 = GeneralFuncs.MakeEmpty(transform, "Wave 2").transform; ActivateNextWave val4 = WaveFuncs.AddActivation(transform4, array, component2); DeathMarkerFuncs.AddDeathMarker(transform4, anwActivator, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform4, LevelAssets.Enemies["RocketLauncherNoStand"], new Vector3(-92f, 3f, 177f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform4, LevelAssets.Enemies["RocketLauncherNoStand"], new Vector3(-46f, 3f, 177f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform4, LevelAssets.Enemies["Soldier"], new Vector3(-51.5f, -3f, 178.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform4, LevelAssets.Enemies["Soldier"], new Vector3(-51.5f, -3f, 167.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform4, LevelAssets.Enemies["Soldier"], new Vector3(-87.5f, -3f, 167.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform4, LevelAssets.Enemies["Soldier"], new Vector3(-87.5f, -3f, 178.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); Transform targetRoom = transform; transform = GeneralFuncs.MakeEmpty(val, "NemesisStuff GoBack").transform; ComponentExtensions.GetOrAddComponent((Component)(object)transform); Transform transform5 = GeneralFuncs.MakeEmpty(transform, "GoBack Wave 1").transform; GameObject val5 = ArenaFuncs.MakeTrigger(transform, "GoBack Wave 1", new Vector3(-60f, -4f, 163f), new Vector3(-80f, 5f, 183f)); val5.SetActive(false); GameObject trigger2 = ArenaFuncs.MakeTrigger(transform, "Skull", new Vector3(-98f, -5f, 180f), new Vector3(-108f, 5f, 198f)); ObjectActivator val6 = ObjectActivatorFuncs.AddObjectActivator(trigger2, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { val5 })); CheckPoint val7 = CheckpointFuncs.MakeCheckpoint("RedSkull", new Vector3(-103f, -5f, 185f), GeneralFuncs.Quat_180, ((Component)val).gameObject, component3.doorsToUnlock, (GameObject[])(object)new GameObject[1] { ((Component)transform).gameObject }, new List()); ActivateArena val8 = ArenaFuncs.AddArena(val5, array); ActivateNextWave val9 = WaveFuncs.AddActivation(transform5, Array.Empty(), null, lastWave: false); NemesisEnemy idol = EnemyFuncs.AddEnemy(transform5, LevelAssets.Enemies["Idol"], new Vector3(-49.25f, -4f, 181.25f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val9 }, (ActivateArena[])(object)new ActivateArena[1] { val8 }); NemesisEnemy idol2 = EnemyFuncs.AddEnemy(transform5, LevelAssets.Enemies["Idol"], new Vector3(-89.5f, -4f, 164.25f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val9 }, (ActivateArena[])(object)new ActivateArena[1] { val8 }); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(transform5, LevelAssets.Enemies["Providence"], new Vector3(-47f, 0f, 173f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val9 }, (ActivateArena[])(object)new ActivateArena[1] { val8 }); NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemy(transform5, LevelAssets.Enemies["Virtue"], new Vector3(-93f, 0f, 173f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val9 }, (ActivateArena[])(object)new ActivateArena[1] { val8 }); EnemyFuncs.AddStopper(nemesisEnemy); EnemyFuncs.AddStopper(nemesisEnemy2); EnemyFuncs.SetIdolTarget(nemesisEnemy2, idol); EnemyFuncs.SetIdolTarget(nemesisEnemy, idol2); Transform transform6 = GeneralFuncs.MakeEmpty(transform, "GoBack Wave 2").transform; ActivateNextWave val10 = WaveFuncs.AddActivation(transform6, array, component); Transform transform7 = EnemyFuncs.AddEnemyNoTrigger(transform6, LevelAssets.Enemies["Mindflayer"], new Vector3(-51.5f, 0f, 173f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val10 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val9 }).transform; transform7.localScale *= 0.85f; Transform transform8 = EnemyFuncs.AddEnemyNoTrigger(transform6, LevelAssets.Enemies["Mindflayer"], new Vector3(-87f, 0f, 173f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val10 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val9 }).transform; transform8.localScale *= 0.85f; CheckpointFuncs.AddInheritedRoomToCheckpoint(targetRoom, component3); } public static void SidePathCorridor() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) Transform roomTransform = GeneralFuncs.FindInactive("4B - Hallway/4B Nonstuff"); ObjectFuncs.PlaceAltarRed(roomTransform, 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_00bd: 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown Transform val = GeneralFuncs.FindInactive("5 - Crusher Tutorial/5 Contents"); Transform waveTransform = val.Find("Enemies"); ActivateArena component = ((Component)val.Find("Cube (1)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (15)/Door (Large)")).GetComponent(); Util.ArrayAdd(ref component2.activatedRooms, ((Component)GeneralFuncs.FindInactive("4 - Swordsmachine Hallway")).gameObject); CheckPoint component3 = ((Component)GeneralFuncs.FindInactive("Checkpoint")).GetComponent(); WaveFuncs.ClearWave(waveTransform, null, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["PowerNoEffect"], new Vector3(15f, -6.2f, 220f), GeneralFuncs.Quat_180, null, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform transform = nemesisEnemy.transform; transform.localScale *= 0.85f; EnemyFuncs.RemoveEnemyLogic(nemesisEnemy); CheckPoint val2 = component3; if (val2.onRestart == null) { val2.onRestart = new UnityEvent(); } UnityEvent onRestart = component3.onRestart; object obj = <>c.<>9__12_0; if (obj == null) { UnityAction val3 = delegate { ((Component)GeneralFuncs.FindInactive("5 - Crusher Tutorial")).gameObject.SetActive(true); }; <>c.<>9__12_0 = val3; obj = (object)val3; } onRestart.AddListener((UnityAction)obj); CheckpointFuncs.UpdateRoomInCheckpoint(val.parent, component3); } public static void CrusherRoom() { //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_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_013c: 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_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) Transform val = GeneralFuncs.FindInactive("6 - Crusher Arena/6 Contents/Enemies"); Transform val2 = val.Find("Wave 2"); ActivateArena component = ((Component)val.Find("Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val2).GetComponent(); CheckPoint component3 = ((Component)GeneralFuncs.FindInactive("Checkpoint")).GetComponent(); Door[] doors = component2.doors; Door doorForward = component2.doorForward; component2.lastWave = false; component2.doors = Array.Empty(); component2.doorForward = null; WaveFuncs.ClearWave(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val2, 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(val2, 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(val2, LevelAssets.Enemies["Virtue"], new Vector3(15f, 3f, 254f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component })); ActivateNextWave val3 = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 1, null, noActivationDelay: false, forEnemies: true); Transform transform = GeneralFuncs.MakeEmpty(val, "Maurice").transform; ActivateNextWave val4 = WaveFuncs.AddActivation(transform, doors, doorForward, lastWave: true, 0); DeathMarkerFuncs.AddDeathMarker(transform, component2, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["MaliciousFace"], new Vector3(15f, -10f, 234f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }), stopDashing: true, stopWalking: true); CheckpointFuncs.UpdateRoomInCheckpoint(val.parent, component3); } public static void CrusherCorridor() { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("7 - Crusher Hallway/7 Contents/Enemies"); Transform waveTransform = val.Find("Wave 1"); ActivateArena component = ((Component)val.Find("Wave 1 Trigger")).GetComponent(); CheckPoint component2 = ((Component)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(val.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 val = GeneralFuncs.FindInactive("7 - Crusher Hallway/7 Contents"); GameObject gameObject = ((Component)GeneralFuncs.FindInactive("5B - Secret Arena/5B Contents")).gameObject; Door component = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (5)/Door (Large)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (3)/Door (Large)")).GetComponent(); Door component3 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (4)/Door (Large)")).GetComponent(); Door component4 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (7)/Door (Large)")).GetComponent(); Door component5 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (11)/Door (Large)")).GetComponent(); CheckPoint component6 = ((Component)GeneralFuncs.FindInactive("Checkpoint (1)")).GetComponent(); Util.ArrayRemove(ref component6.doorsToUnlock, (Door[])(object)new Door[2] { component, component2 }); component6.roomsToInherit.Remove(gameObject); CheckpointFuncs.AddCheckpointConstantOff(((Component)component6).gameObject, component6); CheckPoint component7 = ((Component)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] { gameObject }); Util.ArrayRemove(ref component7.rooms, ((Component)val).gameObject); CheckPoint component8 = ((Component)GeneralFuncs.FindInactive("Checkpoint (2)")).GetComponent(); Util.ArrayRemove(ref component8.doorsToUnlock, (Door[])(object)new Door[2] { component, component2 }); CheckPoint component9 = ((Component)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)val.parent).gameObject, (Door[])(object)new Door[3] { component3, component4, component5 }, (GameObject[])(object)new GameObject[1] { gameObject }, 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 = ((Component)GeneralFuncs.FindInactive("9B - Swordsmachine Arena Hallway/9B Nonstuff/Vent")).GetComponent(); Breakable component11 = ((Component)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 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 = ((Component)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 WickedRoom() { //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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_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_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Unknown result type (might be due to invalid IL or missing references) //IL_0497: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Unknown result type (might be due to invalid IL or missing references) //IL_04da: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_055b: Unknown result type (might be due to invalid IL or missing references) //IL_0560: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("5B - Secret Arena/5B Contents"); Door component = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (4)/Door (Large)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (7)/Door (Large)")).GetComponent(); Door component3 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (5)/Door (Large)")).GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component, component2 }; CheckPoint component4 = ((Component)GeneralFuncs.FindInactive("CheckpointNemesis FourWay")).GetComponent(); Transform transform = Object.Instantiate(LevelAssets.Objects["TeslaCoils"], new Vector3(-45f, -11f, 244f), GeneralFuncs.Quat_0).transform; transform.SetParent(val); GameObject val2 = ArenaFuncs.MakeTrigger(val, "Power", new Vector3(-60f, 20f, 256f), new Vector3(-30f, -10f, 216f)); val2.SetActive(false); ObjectActivator component5 = ((Component)transform.Find("Activated")).GetComponent(); Util.ArrayAdd(ref component5.events.toActivateObjects, val2); CheckPoint val3 = CheckpointFuncs.MakeCheckpoint("Dimmed", new Vector3(-48.5f, -11f, 193f), GeneralFuncs.Quat_270, ((Component)GeneralFuncs.FindInactive("4B - Hallway")).gameObject, (Door[])(object)new Door[1] { component3 }, Array.Empty(), new List(), reusable: false, inheritAllRooms: false, forceOff: true); GeneralFuncs.DontManipulateLights(((Component)val3).transform); GameObject val4 = ArenaFuncs.MakeTrigger(val, "Virtues", new Vector3(-60f, 20f, 256f), new Vector3(-30f, -10f, 216f)); val4.SetActive(false); Transform transform2 = val4.transform; transform2.localScale *= 2f; ObjectActivatorFuncs.AddObjectActivator(val4, ObjectActivatorFuncs.MakeUltrakillEvent(null, (GameObject[])(object)new GameObject[1] { val4 }), 0.5f); WaveFuncs.AddActivation(val4.transform, (Door[])(object)new Door[1] { component2 }, component2, lastWave: true, 0, null, noActivationDelay: true, forEnemies: true); ObjectActivatorFuncs.AddHudMessage(val4, "Oh no I better start running!", timed: true, 4f); GameObject val5 = GeneralFuncs.MakeEmpty(val, "SoundPlayerActivator"); val5.SetActive(false); GameObject val6 = GeneralFuncs.MakeEmpty(null, "SoundPlayer"); val6.SetActive(false); AudioSource val7 = val6.AddComponent(); GeneralFuncs.PlayAudioOnEnable(val6, val7); val7.clip = LevelAssets.AudioClips["Shutdown"]; AudioSourceExtensions.SetSpatialBlend(val7, 0f); ObjectActivator val8 = ObjectActivatorFuncs.AddObjectActivator(val5, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { val6 }), 2f, oneTime: true, nonCollider: true); GameObject val9 = GeneralFuncs.MakeEmpty(val, "LightManActivator"); val9.SetActive(false); GameObject val10 = GeneralFuncs.MakeEmpty(null, "LightMan"); val10.SetActive(false); LightManipulator lightManipulator = val10.AddComponent(); lightManipulator.Configure(); GameObject val11 = GeneralFuncs.MakeEmpty(((Component)val3).transform, "CheckpointTurnOn"); val11.SetActive(false); ObjectActivatorFuncs.AddCheckpointTurnOn(val11, val3); ObjectActivator val12 = ObjectActivatorFuncs.AddObjectActivator(val9, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[2] { val10, val11 }), 3.5f, oneTime: true, nonCollider: true); GameObject val13 = GeneralFuncs.MakeEmpty(val, "VirtueActivator"); val13.SetActive(false); ObjectActivator val14 = ObjectActivatorFuncs.AddObjectActivator(val13, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { val4 }), 5f, oneTime: true, nonCollider: true); Transform transform3 = GeneralFuncs.MakeEmpty(val, "Wave 1").transform; ActivateArena val15 = ArenaFuncs.AddArena(val2, doors); ActivateNextWave val16 = WaveFuncs.AddActivation(transform3, (Door[])(object)new Door[1] { component3 }, null, lastWave: true, 0, (GameObject[])(object)new GameObject[3] { val5, val9, val13 }, noActivationDelay: false, forEnemies: true); ComponentExtensions.GetOrAddComponent((Component)(object)EnemyFuncs.AddEnemy(transform3, LevelAssets.Enemies["Power"], new Vector3(-45f, 3f, 236f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val16 }, (ActivateArena[])(object)new ActivateArena[1] { val15 }).eid).distanceLimit = 18.5f; ActivateArena val17 = ArenaFuncs.AddArena(val4, Array.Empty(), onlyWave: true); Transform transform4 = GeneralFuncs.MakeEmpty(val, "Wave 2 idols").transform; WaveFuncs.AddActivation(transform4, (Door[])(object)new Door[1] { component }, component, lastWave: false, 2, null, noActivationDelay: false, forEnemies: true); Transform transform5 = GeneralFuncs.MakeEmpty(val, "Wave 2").transform; WaveFuncs.AddActivation(transform5, (Door[])(object)new Door[1] { component }, component, lastWave: true, 2); NemesisEnemy idol = EnemyFuncs.AddEnemy(transform4, LevelAssets.Enemies["Idol"], new Vector3(-45f, -11f, 274.5f), GeneralFuncs.Quat_90, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { val17 }); NemesisEnemy idol2 = EnemyFuncs.AddEnemy(transform4, LevelAssets.Enemies["Idol"], new Vector3(-45f, -11f, 279.5f), GeneralFuncs.Quat_90, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { val17 }); NemesisEnemy targetEnemy = EnemyFuncs.AddEnemy(transform5, LevelAssets.Enemies["Virtue"], new Vector3(-45f, 5f, 253.5f), GeneralFuncs.Quat_180, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { val17 }); NemesisEnemy targetEnemy2 = EnemyFuncs.AddEnemy(transform5, LevelAssets.Enemies["Virtue"], new Vector3(-45f, 8f, 221f), GeneralFuncs.Quat_180, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { val17 }); EnemyFuncs.SetIdolTarget(targetEnemy, idol); EnemyFuncs.SetIdolTarget(targetEnemy2, idol2); Breakable component6 = ((Component)GeneralFuncs.FindInactive("5B - Secret Arena/5B Contents/Cube")).GetComponent(); Object.Destroy((Object)(object)component6); GameObject gameObject = ((Component)GeneralFuncs.FindInactive("5B - Secret Arena")).gameObject; Door[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); foreach (Door val18 in array) { Util.ArrayAdd(ref val18.activatedRooms, gameObject); Util.ArrayRemove(ref val18.deactivatedRooms, gameObject); } CheckpointFuncs.UpdateRoomInCheckpoint(val, component4); } public static void ActivateCheckpointDimmed() { CheckPoint component = ((Component)GeneralFuncs.FindInactive("CheckpointNemesis Dimmed")).GetComponent(); component.SetForceOff(false); component.activated = false; } public static void AlarmRoom() { //IL_012b: 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_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: 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_02b3: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("8 - Sim Arena/8 Contents/Enemies"); Transform val2 = val.Find("Wave 1"); ActivateArena component = ((Component)val.parent.Find("Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val2).GetComponent(); Door component3 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (5)/Door (Large)")).GetComponent(); Door component4 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (11)/Door (Large)")).GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component3, component4 }; CheckPoint component5 = ((Component)GeneralFuncs.FindInactive("Checkpoint")).GetComponent(); component.doors = doors; Transform val3 = val.Find("Wave 2"); ActivateNextWave component6 = ((Component)val3).GetComponent(); component2.toActivate = component6.toActivate; ((Component)val3).gameObject.SetActive(false); component2.lastWave = true; component2.doors = doors; component2.doorForward = component4; Object.Destroy((Object)(object)((Component)component).GetComponent()); Object.Destroy((Object)(object)((Component)val.parent.Find("AlarmLight")).GetComponent()); WaveFuncs.ClearWave(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, 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(val2, 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(val2, 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(val2, 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 = ((Component)GeneralFuncs.FindInactive("Checkpoint (2)")).GetComponent(); component7.roomsToInherit.Remove(((Component)val.parent).gameObject); CheckPoint component8 = ((Component)GeneralFuncs.FindInactive("Checkpoint (1)")).GetComponent(); component8.roomsToInherit.Remove(((Component)val.parent).gameObject); CheckpointFuncs.RemoveRoomFromCheckpoint("8", component5); CheckpointFuncs.AddRoomToCheckpoint(val.parent, ((Component)GeneralFuncs.FindInactive("CheckpointNemesis Dimmed")).GetComponent()); CheckpointFuncs.MakeCheckpoint("AlarmRoom", new Vector3(-67.5f, -11f, 277f), GeneralFuncs.Quat_270, ((Component)val.parent).gameObject, (Door[])(object)new Door[2] { component4, component3 }, (GameObject[])(object)new GameObject[1] { ((Component)val.parent).gameObject }); } public static void FinalRoom() { //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_010f: 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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_019c: 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_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: 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_028f: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_037b: 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_03c4: 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_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04a4: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_0531: Unknown result type (might be due to invalid IL or missing references) //IL_0536: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("9 - Crushers Arena/9 Contents/Enemies"); Transform val2 = val.Find("Wave 2"); ActivateArena component = ((Component)val.parent.Find("ActivateArena")).GetComponent(); ActivateNextWave component2 = ((Component)val2).GetComponent(); CheckPoint component3 = ((Component)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(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val2, 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(val2, 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); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(val2, 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(nemesisEnemy, stopDashing: true, stopWalking: true); EnemyFuncs.ApplySand(nemesisEnemy); Transform transform = nemesisEnemy.transform; transform.localScale *= 0.85f; NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemy(val2, 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(nemesisEnemy2, stopDashing: true, stopWalking: true); EnemyFuncs.ApplySand(nemesisEnemy2); Transform transform2 = nemesisEnemy2.transform; transform2.localScale *= 0.85f; EnemyFuncs.AddEnemy(val2, 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(val2, 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(val2, 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 val3 = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 2, null, noActivationDelay: false, forEnemies: true); ActivateNextWave val4 = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 4, null, noActivationDelay: false, forEnemies: true); Transform transform3 = GeneralFuncs.MakeEmpty(val, "Secondary").transform; ActivateNextWave val5 = WaveFuncs.AddActivation(transform3, doors, doorForward, lastWave: true, 0, toActivate); DeathMarkerFuncs.AddDeathMarker(transform3, component2, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Idol"], new Vector3(-101.5f, -11.5f, 274.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Mannequin"], new Vector3(-104f, -10.9f, 267f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Mannequin"], new Vector3(-104f, -10.9f, 287f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Idol"], new Vector3(-137f, -26.5f, 277f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Streetcleaner"], new Vector3(-104f, -10.9f, 267f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Streetcleaner"], new Vector3(-104f, -10.9f, 287f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["RocketLauncher"], new Vector3(-147f, -16f, 277f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); Piston[] componentsInChildren = ((Component)val.parent).GetComponentsInChildren(true); foreach (Piston val6 in componentsInChildren) { DeathZone componentInChildren = ((Component)val6).GetComponentInChildren(); componentInChildren.affected = (AffectedSubjects)1; componentInChildren.enemyAffected = false; componentInChildren.enemiesCanDodge = true; } CheckPoint component4 = ((Component)GeneralFuncs.FindInactive("Checkpoint (2)")).GetComponent(); component4.roomsToInherit.Remove(((Component)val.parent).gameObject); CheckPoint component5 = ((Component)GeneralFuncs.FindInactive("Checkpoint (1)")).GetComponent(); component5.roomsToInherit.Remove(((Component)val.parent).gameObject); CheckpointFuncs.AddRoomToCheckpoint(val.parent, ((Component)GeneralFuncs.FindInactive("CheckpointNemesis Dimmed")).GetComponent()); CheckpointFuncs.RemoveRoomFromCheckpoint("9", component3); } public static void SecretSwordsmachine() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("10B - Swordsmachine Arena/10B Contents"); Transform val2 = val.Find("Enemies"); ActivateNextWave component = ((Component)val2).GetComponent(); ObjectActivator component2 = ((Component)val.Find("Trigger")).GetComponent(); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["PowerNoEffect"], new Vector3(-81f, 10f, 356.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component }); ComponentExtensions.GetOrAddComponent((Component)(object)nemesisEnemy.eid).distanceLimit = 18.5f; Util.ArrayAdd(ref component2.events.toActivateObjects, nemesisEnemy.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_00af: 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_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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) Transform val = GeneralFuncs.FindInactive("1 - Main Room - Floor 1/1 Content"); Transform val2 = val.Find("Enemies"); ActivateArena component = ((Component)val2.Find("Cube")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers/Door (Large)")).GetComponent(); Door component3 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (1)/Door (Large)")).GetComponent(); component.doors = (Door[])(object)new Door[2] { component2, component3 }; component.onlyWave = false; WaveFuncs.ClearWave(val2, null, (ActivateArena[])(object)new ActivateArena[1] { component }); ActivateNextWave val3 = WaveFuncs.AddActivation(val2, (Door[])(object)new Door[1] { component2 }, component2, lastWave: true, 0); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Ferryman"], new Vector3(0f, -10f, 307f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform transform = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Guttertank"], new Vector3(0f, 10f, 302.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }).transform; transform.localScale *= 0.9f; Transform val4 = GeneralFuncs.FindInactive("10 - Main Room - Floor 2/10 Contents"); Glass[] componentsInChildren = ((Component)val4).GetComponentsInChildren(); foreach (Glass val5 in componentsInChildren) { val5.broken = true; } } public static void TallRoomSecret() { //IL_0076: 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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("1 - Main Room - Floor 1/1 Content").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 = 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 = 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_006e: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_0096: 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_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_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_01f7: 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_0251: 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_025c: Expected O, but got Unknown Transform val = GeneralFuncs.FindInactive("2 - Side Hallway - Floor 1/2 Content"); Transform val2 = val.Find("Enemies"); ActivateArena component = ((Component)val2.Find("Cube (1)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers/Door (Large)")).GetComponent(); Door component3 = ((Component)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, 30f * localScale.z); component.onlyWave = false; component.doors = doors; WaveFuncs.ClearWave(val2, null, (ActivateArena[])(object)new ActivateArena[1] { component }); ActivateNextWave val3 = WaveFuncs.AddActivation(val2, doors, component3, lastWave: true, 0); Transform transform = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Cerberus"], new Vector3(-11f, 15f, 346f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }).transform; transform.localScale *= 0.9f; Transform transform2 = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Cerberus"], new Vector3(11f, 15f, 346f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }).transform; transform2.localScale *= 0.9f; EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Mannequin"], new Vector3(0f, 10f, 356f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform transform3 = Object.Instantiate(LevelAssets.Objects["TeslaCoils"], new Vector3(0f, 10f, 346f), GeneralFuncs.Quat_0).transform; transform3.SetParent(val); ObjectActivator component4 = ((Component)transform3.Find("Activated")).GetComponent(); component4.delay = 1.5f; UnityEvent onActivate = component4.events.onActivate; object obj = <>O.<0>__ResetEnvironment; if (obj == null) { UnityAction val4 = ResetEnvironment; <>O.<0>__ResetEnvironment = val4; obj = (object)val4; } onActivate.AddListener((UnityAction)obj); 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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: 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_0147: Unknown result type (might be due to invalid IL or missing references) //IL_015b: 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_0233: 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_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_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_043f: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("3 - Side Arena - Floor 1/3 Content"); Transform val2 = val.Find("Enemies/Wave 1"); ActivateArena component = ((Component)val.Find("Enemies/Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val2).GetComponent(); Transform val3 = val.Find("Enemies/Wave 2"); ActivateNextWave component3 = ((Component)val3).GetComponent(); Door component4 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (1)/Door (Large)")).GetComponent(); Door component5 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (2)/Door (Large)")).GetComponent(); WaveFuncs.ClearWave(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy idol = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Idol"], new Vector3(18f, 29.5f, 389.5f), GeneralFuncs.Quat_180, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(val2, 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(nemesisEnemy, stopDashing: true, stopWalking: true); EnemyFuncs.SetIdolTarget(nemesisEnemy, idol); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val2, 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(val2, Array.Empty(), null, lastWave: false, 3, null, noActivationDelay: false, forEnemies: true); WaveFuncs.ClearWaveNoTrigger(val3, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); DeathMarkerFuncs.AddDeathMarker(val3, anwActivator, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }); EnemyFuncs.AddEnemyNoTrigger(val3, 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(val3, 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(val3, 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)val.parent).gameObject, (Door[])(object)new Door[2] { component4, component5 }, null, null, reusable: false, inheritAllRooms: true); Transform val5 = ObjectFuncs.PlaceEnergyBeam(val.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_004c: 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) Transform val = GeneralFuncs.FindInactive("4 - Side Stairway - Floor 1-2/4 Stuff"); Door component = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (3)/Door (Large)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (2)/Door (Large)")).GetComponent(); ObjectFuncs.PlaceAltarBlue(val.parent.Find("4 Nonstuff"), hasSkull: false, new Vector3(7.5f, 50f, 416f), GeneralFuncs.Quat_90, (Door[])(object)new Door[1] { component }); GameObject gameObject = ((Component)GeneralFuncs.FindInactive("7 - Path 2 - Menacing Room")).gameObject; Util.ArrayAdd(ref component2.activatedRooms, gameObject); Door component3 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (6)/Door (Large)")).GetComponent(); Util.ArrayAdd(ref component3.activatedRooms, ((Component)val.parent).gameObject); } public static void FirstSwordsmachineRoom() { //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0180: 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_020a: Unknown result type (might be due to invalid IL or missing references) //IL_02de: 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_0329: Unknown result type (might be due to invalid IL or missing references) //IL_034f: 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_0395: 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_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("6 - Path 1 - Boss Arena/Boss Arena Contents"); Transform val2 = val.parent.Find("6 Nonstuff"); Door component = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (5)/Door (Large)")).GetComponent(); Door[] doors = (Door[])(object)new Door[1] { component }; ObjectActivator component2 = ((Component)val.Find("Cube (1)")).GetComponent(); Transform transform = GeneralFuncs.MakeEmpty(val, "Nemesis Wave 1").transform; ActivateArena val3 = ArenaFuncs.AddArena(((Component)component2).gameObject, doors); ActivateNextWave val4 = WaveFuncs.AddActivation(val, doors, component, lastWave: true, 1); ((Component)val4).gameObject.AddComponent(); Transform val5 = EnemyFuncs.AddBombSpawner(transform, LevelAssets.Enemies["BombSpawnerBreaker"], new Vector3(-122f, -15f, 420.5f), GeneralFuncs.Quat_90); ((Component)val5).gameObject.SetActive(false); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(val5.Find("Enemy"), LevelAssets.Enemies["Swordsmachine"], new Vector3(-122f, -15f, 420.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); nemesisEnemy.transform.localPosition = new Vector3(0f, 0f, 0f); nemesisEnemy.gameObject.SetActive(true); ObjectActivator val6 = ObjectActivatorFuncs.AddObjectActivator(((Component)component2).gameObject, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { ((Component)val5).gameObject }), 2f); Transform targetTransform = ObjectFuncs.PlaceAltarBlue(val2, hasSkull: true, new Vector3(-93f, -25f, 413f), GeneralFuncs.Quat_180); GameObject val7 = GeneralFuncs.MakeEmpty(val2, "AltarMover"); val7.SetActive(false); EnemyFuncs.AddMover(val7, targetTransform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, -15f); Util.ArrayAdd(ref val4.toActivate, val7); Transform transform2 = GeneralFuncs.MakeEmpty(val2, "BeamRotator").transform; transform2.position = new Vector3(-112f, -7f, 413f); ((Component)transform2).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 transform3 = GeneralFuncs.MakeEmpty(transform2, "BeamBackAndForth").transform; ((Component)transform3).gameObject.AddComponent().Configure(speed); Transform val8 = ObjectFuncs.PlaceEnergyBeam(transform3, new Vector3(-112f, -7f, 433f), Quaternion.Euler(270f, 0f, 0f), 40f, (AffectedSubjects)1, 200f, 0f, 2f, 0f); val8.localPosition = new Vector3(0f, 0f, 20f); val8.Find("Receiver").position = new Vector3(-117f, 40f, 437.75f); Transform val9 = val8.Find("Beam"); val9.localScale = new Vector3(1f, 3.5f, 1f); val9.position = new Vector3(-112f, 40f, 433f); val9.localPosition = new Vector3(0f, 0f, 19f); MainModule main = ((Component)val9.Find("Particle System")).GetComponent().main; ((MainModule)(ref main)).startLifetimeMultiplier = 8f; CheckPoint[] array = Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)0); foreach (CheckPoint val10 in array) { if (((Object)val10.toActivate).name == "5 - Path 1 - First Encounter") { Util.ArrayAdd(ref val10.doorsToUnlock, component); } } } public static void OverpassRoom() { //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_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_01e9: 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_0237: 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_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_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("7 - Path 2 - Menacing Room/Most of the Stuff/Enemies"); Transform waveTransform = val.Find("First Wave"); ActivateArena component = ((Component)val.Find("Trigger")).GetComponent(); Transform val2 = val.Find("Second Wave"); ActivateArena component2 = ((Component)val.Find("Trigger (1)")).GetComponent(); Transform waveTransform2 = val.Find("Third Wave"); ActivateArena component3 = ((Component)val.Find("Trigger (2)")).GetComponent(); Door component4 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (3)/Door (Large)")).GetComponent(); Door component5 = ((Component)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(val2, null, (ActivateArena[])(object)new ActivateArena[1] { component2 }); WaveFuncs.ClearWave(waveTransform2, null, (ActivateArena[])(object)new ActivateArena[1] { component3 }); component2.doors = doors; component2.onlyWave = false; ActivateNextWave val3 = WaveFuncs.AddActivation(val2, doors, component5, lastWave: true, 0); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["MaliciousFace"], new Vector3(89f, 40f, 424f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component2 }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["MaliciousFace"], new Vector3(89f, 40f, 403f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component2 }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Schism"], new Vector3(116f, 50f, 443f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component2 }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Schism"], new Vector3(65f, 40.2f, 413f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component2 }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Virtue"], new Vector3(74f, 67.5f, 413f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component2 })); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Idol"], new Vector3(116f, 34.5f, 412.5f), GeneralFuncs.Quat_270, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component2 }); NemesisEnemy targetEnemy = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Sentry"], new Vector3(128.5f, 45f, 413f), GeneralFuncs.Quat_270, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component2 }); EnemyFuncs.SetIdolTarget(targetEnemy, nemesisEnemy); GameObject val4 = GeneralFuncs.MakeEmpty(val2, "IdolMover"); val4.SetActive(false); EnemyFuncs.AddMover(val4, nemesisEnemy.transform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, 44.5f); Util.ArrayAdd(ref val3.toActivate, val4); GameObject gameObject = ((Component)val.Find("Trigger (3)")).gameObject; gameObject.SetActive(false); Door component6 = ((Component)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 val = GeneralFuncs.FindInactive("8 - Path 2 - Menacing Hallway/8 Contents/Enemies"); GameObject gameObject = ((Component)val.Find("Cube")).gameObject; gameObject.SetActive(false); } public static void MultiHazardRoom() { //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_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_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Unknown result type (might be due to invalid IL or missing references) //IL_0472: Expected O, but got Unknown //IL_04d5: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("9 - Windtunnel/9 Contents/Enemies"); Transform waveTransform = val.Find("Wave 1"); Transform waveTransform2 = val.Find("Wave 2"); ActivateArena component = ((Component)val.Find("Trigger (1)")).GetComponent(); Transform waveTransform3 = val.Find("Wave 3"); ActivateArena component2 = ((Component)val.Find("Trigger (2)")).GetComponent(); Transform waveTransform4 = val.Find("Wave 4"); ActivateArena component3 = ((Component)val.Find("Trigger (3)")).GetComponent(); Door component4 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (8)/Door (Large)")).GetComponent(); Door component5 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (9)/Door (Large)")).GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component4, component5 }; ActivateArena component6 = ((Component)val.Find("Trigger")).GetComponent(); ActivateArena component7 = ((Component)val.Find("TriggerB")).GetComponent(); ActivateArena[] array = (ActivateArena[])(object)new ActivateArena[2] { component6, component7 }; ArenaLink arenaLink = ((Component)val).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 val2 = WaveFuncs.AddActivation(waveTransform, Array.Empty(), null, lastWave: false, 2, null, noActivationDelay: false, forEnemies: true); ActivateNextWave val3 = 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] { val3 }, 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] { val3 }, array)); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Mannequin"], new Vector3(28.5f, 50.1f, 390f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, array); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Mannequin"], new Vector3(28.5f, 50.1f, 383f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, array); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["EyeMalicious"], new Vector3(38f, 55f, 384f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, array)); EnemyFuncs.AddEnemyNoTrigger(waveTransform, LevelAssets.Enemies["Cerberus"], new Vector3(68f, 47.2f, 367f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }); int @int = MonoSingleton.Instance.GetInt("difficulty", 0); if (1 == 0) { } float num = @int switch { 4 => 1.2f, 3 => 1.6f, 2 => 1.8f, 1 => 2.2f, 0 => 2.4f, _ => 1f, }; if (1 == 0) { } float num2 = num; Transform[] array2 = Array.Empty(); for (int i = 0; i < 6; i++) { Transform val4 = ObjectFuncs.PlaceEnergyBeam(val.root.Find("9 Nonstuff"), new Vector3(80f - (float)i * 18f, 56f, 367f), Quaternion.Euler(270f, 0f, 0f), 25f, (AffectedSubjects)1, 100f, (2f + (float)i) * num2, 1f * num2, 2f * num2); val4.localScale = new Vector3(2f, 2f, 1.12f); ObjectActivator component8 = ((Component)val4.Find("State/ChargingUp")).GetComponent(); BeamDelayHelper beamDelayHelper = ((Component)component8).gameObject.AddComponent(); beamDelayHelper.chargeUpTimeToSubtract = (float)i * num2; beamDelayHelper.objectActivator = component8; component8.events.onActivate.AddListener(new UnityAction(beamDelayHelper.Subtract)); Util.ArrayAdd(ref array2, val4); } DeathZone[] componentsInChildren = ((Component)GeneralFuncs.FindInactive("9 - Windtunnel/9 Nonstuff/Hazards")).GetComponentsInChildren(); DeathZone[] array3 = componentsInChildren; foreach (DeathZone val5 in array3) { if (((Object)val5).name.Contains("Fan")) { val5.affected = (AffectedSubjects)1; val5.enemiesCanDodge = true; val5.enemyAffected = false; } } } public static void TallRoomUpper() { Transform val = GeneralFuncs.FindInactive("10 - Main Room - Floor 2/10 Contents/Enemies"); GameObject gameObject = ((Component)val.Find("Trigger")).gameObject; GameObject gameObject2 = ((Component)val.Find("Trigger (1)")).gameObject; GameObject gameObject3 = ((Component)val.Find("Trigger (2)")).gameObject; gameObject.SetActive(false); gameObject2.SetActive(false); gameObject3.SetActive(false); } public static void PreSecondSwordsmachineTerminal() { //IL_0023: 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 roomTransform = GeneralFuncs.FindInactive("10B - Second Encounter/5 Nonstuff"); 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(roomTransform, message, new Vector3(-18f, 73f, 307.5f), Quaternion.Euler(0f, 270f, 180f), hasMusic: false, 0.02f); } public static void SecondSwordsmachineRoom() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d8: 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_0126: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0186: 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_01b1: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("11 - Boss Arena - Floor 2/11 Contents"); Transform val2 = val.Find("Boss"); ActivateArena component = ((Component)val.Find("Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val2).GetComponent(); EnemyFuncs.AddEnemy(val2, 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(val2, 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 transform = Object.Instantiate(LevelAssets.Objects["Fan"], new Vector3(-107f, 102f, 314.75f), Quaternion.Euler(0f, 180f, 180f)).transform; transform.SetParent(val.parent.Find("11 Nonstuff")); transform.localScale = new Vector3(52f, 1f, 52f); transform.Find("Cylinder").localScale = new Vector3(0.015f, 1f, 0.015f); Object.Destroy((Object)(object)((Component)transform).GetComponent()); Object.Destroy((Object)(object)((Component)transform).GetComponent()); DeathZone component3 = ((Component)transform).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_0055: 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) GameObject gameObject = ((Component)GeneralFuncs.FindInactive("5 - Tube Hallways")).gameObject; Door component = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (5)/Door (Large)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (6)/Door (Large)")).GetComponent(); Door component3 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (4)/Door (Large)")).GetComponent(); CheckpointFuncs.MakeCheckpoint("Main", new Vector3(0f, 12.5f, 503f), GeneralFuncs.Quat_0, gameObject, (Door[])(object)new Door[3] { component, component2, component3 }, null, null, reusable: true, inheritAllRooms: true).disableDuringCombat = true; } public static void FirstRoom() { //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_013c: 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_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: 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_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_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_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_0314: 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_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_044a: 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_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_0532: Unknown result type (might be due to invalid IL or missing references) //IL_0537: Unknown result type (might be due to invalid IL or missing references) //IL_057b: Unknown result type (might be due to invalid IL or missing references) //IL_0580: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("2 - Arena/2 Stuff/Enemies"); ActivateArena component = ((Component)val.parent.Find("Trigger")).GetComponent(); Transform val2 = val.Find("Wave 1A"); ActivateNextWave component2 = ((Component)val2).GetComponent(); Transform val3 = val.Find("Wave 1B"); ActivateNextWave component3 = ((Component)val3).GetComponent(); Transform val4 = val.Find("Wave 2"); ActivateNextWave component4 = ((Component)val4).GetComponent(); WaveFuncs.ClearWave(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); WaveFuncs.ClearWave(val3, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); WaveFuncs.ClearWaveNoTrigger(val4, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }, (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, component3 }); component4.enemyCount = 2; ActivateNextWave val5 = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 3, null, noActivationDelay: false, forEnemies: true); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(val2, 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 }); NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Idol"], new Vector3(27f, 0f, 353.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy3 = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Idol"], new Vector3(0f, 10.5f, 338f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy4 = EnemyFuncs.AddEnemy(val2, 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 }); NemesisEnemy targetEnemy = EnemyFuncs.AddEnemy(val2, 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 }); NemesisEnemy targetEnemy2 = EnemyFuncs.AddEnemy(val2, 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(targetEnemy, new NemesisEnemy[2] { nemesisEnemy, nemesisEnemy3 }); EnemyFuncs.SetIdolTarget(targetEnemy2, new NemesisEnemy[2] { nemesisEnemy2, nemesisEnemy4 }); EnemyFuncs.AddEnemyNoTrigger(val4, LevelAssets.Enemies["Tower"], new Vector3(22.5f, -5f, 353.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }); EnemyFuncs.AddEnemyNoTrigger(val4, LevelAssets.Enemies["Streetcleaner"], new Vector3(0f, -10f, 338.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }); component4.enemyCount--; component4.lastWave = false; Door[] doors = component4.doors; Door doorForward = component4.doorForward; component4.doors = Array.Empty(); component4.doorForward = null; Transform transform = GeneralFuncs.MakeEmpty(val, "Wave 3").transform; ActivateNextWave val6 = WaveFuncs.AddActivation(transform, doors, doorForward, lastWave: true, 0); ActivateNextWave anwActivator = WaveFuncs.AddActivation(val4, Array.Empty(), null, lastWave: false, 4, null, noActivationDelay: false, forEnemies: true); DeathMarkerFuncs.AddDeathMarker(transform, anwActivator, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }); DeathMarkerFuncs.AddDeathMarker(transform, component2, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }); NemesisEnemy nemesisEnemy5 = EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Idol"], new Vector3(22.5f, -2f, 378f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }); NemesisEnemy nemesisEnemy6 = EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Idol"], new Vector3(-27.5f, 24.5f, 347f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }); NemesisEnemy nemesisEnemy7 = EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Idol"], new Vector3(25f, 30.5f, 335.75f), Quaternion.Euler(0f, 0f, 180f), (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }); NemesisEnemy targetEnemy3 = EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["EyeMalicious"], new Vector3(0f, 22f, 360f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }); EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Drone"], new Vector3(0f, 23.5f, 339f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }); EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Drone"], new Vector3(-12f, 10f, 373.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component4 }); EnemyFuncs.SetIdolTarget(targetEnemy3, new NemesisEnemy[3] { nemesisEnemy5, nemesisEnemy6, nemesisEnemy7 }); } public static void FirstRoomGoBack() { //IL_006c: 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_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_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_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_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("2 - Arena"); Transform transform = GeneralFuncs.MakeEmpty(val.Find("2 Stuff"), "NemesisStuff GoBack").transform; Door component = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (4)/Door (Large)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers/Door (Large)")).GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component2, component }; GameObject val2 = ArenaFuncs.MakeTrigger(transform, "GoBack", new Vector3(30f, -10f, 385f), new Vector3(-30f, 27f, 340f)); val2.SetActive(false); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Wave 1").transform; ActivateArena val3 = ArenaFuncs.AddArena(val2, doors); ActivateNextWave val4 = WaveFuncs.AddActivation(transform2, doors, component, lastWave: true, 0); ArenaFuncs.SetArenaDelay(val3, 1.75f); GameObject trigger = GeneralFuncs.MakeEmpty(transform, "GoBack Enabler"); ObjectActivator val5 = ObjectActivatorFuncs.AddObjectActivator(trigger, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { val2 }), 0f, oneTime: true, nonCollider: true); ObjectActivationCheck obac = GeneralFuncs.MakeEmpty(val, "GoBack Obac").AddComponent(); val5.obac = obac; NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["MirrorReaper"], new Vector3(0f, -10f, 337f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateArena[])(object)new ActivateArena[1] { val3 }); ActivateNextWaveHP val6 = WaveFuncs.AddActivationHP(transform2, 55f, nemesisEnemy, Array.Empty(), null, lastWave: false, null, forEnemies: true); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Virtue"], new Vector3(0f, 16f, 338.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, null, (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[1] { val6 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["RocketLauncher"], new Vector3(27.4f, 0f, 353.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, null, (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[1] { val6 }); ActivateNextWaveHP val7 = WaveFuncs.AddActivationHP(transform2, 35f, nemesisEnemy, Array.Empty(), null, lastWave: false, null, forEnemies: true); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Virtue"], new Vector3(-27f, 9.5f, 384f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, null, (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[1] { val7 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Virtue"], new Vector3(27f, 9.5f, 384f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, null, (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[1] { val7 }); Transform val8 = ObjectFuncs.PlaceAltarBlue(val.Find("2 Nonstuff"), hasSkull: true, new Vector3(0f, 2f, 387f), GeneralFuncs.Quat_90); ((Component)val8).gameObject.SetActive(false); Transform val9 = GeneralFuncs.FindInactive("CheckpointNemesis Main").Find("Reactivator"); Util.ArrayAdd(ref val4.toActivate, (GameObject[])(object)new GameObject[2] { ((Component)val8).gameObject, ((Component)val9).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_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0340: 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_038c: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Expected O, but got Unknown //IL_0542: Unknown result type (might be due to invalid IL or missing references) //IL_0547: Unknown result type (might be due to invalid IL or missing references) //IL_0581: Unknown result type (might be due to invalid IL or missing references) //IL_0586: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("5 - Tube Hallways/5 Content/Enemies"); Transform val2 = val.Find("Wave 2"); ActivateArena component = ((Component)val.Find("Wave 2 Trigger")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (8)/Door (Large)")).GetComponent(); Door component3 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (5)/Door (Large)")).GetComponent(); Door component4 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (6)/Door (Large)")).GetComponent(); Door component5 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (4)/Door (Large)")).GetComponent(); Door component6 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (9)/Door (Large)")).GetComponent(); Util.ArrayAdd(ref component3.activatedRooms, ((Component)GeneralFuncs.FindInactive("6 - Pipes Hallway")).gameObject); Util.ArrayAdd(ref component4.activatedRooms, ((Component)GeneralFuncs.FindInactive("6 - Pipes Hallway")).gameObject); Util.ArrayAdd(ref component6.activatedRooms, ((Component)val.root).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 val3 = WaveFuncs.AddActivation(val2, (Door[])(object)new Door[2] { component4, component5 }, null, lastWave: true, 0); ((Component)val.Find("Wave 1 Trigger")).gameObject.SetActive(false); WaveFuncs.ClearWave(val2, null, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform transform = GeneralFuncs.MakeEmpty(val, "Wave Idol").transform; ActivateNextWave val4 = WaveFuncs.AddActivation(transform, Array.Empty(), null, lastWave: false, -1, null, noActivationDelay: true, forEnemies: true); ActivateNextWave val5 = WaveFuncs.AddActivation(transform, Array.Empty(), null, lastWave: false, -1, null, noActivationDelay: false, forEnemies: true); DeathMarkerFuncs.AddDeathMarker(val2, val5, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(transform, LevelAssets.Enemies["Idol"], new Vector3(0f, 1.5f, 394.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[2] { val4, val5 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Virtue"], new Vector3(15f, 27f, 503f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(nemesisEnemy2); EnemyFuncs.SetIdolTarget(nemesisEnemy2, nemesisEnemy); ObjectActivatorFuncs.AddEnemyBlockBreakables(nemesisEnemy); ObjectActivatorFuncs.AddEnemyBlockBreakables(nemesisEnemy2); ObjectActivatorFuncs.AddEnemyBlockBreakables(EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Stray"], new Vector3(7.5f, 12f, 510.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component })); ObjectActivatorFuncs.AddEnemyBlockBreakables(EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Stray"], new Vector3(-7f, 12f, 510.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component })); ObjectActivatorFuncs.AddEnemyBlockBreakables(EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Stray"], new Vector3(0f, 12f, 528f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component })); ObjectActivatorFuncs.AddEnemyBlockBreakables(EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Mannequin"], new Vector3(0f, 12.15f, 433f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 })); ObjectActivatorFuncs.AddEnemyBlockBreakables(EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Mannequin"], new Vector3(0f, 7.5f, 422.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 })); Transform transform2 = Object.Instantiate(LevelAssets.Objects["ElectricityBox"], new Vector3(-20f, 26f, 510.5f), GeneralFuncs.Quat_180).transform; transform2.SetParent(val.root.Find("5 Nonstuff")); DoorOpener componentInChildren = ((Component)transform2).GetComponentInChildren(true); if (componentInChildren != null) { ((Behaviour)componentInChildren).enabled = false; } ObjectActivator component7 = ((Component)transform2.Find("Broken")).GetComponent(); Breakable componentInChildren2 = ((Component)transform2).GetComponentInChildren(true); GameObject obj = GeneralFuncs.MakeEmpty(((Component)componentInChildren2).transform, "BreakableAllower"); ObjectActivatorFuncs.AddBreakableAllower(obj, componentInChildren2); GameObject val6 = GeneralFuncs.MakeEmpty(transform2, "HudMessage"); val6.SetActive(false); ObjectActivatorFuncs.AddHudMessage(val6, "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] { val6 }); ObjectActivationCheck arenaTriggerObac = ((Component)GeneralFuncs.FindInactive("2 - Arena/GoBack Obac")).GetComponent(); component7.events.onActivate.AddListener((UnityAction)delegate { arenaTriggerObac.readyToActivate = true; }); ObjectFuncs.PlaceAltarBlue(val.root.Find("5 Nonstuff"), hasSkull: false, new Vector3(-3f, 12f, 531f), GeneralFuncs.Quat_90, (Door[])(object)new Door[1] { component2 }); ObjectFuncs.PlaceAltarRed(val.root.Find("5 Nonstuff"), hasSkull: false, new Vector3(3f, 12f, 531f), GeneralFuncs.Quat_90, (Door[])(object)new Door[1] { component2 }); } public static void SideRoom() { //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: 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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: 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_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("5B - Bonus Arena/5B Content/Enemies"); Transform val2 = val; ActivateArena component = ((Component)val2.Find("Cube")).GetComponent(); ActivateNextWave component2 = ((Component)val2).GetComponent(); Door component3 = ((Component)GeneralFuncs.FindInactive("Door (Large) With Controllers (6)/Door (Large)")).GetComponent(); component.onlyWave = false; component2.doorForward = component3; ActivateNextWave val3 = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 0, null, noActivationDelay: false, forEnemies: true); WaveFuncs.ClearWave(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Deathcatcher"], new Vector3(12.5f, 22f, 502.5f), GeneralFuncs.Quat_90, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Mindflayer"], new Vector3(42.5f, 26f, 503f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Sentry"], new Vector3(48f, 22.1f, 510.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Sentry"], new Vector3(48f, 22.1f, 495.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Sentry"], new Vector3(24f, 22.1f, 503f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["Power"], new Vector3(36f, 30f, 503f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddDontCatch(nemesisEnemy); component2.enemyCount = 5; Transform val4 = ObjectFuncs.PlaceAltarRed(val.root.Find("5 Nonstuff"), hasSkull: true, new Vector3(48f, 22f, 503f), GeneralFuncs.Quat_180); ((Component)val4).gameObject.SetActive(false); Transform val5 = GeneralFuncs.FindInactive("CheckpointNemesis Main").Find("Reactivator"); Util.ArrayAdd(ref component2.toActivate, (GameObject[])(object)new GameObject[2] { ((Component)val4).gameObject, ((Component)val5).gameObject }); } public static void ShowerTerminal() { //IL_0023: 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 roomTransform = GeneralFuncs.FindInactive("6 - Pipes Hallway/6 Nonstuff"); 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 1 talks about). So those rooms may still have meaningful impact"; ObjectFuncs.PlaceTerminalTestament(roomTransform, message, new Vector3(9.5f, 21.8f, 537f), Quaternion.Euler(0f, 270f, 180f), hasMusic: false, 0.02f); } public static void DumbfuckTerminal() { //IL_0023: 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_004c: 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) Transform roomTransform = GeneralFuncs.FindInactive("7 - 2 Floor Arena/7 Nonstuff"); string message = "NEMESIS COMMENTARY 4.2:\r\nI'm not sure what to do for the future layer boss levels since the mod is specifically not about bosses, so if you have ideas you can dm me on discord @somebilly lmao"; ObjectFuncs.PlaceTerminalTestament(roomTransform, message, new Vector3(0f, 7f, 547.5f), Quaternion.Euler(0f, 0f, 180f)).localScale = 0.75f * Vector3.one; } public static void FinalRoom() { //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_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_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("7 - 2 Floor Arena/7 Contents/Enemies"); Transform val2 = val.Find("Wave 1"); ActivateArena component = ((Component)val.Find("Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val2).GetComponent(); Transform val3 = val.Find("Wave 2"); ActivateNextWave component3 = ((Component)val3).GetComponent(); ActivateNextWave val4 = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 2, null, noActivationDelay: false, forEnemies: true); ActivateNextWave val5 = WaveFuncs.AddActivation(val3, Array.Empty(), null, lastWave: false, 2, null, noActivationDelay: false, forEnemies: true); WaveFuncs.ClearWave(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, 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(val2, 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(val2, 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(val2, 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(val2, 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(val2, LevelAssets.Enemies["Mindflayer"], new Vector3(0f, 20f, 570f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); WaveFuncs.ClearWaveNoTrigger(val3, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); EnemyFuncs.AddEnemyNoTrigger(val3, 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(val3, 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(val3, 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(val3, 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(val3, 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(val3, LevelAssets.Enemies["Virtue"], new Vector3(0f, 30f, 605f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 })); } } public static class PatchLevel0_5 { public static int[] killRanks = new int[4] { 2, 4, 6, 8 }; public static int[] styleRanks = new int[4] { 3200, 5200, 6800, 8000 }; public static int[] timeRanks = new int[4] { 370, 250, 160, 100 }; public static void Patch() { BossRoom(); LongPathTerminal(); TheKilnTerminal(); } public static void BossRoom() { //IL_0087: 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_00c6: 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_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: 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) Transform val = GeneralFuncs.FindInactive("4 - Cerberus Arena/4 Contents"); Transform parent = GeneralFuncs.FindInactive("4 - Cerberus Arena/4 Contents/Enemies/StatueFake/Cerberus"); Transform parent2 = GeneralFuncs.FindInactive("4 - Cerberus Arena/4 Contents/Enemies/StatueFake (1)/Cerberus"); Transform transform = GeneralFuncs.MakeEmpty(val, "Nemesis Enemies").transform; Transform val2 = val.Find("Enemies"); ActivateNextWave[] components = ((Component)val2).GetComponents(); ActivateNextWave val3 = WaveFuncs.AddActivation(transform, Array.Empty(), null, lastWave: false, 0, null, noActivationDelay: false, forEnemies: true); DeathMarkerFuncs.AddDeathMarker(val2, val3, components); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Idol"], new Vector3(194.5f, -16.5f, 384.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Mindflayer"], new Vector3(194.5f, 1f, 382f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); NemesisEnemy nemesisEnemy3 = EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Idol"], new Vector3(194.5f, -16.5f, 379.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); NemesisEnemy nemesisEnemy4 = EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Providence"], new Vector3(194.5f, 30f, 382f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddStopper(nemesisEnemy4); nemesisEnemy4.transform.rotation = Quaternion.Euler(90f, 270f, 0f); EnemyFuncs.SetIdolTarget(nemesisEnemy2, nemesisEnemy); EnemyFuncs.SetIdolTarget(nemesisEnemy4, nemesisEnemy3); EnemyFuncs.AddMover(nemesisEnemy4.gameObject, nemesisEnemy4.transform, 9999f).MoveXYZ().TargetXYZ(194.5f, 30f, 382f); GameObject val4 = GeneralFuncs.MakeEmpty(transform, "IdolMoverMindflayer"); val4.SetActive(false); EnemyFuncs.AddMover(val4, nemesisEnemy.transform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, -6.5f); GameObject val5 = GeneralFuncs.MakeEmpty(transform, "IdolMoverProvidence"); val5.SetActive(false); EnemyFuncs.AddMover(val5, nemesisEnemy3.transform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, -6.5f); NemesisEnemy nemesisEnemy5 = EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Idol"], new Vector3(194.5f, -16.5f, 382f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); NemesisEnemy nemesisEnemy6 = EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["EyeMalicious"], new Vector3(194.5f, 11f, 382f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.SetIdolTarget(nemesisEnemy6, nemesisEnemy5); GameObject val6 = GeneralFuncs.MakeEmpty(transform, "IdolMoverEyeMalicious"); val6.SetActive(false); EnemyFuncs.AddMover(val6, nemesisEnemy5.transform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, -6.5f); WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 2, (GameObject[])(object)new GameObject[1] { val6 }, noActivationDelay: false, forEnemies: true); GameObject trigger = GeneralFuncs.MakeEmpty(parent, "EnemySpawner"); ObjectActivatorFuncs.AddObjectActivator(trigger, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[4] { nemesisEnemy2.gameObject, nemesisEnemy.gameObject, nemesisEnemy4.gameObject, nemesisEnemy3.gameObject }), 0f, oneTime: true, nonCollider: true); GameObject trigger2 = GeneralFuncs.MakeEmpty(parent2, "EnemySpawner"); ObjectActivatorFuncs.AddObjectActivator(trigger2, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[4] { val4, val5, nemesisEnemy6.gameObject, nemesisEnemy5.gameObject }), 0f, oneTime: true, nonCollider: true); } public static void LongPathTerminal() { //IL_0023: 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 roomTransform = GeneralFuncs.FindInactive("2 - Lava Foundry/DangerPath"); string message = "NEMESIS COMMENTARY 5:\r\nOne of the reasons I started making this mod is because I felt a lack of levels that try to experiment with encounters. This also applies to the main campaign, since it has to be created with new players in mind and that places limits on what the devs can do\r\n\r\nEven with some really good custom levels and the 2 encores currently released, I just felt the game needs more levels like that. And since making full custom levels would require a lot more effort and time, I decided that I'll just make the encounters without having to make the levels"; ObjectFuncs.PlaceTerminalTestament(roomTransform, message, new Vector3(84f, -5f, 435.5f), Quaternion.Euler(0f, 180f, 180f), hasMusic: false, 0.02f); } public static void TheKilnTerminal() { //IL_0023: 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 roomTransform = GeneralFuncs.FindInactive("2 - Lava Foundry"); string message = "The final boss of the Prelude in ULTRAKILL is:\r\nGabriel (First appearance)\r\n\r\n—————————————————\r\nWhere it happens\r\n• Level: 0-5 — The Kiln\r\n• This is the end of the Prelude and your first \"major boss moment\""; ObjectFuncs.PlaceTerminalPrime(roomTransform, message, new Vector3(132f, -6f, 389.5f), Quaternion.Euler(0f, 270f, 180f)); } } public static class PatchLevel1_1 { public static int[] killRanks = new int[4] { 14, 20, 38, 47 }; public static int[] styleRanks = new int[4] { 11000, 14500, 17000, 19000 }; public static int[] timeRanks = new int[4] { 420, 330, 260, 210 }; public static void Patch() { DroneRoom(); DroneRoomSecret(); TightRoom(); NailgunRoom(); LongCorridor(); TwoDrones(); LCorridorAddDoor(); FountainRoom(); LCorridor(); PreFinalRoom(); FinalRoom(); SlabTerminal(); CheckpointFuncs.ClearAndInheritAllRooms(); } public static void DroneRoom() { //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_01ff: 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_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_0561: Expected O, but got Unknown //IL_05a2: Unknown result type (might be due to invalid IL or missing references) //IL_05ac: Expected O, but got Unknown Transform val = GeneralFuncs.FindInactive("6 - Waterfall Arena/6 Stuff/Enemies"); Transform val2 = val.Find("Wave 1"); ActivateArena component = ((Component)val.Find("EnemyTrigger")).GetComponent(); ActivateNextWave component2 = ((Component)val2).GetComponent(); Transform val3 = val.Find("Wave 2"); ActivateNextWave component3 = ((Component)val3).GetComponent(); CheckPoint component4 = ((Component)GeneralFuncs.FindInactive("Checkpoint")).GetComponent(); WaveFuncs.ClearWave(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Schism"], new Vector3(46f, 0.6f, 454f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Schism"], new Vector3(56f, 2f, 435.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }), stopDashing: true, stopWalking: true); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Schism"], new Vector3(61f, 12.5f, 407f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Schism"], new Vector3(23.5f, 20.5f, 400.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Swordsmachine"], new Vector3(46f, 0.6f, 400f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Drone"], new Vector3(24.5f, 28f, 445.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Drone"], new Vector3(68f, 26f, 450f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Drone"], new Vector3(45.5f, 26.5f, 400f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); ActivateNextWave val4 = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 3, null, noActivationDelay: false, forEnemies: true); ActivateNextWaveHP val5 = WaveFuncs.AddActivationHP(val2, 10f, nemesisEnemy, Array.Empty(), null, lastWave: false, null, forEnemies: true); WaveFuncs.ClearWaveNoTrigger(val3, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); DeathMarkerFuncs.AddDeathMarker(val3, component2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemyNoTrigger(val3, LevelAssets.Enemies["MaliciousFace"], new Vector3(36f, -3.5f, 427f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[1] { val5 }), stopDashing: true, stopWalking: true); NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemyNoTrigger(val3, LevelAssets.Enemies["Sentry"], new Vector3(28f, -3.4f, 427f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[1] { val5 }); EnemyFuncs.AddEnemyNoTrigger(val3, LevelAssets.Enemies["Sentry"], new Vector3(59f, 2f, 405f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[1] { val5 }); EnemyFuncs.AddStopper(nemesisEnemy2, stopDashing: true, stopWalking: true); EnemyFuncs.AddTeleportOnCondition(nemesisEnemy2).AddCondition(new Vector3(28f, -3.4f, 427f), isMoveVectorAbsolute: true).AddAxis(nemesisEnemy2.transform, 'x', 24f); GameObject val6 = GeneralFuncs.MakeEmpty(val.root, "HudMessage"); val6.SetActive(false); string message = "I really hope there are no radiant enemies with increased health AND/OR speed& That would be a danger!"; ObjectActivatorFuncs.AddHudMessage(val6, message, timed: true, 8f, silent: false, colliderless: true); ObjectActivationCheck hudMessageObac = ((Component)val.root).gameObject.AddComponent(); hudMessageObac.readyToActivate = true; GameObject hudMessageActivatorObject = GeneralFuncs.MakeEmpty(val.root, "HudMessageActivator"); hudMessageActivatorObject.SetActive(false); ObjectActivator val7 = ObjectActivatorFuncs.AddObjectActivator(hudMessageActivatorObject, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { val6 }), 0f, oneTime: true, nonCollider: true); val7.obac = hudMessageObac; GameObject val8 = GeneralFuncs.MakeEmpty(val.root, "HudMessageDeactivator"); val8.SetActive(false); ObjectActivator val9 = ObjectActivatorFuncs.AddObjectActivator(val8, ObjectActivatorFuncs.MakeUltrakillEvent(), 0.1f, oneTime: true, nonCollider: true); val9.events.onActivate.AddListener((UnityAction)delegate { hudMessageObac.readyToActivate = false; }); Util.ArrayAdd(ref component3.toActivate, (GameObject[])(object)new GameObject[1] { hudMessageActivatorObject }); Util.ArrayAdd(ref val7.events.toActivateObjects, val8); component4.onRestart.AddListener((UnityAction)delegate { hudMessageActivatorObject.SetActive(false); }); CheckpointFuncs.UpdateRoomInCheckpoint(val.parent, component4); } public static void DroneRoomSecret() { //IL_0055: 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_0095: 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_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_0124: 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) Transform val = GeneralFuncs.FindInactive("6 - Waterfall Arena/6 Nonstuff/Secret Area"); Transform transform = GeneralFuncs.MakeEmpty(val, "Nemesis Enemies").transform; ActivateArena componentInChildren = ((Component)val).GetComponentInChildren(); componentInChildren.enemies = Array.Empty(); componentInChildren.onlyWave = true; EnemyFuncs.AddEnemy(transform, LevelAssets.Enemies["Providence"], new Vector3(22.5f, 28.5f, 427.5f), GeneralFuncs.Quat_90, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { componentInChildren }); EnemyFuncs.AddEnemy(transform, LevelAssets.Enemies["Providence"], new Vector3(54f, 18.5f, 452f), Quaternion.Euler(0f, 225f, 0f), Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { componentInChildren }); EnemyFuncs.AddEnemy(transform, LevelAssets.Enemies["Providence"], new Vector3(61f, 22.5f, 417f), GeneralFuncs.Quat_270, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { componentInChildren }); EnemyFuncs.AddEnemy(transform, LevelAssets.Enemies["Providence"], new Vector3(41f, 9.5f, 404.5f), GeneralFuncs.Quat_0, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { componentInChildren }); } public static void TightRoom() { //IL_00e5: 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_013b: 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_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_024e: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("7 - Castle Entrance/7 Stuff/Enemies"); Transform waveTransform = val.Find("Wave 1"); ActivateArena component = ((Component)val.Find("Wave 1 Trigger")).GetComponent(); ActivateArena component2 = ((Component)val.Find("Wave 2 Trigger")).GetComponent(); Door val2 = GeneralFuncs.FindDoorByRoom("LargeDoor (5)", val.root); Door component3 = ((Component)GeneralFuncs.FindInactive("LargeDoor (7)")).GetComponent(); Door[] array = (Door[])(object)new Door[2] { val2, component3 }; CheckPoint component4 = ((Component)GeneralFuncs.FindInactive("Checkpoint")).GetComponent(); component.onlyWave = false; component.doors = array; Util.ArrayAdd(ref component4.doorsToUnlock, array); WaveFuncs.ClearWave(waveTransform, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component }); ActivateNextWave val3 = WaveFuncs.AddActivation(waveTransform, array, component3, lastWave: true, 0); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Mortar"], new Vector3(46f, 26f, 458f), Quaternion.Euler(0f, 90f, 90f), (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Mortar"], new Vector3(46f, 29f, 532f), Quaternion.Euler(0f, 270f, 90f), (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy3 = EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Ferryman"], new Vector3(46f, 1.6f, 510.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.ApplyRadiance(nemesisEnemy3, buffSpeed: false, buffHealth: true); EnemyFuncs.ApplyRadiance(nemesisEnemy, buffSpeed: true, buffHealth: false, buffDamage: false, 2f); EnemyFuncs.ApplyRadiance(nemesisEnemy2, buffSpeed: true, buffHealth: false, buffDamage: false, 2f); EnemyFuncs.AddTeleportOnCondition(nemesisEnemy3).AddCondition(new Vector3(0f, 0f, 5f)).AddAxis(nemesisEnemy3.transform, 'z', 457f); ((Component)component2).gameObject.SetActive(false); } public static void NailgunRoom() { Transform val = GeneralFuncs.FindInactive("9 - Castle Hall/9 Stuff/Enemies"); Transform val2 = val.Find("EnemyTrigger"); ((Component)val2).gameObject.SetActive(false); Transform val3 = val.Find("EnemyTrigger2"); ((Component)val3).gameObject.SetActive(false); } public static void LongCorridor() { //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_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("10 - Long Corridor/10 Stuff/Enemies"); Transform val2 = val.Find("Wave 1 Trigger"); ((Component)val2).gameObject.SetActive(false); Transform waveTransform = val.Find("Wave 2"); ActivateArena component = ((Component)val.Find("Wave 2 Trigger")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("LargeDoor (9)")).GetComponent(); Door component3 = ((Component)GeneralFuncs.FindInactive("LargeDoor (11)")).GetComponent(); Door[] array = (Door[])(object)new Door[2] { component2, component3 }; CheckPoint component4 = ((Component)GeneralFuncs.FindInactive("Checkpoint (1)")).GetComponent(); Util.ArrayAdd(ref component4.doorsToUnlock, array); component.onlyWave = false; component.doors = array; ActivateNextWave val3 = WaveFuncs.AddActivation(waveTransform, array, component3, lastWave: true, 0); WaveFuncs.ClearWave(waveTransform, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy idol = EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Idol"], new Vector3(-8f, 21f, 578f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy idol2 = EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Idol"], new Vector3(-8f, 21f, 492.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Gutterman"], new Vector3(-15f, 21.5f, 483.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Sentry"], new Vector3(-15f, 21.5f, 583f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Mannequin"], new Vector3(-23f, 21.5f, 521.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Mannequin"], new Vector3(-6.5f, 21.5f, 556f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(nemesisEnemy, stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(nemesisEnemy2, stopDashing: true, stopWalking: true); EnemyFuncs.SetIdolTarget(nemesisEnemy, idol); EnemyFuncs.SetIdolTarget(nemesisEnemy2, idol2); } public static void TwoDrones() { Transform val = GeneralFuncs.FindInactive("5 - Corner Hallway/5 Stuff/Enemies"); ((Component)val.Find("EnemyTrigger")).gameObject.SetActive(false); } public static void LCorridorAddDoor() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor (12)")).GetComponent(); Transform transform = Object.Instantiate(((Component)component).gameObject, new Vector3(81f, -5f, 300f), GeneralFuncs.Quat_0).transform; ((Object)transform).name = "LargeDoor (N1)"; transform.localScale = new Vector3(1f, 0.9f, 0.9f); ((Component)transform.Find("DoorFrame")).gameObject.SetActive(false); Util.ArrayAdd(ref ((Component)transform).GetComponent().activatedRooms, ((Component)GeneralFuncs.FindInactive("3 - Skull Field")).gameObject); } public static void FountainRoom() { //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_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0295: 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_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: 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_037d: 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_03c3: 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_0409: Unknown result type (might be due to invalid IL or missing references) //IL_040e: Unknown result type (might be due to invalid IL or missing references) //IL_044f: 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_0495: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("1 - First Field/1 Stuff/Enemies"); Transform val2 = val; ActivateArena component = ((Component)val.Find("Trigger")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("LargeDoor")).GetComponent(); Door component3 = ((Component)GeneralFuncs.FindInactive("LargeDoor (12)")).GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component2, component3 }; CheckPoint component4 = ((Component)GeneralFuncs.FindInactive("Checkpoint (2)")).GetComponent(); Door val3 = GeneralFuncs.FindDoorByRoom("LargeDoor (5)", GeneralFuncs.FindInactive("7 - Castle Entrance")); Door component5 = ((Component)GeneralFuncs.FindInactive("LargeDoor (7)")).GetComponent(); Util.ArrayAdd(ref component4.doorsToUnlock, (Door[])(object)new Door[4] { component2, component3, val3, component5 }); CheckPoint component6 = ((Component)GeneralFuncs.FindInactive("Checkpoint")).GetComponent(); Door component7 = ((Component)GeneralFuncs.FindInactive("LargeDoor (10)")).GetComponent(); Door component8 = ((Component)GeneralFuncs.FindInactive("LargeDoor (N1)")).GetComponent(); Util.ArrayAdd(ref component6.doorsToUnlock, (Door[])(object)new Door[4] { component2, component3, component7, component8 }); component.onlyWave = false; component.doors = doors; ActivateNextWave val4 = WaveFuncs.AddActivation(val2, doors, component3, lastWave: true, 0); ActivateNextWave val5 = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 3, null, noActivationDelay: false, forEnemies: true); WaveFuncs.ClearWave(val2, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component }); Transform transform = GeneralFuncs.MakeEmpty(val.parent, "Enemies Angels").transform; ActivateNextWave val6 = WaveFuncs.AddActivation(transform, Array.Empty(), null, lastWave: false, 0, null, noActivationDelay: false, forEnemies: true); DeathMarkerFuncs.AddDeathMarker(val2, val6, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemy(transform, LevelAssets.Enemies["Virtue"], new Vector3(-7.5f, 6.5f, 337.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(transform, LevelAssets.Enemies["Virtue"], new Vector3(7.5f, 6.5f, 323f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(transform, LevelAssets.Enemies["Providence"], new Vector3(-21f, 15.2f, 308f), Quaternion.Euler(0f, 45f, 0f), (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Schism"], new Vector3(-7.5f, 1.5f, 323f), Quaternion.Euler(0f, 45f, 0f), (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateArena[])(object)new ActivateArena[1] { component }), stopDashing: true, stopWalking: true); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Soldier"], new Vector3(7.5f, -9.5f, 308f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Soldier"], new Vector3(-7.5f, -9.8f, 308f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Soldier"], new Vector3(-26f, -9.8f, 323f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Soldier"], new Vector3(-26f, -9.4f, 336f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Stray"], new Vector3(-0.5f, -9.8f, 353.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Stray"], new Vector3(17.5f, -9.8f, 329.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["EyeMalicious"], new Vector3(-28f, 14.5f, 330f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["EyeMalicious"], new Vector3(28f, 14.5f, 330f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }); EnemyFuncs.AddEnemyNoTrigger(val2, LevelAssets.Enemies["EyeMalicious"], new Vector3(0f, 14.5f, 302f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }); } public static void LCorridor() { //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_010e: 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_0155: 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_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_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("2 - Indoors/2 Stuff/Enemies"); Transform waveTransform = val; ActivateArena component = ((Component)val.Find("EnemyTrigger")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("LargeDoor (12)")).GetComponent(); Door component3 = ((Component)GeneralFuncs.FindInactive("LargeDoor (N1)")).GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component2, component3 }; CheckPoint component4 = ((Component)GeneralFuncs.FindInactive("Checkpoint (2)")).GetComponent(); Util.ArrayAdd(ref component4.doorsToUnlock, component3); component.onlyWave = false; component.doors = doors; ActivateNextWave val2 = WaveFuncs.AddActivation(waveTransform, doors, component3, lastWave: true, 0); WaveFuncs.ClearWave(waveTransform, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Idol"], new Vector3(89f, -4.5f, 310f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Idol"], new Vector3(41f, -4.5f, 322f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy targetEnemy = EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["VeryCancerousRodent"], new Vector3(81f, -5f, 330f), Quaternion.Euler(0f, 225f, 0f), (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component }, spawnEffect: true, bossBar: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Guttertank"], new Vector3(81f, -4.8f, 303.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Guttertank"], new Vector3(34.5f, -4.8f, 330f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { component }), stopDashing: true, stopWalking: true); EnemyFuncs.SetIdolTarget(targetEnemy, new NemesisEnemy[2] { nemesisEnemy, nemesisEnemy2 }); } public static void PreFinalRoom() { //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_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_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_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_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("12 - Hall/12 Stuff/Enemies"); Transform waveTransform = val; ActivateArena component = ((Component)val.Find("Cube")).GetComponent(); Door val2 = GeneralFuncs.FindDoorByRoom("LargeDoor (5)", val.root); Door component2 = ((Component)GeneralFuncs.FindInactive("LargeDoor (10)")).GetComponent(); Door[] doors = (Door[])(object)new Door[2] { val2, component2 }; component.onlyWave = false; component.doors = doors; ActivateNextWave val3 = WaveFuncs.AddActivation(waveTransform, doors, component2, lastWave: true, 0); ActivateNextWave val4 = WaveFuncs.AddActivation(waveTransform, Array.Empty(), null, lastWave: false, 1, null, noActivationDelay: false, forEnemies: true); WaveFuncs.ClearWave(waveTransform, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.ApplyRadiance(EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Deathcatcher"], new Vector3(81f, -6f, 184.5f), GeneralFuncs.Quat_0, Array.Empty(), (ActivateArena[])(object)new ActivateArena[1] { component }), buffSpeed: true); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["VeryCancerousRodent"], new Vector3(81f, -6f, 197f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Cerberus"], new Vector3(64f, -3.4f, 219f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Schism"], new Vector3(64f, -3.4f, 199f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemyNoTrigger(waveTransform, LevelAssets.Enemies["Cerberus"], new Vector3(98f, -3.4f, 199f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(waveTransform, LevelAssets.Enemies["Schism"], new Vector3(98f, -3.4f, 219f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); } public static void FinalRoom() { //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: 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_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) Transform val = GeneralFuncs.FindInactive("13 - End Room/13 Stuff/Enemies"); Transform val2 = val.Find("Wave 1"); ActivateArena component = ((Component)val.Find("Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val2).GetComponent(); Transform val3 = val.Find("Wave 2"); ActivateNextWave component3 = ((Component)val3).GetComponent(); ObjectActivator component4 = ((Component)component).GetComponent(); Util.ArrayRemove(ref component4.events.toDisActivateObjects, (GameObject[])(object)new GameObject[2] { ((Component)GeneralFuncs.FindInactive("12 - Hall")).gameObject, ((Component)GeneralFuncs.FindInactive("3 - Skull Field")).gameObject }); WaveFuncs.ClearWave(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["PowerNoEffect"], new Vector3(63f, -1f, 158.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["PowerNoEffect"], new Vector3(99f, -1f, 158.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); ActivateNextWaveHP val4 = WaveFuncs.AddActivationHP(val2, 15f, nemesisEnemy, Array.Empty(), null, lastWave: false, null, forEnemies: true); ActivateNextWaveHP val5 = WaveFuncs.AddActivationHP(val2, 15f, nemesisEnemy2, Array.Empty(), null, lastWave: false, null, forEnemies: true); WaveFuncs.ClearWaveNoTrigger(val3, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }); DeathMarkerFuncs.AddDeathMarker(val3, component2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }); EnemyFuncs.AddEnemyNoTrigger(val3, LevelAssets.Enemies["Mindflayer"], new Vector3(81f, -0.75f, 140.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, Array.Empty(), (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[2] { val4, val5 }); CheckpointFuncs.MakeCheckpoint("Last", new Vector3(81f, -6f, 178f), GeneralFuncs.Quat_180, ((Component)val.root).gameObject, (Door[])(object)new Door[1] { ((Component)GeneralFuncs.FindInactive("LargeDoor (10)")).GetComponent() }, null, null, reusable: false, inheritAllRooms: true); } public static void SlabTerminal() { //IL_0023: 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 roomTransform = GeneralFuncs.FindInactive("13 - End Room/13 Nonstuff"); string message = "NEMESIS COMMENTARY 6:\r\nYes the Very Cancerous Rodent is distinct enough from other enemies gameplay-wise to actually appear in encounters. I'm open to using basically any enemy as long as that fact is true"; Transform val = ObjectFuncs.PlaceTerminalTestament(roomTransform, message, new Vector3(81f, 10.5f, 139f), Quaternion.Euler(0f, 0f, 180f)); ((Component)val).gameObject.layer = LayerMask.NameToLayer("Outdoors"); } } public static class PatchLevel1_2 { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__4_0; public static UnityAction <>9__11_2; internal void b__4_0() { ((Component)GeneralFuncs.FindInactive("4 - Fire Hallway")).gameObject.SetActive(true); } internal void b__11_2() { PortalFuncs.BlockPortal(((Component)GeneralFuncs.FindInactive("Portal In - ToRodent")).GetComponent(), unblock: true); } } public static int[] killRanks = new int[4] { 14, 20, 31, 42 }; public static int[] styleRanks = new int[4] { 15000, 18500, 21000, 22500 }; public static int[] timeRanks = new int[4] { 450, 380, 320, 270 }; public static void Patch() { ChangePath(); FirstRoom(); WeirdRoom(); SkullRoom(); RodentRoom(); DoorTerminal(); BloodOrbCerberus(); FinalRoom(); FlippedTerminal(); CheckpointFuncs.UpdateAllRoomsInCheckpoints(); } public static void ChangePath() { //IL_0078: 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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: 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_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Expected O, but got Unknown Transform val = GeneralFuncs.FindInactive("5 - Double Hallway/5 Nonstuff/Altar"); ((Component)val).gameObject.SetActive(false); Transform val2 = GeneralFuncs.FindInactive("1 - First Room/1 Nonstuff/Altar (Red)"); ((Component)val2).gameObject.SetActive(false); Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor")).GetComponent(); ObjectActivatorFuncs.AddDoorConstantLocker(((Component)component).gameObject, component, unlockOnDisable: false); Transform val3 = GeneralFuncs.FindInactive("1 - First Room/1 Nonstuff"); GameObject val4 = Object.Instantiate(LevelAssets.Objects["PlankBlocker"], new Vector3(0f, -12f, 379.5f), Quaternion.Euler(0f, 0f, 345f)); GameObject val5 = Object.Instantiate(LevelAssets.Objects["PlankBlocker"], new Vector3(0f, -7f, 379.5f), Quaternion.Euler(0f, 0f, 15f)); GameObject[] array = (GameObject[])(object)new GameObject[2] { val4, val5 }; foreach (GameObject val6 in array) { val6.transform.SetParent(val3); val6.layer = LayerMask.NameToLayer("Outdoors"); Object.Destroy((Object)(object)val6.GetComponent()); Object.Destroy((Object)(object)val6.GetComponent()); } Transform val7 = GeneralFuncs.FindInactive("5 - Double Hallway/5 Stuff/Enemies"); Transform val8 = val7.Find("Trigger 2"); ((Component)val8).gameObject.SetActive(true); Transform waveTransform = val7.Find("Wave 2"); WaveFuncs.ClearWave(waveTransform); ObjectActivator[] components = ((Component)val8).GetComponents(); foreach (ObjectActivator val9 in components) { List list = val9.events.toActivateObjects.ToList(); for (int k = 0; k < list.Count; k++) { if (((Object)list[k]).name.Contains("Streetcleaner")) { list.RemoveAt(k); break; } } } Portal portal = PortalFuncs.MakePortal("ToRodent", PortalFuncs.MakePortalSide(null, new Vector3(-102f, -5.5f, 310f), GeneralFuncs.Quat_270), PortalFuncs.MakePortalSide(null, new Vector3(-61f, -16.5f, 383.5f), GeneralFuncs.Quat_180), new Vector2(10f, 10f)); PortalFuncs.SetPortalVisibility(portal, isPlayerVisible: false, canSeeItself: false, appearsInRecursions: false, 0); Portal portal2 = PortalFuncs.MakePortal("RodentLoop", PortalFuncs.MakePortalSide(null, new Vector3(-26f, -16.5f, 431.5f), GeneralFuncs.Quat_0), PortalFuncs.MakePortalSide(null, new Vector3(-61f, -16.5f, 385.5f), GeneralFuncs.Quat_180), new Vector2(10f, 10f)); PortalFuncs.SetPortalVisibility(portal2, isPlayerVisible: false, canSeeItself: false, appearsInRecursions: false, 0); Breakable component2 = ((Component)GeneralFuncs.FindInactive("CV11 - Hallway/CV11 Stuff/Breakable Wall")).GetComponent(); component2.Break(); Transform val10 = GeneralFuncs.FindInactive("CV11 - Hallway/CV11 Stuff/Cancerous Rodent"); ((Component)val10).gameObject.SetActive(false); ObjectActivator[] componentsInChildren = ((Component)((Component)val10).transform.parent).GetComponentsInChildren(); foreach (ObjectActivator val11 in componentsInChildren) { ((Component)val11).gameObject.SetActive(false); } MusicChanger[] componentsInChildren2 = ((Component)((Component)val10).transform.parent).GetComponentsInChildren(); foreach (MusicChanger val12 in componentsInChildren2) { ((Component)val12).gameObject.SetActive(false); } Breakable component3 = ((Component)GeneralFuncs.FindInactive("7 - Castle Entrance/7 Stuff/Breakable")).GetComponent(); component3.Break(); Transform val13 = GeneralFuncs.FindInactive("7 - Castle Entrance/7 Stuff/Cube-clone"); ((Component)val13).gameObject.SetActive(false); GameObject gameObject = ((Component)GeneralFuncs.FindInactive("CV11 - Hallway")).gameObject; GameObject gameObject2 = ((Component)GeneralFuncs.FindInactive("7 - Castle Entrance")).gameObject; GameObject gameObject3 = ((Component)GeneralFuncs.FindInactive("7B - Lava Room")).gameObject; Door component4 = ((Component)GeneralFuncs.FindInactive("LargeDoor (6)")).GetComponent(); Util.ArrayAdd(ref component4.activatedRooms, (GameObject[])(object)new GameObject[3] { gameObject, gameObject2, gameObject3 }); Door component5 = ((Component)GeneralFuncs.FindInactive("LargeDoor (10)")).GetComponent(); Util.ArrayAdd(ref component5.activatedRooms, (GameObject[])(object)new GameObject[3] { ((Component)val7.root).gameObject, ((Component)val3.root).gameObject, ((Component)GeneralFuncs.FindInactive("3 - Stairs Room")).gameObject }); CheckPoint component6 = ((Component)GeneralFuncs.FindInactive("Checkpoint")).GetComponent(); UnityEvent onRestart = component6.onRestart; object obj = <>c.<>9__4_0; if (obj == null) { UnityAction val14 = delegate { ((Component)GeneralFuncs.FindInactive("4 - Fire Hallway")).gameObject.SetActive(true); }; <>c.<>9__4_0 = val14; obj = (object)val14; } onRestart.AddListener((UnityAction)obj); Transform val15 = GeneralFuncs.FindInactive("4 - Fire Hallway/4 Nonstuff/Enemies (1)"); ((Component)val15).gameObject.SetActive(false); Transform val16 = GeneralFuncs.FindInactive("1 - First Room/1 Stuff/Burning Version/New Enemies"); ((Component)val16).gameObject.SetActive(false); HurtZone component7 = ((Component)GeneralFuncs.FindInactive("7B - Lava Room/Floor/Lava")).GetComponent(); component7.setDamage = 10f; } public static void FirstRoom() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_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_011f: 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_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: 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_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("1 - First Room/1 Stuff"); ((Component)val.Find("Enemies")).gameObject.SetActive(false); GameObject trigger = ArenaFuncs.MakeTrigger(val, "Wave 1", new Vector3(40f, -14f, 320f), new Vector3(-40f, 35f, 330f)); Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor (1)")).GetComponent(); Transform transform = GeneralFuncs.MakeEmpty(val, "Nemesis Wave 1").transform; ActivateArena val2 = ArenaFuncs.AddArena(trigger, (Door[])(object)new Door[1] { component }); ActivateNextWave val3 = WaveFuncs.AddActivation(transform, (Door[])(object)new Door[1] { component }, null, lastWave: true, 0); ActivateNextWave val4 = WaveFuncs.AddActivation(transform, Array.Empty(), null, lastWave: false, 0, null, noActivationDelay: false, forEnemies: true); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(transform, LevelAssets.Enemies["Idol"], new Vector3(0f, -24f, 339.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); NemesisEnemy targetEnemy = EnemyFuncs.AddEnemy(transform, LevelAssets.Enemies["BlackHoleLauncher"], new Vector3(0f, 21f, 340f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }, spawnEffect: true, bossBar: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(transform, LevelAssets.Enemies["Guttertank"], new Vector3(-26f, 15f, 352.25f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[2] { val3, val4 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }), stopDashing: true, stopWalking: true); EnemyFuncs.AddEnemy(transform, LevelAssets.Enemies["Mindflayer"], new Vector3(30.5f, 8.5f, 342.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[2] { val3, val4 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform, LevelAssets.Enemies["Soldier"], new Vector3(30f, -15f, 371.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[2] { val3, val4 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform, LevelAssets.Enemies["Soldier"], new Vector3(10f, -15f, 371.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[2] { val3, val4 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform, LevelAssets.Enemies["Soldier"], new Vector3(-10f, -15f, 371.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[2] { val3, val4 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform, LevelAssets.Enemies["Soldier"], new Vector3(-30f, -15f, 371.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[2] { val3, val4 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.SetIdolTarget(targetEnemy, nemesisEnemy); GameObject val5 = GeneralFuncs.MakeEmpty(transform, "IdolMover"); val5.SetActive(false); EnemyFuncs.AddMover(val5, nemesisEnemy.transform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, -14f); Util.ArrayAdd(ref val4.toActivate, val5); string message = "BLACK HOLE LAUNCHER: fires a black hole, has 27 health. Move!"; ObjectActivatorFuncs.AddHudMessage(trigger, message); } public static void WeirdRoom() { //IL_00e8: 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_0145: 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_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_01b4: 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_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Expected O, but got Unknown //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Expected O, but got Unknown Transform val = GeneralFuncs.FindInactive("2 - Upper Way/2 Stuff/Enemies"); Transform parent = GeneralFuncs.FindInactive("2 - Upper Way/2 Nonstuff"); Transform val2 = val.Find("Wave 1"); ActivateArena component = ((Component)val.Find("Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val2).GetComponent(); Transform val3 = val.Find("Wave 2"); ActivateNextWave component3 = ((Component)val3).GetComponent(); Door component4 = ((Component)GeneralFuncs.FindInactive("LargeDoor (1)")).GetComponent(); Door component5 = ((Component)GeneralFuncs.FindInactive("LargeDoor (3)")).GetComponent(); Door component6 = ((Component)GeneralFuncs.FindInactive("LargeDoor (4)")).GetComponent(); CheckPoint val4 = CheckpointFuncs.FindCheckpointByRoom("Checkpoint (1)", val.root); Util.ArrayAdd(ref val4.doorsToUnlock, (Door[])(object)new Door[3] { component4, component5, component6 }); GameObject val5 = GeneralFuncs.MakeEmpty(val, "GravitySwitcher Up"); val5.SetActive(false); ObjectActivatorFuncs.AddGravitySwitcher(val5, new Vector3(0f, 40f, 0f)); Util.ArrayAdd(ref ((Component)component).GetComponent().events.toActivateObjects, val5); Portal portal1 = PortalFuncs.MakePortal("WeirdRoom Main", PortalFuncs.MakePortalSide(parent, new Vector3(18.5f, 26f, 401f), GeneralFuncs.Quat_90), PortalFuncs.MakePortalSide(parent, new Vector3(-18.5f, 26f, 401f), GeneralFuncs.Quat_270), new Vector2(20f, 13f)); PortalFuncs.SetPortalVisibility(portal1, isPlayerVisible: true, canSeeItself: true, appearsInRecursions: true, 2); Portal portal2 = PortalFuncs.MakePortal("WeirdRoom Extra", PortalFuncs.MakePortalSide(parent, new Vector3(18.5f, 41f, 401f), GeneralFuncs.Quat_90), PortalFuncs.MakePortalSide(parent, new Vector3(-18.5f, 41f, 401f), GeneralFuncs.Quat_270), new Vector2(10f, 18f)); PortalFuncs.SetPortalVisibility(portal2, isPlayerVisible: true, canSeeItself: true, appearsInRecursions: true, 2); WaveFuncs.ClearWave(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Gutterman"], new Vector3(0f, 20f, 401f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Virtue"], new Vector3(0f, 40f, 401f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); ActivateNextWave val6 = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 1, null, noActivationDelay: false, forEnemies: true); WaveFuncs.ClearWaveNoTrigger(val3, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }); DeathMarkerFuncs.AddDeathMarker(val3, component2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }); EnemyFuncs.AddEnemyNoTrigger(val3, LevelAssets.Enemies["Power"], new Vector3(10f, 40f, 401f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { component3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }); Transform transform = ((Component)GeneralFuncs.FindInactive("2 - Upper Way/2 Nonstuff/Secret/Boards")).transform; ((Component)transform.Find("Cube (21)")).gameObject.SetActive(false); Collider[] componentsInChildren = ((Component)transform).GetComponentsInChildren(); foreach (Collider val7 in componentsInChildren) { if (!((Object)(object)((Component)val7).GetComponent() != (Object)null)) { val7.enabled = false; } } val4.onRestart.AddListener((UnityAction)delegate { PortalFuncs.BlockPortal(portal1, unblock: true); }); val4.onRestart.AddListener((UnityAction)delegate { PortalFuncs.BlockPortal(portal2, unblock: true); }); } public static void SkullRoom() { //IL_0136: 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_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_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_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_0346: 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_03cb: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("3 - Stairs Room/3 Stuff/Enemies"); Transform waveTransform = val; Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor (3)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("LargeDoor (4)")).GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component, component2 }; ActivateArena component3 = ((Component)val.Find("Zombies Trigger")).GetComponent(); ActivateArena component4 = ((Component)val.Find("Zombies Trigger (1)")).GetComponent(); ActivateArena[] array = (ActivateArena[])(object)new ActivateArena[2] { component3, component4 }; ArenaLink arenaLink = ((Component)val).gameObject.AddComponent(); arenaLink.linkedArenas = array; component3.onlyWave = false; component4.onlyWave = false; component3.doors = doors; component4.doors = doors; ActivateNextWave val2 = WaveFuncs.AddActivation(waveTransform, (Door[])(object)new Door[1] { component2 }, component2, lastWave: true, 0); GameObject val3 = GeneralFuncs.MakeEmpty(((Component)component).transform, "DoorConstantLocker"); val3.SetActive(false); ObjectActivatorFuncs.AddDoorConstantLocker(val3, component); Util.ArrayAdd(ref component3.enemies, val3); Util.ArrayAdd(ref component4.enemies, val3); WaveFuncs.ClearWave(waveTransform, Array.Empty(), array); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Providence"], new Vector3(0f, 30f, 455.5f), Quaternion.Euler(0f, 225f, 0f), (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, array); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Providence"], new Vector3(-15f, 34f, 430f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, array); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Sentry"], new Vector3(-7f, 19f, 437f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, array), stopDashing: true, stopWalking: true); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Mannequin"], new Vector3(0f, 20f, 429f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, array); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["Mannequin"], new Vector3(-21f, 17.5f, 432f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, array); EnemyFuncs.AddEnemy(waveTransform, LevelAssets.Enemies["VeryCancerousRodent"], new Vector3(-18f, 30f, 454.5f), Quaternion.Euler(0f, 135f, 0f), (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, array); GameObject val4 = GeneralFuncs.MakeEmpty(val, "DoorUnlocker"); val4.SetActive(false); ObjectActivatorFuncs.AddObjectActivator(val4, ObjectActivatorFuncs.MakeUltrakillEvent(null, (GameObject[])(object)new GameObject[1] { val3 }), 0f, oneTime: true, nonCollider: true); GameObject val5 = GeneralFuncs.MakeEmpty(val, "WeirdRoom Portal Disabler"); val5.SetActive(false); ObjectActivatorFuncs.AddPortalBlocker(val5, "2 - Upper Way/2 Nonstuff/Portal In - WeirdRoom Main"); ObjectActivatorFuncs.AddPortalBlocker(val5, "2 - Upper Way/2 Nonstuff/Portal In - WeirdRoom Extra"); GameObject val6 = GeneralFuncs.MakeEmpty(val, "GravitySwitcher Down"); val6.SetActive(false); ObjectActivatorFuncs.AddGravitySwitcher(val6, new Vector3(0f, -40f, 0f)); Util.ArrayAdd(ref val2.toActivate, (GameObject[])(object)new GameObject[3] { val6, val4, val5 }); ((Component)GeneralFuncs.FindInactive("7 - Castle Entrance/7 Nonstuff/Tesla Coils")).gameObject.SetActive(false); ((Component)GeneralFuncs.FindInactive("7 - Castle Entrance/7 Nonstuff/Decorations/Cube")).gameObject.SetActive(false); CheckpointFuncs.MakeCheckpoint("SkullRoom", new Vector3(0f, 26f, 424f), Quaternion.Euler(0f, 0f, 180f), ((Component)val.root).gameObject, Array.Empty(), null, null, reusable: false, inheritAllRooms: true); } public static void RodentRoom() { //IL_0037: 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_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_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_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_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_044b: 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_0494: Unknown result type (might be due to invalid IL or missing references) //IL_0499: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_052b: 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_0574: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05a7: Unknown result type (might be due to invalid IL or missing references) //IL_05d9: Unknown result type (might be due to invalid IL or missing references) Transform transform = ((Component)GeneralFuncs.FindInactive("CV11 - Hallway/CV11 Stuff")).transform; Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Nemesis Wave 1").transform; GameObject trigger = ArenaFuncs.MakeTrigger(transform, "Enemies", new Vector3(-56f, -21.5f, 389f), new Vector3(-66f, -11.5f, 393f)); ActivateArena val = ArenaFuncs.AddArena(trigger, Array.Empty()); ActivateNextWave val2 = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false, 0); ArenaFuncs.SetArenaDelay(val, 1f); GameObject val3 = GeneralFuncs.MakeEmpty(transform, "Arena Starter"); val3.SetActive(false); ObjectActivatorFuncs.AddPortalBlocker(val3, "Portal In - ToRodent", unblock: false, entry: false); ObjectActivatorFuncs.AddPortalBlocker(val3, "Portal In - RodentLoop", unblock: true); ObjectActivatorFuncs.AddObjectActivator(trigger, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { val3 })); EnemyFuncs.SetIdolTarget(EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Virtue"], new Vector3(-26f, -16.5f, 406.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { val }), EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Idol"], new Vector3(-61f, -22f, 429.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { val })); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Sentry"], new Vector3(-61f, -21.5f, 426.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { val }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Sentry"], new Vector3(-16.5f, -21.5f, 416.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { val }), stopDashing: true, stopWalking: true); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Ferryman"], new Vector3(-43f, -21.5f, 417f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { val }); Transform transform3 = GeneralFuncs.MakeEmpty(transform, "Nemesis Wave 2").transform; ActivateNextWave val4 = WaveFuncs.AddActivation(transform3, Array.Empty(), null, lastWave: false, 0); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["MirrorReaper"], new Vector3(-70.5f, -21.5f, 396.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }); EnemyFuncs.ApplyRadiance(nemesisEnemy, buffSpeed: false, buffHealth: true); GameObject val5 = GeneralFuncs.MakeEmpty(transform, "GravitySwitcher Sideways"); val5.SetActive(false); ObjectActivatorFuncs.AddGravitySwitcher(val5, new Vector3(40f, 0f, 0f)); Util.ArrayAdd(ref val4.toActivate, val5); Transform transform4 = GeneralFuncs.MakeEmpty(transform, "Nemesis Wave 3").transform; ActivateNextWave val6 = WaveFuncs.AddActivation(transform4, Array.Empty(), null, lastWave: true, 0); EnemyFuncs.AddEnemyNoTrigger(transform4, LevelAssets.Enemies["Filth"], new Vector3(-16f, -21.5f, 413.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform4, LevelAssets.Enemies["Filth"], new Vector3(-16f, -21.5f, 420f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform4, LevelAssets.Enemies["Filth"], new Vector3(-26f, -21.5f, 429f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform4, LevelAssets.Enemies["Filth"], new Vector3(-61f, -21.5f, 406.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform4, LevelAssets.Enemies["Filth"], new Vector3(-51f, -21.5f, 416.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform4, LevelAssets.Enemies["Swordsmachine"], new Vector3(-69.5f, -21.5f, 396.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform4, LevelAssets.Enemies["Swordsmachine"], new Vector3(-26f, -21.5f, 406.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); Transform transform5 = EnemyFuncs.AddEnemyNoTrigger(transform4, LevelAssets.Enemies["Cerberus"], new Vector3(-61f, -21.5f, 426f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }).transform; transform5.localScale *= 0.9f; GameObject val7 = GeneralFuncs.MakeEmpty(transform, "GravitySwitcher Down"); val7.SetActive(false); ObjectActivatorFuncs.AddGravitySwitcher(val7, new Vector3(0f, -40f, 0f)); Util.ArrayAdd(ref val6.toActivate, val7); GameObject val8 = GeneralFuncs.MakeEmpty(transform, "Arena Ender"); val8.SetActive(false); ObjectActivatorFuncs.AddPortalBlocker(val8, "Portal In - ToRodent", unblock: true); ObjectActivatorFuncs.AddPortalBlocker(val8, "Portal In - RodentLoop"); Util.ArrayAdd(ref val6.toActivate, val8); Transform val9 = GeneralFuncs.FindInactive("CV11 - Hallway/CV11 Notstuff"); Collider[] componentsInChildren = ((Component)val9.Find("Arches")).GetComponentsInChildren(); foreach (Collider val10 in componentsInChildren) { val10.enabled = false; } Collider[] componentsInChildren2 = ((Component)val9.Find("Doors")).GetComponentsInChildren(); foreach (Collider val11 in componentsInChildren2) { val11.enabled = false; } MusicChanger component = ((Component)GeneralFuncs.FindInactive("7 - Castle Entrance/7 Nonstuff/MusicActivator")).GetComponent(); ((Component)component).gameObject.SetActive(false); GeneralFuncs.AddMusicChanger(trigger, component.battle, component.clean); CheckPoint component2 = ((Component)GeneralFuncs.FindInactive("Checkpoint")).GetComponent(); CheckpointFuncs.AddRoomToCheckpoint(transform, component2); ((Component)transform).GetComponent().checkpoint = component2; CheckPoint val12 = CheckpointFuncs.FindCheckpointByRoom("Checkpoint (1)", GeneralFuncs.FindInactive("7 - Castle Entrance")); GameObject[] rooms = val12.rooms; foreach (GameObject val13 in rooms) { if (((Object)val13).name.Contains("CV11 Stuff")) { Util.ArrayRemove(ref val12.rooms, val13); } } } public static void DoorTerminal() { //IL_0023: 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 roomTransform = GeneralFuncs.FindInactive("6 - Entrance Entrance"); string message = "NEMESIS COMMENTARY 7.1:\r\nCustom enemies obviously allow for even more possibilities than the base game. My goal is for them to make the overall experience of playing the mod more unique, memorable and difficult\r\n\r\nThese enemies having relatively simple mechanics means they can have a more clear function, and their usage won't be overly limited by outside factors"; ObjectFuncs.PlaceTerminalTestament(roomTransform, message, new Vector3(4.5f, -15f, 387f), Quaternion.Euler(0f, 270f, 180f)); } public static void BloodOrbCerberus() { //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_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) //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_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: 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_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) Transform transform = ((Component)GeneralFuncs.FindInactive("7 - Castle Entrance/7 Stuff/Enemies")).transform; Transform val = transform; ActivateArena component = ((Component)val.Find("Cube")).GetComponent(); ActivateNextWave component2 = ((Component)val).GetComponent(); Door component3 = ((Component)GeneralFuncs.FindInactive("LargeDoor (10)")).GetComponent(); ActivateNextWave val2 = WaveFuncs.AddActivation(val, (Door[])(object)new Door[1] { component3 }, component3, lastWave: false, 1, null, noActivationDelay: false, forEnemies: true); component.onlyWave = false; NemesisEnemy targetEnemy = new NemesisEnemy(val.Find("StatueEnemy")); NemesisEnemy idol = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Idol"], new Vector3(0f, -15.5f, 405f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, val2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy idol2 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Idol"], new Vector3(30f, -10.5f, 432f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy idol3 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Idol"], new Vector3(16.25f, 10.5f, 417f), Quaternion.Euler(0f, 0f, 180f), (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, val2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Virtue"], new Vector3(0f, -18.5f, 415f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); Transform transform2 = nemesisEnemy.transform; transform2.localScale *= 0.75f; NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Virtue"], new Vector3(34f, -5f, 432f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(nemesisEnemy); EnemyFuncs.AddStopper(nemesisEnemy2); EnemyFuncs.SetIdolTarget(targetEnemy, idol); EnemyFuncs.SetIdolTarget(nemesisEnemy, idol2); EnemyFuncs.SetIdolTarget(targetEnemy, idol3); } public static void FinalRoom() { //IL_00ca: 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Expected O, but got Unknown //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Expected O, but got Unknown //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_0434: 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_047e: Unknown result type (might be due to invalid IL or missing references) //IL_0483: 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_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_04ea: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0579: Unknown result type (might be due to invalid IL or missing references) //IL_057e: Unknown result type (might be due to invalid IL or missing references) //IL_05e5: Unknown result type (might be due to invalid IL or missing references) //IL_05ea: Unknown result type (might be due to invalid IL or missing references) //IL_062e: Unknown result type (might be due to invalid IL or missing references) //IL_0633: Unknown result type (might be due to invalid IL or missing references) //IL_0677: Unknown result type (might be due to invalid IL or missing references) //IL_067c: Unknown result type (might be due to invalid IL or missing references) //IL_06c7: Unknown result type (might be due to invalid IL or missing references) //IL_06cc: 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_036a: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Expected O, but got Unknown Transform val = GeneralFuncs.FindInactive("8 - Final Arena/8 Stuff"); ((Component)val.Find("Enemies")).gameObject.SetActive(false); Transform transform = GeneralFuncs.MakeEmpty(val, "Nemesis Enemies").transform; Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor (11)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("LargeDoor (6)")).GetComponent(); Door component3 = ((Component)GeneralFuncs.FindInactive("LargeDoor (7)")).GetComponent(); Door[] doors = (Door[])(object)new Door[3] { component, component2, component3 }; CheckPoint val2 = CheckpointFuncs.FindCheckpointByRoom("Checkpoint (1)", GeneralFuncs.FindInactive("7 - Castle Entrance")); Util.ArrayAdd(ref component.activatedRooms, ((Component)GeneralFuncs.FindInactive("1 - First Room")).gameObject); Portal portal1 = PortalFuncs.MakePortal("WindowLeft", PortalFuncs.MakePortalSide(null, new Vector3(-17f, 0f, 483f), GeneralFuncs.Quat_270), PortalFuncs.MakePortalSide(null, new Vector3(0f, 18.5f, 302.5f), GeneralFuncs.Quat_180), new Vector2(9.5f, 25f)); PortalFuncs.SetPortalVisibility(portal1, isPlayerVisible: true, canSeeItself: true, appearsInRecursions: true, 1); PortalFuncs.BlockPortal(portal1); Portal portal2 = PortalFuncs.MakePortal("WindowRight", PortalFuncs.MakePortalSide(null, new Vector3(17f, 0f, 483f), GeneralFuncs.Quat_90), PortalFuncs.MakePortalSide(null, new Vector3(0f, -2.5f, 377f), GeneralFuncs.Quat_0), new Vector2(9.5f, 25f)); PortalFuncs.SetPortalVisibility(portal2, isPlayerVisible: true, canSeeItself: true, appearsInRecursions: true, 1); PortalFuncs.BlockPortal(portal2); val2.onRestart.AddListener((UnityAction)delegate { PortalFuncs.BlockPortal(portal1); }); val2.onRestart.AddListener((UnityAction)delegate { PortalFuncs.BlockPortal(portal2); }); Transform val3 = GeneralFuncs.FindInactive("8 - Final Arena/8 Nonstuff/Decorations"); ((Component)val3.Find("Cube (70)")).gameObject.SetActive(false); ((Component)val3.Find("Cube (70)(Clone)")).gameObject.SetActive(false); GameObject trigger = ArenaFuncs.MakeTrigger(transform, "Enemies", new Vector3(20f, -15f, 478f), new Vector3(-20f, 15f, 488f)); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Wave 1").transform; ActivateArena val4 = ArenaFuncs.AddArena(trigger, doors); ActivateNextWave val5 = WaveFuncs.AddActivation(transform2, doors, null, lastWave: true, 0); ActivateNextWave val6 = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false, 1, null, noActivationDelay: false, forEnemies: true); ActivateNextWave val7 = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false, 2, null, noActivationDelay: false, forEnemies: true); ActivateNextWave val8 = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false, 3, null, noActivationDelay: false, forEnemies: true); Transform val9 = GeneralFuncs.FindInactive("8 - Final Arena/8 Stuff/FinalRoom/FinalDoor/FinalDoorOpener"); Util.ArrayAdd(ref val5.toActivate, ((Component)val9).gameObject); GameObject val10 = GeneralFuncs.MakeEmpty(transform, "Portal Blocker"); val10.SetActive(false); ObjectActivatorFuncs.AddPortalBlocker(val10, "Portal In - WindowLeft", unblock: true); ObjectActivatorFuncs.AddPortalBlocker(val10, "Portal In - WindowRight", unblock: true); ObjectActivatorFuncs.AddPortalBlocker(val10, "Portal In - ToRodent"); ObjectActivatorFuncs.AddObjectActivator(trigger, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { val10 })); UnityEvent onRestart = val2.onRestart; object obj = <>c.<>9__11_2; if (obj == null) { UnityAction val11 = delegate { PortalFuncs.BlockPortal(((Component)GeneralFuncs.FindInactive("Portal In - ToRodent")).GetComponent(), unblock: true); }; <>c.<>9__11_2 = val11; obj = (object)val11; } onRestart.AddListener((UnityAction)obj); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Sentry"], new Vector3(0f, 8.5f, 333f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateArena[])(object)new ActivateArena[1] { val4 }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Sentry"], new Vector3(0f, -13.5f, 340f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateArena[])(object)new ActivateArena[1] { val4 }), stopDashing: true, stopWalking: true); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Idol"], new Vector3(-25.5f, 2.5f, 332f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }); NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["HideousMass"], new Vector3(0f, -14.2f, 359f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }); Transform transform3 = nemesisEnemy2.transform; transform3.localScale *= 0.8f; NemesisEnemy nemesisEnemy3 = EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Idol"], new Vector3(0f, -10.5f, 310f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }); NemesisEnemy nemesisEnemy4 = EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Idol"], new Vector3(-17.5f, 4.5f, 470.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }); NemesisEnemy nemesisEnemy5 = EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Idol"], new Vector3(17.5f, 4.5f, 495.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val6 }); EnemyFuncs.SetIdolTarget(nemesisEnemy2, new NemesisEnemy[4] { nemesisEnemy, nemesisEnemy3, nemesisEnemy4, nemesisEnemy5 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["BlackHoleLauncher"], new Vector3(0f, -14.5f, 326f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val7 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Providence"], new Vector3(7.5f, 6f, 482f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val8 }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Gutterman"], new Vector3(0f, -15f, 482f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val8 }), stopDashing: true, stopWalking: true); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Mindflayer"], new Vector3(-7.5f, 2f, 482f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val8 }); } public static void FlippedTerminal() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) string message = "NEMESIS COMMENTARY 7.2:\r\nHello"; ObjectFuncs.PlaceTerminalTestament(null, message, new Vector3(0f, 117.2f, 248.5f), Quaternion.Euler(0f, 0f, 0f), hasMusic: false, 0.3f); } } public static class PatchLevel1_3 { [CompilerGenerated] private static class <>O { public static UnityAction <0>__RedPathLavaRoomBreakStuff; } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__10_0; public static UnityAction <>9__10_1; public static UnityAction <>9__25_0; internal void b__10_0() { ComponentExtensions.GetOrAddComponent((Component)(object)MonoSingleton.Instance); } internal void b__10_1() { VariableDelay.ActivateAll("RedPathLavaRoomGoBack"); } internal void b__25_0() { VariableDelay.ActivateAll("Boss"); } } public static int[] killRanks = new int[4] { 25, 50, 75, 100 }; public static int[] styleRanks = new int[4] { 30000, 40000, 50000, 60000 }; public static int[] timeRanks = new int[4] { 900, 780, 680, 600 }; private static bool brokeStuff = false; public static void Patch() { brokeStuff = false; Plugin.DisableEnemyVertexLighting = true; FirstRoom(); BalconySecretTerminal(); RedPathFirstRoom(); RedPathLavaRoom(); RedPathSkullRoom(); RedPathLavaRoomGoBack(); RedPathFirstRoomGoBack(); RedPathSurpriseCerberus(); BluePathSetup(); BluePathSoapRoom(); BluePathLavaStaircase(); BluePathLavaWaterfall(); BluePathSkullRoom(); BluePathBlueStaircase(); BluePathSmallBlueRoom(); AgonyTundraRoom(); BossRoom(); CheckpointFuncs.UpdateAllRoomsInCheckpoints(); } public static void FirstRoom() { //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("1 - Water Hall/1 Nonstuff"); GameObject gameObject = ((Component)val.Find("Cube")).gameObject; Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor (2)")).GetComponent(); GameObject val2 = GeneralFuncs.MakeEmpty(val, "New Hud Message"); val2.SetActive(false); ObjectActivatorFuncs.AddHudMessage(val2, "actually you need both skulls + a torch", timed: true, 4f, silent: false, colliderless: true); ObjectActivatorFuncs.AddObjectActivator(gameObject, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { val2 }), 0.65f); ItemPlaceZone component2 = ((Component)GeneralFuncs.FindInactive("1 - Water Hall/1 Nonstuff/Altar (Red)/Cube")).GetComponent(); ItemPlaceZone component3 = ((Component)GeneralFuncs.FindInactive("1 - Water Hall/1 Nonstuff/Altar (Blue)/Cube/")).GetComponent(); ObjectFuncs.AddDoorHelper((Door[])(object)new Door[1] { component }, component2); ObjectFuncs.AddDoorHelper((Door[])(object)new Door[1] { component }, component3); ObjectFuncs.PlaceAltarTorch(val, hasTorch: false, new Vector3(0f, -10.5f, 355.5f), GeneralFuncs.Quat_90, (Door[])(object)new Door[1] { component }); } public static void BalconySecretTerminal() { //IL_0023: 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 roomTransform = GeneralFuncs.FindInactive("R1 - Courtyard/R1 Nonstuff"); string message = "NEMESIS COMMENTARY 8:\r\nSome specific enemies don't get puppeted by Deathcatchers on purpose as part of an encounter's design. You can see this in the room at the end of 0-1 with the Flesh Prison Eyes, or in the 0-4 red skull room where one of the Sentries doesn't respawn to balance the fight\r\n\r\nAnd on top of that, some enemy types become able to respawn when they normally can't, like the Malicious Spawn in the red skull arena in 1-3"; ObjectFuncs.PlaceTerminalTestament(roomTransform, message, new Vector3(-0.5f, 14.5f, 369f), Quaternion.Euler(0f, 0f, 180f), hasMusic: false, 0.02f); } public static void RedPathFirstRoom() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_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_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: 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_0306: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("R1 - Courtyard/R1 Stuff"); ((Component)val.Find("Enemies")).gameObject.SetActive(false); Transform transform = GeneralFuncs.MakeEmpty(val, "Nemesis Enemies").transform; Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor (1)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("LargeDoor (11)")).GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component, component2 }; GameObject trigger = ArenaFuncs.MakeTrigger(transform, "Enemies", new Vector3(-44.5f, -15.5f, 340f), new Vector3(-39.5f, 24.5f, 400f)); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Wave 1").transform; ActivateArena val2 = ArenaFuncs.AddArena(trigger, doors); ArenaFuncs.SetArenaDelay(val2, 2f); ActivateNextWave val3 = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false, 0); ObjectActivatorFuncs.AddObjectActivator(trigger, ObjectActivatorFuncs.MakeUltrakillEvent(null, (GameObject[])(object)new GameObject[1] { ((Component)GeneralFuncs.FindInactive("1 - Water Hall")).gameObject }), 0f, oneTime: false); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Watchtower"], new Vector3(-38f, -10.5f, 372f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }, spawnEffect: true, bossBar: true); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Cerberus"], new Vector3(-36f, -10.5f, 345f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Virtue"], new Vector3(-66f, -5.5f, 342f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); Transform transform3 = GeneralFuncs.MakeEmpty(transform, "Wave 2").transform; ActivateNextWave val4 = WaveFuncs.AddActivation(transform3, doors, component2, lastWave: true, 0); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Watchtower"], new Vector3(-53.5f, -15.5f, 377f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Watchtower"], new Vector3(-53.5f, -15f, 347.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); NemesisEnemy idol = EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Idol"], new Vector3(-66f, 4f, 367.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); NemesisEnemy targetEnemy = EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Sentry"], new Vector3(-9f, 14.5f, 382f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.SetIdolTarget(targetEnemy, idol); string message = "WATCHTOWER: fires fast predictive projectiles. Parry the orb at the top for significant damage"; ObjectActivatorFuncs.AddHudMessage(trigger, message); GameObject val5 = GeneralFuncs.MakeEmpty(transform, "Arena End Message"); val5.SetActive(false); string message2 = "Parrying a Watchtower projectile makes the rest of them unparriable"; ObjectActivatorFuncs.AddHudMessage(val5, message2, timed: true, 4f, silent: false, colliderless: true); Util.ArrayAdd(ref val4.toActivate, val5); ObjectActivatorFuncs.AddObjectActivator(val5, ObjectActivatorFuncs.MakeUltrakillEvent(null, (GameObject[])(object)new GameObject[1] { val5 }), 0f, oneTime: true, nonCollider: true); } public static void RedPathLavaRoom() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: 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_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: 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_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: 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_0344: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: 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_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("R2 - Second Arena/R2 Stuff"); ((Component)val.Find("Enemies")).gameObject.SetActive(false); Transform transform = GeneralFuncs.MakeEmpty(val, "Nemesis Enemies").transform; Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor (11)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("LargeDoor (12)")).GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component, component2 }; GameObject trigger = ArenaFuncs.MakeTrigger(transform, "Enemies", new Vector3(-116.5f, -15.5f, 325f), new Vector3(-96.5f, 44.5f, 415f)); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Wave 1").transform; ActivateArena val2 = ArenaFuncs.AddArena(trigger, doors); ActivateNextWave val3 = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false, 0); ActivateNextWave val4 = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false, 1); ObjectActivatorFuncs.AddObjectActivator(trigger, ObjectActivatorFuncs.MakeUltrakillEvent(null, (GameObject[])(object)new GameObject[2] { ((Component)GeneralFuncs.FindInactive("R1 - Courtyard")).gameObject, ((Component)GeneralFuncs.FindInactive("1 - Water Hall")).gameObject }), 0f, oneTime: false); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["BlackHoleLauncher"], new Vector3(-107.5f, 4.5f, 390f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["BlackHoleLauncher"], new Vector3(-107.5f, 4.5f, 350f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Swordsmachine"], new Vector3(-129.5f, 9.5f, 390f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Watchtower"], new Vector3(-126.5f, -0.5f, 350f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Stray"], new Vector3(-99.5f, 25.5f, 370f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Stray"], new Vector3(-109.5f, 26.5f, 360f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Stray"], new Vector3(-119.5f, 25.5f, 370f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Stray"], new Vector3(-109.5f, 26.5f, 380f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); Transform transform3 = GeneralFuncs.MakeEmpty(transform, "Wave 2").transform; ActivateNextWave val5 = WaveFuncs.AddActivation(transform3, doors, component2, lastWave: true, 0); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Providence"], new Vector3(-96f, 12f, 370f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["RocketLauncher"], new Vector3(-89.5f, 9.5f, 342.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["RocketLauncher"], new Vector3(-129.5f, 9.5f, 397.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["MirrorReaper"], new Vector3(-78f, 20.5f, 370f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddStopper(nemesisEnemy); EnemyFuncs.AddMover(nemesisEnemy.gameObject, nemesisEnemy.transform, 9999f).MoveXYZ().TargetXYZ(-96f, 12f, 370f); Transform val6 = transform.root.Find("R2 Nonstuff"); Transform[] children = Extensions.GetChildren(val6.Find("Floor")); foreach (Transform val7 in children) { ((Component)val7).gameObject.SetActive(false); } } public static void RedPathSkullRoom() { //IL_0085: 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_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0500: Unknown result type (might be due to invalid IL or missing references) //IL_0545: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_0593: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: Unknown result type (might be due to invalid IL or missing references) //IL_05e6: Unknown result type (might be due to invalid IL or missing references) //IL_062f: Unknown result type (might be due to invalid IL or missing references) //IL_0634: Unknown result type (might be due to invalid IL or missing references) //IL_067e: Unknown result type (might be due to invalid IL or missing references) //IL_0683: Unknown result type (might be due to invalid IL or missing references) //IL_06b3: Unknown result type (might be due to invalid IL or missing references) //IL_06b8: Unknown result type (might be due to invalid IL or missing references) //IL_072c: Unknown result type (might be due to invalid IL or missing references) //IL_079d: Unknown result type (might be due to invalid IL or missing references) //IL_07a2: Unknown result type (might be due to invalid IL or missing references) //IL_082f: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_09be: Unknown result type (might be due to invalid IL or missing references) //IL_09c8: Expected O, but got Unknown //IL_09d7: Unknown result type (might be due to invalid IL or missing references) //IL_09e1: Expected O, but got Unknown //IL_09f0: Unknown result type (might be due to invalid IL or missing references) //IL_09fa: Expected O, but got Unknown //IL_0a09: Unknown result type (might be due to invalid IL or missing references) //IL_0a13: Expected O, but got Unknown Transform val = GeneralFuncs.FindInactive("R3 - Final Arena/R3 Stuff"); ((Component)val.Find("Enemies")).gameObject.SetActive(false); Transform transform = GeneralFuncs.MakeEmpty(val, "Nemesis Enemies").transform; Door doorBack = ((Component)GeneralFuncs.FindInactive("LargeDoor (12)")).GetComponent(); Door[] doors = (Door[])(object)new Door[1] { doorBack }; CheckPoint component = ((Component)GeneralFuncs.FindInactive("Checkpoint (1)")).GetComponent(); GameObject trigger = ArenaFuncs.MakeTrigger(transform, "Enemies", new Vector3(-168f, -1.5f, 387.5f), new Vector3(-228f, 45f, 400f)); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Wave 1").transform; ActivateArena val2 = ArenaFuncs.AddArena(trigger, doors); ActivateNextWave val3 = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false, 0); ActivateNextWave val4 = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false, 0); GameObject val5 = GeneralFuncs.MakeEmpty(transform.root, "HudMessage"); val5.SetActive(false); ObjectActivatorFuncs.AddHudMessage(val5, "you know malface instakills right", timed: true, 3f, silent: false, colliderless: true); ObjectActivatorFuncs.AddObjectActivator(trigger, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { val5 }, (GameObject[])(object)new GameObject[1] { ((Component)GeneralFuncs.FindInactive("R2 - Second Arena")).gameObject }), 0f, oneTime: false); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Idol"], new Vector3(-198f, -1f, 394.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["BlackHoleLauncher"], new Vector3(-198f, 14.5f, 415f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.ApplyRadiance(nemesisEnemy2, buffSpeed: false, buffHealth: false, buffDamage: true); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Virtue"], new Vector3(-212f, 5.5f, 385f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[2] { val3, val4 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Virtue"], new Vector3(-171f, 25f, 345f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[2] { val3, val4 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["MaliciousFace"], new Vector3(-198f, 9.5f, 345f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[2] { val3, val4 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["MaliciousFace"], new Vector3(-218f, 24.5f, 434.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[2] { val3, val4 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["MaliciousFace"], new Vector3(-223f, 9.5f, 395f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[2] { val3, val4 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["MaliciousFace"], new Vector3(-172.5f, 4.5f, 370f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[2] { val3, val4 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.SetIdolTarget(nemesisEnemy2, nemesisEnemy); GameObject val6 = GeneralFuncs.MakeEmpty(transform2, "IdolMover"); val6.SetActive(false); EnemyFuncs.AddMover(val6, nemesisEnemy.transform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, 9f); Util.ArrayAdd(ref val4.toActivate, val6); Transform transform3 = GeneralFuncs.MakeEmpty(transform, "Wave 2").transform; ActivateNextWave val7 = WaveFuncs.AddActivation(transform3, doors, null, lastWave: true, 0); ActivateNextWave val8 = WaveFuncs.AddActivation(transform3, Array.Empty(), null, lastWave: false, 2, null, noActivationDelay: false, forEnemies: true); ActivateNextWave val9 = WaveFuncs.AddActivation(transform3, Array.Empty(), null, lastWave: false, 0, null, noActivationDelay: false, forEnemies: true); NemesisEnemy nemesisEnemy3 = EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["DeathcatcherCase"], new Vector3(-199.5f, 24.5f, 436f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val7 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); NemesisEnemy nemesisEnemy4 = EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["DeathcatcherCase"], new Vector3(-191.5f, 24.5f, 436f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val7 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Mannequin"], new Vector3(-196f, 14.5f, 414f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[2] { val7, val9 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Power"], new Vector3(-197.5f, 20f, 370f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[2] { val7, val9 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["Ferryman"], new Vector3(-223f, 4.5f, 370f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[2] { val7, val9 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); NemesisEnemy nemesisEnemy5 = EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["HideousMass"], new Vector3(-197f, -0.5f, 370f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[2] { val7, val9 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val8 }); EnemyFuncs.AddEnemyNoTrigger(transform3, LevelAssets.Enemies["EyeMalicious"], new Vector3(-223f, 26f, 346f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[2] { val7, val9 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val8 }); nemesisEnemy5 = EnemyFuncs.MakeEnemyScale(nemesisEnemy5, 0.9f * Vector3.one, "Mass"); Util.ArrayAdd(ref val9.toActivate, (GameObject[])(object)new GameObject[2] { ((Component)nemesisEnemy3.transform.Find("Opener")).gameObject, ((Component)nemesisEnemy4.transform.Find("Opener")).gameObject }); Transform val10 = GeneralFuncs.FindInactive("R3 - Final Arena/R3 Nonstuff/Altar"); val10.position = new Vector3(-198f, 16.25f, 421.25f); GameObject val11 = GeneralFuncs.MakeEmpty(transform3, "AltarMover"); val11.SetActive(false); EnemyFuncs.AddMover(val11, val10).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, 26.25f); Util.ArrayAdd(ref val7.toActivate, val11); CheckPoint val12 = CheckpointFuncs.MakeCheckpoint("RedPath GoBack", new Vector3(-167.5f, 4.5f, 370f), GeneralFuncs.Quat_90, ((Component)transform.root).gameObject, (Door[])(object)new Door[2] { doorBack, ((Component)GeneralFuncs.FindInactive("LargeDoor (11)")).GetComponent() }, Array.Empty(), new List(), reusable: false, inheritAllRooms: true, forceOff: true); GameObject checkpointTurnOn = GeneralFuncs.MakeEmpty(((Component)val12).transform, "CheckpointTurnOn"); checkpointTurnOn.SetActive(false); ObjectActivatorFuncs.AddCheckpointTurnOn(checkpointTurnOn, val12); CheckPoint val13 = CheckpointFuncs.MakeCheckpoint("RedPath GoBack 2", new Vector3(-67.5f, 4.5f, 370f), GeneralFuncs.Quat_90, ((Component)GeneralFuncs.FindInactive("R1 - Courtyard")).gameObject, (Door[])(object)new Door[3] { ((Component)GeneralFuncs.FindInactive("LargeDoor (1)")).GetComponent(), ((Component)GeneralFuncs.FindInactive("LargeDoor (11)")).GetComponent(), ((Component)GeneralFuncs.FindInactive("LargeDoor")).GetComponent() }, Array.Empty(), new List(), reusable: false, inheritAllRooms: true, forceOff: true); GameObject checkpointTurnOn2 = GeneralFuncs.MakeEmpty(((Component)val13).transform, "CheckpointTurnOn"); checkpointTurnOn2.SetActive(false); ObjectActivatorFuncs.AddCheckpointTurnOn(checkpointTurnOn2, val13); GameObject val14 = GeneralFuncs.MakeEmpty(null, "RedPath GoBack ArenaStatus"); ArenaStatus orAddComponent = GameObjectExtensions.GetOrAddComponent(val14); orAddComponent.currentStatus = 0; ObjectActivationCheck orAddComponent2 = GameObjectExtensions.GetOrAddComponent(val14); orAddComponent2.readyToActivate = false; GameObject val15 = GeneralFuncs.MakeEmpty(transform.root, "ArenaStatusUpdater1"); val15.SetActive(false); ObjectActivatorFuncs.AddArenaStatusUpdater(val15, orAddComponent); ObjectActivatorFuncs.AddObacReadier(val15, orAddComponent2); Util.ArrayAdd(ref val7.toActivate, (GameObject[])(object)new GameObject[4] { ((Component)GeneralFuncs.FindInactive("R2 - Second Arena")).gameObject, checkpointTurnOn, checkpointTurnOn2, val15 }); GameObject arenaStatusUpdater0 = GeneralFuncs.MakeEmpty(transform.root, "ArenaStatusUpdater0"); arenaStatusUpdater0.SetActive(false); ObjectActivatorFuncs.AddArenaStatusUpdater(arenaStatusUpdater0, orAddComponent, 0); ObjectActivatorFuncs.AddObacReadier(arenaStatusUpdater0, orAddComponent2, makeReady: false); component.onRestart.AddListener((UnityAction)delegate { checkpointTurnOn.SetActive(false); }); component.onRestart.AddListener((UnityAction)delegate { checkpointTurnOn2.SetActive(false); }); component.onRestart.AddListener((UnityAction)delegate { arenaStatusUpdater0.SetActive(true); }); component.onRestart.AddListener((UnityAction)delegate { doorBack.Unlock(); }); Breakable componentInChildren = ((Component)GeneralFuncs.FindInactive("R3 - Final Arena/R3 Stuff/Breakable Wall")).GetComponentInChildren(); Object.Destroy((Object)(object)componentInChildren); } public static void RedPathLavaRoomGoBack() { //IL_0069: 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_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0193: 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_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_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_02cc: 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_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_0436: 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_0441: Expected O, but got Unknown //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_046d: Expected O, but got Unknown //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_0499: Expected O, but got Unknown Transform parent = GeneralFuncs.FindInactive("R2 - Second Arena/R2 Stuff"); Transform transform = GeneralFuncs.MakeEmpty(parent, "Nemesis GoBack").transform; Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor (11)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("LargeDoor (12)")).GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component, component2 }; float delay = 1.25f; GameObject trigger = ArenaFuncs.MakeTrigger(transform, "Enemies", new Vector3(-116.5f, -15.5f, 325f), new Vector3(-146.5f, 44.5f, 415f)); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Wave 1").transform; ArenaStatus component3 = ((Component)GeneralFuncs.FindInactive("RedPath GoBack ArenaStatus")).GetComponent(); ActivateArena val = ArenaFuncs.AddArena(trigger, doors, onlyWave: false, component3, 1); ArenaDelay targetComponent = ArenaFuncs.SetArenaDelay(val, delay); ActivateNextWave val2 = WaveFuncs.AddActivation(transform2, doors, null, lastWave: true, 0); ActivateNextWave val3 = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false, 2, null, noActivationDelay: false, forEnemies: true); HurtZone component4 = ((Component)GeneralFuncs.FindInactive("R2 - Second Arena/R2 Nonstuff/Lava")).GetComponent(); List ignoredEnemyTypes = component4.ignoredEnemyTypes; EnemyType[] array = new EnemyType[4]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); ignoredEnemyTypes.AddRange(new <>z__ReadOnlyArray((EnemyType[])(object)array)); component4.setDamage = 35f; EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Mindflayer"], new Vector3(-117f, 12f, 345f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { val }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Providence"], new Vector3(-105f, 33.5f, 370f), Quaternion.Euler(45f, 270f, 0f), (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { val }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Mindflayer"], new Vector3(-117f, 12f, 395f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { val }); ComponentExtensions.GetOrAddComponent((Component)(object)EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["PowerNoEffect"], new Vector3(-107f, 10f, 370f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }).eid); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Watchtower"], new Vector3(-117f, -7f, 370f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); GameObject val4 = Object.Instantiate(LevelAssets.Objects["HookpointProvidence"], new Vector3(-116f, 29f, 401f), Quaternion.identity); val4.transform.SetParent(transform2); val4.SetActive(false); Util.ArrayAdd(ref val.enemies, val4); GameObject val5 = Object.Instantiate(LevelAssets.Objects["HookpointGreen"], new Vector3(-77f, 12f, 370f), GeneralFuncs.Quat_0); val5.transform.SetParent(transform); HookPoint component5 = val5.GetComponent(); component5.Start(); component5.Deactivate(); val5.SetActive(false); Util.ArrayAdd(ref val.enemies, val5); Util.ArrayAdd(ref val2.toActivate, ((Component)val5.transform.Find("Activator")).gameObject); GameObject val6 = GeneralFuncs.MakeEmpty(transform, "HudMessage"); val6.SetActive(false); ObjectActivatorFuncs.AddHudMessage(val6, "In-air fight! Jump now!", timed: true, 2f, silent: false, colliderless: true); ObjectActivatorFuncs.AddObjectActivator(trigger, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { val6 }), 0f, oneTime: true, nonCollider: false, ((Component)GeneralFuncs.FindInactive("RedPath GoBack ArenaStatus")).GetComponent()); GameObject val7 = GeneralFuncs.MakeEmpty(transform.root, "Breaker"); val7.SetActive(false); ActionOnEnable actionOnEnable = val7.AddComponent(); UnityEvent unityEvent = actionOnEnable.unityEvent; object obj = <>O.<0>__RedPathLavaRoomBreakStuff; if (obj == null) { UnityAction val8 = RedPathLavaRoomBreakStuff; <>O.<0>__RedPathLavaRoomBreakStuff = val8; obj = (object)val8; } unityEvent.AddListener((UnityAction)obj); UnityEvent unityEvent2 = actionOnEnable.unityEvent; object obj2 = <>c.<>9__10_0; if (obj2 == null) { UnityAction val9 = delegate { ComponentExtensions.GetOrAddComponent((Component)(object)MonoSingleton.Instance); }; <>c.<>9__10_0 = val9; obj2 = (object)val9; } unityEvent2.AddListener((UnityAction)obj2); UnityEvent unityEvent3 = actionOnEnable.unityEvent; object obj3 = <>c.<>9__10_1; if (obj3 == null) { UnityAction val10 = delegate { VariableDelay.ActivateAll("RedPathLavaRoomGoBack"); }; <>c.<>9__10_1 = val10; obj3 = (object)val10; } unityEvent3.AddListener((UnityAction)obj3); ObjectActivator val11 = ObjectActivatorFuncs.AddObjectActivator(trigger, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { val7 }), delay, oneTime: true, nonCollider: false, ((Component)GeneralFuncs.FindInactive("RedPath GoBack ArenaStatus")).GetComponent()); GeneralFuncs.AddVariableDelay((Component)(object)targetComponent, "RedPathLavaRoomGoBack", 0.5f); } public static void RedPathLavaRoomBreakStuff() { if (brokeStuff) { return; } Transform val = GeneralFuncs.FindInactive("R2 - Second Arena"); Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor (11)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("LargeDoor (12)")).GetComponent(); Transform val2 = val.Find("R2 Nonstuff"); string[] array = new string[5] { "Platforms", "Entrance", "Exit", "Decorations", "Supports" }; string[] array2 = array; foreach (string text in array2) { BreakAllChildColliders(val2.Find(text)); } Transform[] children = Extensions.GetChildren(val2.Find("Floor")); foreach (Transform val3 in children) { BreakCollider(((Component)val3).GetComponent()); } Transform val4 = val2.Find("Skybox"); Transform val5 = val4.Find("Wall 2"); ((Component)((Component)val5).GetComponentInChildren(true)).gameObject.SetActive(false); Transform[] children2 = Extensions.GetChildren(val5); foreach (Transform val6 in children2) { if ((!(((Object)val6).name == "Cube (3)") && !(((Object)val6).name == "Cube(Clone)")) || ((Component)val6).gameObject.layer != LayerMask.NameToLayer("Environment")) { BreakAllChildColliders(val6, LevelAssets.Particles["BreakMetal"]); } } Transform val7 = val4.Find("Wall 1"); ((Component)((Component)val7).GetComponentInChildren(true)).gameObject.SetActive(false); Transform[] children3 = Extensions.GetChildren(val7); foreach (Transform val8 in children3) { if ((!(((Object)val8).name == "Cube (2)") && !(((Object)val8).name == "Cube")) || ((Component)val8).gameObject.layer != LayerMask.NameToLayer("Environment")) { BreakAllChildColliders(val8, LevelAssets.Particles["BreakMetal"]); } } BreakAllChildColliders(((Component)component2).transform.Find("DoorFrame/Side 1")); BreakAllChildColliders(((Component)component).transform.Find("DoorFrame/Side 1")); brokeStuff = true; } public static void BreakAllChildColliders(Transform transform, GameObject breakParticle = null) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown Collider[] componentsInChildren = ((Component)transform).GetComponentsInChildren(true); foreach (Collider val in componentsInChildren) { if ((Object)(object)((Component)((Component)val).transform.parent).GetComponentInParent(true) != (Object)null) { breakParticle = new GameObject("break particle placeholder"); breakParticle.SetActive(false); GameObjectExtensions.GetOrAddComponent(breakParticle); } BreakCollider(val, breakParticle ?? LevelAssets.Particles["BreakBig"]); } } public static void BreakCollider(Collider collider, GameObject breakParticle = null) { Breakable val = ObjectManipulationFuncs.MakeObjectBreakable(((Component)collider).gameObject, breakParticle ?? LevelAssets.Particles["BreakBig"], weak: true, breakOnTouch: true); val.ForceBreak(); } public static void RedPathFirstRoomGoBack() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_0233: 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_0287: 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_0343: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) Transform parent = GeneralFuncs.FindInactive("R1 - Courtyard/R1 Stuff"); Transform transform = GeneralFuncs.MakeEmpty(parent, "Nemesis GoBack").transform; Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor (1)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("LargeDoor (11)")).GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component, component2 }; GameObject trigger = ArenaFuncs.MakeTrigger(transform, "Enemies", new Vector3(-44.5f, -15.5f, 340f), new Vector3(-39.5f, 24.5f, 400f)); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Wave 1").transform; ArenaStatus component3 = ((Component)GeneralFuncs.FindInactive("RedPath GoBack ArenaStatus")).GetComponent(); ActivateArena val = ArenaFuncs.AddArena(trigger, doors, onlyWave: false, component3, 1); ActivateNextWave val2 = WaveFuncs.AddActivation(transform2, doors, null, lastWave: true, 0); ActivateNextWave val3 = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false, 0, null, noActivationDelay: false, forEnemies: true); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Idol"], new Vector3(-46f, -11f, 345f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { val }); NemesisEnemy targetEnemy = EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Virtue"], new Vector3(-45.5f, 6f, 362.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { val }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Sentry"], new Vector3(-35f, -10.5f, 369f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[2] { val2, val3 }, (ActivateArena[])(object)new ActivateArena[1] { val }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Sentry"], new Vector3(-58f, 4.25f, 397f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[2] { val2, val3 }, (ActivateArena[])(object)new ActivateArena[1] { val }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Sentry"], new Vector3(-68f, 9.5f, 345f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[2] { val2, val3 }, (ActivateArena[])(object)new ActivateArena[1] { val }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Sentry"], new Vector3(-66f, -15.2f, 362.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[2] { val2, val3 }, (ActivateArena[])(object)new ActivateArena[1] { val }), stopDashing: true, stopWalking: true); EnemyFuncs.SetIdolTarget(targetEnemy, nemesisEnemy); GameObject val4 = GeneralFuncs.MakeEmpty(transform2, "IdolMover"); val4.SetActive(false); EnemyFuncs.AddMover(val4, nemesisEnemy.transform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, -1f); Util.ArrayAdd(ref val3.toActivate, val4); GameObject val5 = GeneralFuncs.MakeEmpty(transform, "GravitySwitcher Sideways"); val5.SetActive(false); ObjectActivatorFuncs.AddGravitySwitcher(val5, new Vector3(0f, 28.3f, -28.3f)); ObjectActivatorFuncs.AddObjectActivator(trigger, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[1] { val5 }), 0f, oneTime: true, nonCollider: false, ((Component)GeneralFuncs.FindInactive("RedPath GoBack ArenaStatus")).GetComponent()); GameObject val6 = GeneralFuncs.MakeEmpty(transform, "GravitySwitcher Down"); val6.SetActive(false); ObjectActivatorFuncs.AddGravitySwitcher(val6, new Vector3(0f, -40f, 0f)); Util.ArrayAdd(ref val2.toActivate, val6); } public static void RedPathSurpriseCerberus() { //IL_0096: 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_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_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_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_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: 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_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Expected O, but got Unknown Transform parent = GeneralFuncs.FindInactive("1 - Water Hall/1 Stuff"); Transform transform = GeneralFuncs.MakeEmpty(parent, "Nemesis Enemies").transform; Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor (1)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("LargeDoor")).GetComponent(); Door component3 = ((Component)GeneralFuncs.FindInactive("LargeDoor (2)")).GetComponent(); Door component4 = ((Component)GeneralFuncs.FindInactive("LargeDoor (13)")).GetComponent(); Door[] doors = (Door[])(object)new Door[4] { component, component2, component3, component4 }; GameObject trigger = ArenaFuncs.MakeTrigger(transform, "Enemies", new Vector3(-10f, -10.5f, 359f), new Vector3(10f, 28f, 300f)); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Wave 1").transform; ArenaStatus component5 = ((Component)GeneralFuncs.FindInactive("RedPath GoBack ArenaStatus")).GetComponent(); ActivateArena val = ArenaFuncs.AddArena(trigger, doors, onlyWave: false, component5, 1); ActivateNextWave val2 = WaveFuncs.AddActivation(transform2, doors, null, lastWave: true, 0); Transform val3 = GeneralFuncs.FindInactive("1 - Water Hall/1 Nonstuff/Decorations"); GameObject[] statues = (GameObject[])(object)new GameObject[4] { ((Component)val3.Find("Statue (2)")).gameObject, ((Component)val3.Find("Statue (3)")).gameObject, ((Component)val3.Find("Statue (4)")).gameObject, ((Component)val3.Find("Statue (5)")).gameObject }; EnemyFuncs.AddCerberusStatue(transform2, new Vector3(-17f, -12f, 312.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { val }); EnemyFuncs.AddCerberusStatue(transform2, new Vector3(-17f, -12f, 327.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { val }); EnemyFuncs.AddCerberusStatue(transform2, new Vector3(17f, -12f, 312.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { val }); EnemyFuncs.AddCerberusStatue(transform2, new Vector3(17f, -12f, 327.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, (ActivateArena[])(object)new ActivateArena[1] { val }); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Tower"], new Vector3(-12.5f, -10.5f, 357f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, Array.Empty()); NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Tower"], new Vector3(12.5f, -10.5f, 357f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, Array.Empty()); NemesisEnemy nemesisEnemy3 = EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Gutterman"], new Vector3(0f, -2f, 273f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val2 }, Array.Empty()); ObjectActivatorFuncs.AddObjectActivator(trigger, ObjectActivatorFuncs.MakeUltrakillEvent(null, statues), 0f, oneTime: true, nonCollider: false, ((Component)GeneralFuncs.FindInactive("RedPath GoBack ArenaStatus")).GetComponent()); ObjectActivatorFuncs.AddObjectActivator(trigger, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[3] { nemesisEnemy.gameObject, nemesisEnemy2.gameObject, nemesisEnemy3.gameObject }), 4.5f, oneTime: true, nonCollider: false, ((Component)GeneralFuncs.FindInactive("RedPath GoBack ArenaStatus")).GetComponent()); CheckPoint component6 = ((Component)GeneralFuncs.FindInactive("CheckpointNemesis RedPath GoBack 2")).GetComponent(); component6.onRestart.AddListener((UnityAction)delegate { ReactivateStatues(statues); }); } public static void ReactivateStatues(GameObject[] statues) { foreach (GameObject val in statues) { val.SetActive(true); } } public static void BluePathSetup() { //IL_0084: 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) Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor (3)")).GetComponent(); component.Lock(); Transform val = GeneralFuncs.FindInactive("B2 - Tall Room/B2 Nonstuff/Beam"); ((Component)val.Find("LightPillar")).gameObject.SetActive(false); ((Component)val.Find("Teleporter (1)")).gameObject.SetActive(false); ((Component)val.Find("PlayerMagnetizer")).gameObject.SetActive(false); Transform val2 = val.Find("Cube (36)"); val2.position = new Vector3(80f, -5.5f, 347f); val2.localScale = new Vector3(0.6f, 0.6f, 0.6f); } public static void BluePathSoapRoom() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: 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_023f: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("B1-B Skylight Hallway/B1-B Stuff"); ((Component)val.Find("Enemies")).gameObject.SetActive(false); Transform transform = GeneralFuncs.MakeEmpty(val, "Nemesis Enemies").transform; Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor (4)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("LargeDoor (7)")).GetComponent(); Door[] array = (Door[])(object)new Door[2] { component, component2 }; GameObject trigger = ArenaFuncs.MakeTrigger(transform, "Enemies", new Vector3(31f, -10.5f, 314.5f), new Vector3(51f, 4.5f, 304.5f)); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Wave 1").transform; ActivateArena val2 = ArenaFuncs.AddArena(trigger, array); ActivateNextWave val3 = WaveFuncs.AddActivation(transform2, array, component2, lastWave: true, 0); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Virtue"], new Vector3(41f, 10.5f, 282f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Gutterman"], new Vector3(41f, -11.5f, 289f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Drone"], new Vector3(34f, 8.5f, 309.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Drone"], new Vector3(48f, 8.5f, 289.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); CheckPoint component3 = ((Component)GeneralFuncs.FindInactive("Checkpoint (2)")).GetComponent(); Util.ArrayAdd(ref component3.doorsToUnlock, array); Transform val4 = GeneralFuncs.FindInactive("B1-B Skylight Hallway/B1-B Nonstuff/Altar/Cube/Soap"); ((Component)val4).gameObject.SetActive(false); Transform parent = val4.parent; parent.localPosition = new Vector3(0f, 2.6f, 0f); parent.localRotation = GeneralFuncs.Quat_90; ObjectFuncs.PlaceBook(parent, "Washed?", new Vector3(41f, 7.58f, 317f), GeneralFuncs.Quat_0); } public static void BluePathLavaStaircase() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: 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_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: 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_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_023f: 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_028e: 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_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("B1-C Lava Staircase/B1-C Stuff"); ((Component)val.Find("Enemies")).gameObject.SetActive(false); Transform transform = GeneralFuncs.MakeEmpty(val, "Nemesis Enemies").transform; Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor (7)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("LargeDoor (8)")).GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component, component2 }; GameObject trigger = ArenaFuncs.MakeTrigger(transform, "Enemies", new Vector3(86f, -23f, 278.5f), new Vector3(36f, -33f, 228.5f)); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Wave 1").transform; ActivateArena val2 = ArenaFuncs.AddArena(trigger, doors); ActivateNextWave val3 = WaveFuncs.AddActivation(transform2, doors, component2, lastWave: true, 0); ActivateNextWave val4 = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false, 2, null, noActivationDelay: false, forEnemies: true); HurtZone componentInChildren = ((Component)GeneralFuncs.FindInactive("B1-C Lava Staircase/B1-C Nonstuff/Floor")).GetComponentInChildren(); componentInChildren.affected = (AffectedSubjects)1; NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Providence"], new Vector3(81f, 0f, 268.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Cerberus"], new Vector3(41f, -15.5f, 253.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Cerberus"], new Vector3(61f, -25.5f, 233.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Schism"], new Vector3(81f, -35.5f, 253.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Schism"], new Vector3(51f, -45.5f, 273.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }), stopDashing: true, stopWalking: true); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Mortar"], new Vector3(60.5f, -53f, 246.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Mortar"], new Vector3(60.5f, -53f, 260.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Guttertank"], new Vector3(78f, -30.5f, 237f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(nemesisEnemy); EnemyFuncs.AddMover(nemesisEnemy.gameObject, nemesisEnemy.transform, 9999f).MoveXYZ().TargetXYZ(81f, 0f, 268.5f); } public static void BluePathLavaWaterfall() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("B1-D Lava Hallway/B1-D Stuff"); ((Component)val.Find("Enemies")).gameObject.SetActive(false); Transform transform = GeneralFuncs.MakeEmpty(val, "Nemesis Enemies").transform; Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor (8)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("LargeDoor (5)")).GetComponent(); Door[] array = (Door[])(object)new Door[2] { component, component2 }; GameObject trigger = ArenaFuncs.MakeTrigger(transform, "Enemies", new Vector3(51.5f, -50.5f, 285f), new Vector3(67.5f, -30.5f, 314f)); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Wave 1").transform; ActivateArena val2 = ArenaFuncs.AddArena(trigger, array); ActivateNextWave val3 = WaveFuncs.AddActivation(transform2, array, component2, lastWave: true, 0); HurtZone component3 = ((Component)GeneralFuncs.FindInactive("B1-D Lava Hallway/B1-D Nonstuff/Lava")).GetComponent(); component3.affected = (AffectedSubjects)1; EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Ferryman"], new Vector3(76.5f, -50.5f, 292f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Ferryman"], new Vector3(76.5f, -50.5f, 307f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); CheckPoint val4 = CheckpointFuncs.FindCheckpointByRoom("Checkpoint", transform.root); Util.ArrayAdd(ref val4.doorsToUnlock, array); } public static void BluePathSkullRoom() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_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_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: 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_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("B2 - Tall Room/B2 Stuff"); ((Component)val.Find("Enemies")).gameObject.SetActive(false); Transform transform = GeneralFuncs.MakeEmpty(val, "Nemesis Enemies").transform; Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor (5)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("LargeDoor (9)")).GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component, component2 }; GameObject trigger = ArenaFuncs.MakeTrigger(transform, "Enemies", new Vector3(27f, -30.5f, 327.5f), new Vector3(97f, -20.5f, 365.5f)); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Wave 1").transform; ActivateArena val2 = ArenaFuncs.AddArena(trigger, doors); ActivateNextWave val3 = WaveFuncs.AddActivation(transform2, (Door[])(object)new Door[1] { component2 }, component2, lastWave: true, 0); ActivateNextWave val4 = WaveFuncs.AddActivation(transform2, Array.Empty(), null, lastWave: false, 2, null, noActivationDelay: false, forEnemies: true); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["BlackHoleLauncher"], new Vector3(77.5f, -50f, 350f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Swordsmachine"], new Vector3(32f, -30.5f, 331f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Swordsmachine"], new Vector3(47f, -50.5f, 340.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["RocketLauncher"], new Vector3(95f, -31f, 343f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Gutterman"], new Vector3(87.5f, -30.5f, 330.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); NemesisEnemy nemesisEnemy3 = EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Streetcleaner"], new Vector3(47f, -40.5f, 370.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); NemesisEnemy nemesisEnemy4 = EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Streetcleaner"], new Vector3(32f, -40.5f, 370.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["VeryCancerousRodent"], new Vector3(77f, -25.5f, 357.5f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); NemesisEnemy[] array = new NemesisEnemy[4] { nemesisEnemy, nemesisEnemy2, nemesisEnemy3, nemesisEnemy4 }; NemesisEnemy[] array2 = array; foreach (NemesisEnemy nemesisEnemy5 in array2) { EnemyFuncs.AddTeleportOnCondition(nemesisEnemy5).AddCondition(new Vector3(87f, -50.5f, 330.5f), isMoveVectorAbsolute: true).AddAxis(nemesisEnemy5.transform, 'x', 89.5f, greater: true); } Transform val5 = GeneralFuncs.FindInactive("B2 - Tall Room/B2 Nonstuff/Altar"); val5.position = new Vector3(77f, -60.5f, 334f); GameObject val6 = GeneralFuncs.MakeEmpty(transform2, "AltarMover"); val6.SetActive(false); EnemyFuncs.AddMover(val6, val5).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, -50.5f); Util.ArrayAdd(ref val3.toActivate, val6); CheckPoint val7 = CheckpointFuncs.FindCheckpointByRoom("Checkpoint", transform.root); val7.disableDuringCombat = true; Util.ArrayAdd(ref val7.doorsToUnlock, ((Component)GeneralFuncs.FindInactive("LargeDoor (6)")).GetComponent()); ((Component)val.Find("Trigger 1")).gameObject.SetActive(false); ((Component)val.Find("Trigger 2")).gameObject.SetActive(false); } public static void BluePathBlueStaircase() { //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_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_036c: 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_0414: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_04f1: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("B2-B Stairs Hallway/B2-B Stuff/Enemies"); Transform val2 = val; ActivateArena component = ((Component)val.Find("Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val2).GetComponent(); Door component3 = ((Component)GeneralFuncs.FindInactive("LargeDoor (9)")).GetComponent(); Door component4 = ((Component)GeneralFuncs.FindInactive("LargeDoor (10)")).GetComponent(); Door[] doors = (Door[])(object)new Door[2] { component3, component4 }; ObjectActivator component5 = ((Component)component).GetComponent(); for (int i = 0; i < component5.events.toActivateObjects.Length; i++) { if (((Object)component5.events.toActivateObjects[i]).name.Contains("StatueActivator")) { Util.ArrayRemove(ref component5.events.toActivateObjects, component5.events.toActivateObjects[i]); break; } } component.onlyWave = false; component2.lastWave = false; component2.doors = Array.Empty(); component2.doorForward = null; ActivateNextWave val3 = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 0, null, noActivationDelay: false, forEnemies: true); WaveFuncs.ClearWave(val2, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); component2.enemyCount = 0; val2 = GeneralFuncs.MakeEmpty(val, "Wave 1").transform; NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Idol"], new Vector3(142f, -20.5f, 379f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy targetEnemy = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["EyeMalicious"], new Vector3(77f, -3.5f, 381.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["MaliciousFace"], new Vector3(134.5f, -10.5f, 381.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["MaliciousFace"], new Vector3(77f, -25.5f, 381.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Schism"], new Vector3(74f, -25.5f, 394f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Schism"], new Vector3(74f, -25.5f, 369f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Schism"], new Vector3(135f, -9f, 389f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }), stopDashing: true, stopWalking: true); EnemyFuncs.AddStopper(EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Schism"], new Vector3(135f, -9f, 374f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[2] { component2, val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }), stopDashing: true, stopWalking: true); EnemyFuncs.SetIdolTarget(targetEnemy, nemesisEnemy); Transform transform = GeneralFuncs.MakeEmpty(val, "Wave 2").transform; ActivateNextWave val4 = WaveFuncs.AddActivation(transform, doors, component4, lastWave: true, 0); ActivateNextWave val5 = WaveFuncs.AddActivation(transform, Array.Empty(), null, lastWave: false, 0, null, noActivationDelay: false, forEnemies: true); DeathMarkerFuncs.AddDeathMarker(transform, component2, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }); NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Idol"], new Vector3(142f, -20.5f, 384f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); NemesisEnemy targetEnemy2 = EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["EyeMalicious"], new Vector3(119.5f, -3.5f, 381.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Mindflayer"], new Vector3(104.5f, -15.5f, 381.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[2] { val4, val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.AddEnemyNoTrigger(transform, LevelAssets.Enemies["Guttertank"], new Vector3(142f, -10.5f, 381.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[2] { val4, val5 }, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }); EnemyFuncs.SetIdolTarget(targetEnemy2, nemesisEnemy2); GameObject val6 = GeneralFuncs.MakeEmpty(val2, "IdolMover"); val6.SetActive(false); EnemyFuncs.AddMover(val6, nemesisEnemy.transform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, -10.5f); GameObject val7 = GeneralFuncs.MakeEmpty(transform, "IdolMover"); val7.SetActive(false); EnemyFuncs.AddMover(val7, nemesisEnemy2.transform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, -10.5f); Util.ArrayAdd(ref val5.toActivate, (GameObject[])(object)new GameObject[2] { val6, val7 }); } public static void BluePathSmallBlueRoom() { //IL_00a5: 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_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_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_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_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("B2-A Water Hallway/B2-A Stuff"); ((Component)val.Find("Enemies")).gameObject.SetActive(false); Transform transform = GeneralFuncs.MakeEmpty(val, "Nemesis Enemies").transform; Door component = ((Component)GeneralFuncs.FindInactive("LargeDoor (10)")).GetComponent(); Door component2 = ((Component)GeneralFuncs.FindInactive("LargeDoor (6)")).GetComponent(); Door component3 = ((Component)GeneralFuncs.FindInactive("LargeDoor (3)")).GetComponent(); Door component4 = ((Component)GeneralFuncs.FindInactive("LargeDoor (5)")).GetComponent(); Door[] doors = (Door[])(object)new Door[4] { component, component2, component3, component4 }; GameObject trigger = ArenaFuncs.MakeTrigger(transform, "Enemies", new Vector3(133f, -11f, 360.5f), new Vector3(103f, 3.5f, 340.5f)); Transform transform2 = GeneralFuncs.MakeEmpty(transform, "Wave 1").transform; ActivateArena val2 = ArenaFuncs.AddArena(trigger, doors); ActivateNextWave val3 = WaveFuncs.AddActivation(transform2, doors, component2, lastWave: true, 0); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Mindflayer"], new Vector3(112.5f, -4.4f, 350f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }, spawnEffect: true, bossBar: true); float? healthMult = 2.5f; EnemyFuncs.ApplyRadiance(nemesisEnemy, buffSpeed: true, buffHealth: true, buffDamage: false, null, healthMult); EnemyFuncs.ApplySand(nemesisEnemy); EnemyFuncs.SetEnemyName(nemesisEnemy, "MINDFLAYER \"FENTO\""); nemesisEnemy.eid.immuneToFriendlyFire = true; ActivateNextWaveHP val4 = WaveFuncs.AddActivationHP(transform2, 15f, nemesisEnemy, Array.Empty(), null, lastWave: false, null, forEnemies: true); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Filth"], new Vector3(100.5f, -10.4f, 352.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemy(transform2, LevelAssets.Enemies["Filth"], new Vector3(100.5f, -10.4f, 347.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { val2 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Filth"], new Vector3(100.5f, -10.4f, 352.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, null, (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[1] { val4 }); EnemyFuncs.AddEnemyNoTrigger(transform2, LevelAssets.Enemies["Filth"], new Vector3(100.5f, -10.4f, 347.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, null, (ActivateNextWaveHP[])(object)new ActivateNextWaveHP[1] { val4 }); } public static void AgonyTundraRoom() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) Transform val = GeneralFuncs.FindInactive("S - Secret Fight/S Stuff/Enemies"); Transform val2 = val; ActivateArena component = ((Component)val2.Find("Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val2).GetComponent(); ActivateNextWave val3 = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 2, null, noActivationDelay: false, forEnemies: true); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Idol"], new Vector3(-61f, -7f, 245f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); NemesisEnemy targetEnemy = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Virtue"], new Vector3(-61f, 9f, 241.5f), GeneralFuncs.Quat_0, (ActivateNextWave[])(object)new ActivateNextWave[1] { val3 }, (ActivateArena[])(object)new ActivateArena[1] { component }); EnemyFuncs.SetIdolTarget(targetEnemy, nemesisEnemy); GameObject val4 = GeneralFuncs.MakeEmpty(val2, "IdolMover"); val4.SetActive(false); EnemyFuncs.AddMover(val4, nemesisEnemy.transform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, 3f); Util.ArrayAdd(ref component2.toActivate, val4); Transform targetTransform = ObjectFuncs.PlaceAltarTorch(val.root.Find("S Nonstuff"), hasTorch: true, new Vector3(-61f, -8.5f, 274f), GeneralFuncs.Quat_180); GameObject val5 = GeneralFuncs.MakeEmpty(val.root.Find("S Nonstuff"), "AltarMover"); val5.SetActive(false); EnemyFuncs.AddMover(val5, targetTransform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, 2.5f); Util.ArrayAdd(ref val3.toActivate, val5); } public static void BossRoom() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_011b: 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_02a7: 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_02b2: Expected O, but got Unknown Transform val = GeneralFuncs.FindInactive("Boss Arena/BA Stuff/Enemy"); Transform val2 = val; ActivateArena component = ((Component)val2.Find("Trigger")).GetComponent(); ActivateNextWave component2 = ((Component)val2).GetComponent(); ActivateNextWave val3 = WaveFuncs.AddActivation(val2, Array.Empty(), null, lastWave: false, 1, null, noActivationDelay: false, forEnemies: true); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Idol"], new Vector3(-16f, -21f, 431.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, Array.Empty()); NemesisEnemy nemesisEnemy2 = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Ferryman"], new Vector3(-20f, -10.5f, 431.5f), GeneralFuncs.Quat_90, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, Array.Empty()); NemesisEnemy nemesisEnemy3 = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Idol"], new Vector3(16f, -21f, 431.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, Array.Empty()); NemesisEnemy nemesisEnemy4 = EnemyFuncs.AddEnemy(val2, LevelAssets.Enemies["Watchtower"], new Vector3(23.5f, -10.5f, 431.5f), GeneralFuncs.Quat_270, (ActivateNextWave[])(object)new ActivateNextWave[1] { component2 }, Array.Empty()); EnemyFuncs.SetIdolTarget(nemesisEnemy2, nemesisEnemy); EnemyFuncs.SetIdolTarget(nemesisEnemy4, nemesisEnemy3); ObjectActivator val4 = ObjectActivatorFuncs.AddObjectActivator(((Component)component).gameObject, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[4] { nemesisEnemy.gameObject, nemesisEnemy2.gameObject, nemesisEnemy3.gameObject, nemesisEnemy4.gameObject }), 4.5f); GameObject val5 = GeneralFuncs.MakeEmpty(val2, "IdolMover"); val5.SetActive(false); EnemyFuncs.AddMover(val5, nemesisEnemy.transform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, -11f); GameObject val6 = GeneralFuncs.MakeEmpty(val2, "IdolMover"); val6.SetActive(false); EnemyFuncs.AddMover(val6, nemesisEnemy3.transform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, -11f); EventOnDestroy component3 = ((Component)val.Find("Mass")).GetComponent(); component3.stuff = null; Object.Destroy((Object)(object)component3); Util.ArrayAdd(ref val3.toActivate, (GameObject[])(object)new GameObject[2] { val5, val6 }); GameObject val7 = GeneralFuncs.MakeEmpty(val.root, "DelayChanger"); val7.SetActive(false); ActionOnEnable actionOnEnable = val7.AddComponent(); UnityEvent unityEvent = actionOnEnable.unityEvent; object obj = <>c.<>9__25_0; if (obj == null) { UnityAction val8 = delegate { VariableDelay.ActivateAll("Boss"); }; <>c.<>9__25_0 = val8; obj = (object)val8; } unityEvent.AddListener((UnityAction)obj); Util.ArrayAdd(ref val4.events.toActivateObjects, val7); GeneralFuncs.AddVariableDelay((Component)(object)val4, "Boss", 2f); } } public static class PatchLevel1_4 { [CompilerGenerated] private static class <>O { public static UnityAction <0>__OnVittuDeath; } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__4_0; internal void b__4_0() { VariableDelay.ActivateAll("V2Delay"); } } public static int[] killRanks = new int[4] { 1, 2, 3, 4 }; public static int[] styleRanks = new int[4] { 800, 1300, 1700, 2000 }; public static int[] timeRanks = new int[4] { 400, 280, 190, 130 }; public static void Patch() { BossRoom(); TerminalSlab(); CheckpointFuncs.UpdateAllRoomsInCheckpoints(); } public static void BossRoom() { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_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) //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_023f: Expected O, but got Unknown //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Expected O, but got Unknown Transform val = GeneralFuncs.FindInactive("V2 - Arena/V2 Stuff"); Transform val2 = GeneralFuncs.FindInactive("V2 - Arena/V2 Stuff/Door/Cube"); ActivateNextWave val3 = WaveFuncs.AddActivation(val, Array.Empty(), null, lastWave: false, 0, null, noActivationDelay: false, forEnemies: true); ActivateNextWave val4 = WaveFuncs.AddActivation(val, Array.Empty(), null, lastWave: false, 1, null, noActivationDelay: false, forEnemies: true); ActivateNextWave val5 = WaveFuncs.AddActivation(val, Array.Empty(), null, lastWave: true, 5); NemesisEnemy nemesisEnemy = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Idol"], new Vector3(0f, -32f, 612f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[1] { val4 }, Array.Empty()); NemesisEnemy nemesisEnemy2 = new NemesisEnemy(val.Find("V2")); nemesisEnemy2.gameObject.AddComponent().bossVersion = true; EnemyFuncs.AddDontEnrage(nemesisEnemy2); NemesisEnemy nemesisEnemy3 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["V2"], new Vector3(0f, -19f, 640f), GeneralFuncs.Quat_180, (ActivateNextWave[])(object)new ActivateNextWave[2] { val3, val4 }, Array.Empty(), spawnEffect: true, bossBar: true); EnemyFuncs.SetEnemyName(nemesisEnemy3, "VITTU"); NemesisEnemy nemesisEnemy4 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Idol"], new Vector3(0f, -32f, 612f), GeneralFuncs.Quat_180, Array.Empty(), Array.Empty()); NemesisEnemy nemesisEnemy5 = EnemyFuncs.AddEnemy(val, LevelAssets.Enemies["Virtue"], new Vector3(0f, 7f, 642f), GeneralFuncs.Quat_180, Array.Empty(), Array.Empty()); EnemyFuncs.AddDontEnrage(nemesisEnemy5); EnemyFuncs.SetIdolTarget(nemesisEnemy2, nemesisEnemy); EnemyFuncs.SetIdolTarget(nemesisEnemy5, nemesisEnemy4); EnemyFuncs.AddStopper(nemesisEnemy5); GameObject val6 = GeneralFuncs.MakeEmpty(val, "IdolV2Mover"); val6.SetActive(false); EnemyFuncs.AddMover(val6, nemesisEnemy.transform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, -22f); GameObject val7 = GeneralFuncs.MakeEmpty(val.root, "VirtueEnrager"); val7.SetActive(false); ActionOnEnable actionOnEnable = val7.AddComponent(); actionOnEnable.oneTime = false; UnityEvent unityEvent = actionOnEnable.unityEvent; object obj = <>O.<0>__OnVittuDeath; if (obj == null) { UnityAction val8 = OnVittuDeath; <>O.<0>__OnVittuDeath = val8; obj = (object)val8; } unityEvent.AddListener((UnityAction)obj); Util.ArrayAdd(ref val3.toActivate, (GameObject[])(object)new GameObject[2] { val6, val7 }); GameObject val9 = GeneralFuncs.MakeEmpty(val, "IdolVirtueMover"); val9.SetActive(false); EnemyFuncs.AddMover(val9, nemesisEnemy4.transform).MoveXYZ(moveX: false, moveY: true, moveZ: false).TargetXYZ(0f, -22f); Util.ArrayAdd(ref val4.toActivate, val9); ObjectActivator component = ((Component)val2).GetComponent(); Util.ArrayAdd(ref component.events.toActivateObjects, nemesisEnemy.gameObject); GameObject val10 = GeneralFuncs.MakeEmpty(val.root, "DelayChanger"); val10.SetActive(false); ActionOnEnable actionOnEnable2 = val10.AddComponent(); UnityEvent unityEvent2 = actionOnEnable2.unityEvent; object obj2 = <>c.<>9__4_0; if (obj2 == null) { UnityAction val11 = delegate { VariableDelay.ActivateAll("V2Delay"); }; <>c.<>9__4_0 = val11; obj2 = (object)val11; } unityEvent2.AddListener((UnityAction)obj2); ObjectActivator targetComponent = ObjectActivatorFuncs.AddObjectActivator(((Component)val2).gameObject, ObjectActivatorFuncs.MakeUltrakillEvent((GameObject[])(object)new GameObject[4] { nemesisEnemy3.gameObject, nemesisEnemy4.gameObject, nemesisEnemy5.gameObject, val10 }), 7f); GeneralFuncs.AddVariableDelay((Component)(object)targetComponent, "V2Delay", 1.25f); } public static void OnVittuDeath() { DontEnrage[] array = Object.FindObjectsByType((FindObjectsInactive)0, (FindObjectsSortMode)0); DontEnrage[] array2 = array; foreach (DontEnrage dontEnrage in array2) { ((Behaviour)dontEnrage).enabled = false; Drone component = ((Component)dontEnrage).GetComponent(); if (component != null) { component.Enrage(); } } } public static void TerminalSlab() { //IL_0023: 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 roomTransform = GeneralFuncs.FindInactive("3DL - Super Door/3DL Nonstuff/"); string message = "NEMESIS COMMENTARY 9:\r\nEnemies sometimes have small behavioural changes. The most common one is preventing the enemy from moving or dashing, but there are rarer ones like making enemies teleport when they go past a certain point in space, or forcing a Power to stay within a specific distance of you\r\n\r\nThis level also has another enemy change that hasn't appeared up until now"; ObjectFuncs.PlaceTerminalTestament(roomTransform, message, new Vector3(-53.75f, 0f, 483.75f), Quaternion.Euler(0f, 20f, 180f), hasMusic: false, 0.02f); } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } } [CompilerGenerated] internal sealed class <>z__ReadOnlyArray : IEnumerable, ICollection, IList, IEnumerable, IReadOnlyCollection, IReadOnlyList, ICollection, IList { int ICollection.Count => _items.Length; bool ICollection.IsSynchronized => false; object ICollection.SyncRoot => this; object IList.this[int index] { get { return _items[index]; } set { throw new NotSupportedException(); } } bool IList.IsFixedSize => true; bool IList.IsReadOnly => true; int IReadOnlyCollection.Count => _items.Length; T IReadOnlyList.this[int index] => _items[index]; int ICollection.Count => _items.Length; bool ICollection.IsReadOnly => true; T IList.this[int index] { get { return _items[index]; } set { throw new NotSupportedException(); } } public <>z__ReadOnlyArray(T[] items) { _items = items; } IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable)_items).GetEnumerator(); } void ICollection.CopyTo(Array array, int index) { ((ICollection)_items).CopyTo(array, index); } int IList.Add(object value) { throw new NotSupportedException(); } void IList.Clear() { throw new NotSupportedException(); } bool IList.Contains(object value) { return ((IList)_items).Contains(value); } int IList.IndexOf(object value) { return ((IList)_items).IndexOf(value); } void IList.Insert(int index, object value) { throw new NotSupportedException(); } void IList.Remove(object value) { throw new NotSupportedException(); } void IList.RemoveAt(int index) { throw new NotSupportedException(); } IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable)_items).GetEnumerator(); } void ICollection.Add(T item) { throw new NotSupportedException(); } void ICollection.Clear() { throw new NotSupportedException(); } bool ICollection.Contains(T item) { return ((ICollection)_items).Contains(item); } void ICollection.CopyTo(T[] array, int arrayIndex) { ((ICollection)_items).CopyTo(array, arrayIndex); } bool ICollection.Remove(T item) { throw new NotSupportedException(); } int IList.IndexOf(T item) { return ((IList)_items).IndexOf(item); } void IList.Insert(int index, T item) { throw new NotSupportedException(); } void IList.RemoveAt(int index) { throw new NotSupportedException(); } }