Decompiled source of SimulacrumAdditions v2.4.1
SimulacrumAdditions.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
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 AK.Wwise; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using EntityStates; using EntityStates.Drone; using EntityStates.GrandParent; using EntityStates.InfiniteTowerSafeWard; using EntityStates.Missions.Moon; using EntityStates.QuestVolatileBattery; using EntityStates.VagrantMonster; using EntityStates.VagrantNovaItem; using EntityStates.VoidMegaCrab; using EntityStates.VoidMegaCrab.Weapon; using HG; using IL.RoR2; using JetBrains.Annotations; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates; using On.EntityStates.Drone; using On.EntityStates.GrandParent; using On.EntityStates.InfiniteTowerSafeWard; using On.EntityStates.Missions.Moon; using On.EntityStates.QuestVolatileBattery; using On.EntityStates.VagrantMonster; using On.EntityStates.VagrantNovaItem; using On.EntityStates.VoidMegaCrab; using On.EntityStates.VoidMegaCrab.Weapon; using On.RoR2; using On.RoR2.Artifacts; using On.RoR2.Projectile; using On.RoR2.UI; using On.RoR2.UI.MainMenu; using R2API; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.Artifacts; using RoR2.CharacterAI; using RoR2.ExpansionManagement; using RoR2.Hologram; using RoR2.Navigation; using RoR2.Projectile; using RoR2.Skills; using RoR2.Stats; using RoR2.UI; using RoR2.UI.MainMenu; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; 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: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("SimulacrumAdditions")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+48c79658b09f0897524ee7e4ec16b5a05bae4b23")] [assembly: AssemblyProduct("SimulacrumAdditions")] [assembly: AssemblyTitle("SimulacrumAdditions")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] namespace SimulacrumAdditions; internal static class Assets { public static AssetBundle Bundle; public static PluginInfo PluginInfo; public static string Folder = "SimulacrumMod"; internal static string assemblyDir => Path.GetDirectoryName(PluginInfo.Location); internal static void Init(PluginInfo info) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown PluginInfo = info; if (!Directory.Exists(GetPathToFile(Folder))) { Debug.LogWarning((object)(Folder + " | Folder does not exist")); Folder = "plugins\\" + Folder; if (!Directory.Exists(GetPathToFile(Folder))) { Debug.LogWarning((object)(Folder + " | Folder does not exist")); } } if (Directory.Exists(GetPathToFile(Folder + "\\Languages"))) { Language.SetFolders += new hook_SetFolders(SetFolders); } else { Debug.LogWarning((object)(Folder + "\\Languages | Folder does not exist")); } if (Directory.Exists(GetPathToFile(Folder + "\\AssetBundles"))) { Bundle = AssetBundle.LoadFromFile(GetPathToFile(Folder + "\\AssetBundles", "simulacrumadditions")); } else { Debug.LogWarning((object)(Folder + "\\AssetBundles | Folder does not exist")); } } private static void SetFolders(orig_SetFolders orig, Language self, IEnumerable<string> newFolders) { IEnumerable<string> second = Directory.EnumerateDirectories(Path.Combine(GetPathToFile(Folder + "\\Languages")), self.name); orig.Invoke(self, newFolders.Union(second)); } internal static string GetPathToFile(string folderName) { return Path.Combine(assemblyDir, folderName); } internal static string GetPathToFile(string folderName, string fileName) { return Path.Combine(assemblyDir, folderName, fileName); } } public class WConfig { public static ConfigFile ConfigFileUNSORTED = new ConfigFile(Paths.ConfigPath + "\\Wolfo.Simulacrum_Additions.cfg", true); public static ConfigEntry<bool> cfgFasterWavesLater; public static ConfigEntry<bool> cfgCrabSpeedOnLaterWaves; public static ConfigEntry<bool> cfgVoidTripleAllTier; public static ConfigEntry<bool> cfgSimuCreditsRebalance; public static ConfigEntry<bool> cfgSimuMoreGold; public static ConfigEntry<bool> cfgDifferentTeleportEffect; public static ConfigEntry<bool> cfgVoidsEverywhere; public static ConfigEntry<bool> cfgExtraDifficuly; public static ConfigEntry<bool> cfgNewEnemiesVisible; public static ConfigEntry<bool> cfgDumpInfo; public static ConfigEntry<bool> cfgVoidCoins; public static ConfigEntry<bool> cfgMusicSuperBoss; public static ConfigEntry<bool> cfgSacrificeBalance; public static ConfigEntry<bool> cfgItemsEvery8; public static ConfigEntry<bool> cfgItemsFrequently; public static ConfigEntry<bool> cfgMakeSpecialWavesMoreCommon; public static ConfigEntry<bool> cfgAwaitTravel; public static ConfigEntry<bool> cfgWaveOnEndScreen; public static ConfigEntry<float> ArtifactOfRealityBonusRadius; public static ConfigEntry<float> cfgCrabRadius; public static ConfigEntry<float> cfgCrabRadiusPerPlayer; public static ConfigEntry<int> cfgSimuEndingStartAtXWaves; public static ConfigEntry<int> cfgSimuEndingEveryXWaves; public static ConfigEntry<int> cfgSuperBossStartAtXWaves; public static ConfigEntry<int> cfgSuperBossEveryXWaves; public static ConfigEntry<bool> ResetStatsButton; public static void RiskConfig() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Expected O, but got Unknown //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Expected O, but got Unknown //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Expected O, but got Unknown ModSettingsManager.SetModDescription("Simulacrum Gaming"); ModSettingsManager.SetModIcon(Assets.Bundle.LoadAsset<Sprite>("Assets/Simulacrum/Wave/waveGupYellow.png")); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgNewEnemiesVisible, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgVoidCoins)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgVoidTripleAllTier, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgSacrificeBalance)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgFasterWavesLater)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgExtraDifficuly)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgSimuMoreGold, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgSimuCreditsRebalance, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgItemsEvery8, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgItemsFrequently, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgCrabSpeedOnLaterWaves)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgMusicSuperBoss)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgAwaitTravel)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgWaveOnEndScreen)); ModSettingsManager.AddOption((BaseOption)new FloatFieldOption(ArtifactOfRealityBonusRadius)); ModSettingsManager.AddOption((BaseOption)new FloatFieldOption(cfgCrabRadius)); ModSettingsManager.AddOption((BaseOption)new FloatFieldOption(cfgCrabRadiusPerPlayer)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ResetStatsButton)); } public static void InitConfig() { ResetStatsButton = ConfigFileUNSORTED.Bind<bool>("Main", "Reset Wave Count Button", false, "Add buttons to reset wave count or set it to 50."); cfgMusicSuperBoss = ConfigFileUNSORTED.Bind<bool>("Main", "Music for Super Boss waves", true, "Like Mithrix theme for Mithrix wave."); cfgVoidCoins = ConfigFileUNSORTED.Bind<bool>("Main", "Add Void Coins", true, "Add previously unused Void Coins with which you can purchase Void Interactables. You can still purchase them with Blood if you do not have any."); cfgVoidTripleAllTier = ConfigFileUNSORTED.Bind<bool>("Main", "Void Potential Chests can drop more tiers", true, "With this they can give items from any tier, normally they use a normal chest pool."); cfgNewEnemiesVisible = ConfigFileUNSORTED.Bind<bool>("Main", "Logbook Entries for Simu Bosses", true, "Add reskins of enemies added by mod to Logbook."); cfgDifferentTeleportEffect = ConfigFileUNSORTED.Bind<bool>("Main", "Simulacrum Teleport Effect", true, "Void themed teleport effect for Simulacrum runs"); cfgWaveOnEndScreen = ConfigFileUNSORTED.Bind<bool>("Main", "Wave name on end screen", true, "More info"); cfgCrabSpeedOnLaterWaves = ConfigFileUNSORTED.Bind<bool>("Main : Crab", "Speed up as waves go on", true, "The crab will travel faster the more waves are completed, mostly noticible later waves."); cfgAwaitTravel = ConfigFileUNSORTED.Bind<bool>("Main : Crab", "Crab waits before travelling", true, "Like after wave 5, more time to do stuff before leaving or just to leave instantly."); cfgCrabRadius = ConfigFileUNSORTED.Bind<float>("Main : Crab", "Crab Radius : Base Radius", 65f, "Vanilla radius is 60."); cfgCrabRadiusPerPlayer = ConfigFileUNSORTED.Bind<float>("Main : Crab", "Crab Radius : Per Player", 5f, "Radius increase per player including player 1. Vanilla radius is 0."); cfgVoidsEverywhere = ConfigFileUNSORTED.Bind<bool>("Main", "Void Enemies on all stages", true, "After wave 60 void enemies will spawn on all simu stages."); ArtifactOfRealityBonusRadius = ConfigFileUNSORTED.Bind<float>("Main : Artifacts", "Artifact of Reality : Larger Radius", 10f, "Bonus radius since default stages are often bigger and have weird cornerns"); cfgItemsEvery8 = ConfigFileUNSORTED.Bind<bool>("Simulacrum : Balance", "Items every 8 Waves", true, "Give items every 8 waves. Fits better with the run ending at wave 50."); cfgItemsFrequently = ConfigFileUNSORTED.Bind<bool>("Simulacrum : Balance", "Items are given more frequently later", true, "Items will be added twice as frequently after the first Red"); cfgSimuCreditsRebalance = ConfigFileUNSORTED.Bind<bool>("Simulacrum : Balance", "Simulacrum Credits Rebalance", true, "Get more credits early on, Stages have 630 to 400 credits depending on stages completed and get more credits in multiplayer. Vanilla they always have 600 regardless of stage/player count."); cfgSimuMoreGold = ConfigFileUNSORTED.Bind<bool>("Simulacrum : Balance", "Simulacrum Gold Balance", true, "Gold is multiplied per player amount. Gain 50% more gold at the start and 25% less gold starting at wave 30. Helps with early looting and makes it so you won't instantly be able to afford every chest later on."); cfgExtraDifficuly = ConfigFileUNSORTED.Bind<bool>("Simulacrum : Balance", "More scaling", true, "Scales immediate wave spawns up and elite cost down to overall increase difficulty but also make waves shorter"); cfgSacrificeBalance = ConfigFileUNSORTED.Bind<bool>("Simulacrum : Balance", "Nerf Sacrifice in Simulacrum", true, "30% less item drops from enemies and 1 less option in potentials"); cfgFasterWavesLater = ConfigFileUNSORTED.Bind<bool>("Simulacrum : Balance", "Waves get faster later", true, "Less time between waves and waves spawn enemies faster."); cfgSimuEndingStartAtXWaves = ConfigFileUNSORTED.Bind<int>("Simulacrum : Ending Portal", "Ending Start Wave", 50, "This is the first wave the ending Portal appears (only use steps of 10)"); cfgSimuEndingEveryXWaves = ConfigFileUNSORTED.Bind<int>("Simulacrum : Ending Portal", "Ending Portal Every X Waves", 10, "The ending portal will appear every X waves. (only use steps of 10)"); cfgSuperBossStartAtXWaves = ConfigFileUNSORTED.Bind<int>("Simulacrum : Forced Super Boss", "Forced Special Boss Start Wave", 50, "A forced special boss is meant to be paired with the wave where the ending portal spawns so it's less of just a random end. (only use steps of 10)"); cfgSuperBossEveryXWaves = ConfigFileUNSORTED.Bind<int>("Simulacrum : Forced Super Boss", "Forced Special Boss Every X Waves", 30, "The forced special boss will appear every X waves. (only use steps of 10)"); cfgDumpInfo = ConfigFileUNSORTED.Bind<bool>("Testing", "Wave Info Dump", false, "Dump wave info on startup in log"); } } public class AutoConfig { public static ConfigFile ConfigFileAuto = new ConfigFile(Paths.ConfigPath + "\\Wolfo.Simulacrum_Additions___Autogenerated_Wave_Config.cfg", true); public static ConfigEntry<int> cfgSuperBossEveryXWaves; public static void InitConfig() { InfiniteTowerWaveCategory iTBasicWaves = Const.ITBasicWaves; string text = "Basic Waves"; for (int i = 1; i < iTBasicWaves.wavePrefabs.Length; i++) { ConfigEntry<bool> val = ConfigFileAuto.Bind<bool>(text, ((Object)iTBasicWaves.wavePrefabs[i].wavePrefab).name, true, "Enable this wave? :\n" + Language.GetString(((Component)iTBasicWaves.wavePrefabs[i].wavePrefab.GetComponent<InfiniteTowerWaveController>().overlayEntries[1].prefab.transform.GetChild(0).GetChild(1).GetChild(0)).GetComponent<InfiniteTowerWaveCounter>().token) + "\n" + Language.GetString(((Component)iTBasicWaves.wavePrefabs[i].wavePrefab.GetComponent<InfiniteTowerWaveController>().overlayEntries[1].prefab.transform.GetChild(0).GetChild(1).GetChild(1)).GetComponent<LanguageTextMeshController>().token)); } iTBasicWaves = Const.ITBossWaves; text = "Boss Waves"; for (int j = 1; j < iTBasicWaves.wavePrefabs.Length; j++) { ConfigEntry<bool> val2 = ConfigFileAuto.Bind<bool>(text, ((Object)iTBasicWaves.wavePrefabs[j].wavePrefab).name, true, "Enable this wave? :\n" + Language.GetString(((Component)iTBasicWaves.wavePrefabs[j].wavePrefab.GetComponent<InfiniteTowerWaveController>().overlayEntries[1].prefab.transform.GetChild(0).GetChild(1).GetChild(0)).GetComponent<InfiniteTowerWaveCounter>().token) + "\n" + Language.GetString(((Component)iTBasicWaves.wavePrefabs[j].wavePrefab.GetComponent<InfiniteTowerWaveController>().overlayEntries[1].prefab.transform.GetChild(0).GetChild(1).GetChild(1)).GetComponent<LanguageTextMeshController>().token)); } iTBasicWaves = Const.ITSuperBossWaves; text = "Super Boss Waves"; for (int k = 0; k < iTBasicWaves.wavePrefabs.Length; k++) { ConfigEntry<bool> val3 = ConfigFileAuto.Bind<bool>(text, ((Object)iTBasicWaves.wavePrefabs[k].wavePrefab).name, true, "Enable this wave? :\n" + Language.GetString(((Component)iTBasicWaves.wavePrefabs[k].wavePrefab.GetComponent<InfiniteTowerWaveController>().overlayEntries[1].prefab.transform.GetChild(0).GetChild(1).GetChild(0)).GetComponent<InfiniteTowerWaveCounter>().token) + "\n" + Language.GetString(((Component)iTBasicWaves.wavePrefabs[k].wavePrefab.GetComponent<InfiniteTowerWaveController>().overlayEntries[1].prefab.transform.GetChild(0).GetChild(1).GetChild(1)).GetComponent<LanguageTextMeshController>().token)); } } public static void ApplyConfig() { InfiniteTowerWaveCategory iTBasicWaves = Const.ITBasicWaves; string text = "Basic Waves"; for (int i = 1; i < iTBasicWaves.wavePrefabs.Length; i++) { ConfigEntry<bool> val = null; ConfigFileAuto.TryGetEntry<bool>(text, ((Object)iTBasicWaves.wavePrefabs[i].wavePrefab).name, ref val); if (val != null && !val.Value) { iTBasicWaves.wavePrefabs[i].weight = 0f; } } iTBasicWaves = Const.ITBossWaves; text = "Boss Waves"; for (int j = 1; j < iTBasicWaves.wavePrefabs.Length; j++) { ConfigEntry<bool> val2 = null; ConfigFileAuto.TryGetEntry<bool>(text, ((Object)iTBasicWaves.wavePrefabs[j].wavePrefab).name, ref val2); if (val2 != null && !val2.Value) { iTBasicWaves.wavePrefabs[j].weight = 0f; } } iTBasicWaves = Const.ITSuperBossWaves; text = "Super Boss Waves"; for (int k = 0; k < iTBasicWaves.wavePrefabs.Length; k++) { ConfigEntry<bool> val3 = null; ConfigFileAuto.TryGetEntry<bool>(text, ((Object)iTBasicWaves.wavePrefabs[k].wavePrefab).name, ref val3); if (val3 != null && !val3.Value) { iTBasicWaves.wavePrefabs[k].weight = 0f; } } } } public static class Const { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_GetTeleportEffectPrefab <>9__81_0; internal GameObject <SimuTPEffect>b__81_0(orig_GetTeleportEffectPrefab orig, Run self, GameObject objectToTeleport) { if (self is InfiniteTowerRun) { return VoidTeleportOutEffect; } return orig.Invoke(self, objectToTeleport); } } public static GameObject BasicWave = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerWaveDefault.prefab").WaitForCompletion(); public static GameObject BasicWaveUI = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerCurrentWaveUI.prefab").WaitForCompletion(); public static GameObject BossWave = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerWaveBoss.prefab").WaitForCompletion(); public static GameObject BossWaveUI = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerCurrentBossWaveUI.prefab").WaitForCompletion(); public static GameObject ScavWave = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerWaveBossScav.prefab").WaitForCompletion(); public static GameObject ScavWaveUI = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerCurrentBossScavWaveUI.prefab").WaitForCompletion(); public static GameObject ArtifactWave = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerWaveArtifactBomb.prefab").WaitForCompletion(); public static GameObject ArtifactWaveUI = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerCurrentArtifactBombWaveUI.prefab").WaitForCompletion(); public static GameObject LunarWaveUI = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerCurrentBossLunarWaveUI.prefab").WaitForCompletion(); public static GameObject VoidWaveUI = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerCurrentBossVoidWaveUI.prefab").WaitForCompletion(); public static Sprite texITWaveDefaultWhiteS; public static int SimuEndingStartAtXWaves; public static int SimuEndingEveryXWaves; public static int SimuEndingWaveRest; public static int SimuForcedBossStartAtXWaves; public static int SimuForcedBossEveryXWaves; public static int SimuForcedBossWaveRest; public static float BasicWaveWeight = 100f; public static float BasicBossWaveWight = 80f; public static float DefaultWeightMultiplier1 = 0.75f; public static float DefaultWeightMultiplier2 = 0.25f; public static InfiniteTowerWaveCategory ITBasicWaves = Addressables.LoadAssetAsync<InfiniteTowerWaveCategory>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerWaveCategories/CommonWaveCategory.asset").WaitForCompletion(); public static InfiniteTowerWaveCategory ITBossWaves = Addressables.LoadAssetAsync<InfiniteTowerWaveCategory>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerWaveCategories/BossWaveCategory.asset").WaitForCompletion(); public static InfiniteTowerWaveCategory ITSuperBossWaves = ScriptableObject.CreateInstance<InfiniteTowerWaveCategory>(); public static InfiniteTowerWaveCategory ITModSupportWaves = ScriptableObject.CreateInstance<InfiniteTowerWaveCategory>(); public static GameEndingDef InfiniteTowerEnding = ScriptableObject.CreateInstance<GameEndingDef>(); public static InteractableSpawnCard iscSimuExitPortal; public static GameObject VoidTeleportOutEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/ExtraLifeVoid/VoidRezEffect.prefab").WaitForCompletion(), "VoidTeleportOutEffect", false); public static ItemTierDef ItemOrangeTierDef; public static BasicPickupDropTable dtAISafeRandomVoid = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static InfiniteTowerWaveCountPrerequisites AfterWave5Prerequisite = ScriptableObject.CreateInstance<InfiniteTowerWaveCountPrerequisites>(); public static InfiniteTowerWaveCountPrerequisites StartWave11Prerequisite = Addressables.LoadAssetAsync<InfiniteTowerWaveCountPrerequisites>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/Wave11OrGreaterPrerequisite.asset").WaitForCompletion(); public static InfiniteTowerWaveCountPrerequisites StartWave15Prerequisite = ScriptableObject.CreateInstance<InfiniteTowerWaveCountPrerequisites>(); public static InfiniteTowerWaveCountPrerequisites StartWave20Prerequisite = ScriptableObject.CreateInstance<InfiniteTowerWaveCountPrerequisites>(); public static InfiniteTowerWaveCountPrerequisites StartWave25Prerequisite = ScriptableObject.CreateInstance<InfiniteTowerWaveCountPrerequisites>(); public static InfiniteTowerWaveCountPrerequisites StartWave30Prerequisite = ScriptableObject.CreateInstance<InfiniteTowerWaveCountPrerequisites>(); public static InfiniteTowerWaveCountPrerequisites StartWave35Prerequisite = ScriptableObject.CreateInstance<InfiniteTowerWaveCountPrerequisites>(); public static InfiniteTowerWaveCountPrerequisites StartWave40Prerequisite = ScriptableObject.CreateInstance<InfiniteTowerWaveCountPrerequisites>(); public static InfiniteTowerWaveCountPrerequisites StartWave50Prerequisite = ScriptableObject.CreateInstance<InfiniteTowerWaveCountPrerequisites>(); public static ITWave_MaxWave_Prerequisites AfterWave5EndWave30Prerequisite = ScriptableObject.CreateInstance<ITWave_MaxWave_Prerequisites>(); public static InfiniteTowerRun Simu_Run_Run; public static ITWave_DLC_Prerequisites DLC1_StartWave10Prerequisite = ScriptableObject.CreateInstance<ITWave_DLC_Prerequisites>(); public static ITWave_DLC_Prerequisites DLC2_StartWave10Prerequisite = ScriptableObject.CreateInstance<ITWave_DLC_Prerequisites>(); public static ITWave_DLC_Prerequisites DLC2_StartWave15Prerequisite = ScriptableObject.CreateInstance<ITWave_DLC_Prerequisites>(); public static ITWave_DLC_Prerequisites DLC2_StartWave30Prerequisite = ScriptableObject.CreateInstance<ITWave_DLC_Prerequisites>(); public static BasicPickupDropTable dtITWaveTier1 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/dtITDefaultWave.asset").WaitForCompletion(); public static BasicPickupDropTable dtITWaveTier2 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/dtITBossWave.asset").WaitForCompletion(); public static BasicPickupDropTable dtITWaveTier3 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/dtITSpecialBossWave.asset").WaitForCompletion(); public static BasicPickupDropTable dtITVoid = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/dtITVoid.asset").WaitForCompletion(); public static BasicPickupDropTable dtITLunar = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/dtITLunar.asset").WaitForCompletion(); public static BasicPickupDropTable dtAllTier = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITFamilyWaveDamage = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITFamilyWaveHealing = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITFamilyWaveUtility = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITCategoryDamage = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITCategoryHealing = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITCategoryUtility = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITBossCategoryDamage = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITBossCategoryHealing = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITBossCategoryUtility = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITBasicWaveOnKill = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITBasicBonusLunar = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITBasicBonusVoid = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITBasicBonusGreen = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITBossBonusRed = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITBossGreenVoid = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITSpecialEquipment = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITVoidInfestorWave = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static BasicPickupDropTable dtITSpecialBossYellow = ScriptableObject.CreateInstance<BasicPickupDropTable>(); public static ExplicitPickupDropTable dtITHeresy = ScriptableObject.CreateInstance<ExplicitPickupDropTable>(); public static ExplicitPickupDropTable dtITWurms = ScriptableObject.CreateInstance<ExplicitPickupDropTable>(); public static MasterIndex IndexAffixHealingCore = MasterIndex.none; public static float BossWeightCommon = 10f; public static float BossWeightUncommon = 6f; public static float BossWeightRare = 4f; public static void MakeValues() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) SimuTPEffect(); MakePortal(); SetupConstants(); EnemyDropTables(); WaveDropPools(); WavePrerequesites(); bool flag = default(bool); ContentAddition.AddEntityState<PulseWaveState>(ref flag); texITWaveDefaultWhiteS = Assets.Bundle.LoadAsset<Sprite>("Assets/Simulacrum/Wave/waveBasicWhite.png"); } public static void EnemyDropTables() { //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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_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) ItemTag[] bannedItemTags = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/MonsterTeamGainsItems/dtMonsterTeamTier1Item.asset").WaitForCompletion().bannedItemTags; InfiniteTowerRun component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerRun.prefab").WaitForCompletion().GetComponent<InfiniteTowerRun>(); BasicPickupDropTable val = ScriptableObject.CreateInstance<BasicPickupDropTable>(); BasicPickupDropTable val2 = ScriptableObject.CreateInstance<BasicPickupDropTable>(); BasicPickupDropTable val3 = ScriptableObject.CreateInstance<BasicPickupDropTable>(); dtAISafeRandomVoid = ScriptableObject.CreateInstance<BasicPickupDropTable>(); ((Object)val).name = "dtITEnemyTier1"; ((Object)val2).name = "dtITEnemyTier2"; ((Object)val3).name = "dtITEnemyTier3"; val.tier1Weight = 1f; val.tier2Weight = 0f; val.tier3Weight = 0f; val.voidTier1Weight = 0.1f; val.bannedItemTags = bannedItemTags; val2.tier1Weight = 1f; val2.tier2Weight = 0f; val2.tier3Weight = 0f; val2.voidTier2Weight = 0.075f; val2.bannedItemTags = bannedItemTags; val3.tier1Weight = 1f; val3.tier2Weight = 0f; val3.tier3Weight = 0f; val3.voidTier3Weight = 0.075f; val3.bannedItemTags = bannedItemTags; component.enemyItemPattern[0].dropTable = (PickupDropTable)(object)val; component.enemyItemPattern[1].dropTable = (PickupDropTable)(object)val; component.enemyItemPattern[2].dropTable = (PickupDropTable)(object)val2; component.enemyItemPattern[3].dropTable = (PickupDropTable)(object)val2; component.enemyItemPattern[4].dropTable = (PickupDropTable)(object)val3; ((Object)dtAISafeRandomVoid).name = "dtAISafeRandomVoid"; dtAISafeRandomVoid.tier1Weight = 0f; dtAISafeRandomVoid.tier2Weight = 0f; dtAISafeRandomVoid.tier3Weight = 0f; dtAISafeRandomVoid.voidTier1Weight = 6f; dtAISafeRandomVoid.voidTier2Weight = 3f; dtAISafeRandomVoid.voidTier3Weight = 1f; dtAISafeRandomVoid.voidBossWeight = 0.1f; ((PickupDropTable)dtAISafeRandomVoid).canDropBeReplaced = false; dtAISafeRandomVoid.bannedItemTags = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"81e89866bab7f7f49ad46cd10f6d9ac8").WaitForCompletion().bannedItemTags; } public static void WaveDropPools() { dtITWaveTier3.tier3Weight = 90f; dtITWaveTier3.bossWeight = 10f; dtITVoid.voidTier1Weight = 60f; dtITVoid.voidTier2Weight = 60f; dtITVoid.voidTier3Weight = 15f; dtITVoid.voidBossWeight = 10f; ((Object)dtAllTier).name = "dtAllTier"; dtAllTier.tier1Weight = 120f; dtAllTier.tier2Weight = 20f; dtAllTier.tier3Weight = 2f; dtAllTier.bossWeight = 2f; dtAllTier.equipmentWeight = 15f; dtAllTier.lunarItemWeight = 8f; dtAllTier.voidTier1Weight = 50f; dtAllTier.voidTier2Weight = 20f; dtAllTier.voidTier3Weight = 2f; dtAllTier.voidBossWeight = 1f; dtAllTier.lunarEquipmentWeight = 1f; dtITBasicWaveOnKill.tier1Weight = 80f; dtITBasicWaveOnKill.tier2Weight = 9f; dtITBasicWaveOnKill.tier3Weight = 0.75f; dtITBasicWaveOnKill.bossWeight = 0.25f; ((Object)dtITBasicWaveOnKill).name = "dtITBasicWaveOnKill"; dtITBasicWaveOnKill.requiredItemTags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)6 }; dtITBasicBonusGreen.tier1Weight = 30f; dtITBasicBonusGreen.tier2Weight = 80f; dtITBasicBonusGreen.tier3Weight = 0f; dtITBasicBonusGreen.bossWeight = 0f; ((Object)dtITBasicBonusGreen).name = "dtITBasicBonusGreen"; dtITBossBonusRed.tier1Weight = 0f; dtITBossBonusRed.tier2Weight = 20f; dtITBossBonusRed.tier3Weight = 12f; dtITBossBonusRed.bossWeight = 0f; ((Object)dtITBossBonusRed).name = "dtITBossBonusRed"; ((Object)dtITBossGreenVoid).name = "dtITBossGreenVoid"; dtITBossGreenVoid.tier1Weight = 0f; dtITBossGreenVoid.tier2Weight = 80f; dtITBossGreenVoid.tier3Weight = 7.5f; dtITBossGreenVoid.bossWeight = 7.5f; dtITBossGreenVoid.voidTier1Weight = 20f; dtITBossGreenVoid.voidTier2Weight = 80f; dtITBossGreenVoid.voidTier3Weight = 10f; dtITBossGreenVoid.voidBossWeight = 10f; dtITBasicBonusVoid.tier1Weight = 80f; dtITBasicBonusVoid.tier2Weight = 10f; dtITBasicBonusVoid.tier3Weight = 0.25f; dtITBasicBonusVoid.bossWeight = 0f; dtITBasicBonusVoid.voidTier1Weight = 80f; dtITBasicBonusVoid.voidTier2Weight = 25f; dtITBasicBonusVoid.voidTier3Weight = 5f; ((Object)dtITBasicBonusVoid).name = "dtITBasicBonusVoid"; dtITBasicBonusLunar.tier1Weight = 80f; dtITBasicBonusLunar.tier2Weight = 10f; dtITBasicBonusLunar.tier3Weight = 1f; dtITBasicBonusLunar.bossWeight = 0f; dtITBasicBonusLunar.lunarItemWeight = 59f; dtITBasicBonusLunar.lunarEquipmentWeight = 6f; ((Object)dtITBasicBonusLunar).name = "dtITBasicBonusLunar"; dtITVoidInfestorWave.tier1Weight = 0f; dtITVoidInfestorWave.tier2Weight = 0f; dtITVoidInfestorWave.tier3Weight = 0f; dtITVoidInfestorWave.bossWeight = 30f; dtITVoidInfestorWave.voidTier1Weight = 60f; dtITVoidInfestorWave.voidTier2Weight = 30f; dtITVoidInfestorWave.voidTier3Weight = 8f; dtITVoidInfestorWave.voidBossWeight = 10f; ((Object)dtITVoidInfestorWave).name = "dtITVoidInfestorWave"; dtITSpecialBossYellow.tier1Weight = 0f; dtITSpecialBossYellow.tier2Weight = 10f; dtITSpecialBossYellow.tier3Weight = 10f; dtITSpecialBossYellow.bossWeight = 100f; ((Object)dtITSpecialBossYellow).name = "dtITSpecialBossYellow"; dtITSpecialBossYellow.voidBossWeight = 20f; dtITFamilyWaveDamage.tier1Weight = 80f; dtITFamilyWaveDamage.tier2Weight = 8f; dtITFamilyWaveDamage.tier3Weight = 0.25f; dtITFamilyWaveDamage.bossWeight = 4f; ((Object)dtITFamilyWaveDamage).name = "dtITFamilyWaveDamage"; dtITFamilyWaveDamage.requiredItemTags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; dtITFamilyWaveHealing.tier1Weight = 80f; dtITFamilyWaveHealing.tier2Weight = 8f; dtITFamilyWaveHealing.tier3Weight = 0.25f; dtITFamilyWaveHealing.bossWeight = 4f; ((Object)dtITFamilyWaveHealing).name = "dtITFamilyWaveHealing"; dtITFamilyWaveHealing.requiredItemTags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)2 }; dtITFamilyWaveUtility.tier1Weight = 80f; dtITFamilyWaveUtility.tier2Weight = 8f; dtITFamilyWaveUtility.tier3Weight = 0.25f; dtITFamilyWaveUtility.bossWeight = 4f; ((Object)dtITFamilyWaveUtility).name = "dtITFamilyWaveUtility"; dtITFamilyWaveUtility.requiredItemTags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }; dtITCategoryDamage.tier1Weight = 80f; dtITCategoryDamage.tier2Weight = 12f; dtITCategoryDamage.tier3Weight = 0.5f; dtITCategoryDamage.bossWeight = 0.25f; ((Object)dtITCategoryDamage).name = "dtITCategoryDamage"; dtITCategoryDamage.requiredItemTags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; dtITCategoryHealing.tier1Weight = 80f; dtITCategoryHealing.tier2Weight = 12f; dtITCategoryHealing.tier3Weight = 0.5f; dtITCategoryHealing.bossWeight = 0.25f; ((Object)dtITCategoryHealing).name = "dtITCategoryHealing"; dtITCategoryHealing.requiredItemTags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)2 }; dtITCategoryUtility.tier1Weight = 80f; dtITCategoryUtility.tier2Weight = 12f; dtITCategoryUtility.tier3Weight = 0.5f; dtITCategoryUtility.bossWeight = 0.25f; ((Object)dtITCategoryUtility).name = "dtITCategoryUtility"; dtITCategoryUtility.requiredItemTags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }; dtITBossCategoryDamage.tier1Weight = 0f; dtITBossCategoryDamage.tier2Weight = 20f; dtITBossCategoryDamage.tier3Weight = 10f; dtITBossCategoryDamage.bossWeight = 5f; ((Object)dtITBossCategoryDamage).name = "dtITBossCategoryDamage"; dtITBossCategoryDamage.requiredItemTags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }; dtITBossCategoryHealing.tier1Weight = 0f; dtITBossCategoryHealing.tier2Weight = 20f; dtITBossCategoryHealing.tier3Weight = 10f; dtITBossCategoryHealing.bossWeight = 5f; ((Object)dtITBossCategoryHealing).name = "dtITBossCategoryHealing"; dtITBossCategoryHealing.requiredItemTags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)2 }; dtITBossCategoryUtility.tier1Weight = 0f; dtITBossCategoryUtility.tier2Weight = 20f; dtITBossCategoryUtility.tier3Weight = 10f; dtITBossCategoryUtility.bossWeight = 5f; ((Object)dtITBossCategoryUtility).name = "dtITBossCategoryUtility"; dtITBossCategoryUtility.requiredItemTags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }; dtITSpecialEquipment.requiredItemTags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)7 }; dtITSpecialEquipment.tier1Weight = 40f; dtITSpecialEquipment.tier2Weight = 40f; dtITSpecialEquipment.tier3Weight = 20f; dtITSpecialEquipment.bossWeight = 20f; dtITSpecialEquipment.lunarItemWeight = 40f; dtITSpecialEquipment.equipmentWeight = 170f; dtITSpecialEquipment.lunarEquipmentWeight = 30f; ((Object)dtITSpecialEquipment).name = "dtITSpecialEquipment"; } public static void WavePrerequesites() { AfterWave5Prerequisite.minimumWaveCount = 6; ((Object)AfterWave5Prerequisite).name = "AfterWave5Prerequisite"; StartWave15Prerequisite.minimumWaveCount = 15; ((Object)StartWave15Prerequisite).name = "StartWave15Prerequisite"; StartWave20Prerequisite.minimumWaveCount = 20; ((Object)StartWave20Prerequisite).name = "StartWave20Prerequisite"; StartWave25Prerequisite.minimumWaveCount = 25; ((Object)StartWave25Prerequisite).name = "StartWave25Prerequisite"; StartWave30Prerequisite.minimumWaveCount = 30; ((Object)StartWave30Prerequisite).name = "StartWave30Prerequisite"; StartWave35Prerequisite.minimumWaveCount = 35; ((Object)StartWave35Prerequisite).name = "StartWave35Prerequisite"; StartWave40Prerequisite.minimumWaveCount = 40; ((Object)StartWave40Prerequisite).name = "StartWave40Prerequisite"; StartWave50Prerequisite.minimumWaveCount = 50; ((Object)StartWave50Prerequisite).name = "StartWave50Prerequisite"; AfterWave5EndWave30Prerequisite.minimumWaveCount = 6; AfterWave5EndWave30Prerequisite.maximumWaveCount = 30; ((Object)AfterWave5EndWave30Prerequisite).name = "AfterWave5EndWave30Prerequisite"; DLC2_StartWave10Prerequisite.minimumWaveCount = 10; ((Object)DLC2_StartWave10Prerequisite).name = "StartWave10PrerequisiteDLC2"; DLC2_StartWave15Prerequisite.minimumWaveCount = 15; ((Object)DLC2_StartWave15Prerequisite).name = "StartWave15PrerequisiteDLC2"; DLC2_StartWave30Prerequisite.minimumWaveCount = 30; ((Object)DLC2_StartWave30Prerequisite).name = "StartWave30PrerequisiteDLC2"; } public static void SetupConstants() { //IL_0084: 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_00c6: 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_0111: 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_012a: 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_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_01d7: 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_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_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_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) ITSuperBossWaves.wavePrefabs = Array.Empty<WeightedWave>(); ((Object)ITSuperBossWaves).name = "SuperBossWaveCategory"; ITSuperBossWaves.availabilityPeriod = 30; ITSuperBossWaves.minWaveIndex = 50; ITModSupportWaves.wavePrefabs = Array.Empty<WeightedWave>(); ((Object)ITModSupportWaves).name = "ITModSupportWaveCategory"; ITModSupportWaves.availabilityPeriod = 999; ITModSupportWaves.minWaveIndex = 998; ItemOrangeTierDef = ScriptableObject.CreateInstance<ItemTierDef>(); ItemTierDef val = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier1Def.asset").WaitForCompletion(); ItemOrangeTierDef.tier = (ItemTier)10; ((Object)ItemOrangeTierDef).name = "OrangeTierDef"; ItemOrangeTierDef.bgIconTexture = val.bgIconTexture; ItemOrangeTierDef.colorIndex = (ColorIndex)5; ItemOrangeTierDef.darkColorIndex = (ColorIndex)5; ItemOrangeTierDef.isDroppable = false; ItemOrangeTierDef.canScrap = false; ItemOrangeTierDef.canRestack = false; ItemOrangeTierDef.highlightPrefab = val.highlightPrefab; ItemOrangeTierDef.dropletDisplayPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/EquipmentOrb.prefab").WaitForCompletion(); ItemOrangeTierDef.pickupRules = (PickupRules)0; ContentAddition.AddItemTierDef(ItemOrangeTierDef); SimuEndingEveryXWaves = WConfig.cfgSimuEndingEveryXWaves.Value; SimuEndingStartAtXWaves = WConfig.cfgSimuEndingStartAtXWaves.Value; SimuEndingWaveRest = WConfig.cfgSimuEndingStartAtXWaves.Value % WConfig.cfgSimuEndingEveryXWaves.Value; SimuForcedBossEveryXWaves = WConfig.cfgSuperBossEveryXWaves.Value; SimuForcedBossStartAtXWaves = WConfig.cfgSuperBossStartAtXWaves.Value; SimuForcedBossWaveRest = WConfig.cfgSuperBossStartAtXWaves.Value % WConfig.cfgSuperBossEveryXWaves.Value; GameEndingDef val2 = Addressables.LoadAssetAsync<GameEndingDef>((object)"RoR2/Base/ClassicRun/MainEnding.asset").WaitForCompletion(); GameEndingDef val3 = Addressables.LoadAssetAsync<GameEndingDef>((object)"RoR2/DLC1/GameModes/VoidEnding.asset").WaitForCompletion(); GameEndingDef val4 = Addressables.LoadAssetAsync<GameEndingDef>((object)"RoR2/Base/ClassicRun/ObliterationEnding.asset").WaitForCompletion(); Sprite icon = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/DLC1/UI/texVoidTransformationBackground.png").WaitForCompletion(); ContentAddition.AddGameEndingDef(InfiniteTowerEnding); val3.icon = val2.icon; val3.lunarCoinReward += 5; InfiniteTowerEnding.endingTextToken = "Simulation Suspended"; InfiniteTowerEnding.lunarCoinReward = 10u; InfiniteTowerEnding.showCredits = false; InfiniteTowerEnding.isWin = true; InfiniteTowerEnding.gameOverControllerState = val4.gameOverControllerState; InfiniteTowerEnding.material = val2.material; InfiniteTowerEnding.icon = icon; InfiniteTowerEnding.backgroundColor = new Color(0.65f, 0.3f, 0.55f, 0.8f); InfiniteTowerEnding.foregroundColor = new Color(0.85f, 0.5f, 0.65f, 1f); InfiniteTowerEnding.cachedName = "InfiniteTowerEnding"; if (WConfig.cfgVoidTripleAllTier.Value) { Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidTriple/VoidTriple.prefab").WaitForCompletion().GetComponent<OptionChestBehavior>() .dropTable = (PickupDropTable)(object)dtAllTier; } DirectorCardCategorySelection val5 = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/dccsITVoidMonsters.asset").WaitForCompletion(); val5.categories[1].selectionWeight = 2f; val5.categories[2].cards[0].selectionWeight = 2; } internal static void MakePortal() { //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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) InteractableSpawnCard val = Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"RoR2/DLC1/VoidOutroPortal/iscVoidOutroPortal.asset").WaitForCompletion(); InteractableSpawnCard val2 = Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"RoR2/DLC1/PortalVoid/iscVoidPortal.asset").WaitForCompletion(); iscSimuExitPortal = Object.Instantiate<InteractableSpawnCard>(val); ((Object)iscSimuExitPortal).name = "iscSimuExitPortal"; GameObject val3 = PrefabAPI.InstantiateClone(((SpawnCard)iscSimuExitPortal).prefab, "SimulacrumExitPortal", true); ((SpawnCard)iscSimuExitPortal).prefab = val3; val3.GetComponent<GenericDisplayNameProvider>().displayToken = "PORTAL_ITEND_NAME"; val3.GetComponent<GenericInteraction>().contextToken = "PORTAL_ITEND_CONTEXT"; if (Object.op_Implicit((Object)(object)val3.GetComponent<GenericObjectiveProvider>())) { val3.GetComponent<GenericObjectiveProvider>().objectiveToken = "OBJECTIVE_ITEND"; } else { val3.AddComponent<GenericObjectiveProvider>().objectiveToken = "OBJECTIVE_ITEND"; } Object.Instantiate<GameObject>(((Component)((SpawnCard)val2).prefab.transform.GetChild(0)).gameObject, val3.transform); val3.transform.localScale = new Vector3(1.26f, 1.26f, 0.85f); val3.transform.GetChild(2).localPosition = new Vector3(0f, 4f, 0f); ((Component)val3.transform.GetChild(2).GetChild(2)).GetComponent<Light>().color = new Color(-8f, -16f, -8f); Object.Destroy((Object)(object)((Component)val3.transform.GetChild(2).GetChild(2)).GetComponent<LightIntensityCurve>()); Transform child = val3.transform.GetChild(2).GetChild(4); child.localScale *= 0.5f; ((Component)val3.transform.GetChild(2).GetChild(4)).GetComponent<EntityLocator>().entity = val3; ((Component)val3.transform.GetChild(2).GetChild(5)).gameObject.SetActive(true); ((Component)val3.transform.GetChild(2).GetChild(6)).gameObject.SetActive(false); ((Component)val3.transform.GetChild(2).GetChild(7)).gameObject.SetActive(false); Object.Destroy((Object)(object)((Component)val3.transform.GetChild(1)).gameObject); Object.Destroy((Object)(object)((Component)val3.transform.GetChild(0)).gameObject); } public static void SimuTPEffect() { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown ((Component)VoidTeleportOutEffect.transform.GetChild(9)).gameObject.SetActive(false); Object.Destroy((Object)(object)((Component)VoidTeleportOutEffect.transform.GetChild(4)).gameObject); Object.Destroy((Object)(object)((Component)VoidTeleportOutEffect.transform.GetChild(0)).gameObject); VoidTeleportOutEffect.transform.localScale = new Vector3(0.35f, 0.35f, 0.35f); VoidTeleportOutEffect.GetComponent<EffectComponent>().soundName = "Play_UI_charTeleport"; ContentAddition.AddEffect(VoidTeleportOutEffect); if (!WConfig.cfgDifferentTeleportEffect.Value) { return; } object obj = <>c.<>9__81_0; if (obj == null) { hook_GetTeleportEffectPrefab val = (orig_GetTeleportEffectPrefab orig, Run self, GameObject objectToTeleport) => (self is InfiniteTowerRun) ? VoidTeleportOutEffect : orig.Invoke(self, objectToTeleport); <>c.<>9__81_0 = val; obj = (object)val; } Run.GetTeleportEffectPrefab += (hook_GetTeleportEffectPrefab)obj; } public static void Late_MakeValues() { //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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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_0080: 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_008a: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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_00da: 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_00f9: 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_0120: 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_0155: 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_0174: 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_019b: 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_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_0227: 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) IndexAffixHealingCore = MasterCatalog.FindMasterIndex("AffixEarthHealerMaster"); ((Object)dtITHeresy).name = "dtITHeresy"; ((PickupDropTable)dtITHeresy).canDropBeReplaced = false; dtITHeresy.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[6] { new PickupDefEntry { pickupDef = (Object)(object)Items.LunarPrimaryReplacement, pickupWeight = 1.25f }, new PickupDefEntry { pickupDef = (Object)(object)Items.LunarSecondaryReplacement, pickupWeight = 1.25f }, new PickupDefEntry { pickupDef = (Object)(object)Items.LunarUtilityReplacement, pickupWeight = 1.25f }, new PickupDefEntry { pickupDef = (Object)(object)Items.LunarSpecialReplacement, pickupWeight = 1.25f }, new PickupDefEntry { pickupDef = (Object)(object)Items.Pearl, pickupWeight = 0.4f }, new PickupDefEntry { pickupDef = (Object)(object)Items.ShinyPearl, pickupWeight = 0.1f } }; ((Object)dtITWurms).name = "dtITWurms"; ((PickupDropTable)dtITWurms).canDropBeReplaced = false; dtITWurms.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[2] { new PickupDefEntry { pickupDef = (Object)(object)Items.FireballsOnHit, pickupWeight = 1f }, new PickupDefEntry { pickupDef = (Object)(object)Items.LightningStrikeOnHit, pickupWeight = 1f } }; Simu_Run_Run = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerRun.prefab").WaitForCompletion().GetComponent<InfiniteTowerRun>(); ArrayUtils.ArrayAppend<ItemDef>(ref Simu_Run_Run.blacklistedItems, ref Items.Squid); Simu_Run_Run.blacklistedItems = Simu_Run_Run.blacklistedItems.Remove(Items.DroneWeapons); Simu_Run_Run.blacklistedTags = Simu_Run_Run.blacklistedTags.Remove((ItemTag)18); ItemDef itemDef = ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex("VV_ITEM_CORNUCOPIACELL_ITEM")); if ((Object)(object)itemDef != (Object)null) { ArrayUtils.ArrayAppend<ItemDef>(ref Simu_Run_Run.blacklistedItems, ref itemDef); } itemDef = ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex("FieldAccelerator")); if ((Object)(object)itemDef != (Object)null) { ArrayUtils.ArrayAppend<ItemDef>(ref Simu_Run_Run.blacklistedItems, ref itemDef); } if (WConfig.cfgItemsEvery8.Value) { Simu_Run_Run.enemyItemPeriod = 8; } } } public class ITWave_DLC_Prerequisites : InfiniteTowerWavePrerequisites { public static ExpansionDef requiredDLC = Addressables.LoadAssetAsync<ExpansionDef>((object)"RoR2/DLC2/Common/DLC2.asset").WaitForCompletion(); public int minimumWaveCount; public override bool AreMet(InfiniteTowerRun run) { if (((Run)run).IsExpansionEnabled(requiredDLC)) { return run.waveIndex >= minimumWaveCount; } return false; } } public class ITWave_MaxWave_Prerequisites : InfiniteTowerWavePrerequisites { public int maximumWaveCount; public int minimumWaveCount; public override bool AreMet(InfiniteTowerRun run) { if (run.waveIndex >= maximumWaveCount) { return false; } return run.waveIndex >= minimumWaveCount; } } public class ArtifactTweaks { public static SpawnCard iscLemEggIT; public static void Main() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown DevotionInventoryController.Awake += new hook_Awake(DevotionInventoryController_Awake); InfiniteTowerRun.onAllEnemiesDefeatedServer += ActivateNewArtifacts_OnAllEnemiesDefeatedServer; SpawnCard val = (SpawnCard)(object)Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"RoR2/CU8/LemurianEgg/iscLemurianEgg.asset").WaitForCompletion(); iscLemEggIT = Object.Instantiate<SpawnCard>(val); ((Object)iscLemEggIT).name = "iscLemurianEggIT"; iscLemEggIT.directorCreditCost = 1; SceneDirector.onGenerateInteractableCardSelection += SimulacrumDevotionAddEgg; InfiniteTowerWaveController.PlayBeginSound += new hook_PlayBeginSound(LessOptionsDuringSacrifice); SacrificeArtifactManager.OnArtifactEnabled += new hook_OnArtifactEnabled(SacrificeArtifactManager_OnArtifactEnabled); SacrificeArtifactManager.OnArtifactDisabled += new hook_OnArtifactDisabled(SacrificeArtifactManager_OnArtifactDisabled); } private static void ActivateNewArtifacts_OnAllEnemiesDefeatedServer(InfiniteTowerWaveController self) { if (NetworkServer.active && self.isBossWave) { try { DevotionInventoryController.ActivateAllDevotedEvolution(); } catch (Exception ex) { Debug.LogWarning((object)ex); } } } private static void LessOptionsDuringSacrifice(orig_PlayBeginSound orig, InfiniteTowerWaveController self) { orig.Invoke(self); if (!WConfig.cfgSacrificeBalance.Value) { return; } bool flag = RunArtifactManager.instance.IsArtifactEnabled(Artifacts.sacrificeArtifactDef); SimulacrumExtrasHelper component = ((Component)self).GetComponent<SimulacrumExtrasHelper>(); if (flag && self.rewardOptionCount > 1) { self.rewardOptionCount--; if (Object.op_Implicit((Object)(object)component) && component.rewardOptionCount > 1) { component.rewardOptionCount--; } } } private static void DevotionInventoryController_Awake(orig_Awake orig, DevotionInventoryController self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)Run.instance) && Object.op_Implicit((Object)(object)((Component)Run.instance).GetComponent<InfiniteTowerRun>())) { self._devotionMinionInventory.GiveItem(Items.BoostHp, 5); } } private static void SimulacrumDevotionAddEgg(SceneDirector scene, DirectorCardCategorySelection dccs) { //IL_0035: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)Run.instance) && Object.op_Implicit((Object)(object)((Component)Run.instance).GetComponent<InfiniteTowerRun>()) && RunArtifactManager.instance.IsArtifactEnabled(Artifacts.Devotion)) { DirectorCard val = new DirectorCard { spawnCard = iscLemEggIT, selectionWeight = 10, preventOverhead = false, minimumStageCompletions = 0, spawnDistance = (MonsterSpawnDistance)0 }; int num = dccs.AddCategory("Egg", 40f); dccs.AddCard(num, val); } } private static void SacrificeArtifactManager_OnArtifactEnabled(orig_OnArtifactEnabled orig, RunArtifactManager runArtifactManager, ArtifactDef artifactDef) { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown orig.Invoke(runArtifactManager, artifactDef); if (NetworkServer.active && !((Object)(object)artifactDef != (Object)(object)Artifacts.sacrificeArtifactDef) && WConfig.cfgSacrificeBalance.Value && Object.op_Implicit((Object)(object)Run.instance) && Object.op_Implicit((Object)(object)((Component)Run.instance).GetComponent<InfiniteTowerRun>())) { Debug.Log((object)"Simulacrum : Added Sacrifice"); Util.GetExpAdjustedDropChancePercent += new hook_GetExpAdjustedDropChancePercent(SimulacrumNerfSacrifice); } } private static float SimulacrumNerfSacrifice(orig_GetExpAdjustedDropChancePercent orig, float baseChancePercent, GameObject characterBodyObject) { return orig.Invoke(baseChancePercent, characterBodyObject) * 0.7f; } private static void SacrificeArtifactManager_OnArtifactDisabled(orig_OnArtifactDisabled orig, RunArtifactManager runArtifactManager, ArtifactDef artifactDef) { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown orig.Invoke(runArtifactManager, artifactDef); if (NetworkServer.active && !((Object)(object)artifactDef != (Object)(object)Artifacts.sacrificeArtifactDef) && WConfig.cfgSacrificeBalance.Value && Object.op_Implicit((Object)(object)Run.instance) && Object.op_Implicit((Object)(object)((Component)Run.instance).GetComponent<InfiniteTowerRun>())) { Debug.Log((object)"Simulacrum : Removed Sacrifice"); Util.GetExpAdjustedDropChancePercent -= new hook_GetExpAdjustedDropChancePercent(SimulacrumNerfSacrifice); } } } public class CrabActivateToTravel { public class CrabTravelOnCommand : MonoBehaviour { public void Activate() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown Run instance = Run.instance; Xoroshiro128Plus safeWardRng = ((InfiniteTowerRun)((instance is InfiniteTowerRun) ? instance : null)).safeWardRng; EntityStateMachine component = ((Component)this).GetComponent<EntityStateMachine>(); component.SetNextState((EntityState)new Travelling(safeWardRng)); PurchaseInteraction component2 = ((Component)this).gameObject.GetComponent<PurchaseInteraction>(); component2.SetAvailable(false); component2.contextToken = "INFINITE_TOWER_SAFE_WARD_CONTEXT"; Object.Destroy((Object)(object)this); } } public static void Make() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown Travelling.OnEnter += new hook_OnEnter(Travelling_OnEnter); if (WConfig.cfgAwaitTravel.Value) { Unburrow.OnEnter += new hook_OnEnter(Unburrow_OnEnter); Unburrow.FixedUpdate += new hook_FixedUpdate(Unburrow_FixedUpdate); } } private static void Travelling_OnEnter(orig_OnEnter orig, Travelling self) { self.animationStateName = "Swim"; self.animationLayerName = "Base"; orig.Invoke(self); } private static void Unburrow_OnEnter(orig_OnEnter orig, Unburrow self) { //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_00c1: Expected O, but got Unknown //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_0112: 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_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_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown //IL_0131: Expected O, but got Unknown ((BaseSafeWardState)self).zone = ((EntityState)self).GetComponent<VerticalTubeZone>(); float num = VoidSafeWard_Hooks.baseRadius + (float)Run.instance.participatingPlayerCount * VoidSafeWard_Hooks.radiusPerPlayer; if (Object.op_Implicit((Object)(object)((BaseSafeWardState)self).zone) && ((BaseSafeWardState)self).zone.radius > num) { VoidSafeWard_Hooks.RadiusShrinker radiusShrinker = ((EntityState)self).gameObject.AddComponent<VoidSafeWard_Hooks.RadiusShrinker>(); radiusShrinker.originalRadius = ((BaseSafeWardState)self).zone.radius; radiusShrinker.newRadius = num; self.radius = ((BaseSafeWardState)self).zone.radius; } else { self.radius = num; } ((BaseSafeWardState)self).objectiveToken = "INFINITETOWER_OBJECTIVE_AWAITING_TRAVEL"; orig.Invoke(self); self.duration = 0f; Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "INFINITETOWER_TRAVEL_NOTICE" }); Animator modelAnimator = ((EntityState)self).GetModelAnimator(); modelAnimator.Play("BurrowedToIdle", 0, -0.2f); CrabTravelOnCommand target = ((EntityState)self).gameObject.AddComponent<CrabTravelOnCommand>(); PurchaseInteraction component = ((EntityState)self).gameObject.GetComponent<PurchaseInteraction>(); component.SetAvailable(true); component.contextToken = "INFINITETOWER_TRAVEL_CONTEXT"; PersistentCall item = new PersistentCall { m_Target = (Object)(object)target, m_MethodName = "Activate", m_Mode = (PersistentListenerMode)1, m_Arguments = new ArgumentCache() }; ((UnityEventBase)component.onPurchase).m_PersistentCalls.m_Calls.Add(item); ((UnityEventBase)component.onPurchase).m_CallsDirty = true; } private static void Unburrow_FixedUpdate(orig_FixedUpdate orig, Unburrow self) { ((EntityState)self).fixedAge = ((EntityState)self).fixedAge + Time.fixedDeltaTime; if (((EntityState)self).fixedAge > 5f && ((EntityState)self).fixedAge < 6f) { Animator modelAnimator = ((EntityState)self).GetModelAnimator(); modelAnimator.Play("BurrowedToIdle", 0, 12f); } } } public class ITRun_Hooks { public static SceneDef PreviousSceneDef; internal static void AddHooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown InfiniteTowerRun.PreStartClient += new hook_PreStartClient(ITRun_SetThingsOn_Start); InfiniteTowerRun.OnDestroy += new hook_OnDestroy(ITRun_SetThingsOn_End); InfiniteTowerRun.OnWaveAllEnemiesDefeatedServer += new hook_OnWaveAllEnemiesDefeatedServer(PreventRepeatingStages); InfiniteTowerWaveCategory.SelectWavePrefab += new hook_SelectWavePrefab(ForceSuperBossWave); InfiniteTowerRun.AdvanceWave += new hook_AdvanceWave(MakeWavesMoreCommon); if (WConfig.cfgItemsFrequently.Value) { InfiniteTowerRun.AdvanceWave += new hook_AdvanceWave(MoreItems_AdvanceWave); } } private static void MakeWavesMoreCommon(orig_AdvanceWave orig, InfiniteTowerRun self) { orig.Invoke(self); if ((self.waveIndex == 50 || self.waveIndex == 31) && Const.ITBossWaves.wavePrefabs[0].weight > 1f) { float num = 1f; num = ((self.waveIndex != 31) ? Const.DefaultWeightMultiplier2 : Const.DefaultWeightMultiplier1); Const.ITBasicWaves.wavePrefabs[0].weight = Const.BasicWaveWeight * num; Const.ITBasicWaves.GenerateWeightedSelection(); Const.ITBossWaves.wavePrefabs[0].weight = Const.BasicBossWaveWight * num; Const.ITBossWaves.GenerateWeightedSelection(); } } private static void MoreItems_AdvanceWave(orig_AdvanceWave orig, InfiniteTowerRun self) { //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_0116: 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_013e: 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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0158: 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_017a: 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_018c: 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_01a4: 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_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_01bb: Expected O, but got Unknown if (self.enemyItemPatternIndex >= 5 && self.enemyItemPeriod > 5) { self.enemyItemPeriod /= 2; } orig.Invoke(self); if (!WConfig.cfgDumpInfo.Value || !NetworkServer.active || self.waveIndex <= self.enemyItemPeriod) { return; } int num = self.waveIndex; int num2 = 0; int num3 = 8; while (num >= num3) { num -= num3; num2++; if (num2 % 5 == 0 && num3 > 2) { num3 /= 2; } } Debug.Log((object)("WaveIndex:" + self.waveIndex + " ExpectedItemCount " + num2)); while (self.enemyItemPatternIndex < num2) { EnemyItemEntry[] enemyItemPattern = self.enemyItemPattern; int enemyItemPatternIndex = self.enemyItemPatternIndex; self.enemyItemPatternIndex = enemyItemPatternIndex + 1; EnemyItemEntry val = enemyItemPattern[enemyItemPatternIndex % self.enemyItemPattern.Length]; if (!Object.op_Implicit((Object)(object)val.dropTable)) { break; } PickupIndex val2 = val.dropTable.GenerateDrop(self.enemyItemRng); if (val2 != PickupIndex.none) { PickupDef pickupDef = PickupCatalog.GetPickupDef(val2); if (pickupDef != null) { self.enemyInventory.GiveItem(pickupDef.itemIndex, val.stacks); Chat.SendBroadcastChat((ChatMessageBase)new PlayerPickupChatMessage { baseToken = "INFINITETOWER_ADD_ITEM", pickupToken = pickupDef.nameToken, pickupColor = Color32.op_Implicit(pickupDef.baseColor) }); } } } } public static GameObject ForceSuperBossWave(orig_SelectWavePrefab orig, InfiniteTowerWaveCategory self, InfiniteTowerRun run, Xoroshiro128Plus rng) { if (run.waveIndex >= Const.SimuForcedBossStartAtXWaves && run.waveIndex % Const.SimuForcedBossEveryXWaves == Const.SimuForcedBossWaveRest) { GameObject val = orig.Invoke(Const.ITSuperBossWaves, run, rng); Debug.Log((object)"Forcing SuperBoss"); Debug.Log((object)(run.waveIndex + " Forced SuperBoss " + (object)val)); return val; } GameObject val2 = orig.Invoke(self, run, rng); Debug.Log((object)(run.waveIndex + " SelectWavePrefab " + (object)val2)); return val2; } public static void PreventRepeatingStages(orig_OnWaveAllEnemiesDefeatedServer orig, InfiniteTowerRun self, InfiniteTowerWaveController wc) { orig.Invoke(self, wc); if (!self.IsStageTransitionWave()) { return; } if ((Object)(object)PreviousSceneDef != (Object)null && (Object)(object)PreviousSceneDef == (Object)(object)((Run)self).nextStageScene) { int num = 0; do { num++; ((Run)self).PickNextStageSceneFromCurrentSceneDestinations(); } while ((Object)(object)((Run)self).nextStageScene == (Object)(object)PreviousSceneDef && num < 10); } PreviousSceneDef = Stage.instance.sceneDef; } private static void ITRun_SetThingsOn_Start(orig_PreStartClient orig, InfiniteTowerRun self) { orig.Invoke(self); Const.ITBossWaves.availabilityPeriod = 5; Const.ITBossWaves.minWaveIndex = 0; if (Const.ITBossWaves.wavePrefabs[0].weight < 1f) { Const.ITBasicWaves.wavePrefabs[0].weight = Const.BasicWaveWeight; Const.ITBasicWaves.GenerateWeightedSelection(); Const.ITBossWaves.wavePrefabs[0].weight = Const.BasicBossWaveWight; Const.ITBasicWaves.GenerateWeightedSelection(); } SimulacrumDCCS.MakeITSand(makeITSand: true); if (WConfig.cfgVoidCoins.Value) { VoidCoin.VoidCoinRunStart(); } GameObject val = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/EquipmentDroneMaster"); ((Behaviour)val.GetComponent<StartEvent>()).enabled = false; val.AddComponent<EquipmentDroneInSimulacrum>(); Object.Destroy((Object)(object)val.GetComponent<SetDontDestroyOnLoad>()); ((Component)self).gameObject.AddComponent<Hooks_Other.LastWaveHolder>(); } private static void ITRun_SetThingsOn_End(orig_OnDestroy orig, InfiniteTowerRun self) { orig.Invoke(self); GameObject val = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/EquipmentDroneMaster"); ((Behaviour)val.GetComponent<StartEvent>()).enabled = true; val.AddComponent<SetDontDestroyOnLoad>(); Object.Destroy((Object)(object)val.GetComponent<EquipmentDroneInSimulacrum>()); SimulacrumDCCS.MakeITSand(makeITSand: false); if (WConfig.cfgVoidCoins.Value) { VoidCoin.VoidCoinRunEnd(); } } } public class Hooks_Other { public class ResetWavesCounter : MonoBehaviour { public void Reset() { //IL_0075: 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) Debug.LogWarning((object)"Attempting to reset Simulacrum Wave High-scores"); MPEventSystem val = MPEventSystem.instancesList[0]; UserProfile val2; if ((Object)(object)val == (Object)null) { val2 = null; } else { LocalUser localUser = val.localUser; val2 = ((localUser != null) ? localUser.userProfile : null); } UserProfile val3 = val2; if (val3 != null) { StatSheet statSheet = val3.statSheet; SurvivorDef survivorPreference = val3.GetSurvivorPreference(); if (Object.op_Implicit((Object)(object)survivorPreference)) { string bodyName = BodyCatalog.GetBodyName(SurvivorCatalog.GetBodyIndexFromSurvivorIndex(survivorPreference.survivorIndex)); Debug.LogWarning((object)("Resetting for " + bodyName)); statSheet.SetStatValueFromString(PerBodyStatDef.highestInfiniteTowerWaveReachedEasy.FindStatDef(bodyName ?? ""), "0"); statSheet.SetStatValueFromString(PerBodyStatDef.highestInfiniteTowerWaveReachedNormal.FindStatDef(bodyName ?? ""), "0"); statSheet.SetStatValueFromString(PerBodyStatDef.highestInfiniteTowerWaveReachedHard.FindStatDef(bodyName ?? ""), "0"); } } } public void ResetAll() { //IL_00a9: Unknown result type (might be due to invalid IL or missing references) Debug.LogWarning((object)"Attempting to reset ALL Simulacrum Wave High-scores"); MPEventSystem val = MPEventSystem.instancesList[0]; UserProfile val2; if ((Object)(object)val == (Object)null) { val2 = null; } else { LocalUser localUser = val.localUser; val2 = ((localUser != null) ? localUser.userProfile : null); } UserProfile val3 = val2; if (val3 == null) { return; } StatSheet statSheet = val3.statSheet; SurvivorDef[] survivorDefs = SurvivorCatalog.survivorDefs; foreach (SurvivorDef val4 in survivorDefs) { if (Object.op_Implicit((Object)(object)val4.bodyPrefab)) { CharacterBody component = val4.bodyPrefab.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component)) { string bodyName = BodyCatalog.GetBodyName(component.bodyIndex); Debug.LogWarning((object)("Resetting for " + bodyName)); statSheet.SetStatValueFromString(PerBodyStatDef.highestInfiniteTowerWaveReachedEasy.FindStatDef(bodyName ?? ""), "0"); statSheet.SetStatValueFromString(PerBodyStatDef.highestInfiniteTowerWaveReachedNormal.FindStatDef(bodyName ?? ""), "0"); statSheet.SetStatValueFromString(PerBodyStatDef.highestInfiniteTowerWaveReachedHard.FindStatDef(bodyName ?? ""), "0"); } } } } public void Set50D() { Set50(0); } public void Set50R() { Set50(1); } public void Set50M() { Set50(2); } public void Set50(int difficulty) { //IL_0075: 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) Debug.LogWarning((object)"Attempting to set 50 Simulacrum Wave High-scores"); MPEventSystem val = MPEventSystem.instancesList[0]; UserProfile val2; if ((Object)(object)val == (Object)null) { val2 = null; } else { LocalUser localUser = val.localUser; val2 = ((localUser != null) ? localUser.userProfile : null); } UserProfile val3 = val2; if (val3 == null) { return; } StatSheet statSheet = val3.statSheet; SurvivorDef survivorPreference = val3.GetSurvivorPreference(); if (Object.op_Implicit((Object)(object)survivorPreference)) { string bodyName = BodyCatalog.GetBodyName(SurvivorCatalog.GetBodyIndexFromSurvivorIndex(survivorPreference.survivorIndex)); Debug.LogWarning((object)("Setting 50 for " + bodyName)); switch (difficulty) { case 0: statSheet.SetStatValueFromString(PerBodyStatDef.highestInfiniteTowerWaveReachedEasy.FindStatDef(bodyName ?? ""), "50"); break; case 1: statSheet.SetStatValueFromString(PerBodyStatDef.highestInfiniteTowerWaveReachedNormal.FindStatDef(bodyName ?? ""), "50"); break; case 2: statSheet.SetStatValueFromString(PerBodyStatDef.highestInfiniteTowerWaveReachedHard.FindStatDef(bodyName ?? ""), "50"); break; } } } } public class LastWaveHolder : MonoBehaviour { public GameObject UIThing; public GameObject LatestWave; } internal static void AddHooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown PickupCatalog.FindPickupIndex_ItemTier += new hook_FindPickupIndex_ItemTier(PickupCatalog_FindPickupIndex_ItemTier); ScavengerItemGranter.Start += new hook_Start(SimuGiveScavVoidItems); EventFunctions.BeginEnding += new hook_BeginEnding(SimulacrumEndingBeginEnding); if (WConfig.cfgWaveOnEndScreen.Value) { GameEndReportPanelController.SetDisplayData += new hook_SetDisplayData(GameEndReportPanelController_SetDisplayData); } InfiniteTowerMenuController.OnEventSystemDiscovered += new hook_OnEventSystemDiscovered(InfiniteTowerMenuController_OnEventSystemDiscovered); } private static void InfiniteTowerMenuController_OnEventSystemDiscovered(orig_OnEventSystemDiscovered orig, InfiniteTowerMenuController self, MPEventSystem eventSystem) { //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_014f: 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_01ed: 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_0270: 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_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0296: 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_02a1: Expected O, but got Unknown //IL_02a6: Expected O, but got Unknown //IL_02a8: 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_02b4: 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_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Expected O, but got Unknown //IL_02d6: Expected O, but got Unknown //IL_02e1: Expected O, but got Unknown //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Expected O, but got Unknown //IL_035c: Expected O, but got Unknown //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_037c: 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_0387: Expected O, but got Unknown //IL_038c: Expected O, but got Unknown //IL_0397: Expected O, but got Unknown //IL_03da: 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_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: 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_0405: 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_0410: Expected O, but got Unknown //IL_0415: Expected O, but got Unknown //IL_0417: 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_0423: Unknown result type (might be due to invalid IL or missing references) //IL_042e: 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_0435: 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_0440: Expected O, but got Unknown //IL_0445: Expected O, but got Unknown //IL_0450: Expected O, but got Unknown //IL_0493: 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_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_04ac: 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_04b9: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04bf: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Expected O, but got Unknown //IL_04ce: Expected O, but got Unknown //IL_04d0: 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_04dc: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_04e9: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04ef: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Expected O, but got Unknown //IL_04fe: Expected O, but got Unknown //IL_0509: Expected O, but got Unknown //IL_054c: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_0558: Unknown result type (might be due to invalid IL or missing references) //IL_055d: Unknown result type (might be due to invalid IL or missing references) //IL_0565: Unknown result type (might be due to invalid IL or missing references) //IL_0570: Unknown result type (might be due to invalid IL or missing references) //IL_0572: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Expected O, but got Unknown //IL_0587: Expected O, but got Unknown //IL_0589: Unknown result type (might be due to invalid IL or missing references) //IL_058e: Unknown result type (might be due to invalid IL or missing references) //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_05a0: Unknown result type (might be due to invalid IL or missing references) //IL_05a2: 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_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05b2: Expected O, but got Unknown //IL_05b7: Expected O, but got Unknown //IL_05c2: Expected O, but got Unknown orig.Invoke(self, eventSystem); if (WConfig.ResetStatsButton.Value) { Transform child = ((Component)self).transform.GetChild(0).GetChild(1).GetChild(0); Transform val = child.Find("Reset"); Transform val2 = child.Find("ResetAll"); Transform val3 = child.Find("Set50D"); Transform val4 = child.Find("Set50R"); Transform val5 = child.Find("Set50M"); if (child.childCount == 2) { GameObject gameObject = ((Component)child.GetChild(1)).gameObject; GameObject val6 = Object.Instantiate<GameObject>(gameObject, child); ((Object)val6).name = "ResetAll"; ((Graphic)val6.GetComponent<Image>()).color = Color.red; ((Component)val6.transform.GetChild(1)).GetComponent<LanguageTextMeshController>().token = "Reset all Survivors"; val2 = val6.transform; val6 = Object.Instantiate<GameObject>(gameObject, child); ((Object)val6).name = "Reset"; ((Graphic)val6.GetComponent<Image>()).color = Color.red; ((Component)val6.transform.GetChild(1)).GetComponent<LanguageTextMeshController>().token = "Reset selected Survivor"; val = val6.transform; val6 = Object.Instantiate<GameObject>(gameObject, child); ((Object)val6).name = "Set50D"; ((Graphic)val6.GetComponent<Image>()).color = Color.magenta; ((Component)val6.transform.GetChild(1)).GetComponent<LanguageTextMeshController>().token = "Set to 50 for selected Driz"; val3 = val6.transform; val6 = Object.Instantiate<GameObject>(gameObject, child); ((Object)val6).name = "Set50R"; ((Graphic)val6.GetComponent<Image>()).color = Color.magenta; ((Component)val6.transform.GetChild(1)).GetComponent<LanguageTextMeshController>().token = "Set to 50 for selected Rain"; val4 = val6.transform; val6 = Object.Instantiate<GameObject>(gameObject, child); ((Object)val6).name = "Set50M"; ((Graphic)val6.GetComponent<Image>()).color = Color.magenta; ((Component)val6.transform.GetChild(1)).GetComponent<LanguageTextMeshController>().token = "Set to 50 for selected Mons"; val5 = val6.transform; child.GetChild(1).SetAsLastSibling(); } if (Object.op_Implicit((Object)(object)val)) { ((Component)val.GetChild(2)).gameObject.SetActive(false); HGButton component = ((Component)val).GetComponent<HGButton>(); ResetWavesCounter target = ((Component)self).gameObject.AddComponent<ResetWavesCounter>(); ((UnityEventBase)((Button)component).onClick).m_PersistentCalls = new PersistentCallGroup { m_Calls = new List<PersistentCall> { new PersistentCall { m_Target = (Object)(object)target, m_MethodName = "Reset", m_Mode = (PersistentListenerMode)1, m_Arguments = new ArgumentCache() }, new PersistentCall { m_Target = (Object)(object)self, m_MethodName = "UpdateDisplayedSurvivor", m_Mode = (PersistentListenerMode)1, m_Arguments = new ArgumentCache() } } }; } if (Object.op_Implicit((Object)(object)val2)) { ((Component)val2.GetChild(2)).gameObject.SetActive(false); HGButton component2 = ((Component)val2).GetComponent<HGButton>(); ResetWavesCounter target2 = ((Component)self).gameObject.AddComponent<ResetWavesCounter>(); ((UnityEventBase)((Button)component2).onClick).m_PersistentCalls = new PersistentCallGroup { m_Calls = new List<PersistentCall> { new PersistentCall { m_Target = (Object)(object)target2, m_MethodName = "ResetAll", m_Mode = (PersistentListenerMode)1, m_Arguments = new ArgumentCache() }, new PersistentCall { m_Target = (Object)(object)self, m_MethodName = "UpdateDisplayedSurvivor", m_Mode = (PersistentListenerMode)1, m_Arguments = new ArgumentCache() } } }; } if (Object.op_Implicit((Object)(object)val3)) { ((Component)val3.GetChild(2)).gameObject.SetActive(false); HGButton component3 = ((Component)val3).GetComponent<HGButton>(); ResetWavesCounter target3 = ((Component)self).gameObject.AddComponent<ResetWavesCounter>(); ((UnityEventBase)((Button)component3).onClick).m_PersistentCalls = new PersistentCallGroup { m_Calls = new List<PersistentCall> { new PersistentCall { m_Target = (Object)(object)target3, m_MethodName = "Set50D", m_Mode = (PersistentListenerMode)1, m_Arguments = new ArgumentCache() }, new PersistentCall { m_Target = (Object)(object)self, m_MethodName = "UpdateDisplayedSurvivor", m_Mode = (PersistentListenerMode)1, m_Arguments = new ArgumentCache() } } }; } if (Object.op_Implicit((Object)(object)val4)) { ((Component)val4.GetChild(2)).gameObject.SetActive(false); HGButton component4 = ((Component)val4).GetComponent<HGButton>(); ResetWavesCounter target4 = ((Component)self).gameObject.AddComponent<ResetWavesCounter>(); ((UnityEventBase)((Button)component4).onClick).m_PersistentCalls = new PersistentCallGroup { m_Calls = new List<PersistentCall> { new PersistentCall { m_Target = (Object)(object)target4, m_MethodName = "Set50R", m_Mode = (PersistentListenerMode)1, m_Arguments = new ArgumentCache() }, new PersistentCall { m_Target = (Object)(object)self, m_MethodName = "UpdateDisplayedSurvivor", m_Mode = (PersistentListenerMode)1, m_Arguments = new ArgumentCache() } } }; } if (Object.op_Implicit((Object)(object)val5)) { ((Component)val5.GetChild(2)).gameObject.SetActive(false); HGButton component5 = ((Component)val5).GetComponent<HGButton>(); ResetWavesCounter target5 = ((Component)self).gameObject.AddComponent<ResetWavesCounter>(); ((UnityEventBase)((Button)component5).onClick).m_PersistentCalls = new PersistentCallGroup { m_Calls = new List<PersistentCall> { new PersistentCall { m_Target = (Object)(object)target5, m_MethodName = "Set50M", m_Mode = (PersistentListenerMode)1, m_Arguments = new ArgumentCache() }, new PersistentCall { m_Target = (Object)(object)self, m_MethodName = "UpdateDisplayedSurvivor", m_Mode = (PersistentListenerMode)1, m_Arguments = new ArgumentCache() } } }; } } } private static void GameEndReportPanelController_SetDisplayData(orig_SetDisplayData orig, GameEndReportPanelController self, DisplayData newDisplayData) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: 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_02b3: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, newDisplayData); if (!Object.op_Implicit((Object)(object)Run.instance) || !Object.op_Implicit((Object)(object)((Component)Run.instance).GetComponent<InfiniteTowerRun>())) { return; } LastWaveHolder component = ((Component)Run.instance).GetComponent<LastWaveHolder>(); if (!Object.op_Implicit((Object)(object)component)) { return; } GameObject val = component.LatestWave; if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)((Component)Run.instance).GetComponent<InfiniteTowerRun>().waveInstance)) { val = ((Component)Run.instance).GetComponent<InfiniteTowerRun>().waveInstance.GetComponent<InfiniteTowerWaveController>().overlayEntries[1].prefab; } if (!Object.op_Implicit((Object)(object)val) || !Object.op_Implicit((Object)(object)self.selectedDifficultyLabel) || Object.op_Implicit((Object)(object)component.UIThing)) { return; } GameObject val2 = Object.Instantiate<GameObject>(((Component)((Component)self.selectedDifficultyLabel).transform.parent).gameObject, ((Component)self.selectedDifficultyLabel).transform.parent.parent); val2.transform.SetSiblingIndex(1); component.UIThing = val2; ((Component)val2.transform.GetChild(0)).GetComponent<LanguageTextMeshController>().token = "Last Wave:"; string token = ((Component)val.transform.GetChild(0).GetChild(1).GetChild(0)).GetComponent<InfiniteTowerWaveCounter>().token; token = Language.GetString(token); string format = token; Run instance = Run.instance; token = string.Format(format, ((InfiniteTowerRun)((instance is InfiniteTowerRun) ? instance : null)).waveIndex); ((Component)val2.transform.GetChild(2)).GetComponent<LanguageTextMeshController>().token = token; Image component2 = ((Component)val2.transform.GetChild(3)).GetComponent<Image>(); Image component3 = ((Component)val.transform.GetChild(0).GetChild(0).GetChild(0)).GetComponent<Image>(); component2.sprite = component3.sprite; ((Graphic)component2).color = ((Graphic)component3).color; ((Graphic)((Component)val2.transform.GetChild(2)).GetComponent<HGTextMeshProUGUI>()).color = ((Graphic)((Component)val.transform.GetChild(0).GetChild(1).GetChild(0)).GetComponent<TextMeshProUGUI>()).color; val2.transform.GetChild(2).SetAsLastSibling(); try { if (val.transform.GetChild(0).childCount == 4) { GameObject val3 = Object.Instantiate<GameObject>(((Component)component2).gameObject, val2.transform); component3 = ((Component)val.transform.GetChild(0).GetChild(3).GetChild(0)).GetComponent<Image>(); component2 = val3.GetComponent<Image>(); component2.sprite = component3.sprite; ((Graphic)component2).color = ((Graphic)component3).color; } } catch (Exception) { } TooltipProvider val4 = val2.AddComponent<TooltipProvider>(); val4.titleToken = token; val4.titleColor = ((Graphic)((Component)val.transform.GetChild(0).GetChild(2)).GetComponent<Image>()).color; val4.bodyToken = ((Component)val.transform.GetChild(0).GetChild(1).GetChild(1)).GetComponent<LanguageTextMeshController>().token; } public static void SimulacrumEndingBeginEnding(orig_BeginEnding orig, EventFunctions self, GameEndingDef gameEndingDef) { //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_00b0: Expected O, but got Unknown //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown if ((Object)(object)gameEndingDef == (Object)(object)GameEndings.VoidEnding && Object.op_Implicit((Object)(object)((Component)Run.instance).GetComponent<InfiniteTowerRun>())) { orig.Invoke(self, Const.InfiniteTowerEnding); foreach (CharacterBody readOnlyInstances in CharacterBody.readOnlyInstancesList) { if (readOnlyInstances.hasEffectiveAuthority) { } EntityStateMachine val = EntityStateMachine.FindByCustomName(((Component)readOnlyInstances).gameObject, "Body"); if (Object.op_Implicit((Object)(object)val)) { val.SetInterruptState((EntityState)new Idle(), (InterruptPriority)5); } } Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "<color=#F4ADFA><sprite name=\"VoidCoin\" tint=1> The Simulation has been suspended. Printing results.. <sprite name=\"VoidCoin\" tint=1></color>" }); } else { orig.Invoke(self, gameEndingDef); } } public static void SimuGiveScavVoidItems(orig_Start orig, ScavengerItemGranter self) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Invalid comparison between Unknown and I4 //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Invalid comparison between Unknown and I4 orig.Invoke(self); if (Run.instance is InfiniteTowerRun) { Inventory component = ((Component)self).GetComponent<Inventory>(); PickupIndex val = ((PickupDropTable)Const.dtAISafeRandomVoid).GenerateDrop(Run.instance.treasureRng); ItemDef itemDef = ItemCatalog.GetItemDef(((PickupIndex)(ref val)).pickupDef.itemIndex); if ((int)itemDef.tier == 6) { component.GiveItem(itemDef, 3); Debug.Log((object)("Giving Simu Scav 3x " + (object)itemDef)); } else if ((int)itemDef.tier == 7) { component.GiveItem(itemDef, 2); Debug.Log((object)("Giving Simu Scav 2x " + (object)itemDef)); } else { component.GiveItem(itemDef, 1); Debug.Log((object)("Giving Simu Scav 1x " + (object)itemDef)); } } } private static PickupIndex PickupCatalog_FindPickupIndex_ItemTier(orig_FindPickupIndex_ItemTier orig, ItemTier tier) { //IL_0001: 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_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_0051: 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_003b: Unkno