Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of ChunkyMode v0.4.12
ChunkyMode.dll
Decompiled a year ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Treebot.TreebotFlower; using HDeMods.CM; using HDeMods.HurricaneOptionalMods; using HG.Reflection; using HarmonyLib; using IL.EntityStates.Treebot.TreebotFlower; using IL.EntityStates.VoidSurvivor.Weapon; using IL.RoR2; using IL.RoR2.Projectile; using MaterialHud; using Microsoft.CodeAnalysis; using ModdedEntityStates.Aliem; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using On.RoR2; using ProperSave; using ProperSave.Data; using R2API; using RedGuyMod.Content; using RiskOfOptions; using RiskOfOptions.Components.Options; using RiskOfOptions.Components.Panel; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Orbs; using RoR2.Projectile; using SS2.Survivors; using SubmarinerMod.SubmarinerCharacter; using UnityEngine; using UnityEngine.Bindings; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Serialization; [assembly: OptIn] [assembly: IgnoresAccessChecksTo("RiskOfOptions")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyInformationalVersion("1.0.0+cc3f060f019e20efd95af6981dbee52a4bacf107")] [assembly: AssemblyProduct("ChunkyMode")] [assembly: AssemblyTitle("ChunkyMode")] [assembly: AssemblyCompany("ChunkyMode")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] [Microsoft.CodeAnalysis.Embedded] [CompilerGenerated] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace HDeMods { public static class Hurricane { [CompilerGenerated] private static class <>O { public static hook_Init <0>__VerifyInterloper; public static Action<Run, RuleBook> <1>__Run_onRunSetRuleBookGlobal; public static Action<Run> <2>__Run_onRunStartGlobal; public static Action<Run> <3>__Run_onRunDestroyGlobal; public static Action <4>__GenerateCache; public static RoO.LogFunc <5>__Error; public static RoO.LogFunc <6>__Debug; public static UnityAction <7>__ResetToDefault; public static StatHookEventHandler <8>__RecalculateStatsAPI_GetStatCoefficients; public static UpdateHealthEventHandler <9>__ShieldRechargeAndBarrierDecayRate; public static Manipulator <10>__REXHealPulse; public static Manipulator <11>__REXPrimaryAttack; public static Manipulator <12>__AcridRegenBuff; public static Manipulator <13>__CaptainWardBuff; public static Manipulator <14>__VoidFiendSuppressBuff; public static Manipulator <15>__SeekerUnseenHandBuff; public static Manipulator <16>__ChefSotSChefsKissBuff; public static Action<SceneDirector> <17>__SceneDirector_onPrePopulateSceneServer; public static hook_Awake <18>__CombatDirector_Awake; public static HealEventHandler <19>__HealingOverride; public static hook_BeginStage <20>__Run_BeginStage; public static Action<CharacterBody> <21>__TrackShittersAdd; public static Action<CharacterBody> <22>__TrackShittersRemove; public static Action<InfiniteTowerWaveController> <23>__OnAllEnemiesDefeatedServer; public static hook_BeginNextWave <24>__InfiniteTowerRun_BeginNextWave; public static Manipulator <25>__InfiniteTowerWaveController_Initialize; public static Manipulator <26>__InfiniteTowerWaveController_FixedUpdate; public static Manipulator <27>__ExtractRNGFromCombatDirector; public static hook_PrepareNewMonsterWave <28>__CombatDirector_PrepareNewMonsterWave; } public static AssetBundle HurricaneBundle; public static DifficultyDef LegacyDifficultyDef; public static DifficultyIndex LegacyDifficultyIndex; public static DifficultyDef HurricaneDifficultyDef; public static DifficultyIndex HurricaneDifficultyIndex; public static GameObject HurricaneInfo; private static GameObject m_hurricaneInfo; private static bool shouldRun; private static int ogMonsterCap; private static int ogRunLevelCap; internal static bool isSimulacrumRun; internal static int totalBlindPest; internal static int totalLemurians; internal static bool waveStarted; private static float enemyYapTimer; public static ConfigEntry<bool> doHealingBuffs { get; set; } public static ConfigEntry<bool> doEnemyLimitBoost { get; set; } public static ConfigEntry<bool> doGoldPenalty { get; set; } public static ConfigEntry<bool> doEnemyNerfs { get; set; } public static ConfigEntry<float> enemyChanceToYap { get; set; } public static ConfigEntry<float> enemyYapCooldown { get; set; } public static ConfigEntry<bool> limitPest { get; set; } public static ConfigEntry<float> limitPestAmount { get; set; } internal static void StartUp() { if (Chainloader.PluginInfos.ContainsKey("com.HDeDeDe.Hurricane")) { Log.Error("Hurricane is present! Aborting launch to prevent overlap."); return; } if (!File.Exists(Assembly.GetExecutingAssembly().Location.Replace("ChunkyMode.dll", "chunkydifficon"))) { Log.Fatal("Could not load asset bundle, aborting!"); return; } HurricaneBundle = AssetBundle.LoadFromFile(Assembly.GetExecutingAssembly().Location.Replace("ChunkyMode.dll", "chunkydifficon")); CreateNetworkObject(); AddHooks(); } private static void CreateNetworkObject() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown GameObject val = new GameObject("thing"); val.AddComponent<NetworkIdentity>(); HurricaneInfo = PrefabAPI.InstantiateClone(val, "ChunkyRunInfo"); Object.Destroy((Object)(object)val); HurricaneInfo.AddComponent<HurricaneRunInfo>(); ChatMessageBase.chatMessageTypeToIndex.Add(typeof(HurricaneChatEnemyYap), (byte)ChatMessageBase.chatMessageIndexToType.Count); ChatMessageBase.chatMessageIndexToType.Add(typeof(HurricaneChatEnemyYap)); } private static void AddHooks() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown object obj = <>O.<0>__VerifyInterloper; if (obj == null) { hook_Init val = VerifyInterloper; <>O.<0>__VerifyInterloper = val; obj = (object)val; } RewiredIntegrationManager.Init += (hook_Init)obj; Run.onRunSetRuleBookGlobal += Run_onRunSetRuleBookGlobal; Run.onRunStartGlobal += Run_onRunStartGlobal; Run.onRunDestroyGlobal += Run_onRunDestroyGlobal; RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(HurricaneCachedIndexes.GenerateCache)); if (Starstorm2.Enabled) { Starstorm2.GenerateHooks(); } if (AlienHominid.Enabled) { AlienHominid.GenerateHooks(); } if (Ravager.Enabled) { Ravager.GenerateHooks(); } if (Submariner.Enabled) { Submariner.GenerateHooks(); } } private static void RemoveHooks() { Run.onRunSetRuleBookGlobal -= Run_onRunSetRuleBookGlobal; Run.onRunStartGlobal -= Run_onRunStartGlobal; Run.onRunDestroyGlobal -= Run_onRunDestroyGlobal; RoR2Application.onLoad = (Action)Delegate.Remove(RoR2Application.onLoad, new Action(HurricaneCachedIndexes.GenerateCache)); } private static void VerifyInterloper(orig_Init init) { if (!InterlopingArtifactPlugin.startupSuccess) { Log.Fatal("Artifact of Interloping did not start up successfully, aborting!"); RemoveHooks(); init.Invoke(); return; } BindSettings(); AddHurricaneDifficulty(); AddLegacyDifficulty(); if (RoO.Enabled) { AddOptions(); } if (Saving.Enabled) { Saving.SetUp(); } if (RiskUI.Enabled) { RiskUI.AddLegacyDifficulty(); } init.Invoke(); } private static void AddHurricaneDifficulty() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) HurricaneDifficultyDef = new DifficultyDef(4f, "HURRICANE_DIFF_NAME", "HURRICANE_DIFF_ICON", "HURRICANE_DIFF_DESCRIPTION", Color32.op_Implicit(new Color32((byte)117, (byte)59, (byte)217, byte.MaxValue)), "hc", true); HurricaneDifficultyIndex = DifficultyAPI.AddDifficulty(HurricaneDifficultyDef); } private static void AddLegacyDifficulty() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_005d: 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) LegacyDifficultyDef = new DifficultyDef(4f, "ChunkyMode", "CHUNKYMODEDIFFMOD_ICON", "CHUNKYMODEDIFFMOD_DIFF_DESCRIPTION", Color32.op_Implicit(new Color32((byte)61, (byte)25, byte.MaxValue, byte.MaxValue)), "cm", true) { iconSprite = HurricaneBundle.LoadAsset<Sprite>("texChunkyModeDiffIcon"), foundIconSprite = true }; LegacyDifficultyIndex = DifficultyAPI.AddDifficulty(LegacyDifficultyDef); } public static void BindSettings() { doHealingBuffs = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<bool>("Unlisted Difficulty Modifiers", "Do Healing Buffs", true, "Enables buffs to some survivor healing skills. Disable if you want a harder challenge."); doEnemyLimitBoost = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<bool>("Unlisted Difficulty Modifiers", "Do Enemy Limit Boost", true, "Enables enemy limit increase. If your computer is struggling to run on Chunky Mode, consider disabling this."); doGoldPenalty = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<bool>("Unlisted Difficulty Modifiers", "Do Gold Penalty", true, "Enables a -10% gold penalty. Disable to speed up gameplay."); doEnemyNerfs = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<bool>("Unlisted Difficulty Modifiers", "Do Enemy Nerfs", true, "Enables enemy nerfs. Disable if you like unreactable Wandering Vagrants."); enemyChanceToYap = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<float>("Yapping", "Enemy Yap Chance", 0.03f, "The probability of enemies to yap. Set to 0 to stop the yapping."); enemyYapCooldown = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<float>("Yapping", "Enemy Yap Cooldown", 30f, "The amount of time before enemies are allowed to yap again. Set to 0 for turbo yapping."); limitPest = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<bool>("Simulacrum", "Limit Blind Pest", true, "Enable Blind Pest limit in Simulacrum. This also affects Lemurians."); limitPestAmount = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<float>("Simulacrum", "Blind Pest Amount", 10f, "The percentage of enemies that are allowed to be blind pest. Only affects Simulacrum."); HurricaneSurvivorBuffs.RegisterOptions(); } private static void ClampConfigOptions() { enemyChanceToYap.Value = Math.Clamp(enemyChanceToYap.Value, 0f, 100f); enemyYapCooldown.Value = Math.Clamp(enemyYapCooldown.Value, 0f, 600f); limitPestAmount.Value = Math.Clamp(limitPestAmount.Value, 0f, 100f); HurricaneSurvivorBuffs.ClampValues(); } private static void AddOptions() { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Expected O, but got Unknown RoO.Init("com.HDeDeDe.ChunkyMode", "ChunkyMode", Log.Error, Log.Debug); RoO.AddCheck(doHealingBuffs); RoO.AddCheck(doEnemyLimitBoost); RoO.AddCheck(doGoldPenalty); RoO.AddCheck(doEnemyNerfs); object obj = <>O.<7>__ResetToDefault; if (obj == null) { UnityAction val = RoO.ResetToDefault; <>O.<7>__ResetToDefault = val; obj = (object)val; } RoO.AddButton("Reset to default", "Unlisted Difficulty Modifiers", (UnityAction)obj); RoO.AddFloatStep(enemyChanceToYap, 0f, 100f, 0.01f, "{0}%"); RoO.AddFloatStep(enemyYapCooldown, 0f, 600f, 1f, "{0}"); object obj2 = <>O.<7>__ResetToDefault; if (obj2 == null) { UnityAction val2 = RoO.ResetToDefault; <>O.<7>__ResetToDefault = val2; obj2 = (object)val2; } RoO.AddButton("Reset to default", "Yapping", (UnityAction)obj2); RoO.AddCheck(limitPest); RoO.AddFloatStep(limitPestAmount, 0f, 100f, 1f); object obj3 = <>O.<7>__ResetToDefault; if (obj3 == null) { UnityAction val3 = RoO.ResetToDefault; <>O.<7>__ResetToDefault = val3; obj3 = (object)val3; } RoO.AddButton("Reset to default", "Simulacrum", (UnityAction)obj3); HurricaneSurvivorBuffs.RegisterRiskOfOptions(); RoO.SetSprite(HurricaneBundle.LoadAsset<Sprite>("texChunkyModeDiffIcon")); RoO.SetDescriptionToken("HURRICANE_RISK_OF_OPTIONS_DESCRIPTION"); } internal static bool IsHurricane(DifficultyIndex difficulty) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) if (difficulty == LegacyDifficultyIndex || difficulty == HurricaneDifficultyIndex) { return true; } return false; } internal static void Run_onRunSetRuleBookGlobal(Run arg1, RuleBook arg2) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) if (IsHurricane(arg1.selectedDifficulty)) { if (((object)arg1).GetType() == typeof(InfiniteTowerRun)) { isSimulacrumRun = true; } InterlopingArtifact.HurricaneRun = true; } } internal static void Run_onRunStartGlobal(Run run) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Expected O, but got Unknown //IL_02ee: 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_02f9: Expected O, but got Unknown //IL_041e: 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_0429: Expected O, but got Unknown //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Expected O, but got Unknown //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) //IL_0449: Expected O, but got Unknown //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Expected O, but got Unknown //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Expected O, but got Unknown //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Expected O, but got Unknown //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Expected O, but got Unknown //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Expected O, but got Unknown //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Expected O, but got Unknown //IL_04f8: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_0503: Expected O, but got Unknown //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_0523: Expected O, but got Unknown //IL_0538: Unknown result type (might be due to invalid IL or missing references) //IL_053d: Unknown result type (might be due to invalid IL or missing references) //IL_0543: Expected O, but got Unknown //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_0563: Expected O, but got Unknown //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0583: Expected O, but got Unknown shouldRun = false; totalBlindPest = 0; totalLemurians = 0; ogRunLevelCap = Run.ambientLevelCap; ogMonsterCap = TeamCatalog.GetTeamDef((TeamIndex)2).softCharacterLimit; if (!IsHurricane(run.selectedDifficulty)) { return; } Log.Info("Chunky Mode Run started"); shouldRun = true; Run.ambientLevelCap += 9900; object obj = <>O.<8>__RecalculateStatsAPI_GetStatCoefficients; if (obj == null) { StatHookEventHandler val = RecalculateStatsAPI_GetStatCoefficients; <>O.<8>__RecalculateStatsAPI_GetStatCoefficients = val; obj = (object)val; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; if (!NetworkServer.active) { return; } m_hurricaneInfo = Object.Instantiate<GameObject>(HurricaneInfo); NetworkServer.Spawn(m_hurricaneInfo); if (!HurricaneRunInfo.preSet) { ((BaseUnityPlugin)HurricanePlugin.instance).Config.Reload(); ClampConfigOptions(); HurricaneRunInfo.instance.doEnemyLimitBoost = doEnemyLimitBoost.Value; HurricaneRunInfo.instance.doHealingBuffs = doHealingBuffs.Value; HurricaneRunInfo.instance.doGoldPenalty = doGoldPenalty.Value; HurricaneRunInfo.instance.NetworkdoEnemyNerfs = doEnemyNerfs.Value; HurricaneRunInfo.instance.enemyChanceToYap = enemyChanceToYap.Value; HurricaneRunInfo.instance.enemyYapCooldown = enemyYapCooldown.Value; HurricaneRunInfo.instance.limitPest = limitPest.Value; HurricaneRunInfo.instance.limitPestAmount = limitPestAmount.Value; HurricaneRunInfo.instance.rexHealOverride = HurricaneSurvivorBuffs.RexHealOverride.Value; HurricaneRunInfo.instance.acridHealOverride = HurricaneSurvivorBuffs.AcridHealOverride.Value; HurricaneRunInfo.instance.captainHealOverride = HurricaneSurvivorBuffs.CaptainHealOverride.Value; HurricaneRunInfo.instance.voidFiendHealOverride = HurricaneSurvivorBuffs.VoidFiendHealOverride.Value; HurricaneRunInfo.instance.seekerHealOverride = HurricaneSurvivorBuffs.SeekerHealOverride.Value; HurricaneRunInfo.instance.falseSonHealOverride = HurricaneSurvivorBuffs.FalseSonHealOverride.Value; HurricaneRunInfo.instance.chefSotSHealOverride = HurricaneSurvivorBuffs.ChefSotSHealOverride.Value; HurricaneRunInfo.instance.chirrHealOverride = HurricaneSurvivorBuffs.ChirrHealOverride.Value; HurricaneRunInfo.instance.aliemHealOverride = HurricaneSurvivorBuffs.AliemHealOverride.Value; HurricaneRunInfo.instance.submarinerHealOverride = HurricaneSurvivorBuffs.SubmarinerHealOverride.Value; HurricaneRunInfo.instance.ravagerHealOverride = HurricaneSurvivorBuffs.RavagerHealOverride.Value; HurricaneRunInfo.instance.paladinBarrierOverride = HurricaneSurvivorBuffs.PaladinBarrierOverride.Value / 100f; } if (HurricaneRunInfo.instance.doEnemyLimitBoost) { TeamCatalog.GetTeamDef((TeamIndex)2).softCharacterLimit = (int)((double)ogMonsterCap * 1.5); TeamCatalog.GetTeamDef((TeamIndex)4).softCharacterLimit = (int)((double)ogMonsterCap * 1.5); TeamCatalog.GetTeamDef((TeamIndex)3).softCharacterLimit = (int)((double)ogMonsterCap * 1.5); } object obj2 = <>O.<9>__ShieldRechargeAndBarrierDecayRate; if (obj2 == null) { UpdateHealthEventHandler val2 = HurricaneILHooks.ShieldRechargeAndBarrierDecayRate; <>O.<9>__ShieldRechargeAndBarrierDecayRate = val2; obj2 = (object)val2; } HealthComponentAPI.GetHealthStats += (UpdateHealthEventHandler)obj2; if (HurricaneRunInfo.instance.doHealingBuffs) { object obj3 = <>O.<10>__REXHealPulse; if (obj3 == null) { Manipulator val3 = HurricaneILHooks.REXHealPulse; <>O.<10>__REXHealPulse = val3; obj3 = (object)val3; } TreebotFlower2Projectile.HealPulse += (Manipulator)obj3; object obj4 = <>O.<11>__REXPrimaryAttack; if (obj4 == null) { Manipulator val4 = HurricaneILHooks.REXPrimaryAttack; <>O.<11>__REXPrimaryAttack = val4; obj4 = (object)val4; } ProjectileHealOwnerOnDamageInflicted.OnDamageInflictedServer += (Manipulator)obj4; object obj5 = <>O.<12>__AcridRegenBuff; if (obj5 == null) { Manipulator val5 = HurricaneILHooks.AcridRegenBuff; <>O.<12>__AcridRegenBuff = val5; obj5 = (object)val5; } CharacterBody.RecalculateStats += (Manipulator)obj5; object obj6 = <>O.<13>__CaptainWardBuff; if (obj6 == null) { Manipulator val6 = HurricaneILHooks.CaptainWardBuff; <>O.<13>__CaptainWardBuff = val6; obj6 = (object)val6; } HealingWard.HealOccupants += (Manipulator)obj6; object obj7 = <>O.<14>__VoidFiendSuppressBuff; if (obj7 == null) { Manipulator val7 = HurricaneILHooks.VoidFiendSuppressBuff; <>O.<14>__VoidFiendSuppressBuff = val7; obj7 = (object)val7; } CrushBase.OnEnter += (Manipulator)obj7; object obj8 = <>O.<15>__SeekerUnseenHandBuff; if (obj8 == null) { Manipulator val8 = HurricaneILHooks.SeekerUnseenHandBuff; <>O.<15>__SeekerUnseenHandBuff = val8; obj8 = (object)val8; } UnseenHandHealingProjectile.OnDamageInflictedServer += (Manipulator)obj8; object obj9 = <>O.<16>__ChefSotSChefsKissBuff; if (obj9 == null) { Manipulator val9 = HurricaneILHooks.ChefSotSChefsKissBuff; <>O.<16>__ChefSotSChefsKissBuff = val9; obj9 = (object)val9; } GlobalEventManager.OnCharacterDeath += (Manipulator)obj9; if (Starstorm2.Enabled) { Starstorm2.SetHooks(); } if (AlienHominid.Enabled) { AlienHominid.SetHooks(); } if (Ravager.Enabled) { Ravager.SetHooks(); } if (Submariner.Enabled) { Submariner.SetHooks(); } } SceneDirector.onPrePopulateSceneServer += SceneDirector_onPrePopulateSceneServer; object obj10 = <>O.<18>__CombatDirector_Awake; if (obj10 == null) { hook_Awake val10 = CombatDirector_Awake; <>O.<18>__CombatDirector_Awake = val10; obj10 = (object)val10; } CombatDirector.Awake += (hook_Awake)obj10; object obj11 = <>O.<19>__HealingOverride; if (obj11 == null) { HealEventHandler val11 = HurricaneILHooks.HealingOverride; <>O.<19>__HealingOverride = val11; obj11 = (object)val11; } HealthComponentAPI.GetHealStats += (HealEventHandler)obj11; object obj12 = <>O.<20>__Run_BeginStage; if (obj12 == null) { hook_BeginStage val12 = Run_BeginStage; <>O.<20>__Run_BeginStage = val12; obj12 = (object)val12; } Run.BeginStage += (hook_BeginStage)obj12; if (isSimulacrumRun) { waveStarted = false; if (HurricaneRunInfo.instance.limitPest) { CharacterBody.onBodyStartGlobal += TrackShittersAdd; CharacterBody.onBodyDestroyGlobal += TrackShittersRemove; } InfiniteTowerRun.onAllEnemiesDefeatedServer += HurricaneSimulacrum.OnAllEnemiesDefeatedServer; object obj13 = <>O.<24>__InfiniteTowerRun_BeginNextWave; if (obj13 == null) { hook_BeginNextWave val13 = HurricaneSimulacrum.InfiniteTowerRun_BeginNextWave; <>O.<24>__InfiniteTowerRun_BeginNextWave = val13; obj13 = (object)val13; } InfiniteTowerRun.BeginNextWave += (hook_BeginNextWave)obj13; object obj14 = <>O.<25>__InfiniteTowerWaveController_Initialize; if (obj14 == null) { Manipulator val14 = HurricaneSimulacrum.InfiniteTowerWaveController_Initialize; <>O.<25>__InfiniteTowerWaveController_Initialize = val14; obj14 = (object)val14; } InfiniteTowerWaveController.Initialize += (Manipulator)obj14; object obj15 = <>O.<26>__InfiniteTowerWaveController_FixedUpdate; if (obj15 == null) { Manipulator val15 = HurricaneSimulacrum.InfiniteTowerWaveController_FixedUpdate; <>O.<26>__InfiniteTowerWaveController_FixedUpdate = val15; obj15 = (object)val15; } InfiniteTowerWaveController.FixedUpdate += (Manipulator)obj15; object obj16 = <>O.<27>__ExtractRNGFromCombatDirector; if (obj16 == null) { Manipulator val16 = HurricaneSimulacrum.ExtractRNGFromCombatDirector; <>O.<27>__ExtractRNGFromCombatDirector = val16; obj16 = (object)val16; } CombatDirector.AttemptSpawnOnTarget += (Manipulator)obj16; object obj17 = <>O.<28>__CombatDirector_PrepareNewMonsterWave; if (obj17 == null) { hook_PrepareNewMonsterWave val17 = HurricaneSimulacrum.CombatDirector_PrepareNewMonsterWave; <>O.<28>__CombatDirector_PrepareNewMonsterWave = val17; obj17 = (object)val17; } CombatDirector.PrepareNewMonsterWave += (hook_PrepareNewMonsterWave)obj17; } } internal static void Run_onRunDestroyGlobal(Run run) { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Expected O, but got Unknown //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Expected O, but got Unknown //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Expected O, but got Unknown //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Expected O, but got Unknown //IL_01e8: 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_01f3: Expected O, but got Unknown //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0233: 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_02b3: Expected O, but got Unknown //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Expected O, but got Unknown //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Expected O, but got Unknown //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Expected O, but got Unknown //IL_0328: 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_0333: Expected O, but got Unknown if (shouldRun) { Log.Info("Chunky Mode Run ended"); shouldRun = false; isSimulacrumRun = false; HurricaneRunInfo.preSet = false; Run.ambientLevelCap = ogRunLevelCap; Object.Destroy((Object)(object)m_hurricaneInfo); TeamCatalog.GetTeamDef((TeamIndex)2).softCharacterLimit = ogMonsterCap; TeamCatalog.GetTeamDef((TeamIndex)4).softCharacterLimit = ogMonsterCap; TeamCatalog.GetTeamDef((TeamIndex)3).softCharacterLimit = ogMonsterCap; object obj = <>O.<9>__ShieldRechargeAndBarrierDecayRate; if (obj == null) { UpdateHealthEventHandler val = HurricaneILHooks.ShieldRechargeAndBarrierDecayRate; <>O.<9>__ShieldRechargeAndBarrierDecayRate = val; obj = (object)val; } HealthComponentAPI.GetHealthStats -= (UpdateHealthEventHandler)obj; object obj2 = <>O.<10>__REXHealPulse; if (obj2 == null) { Manipulator val2 = HurricaneILHooks.REXHealPulse; <>O.<10>__REXHealPulse = val2; obj2 = (object)val2; } TreebotFlower2Projectile.HealPulse -= (Manipulator)obj2; object obj3 = <>O.<11>__REXPrimaryAttack; if (obj3 == null) { Manipulator val3 = HurricaneILHooks.REXPrimaryAttack; <>O.<11>__REXPrimaryAttack = val3; obj3 = (object)val3; } ProjectileHealOwnerOnDamageInflicted.OnDamageInflictedServer -= (Manipulator)obj3; object obj4 = <>O.<12>__AcridRegenBuff; if (obj4 == null) { Manipulator val4 = HurricaneILHooks.AcridRegenBuff; <>O.<12>__AcridRegenBuff = val4; obj4 = (object)val4; } CharacterBody.RecalculateStats -= (Manipulator)obj4; object obj5 = <>O.<13>__CaptainWardBuff; if (obj5 == null) { Manipulator val5 = HurricaneILHooks.CaptainWardBuff; <>O.<13>__CaptainWardBuff = val5; obj5 = (object)val5; } HealingWard.HealOccupants -= (Manipulator)obj5; object obj6 = <>O.<14>__VoidFiendSuppressBuff; if (obj6 == null) { Manipulator val6 = HurricaneILHooks.VoidFiendSuppressBuff; <>O.<14>__VoidFiendSuppressBuff = val6; obj6 = (object)val6; } CrushBase.OnEnter -= (Manipulator)obj6; object obj7 = <>O.<15>__SeekerUnseenHandBuff; if (obj7 == null) { Manipulator val7 = HurricaneILHooks.SeekerUnseenHandBuff; <>O.<15>__SeekerUnseenHandBuff = val7; obj7 = (object)val7; } UnseenHandHealingProjectile.OnDamageInflictedServer -= (Manipulator)obj7; object obj8 = <>O.<16>__ChefSotSChefsKissBuff; if (obj8 == null) { Manipulator val8 = HurricaneILHooks.ChefSotSChefsKissBuff; <>O.<16>__ChefSotSChefsKissBuff = val8; obj8 = (object)val8; } GlobalEventManager.OnCharacterDeath -= (Manipulator)obj8; if (Starstorm2.Enabled) { Starstorm2.RemoveHooks(); } if (AlienHominid.Enabled) { AlienHominid.RemoveHooks(); } if (Ravager.Enabled) { Ravager.RemoveHooks(); } if (Submariner.Enabled) { Submariner.RemoveHooks(); } object obj9 = <>O.<8>__RecalculateStatsAPI_GetStatCoefficients; if (obj9 == null) { StatHookEventHandler val9 = RecalculateStatsAPI_GetStatCoefficients; <>O.<8>__RecalculateStatsAPI_GetStatCoefficients = val9; obj9 = (object)val9; } RecalculateStatsAPI.GetStatCoefficients -= (StatHookEventHandler)obj9; object obj10 = <>O.<19>__HealingOverride; if (obj10 == null) { HealEventHandler val10 = HurricaneILHooks.HealingOverride; <>O.<19>__HealingOverride = val10; obj10 = (object)val10; } HealthComponentAPI.GetHealStats -= (HealEventHandler)obj10; object obj11 = <>O.<18>__CombatDirector_Awake; if (obj11 == null) { hook_Awake val11 = CombatDirector_Awake; <>O.<18>__CombatDirector_Awake = val11; obj11 = (object)val11; } CombatDirector.Awake -= (hook_Awake)obj11; SceneDirector.onPrePopulateSceneServer -= SceneDirector_onPrePopulateSceneServer; object obj12 = <>O.<20>__Run_BeginStage; if (obj12 == null) { hook_BeginStage val12 = Run_BeginStage; <>O.<20>__Run_BeginStage = val12; obj12 = (object)val12; } Run.BeginStage -= (hook_BeginStage)obj12; CharacterBody.onBodyStartGlobal -= TrackShittersAdd; CharacterBody.onBodyDestroyGlobal -= TrackShittersRemove; InfiniteTowerRun.onAllEnemiesDefeatedServer -= HurricaneSimulacrum.OnAllEnemiesDefeatedServer; object obj13 = <>O.<24>__InfiniteTowerRun_BeginNextWave; if (obj13 == null) { hook_BeginNextWave val13 = HurricaneSimulacrum.InfiniteTowerRun_BeginNextWave; <>O.<24>__InfiniteTowerRun_BeginNextWave = val13; obj13 = (object)val13; } InfiniteTowerRun.BeginNextWave -= (hook_BeginNextWave)obj13; object obj14 = <>O.<25>__InfiniteTowerWaveController_Initialize; if (obj14 == null) { Manipulator val14 = HurricaneSimulacrum.InfiniteTowerWaveController_Initialize; <>O.<25>__InfiniteTowerWaveController_Initialize = val14; obj14 = (object)val14; } InfiniteTowerWaveController.Initialize -= (Manipulator)obj14; object obj15 = <>O.<26>__InfiniteTowerWaveController_FixedUpdate; if (obj15 == null) { Manipulator val15 = HurricaneSimulacrum.InfiniteTowerWaveController_FixedUpdate; <>O.<26>__InfiniteTowerWaveController_FixedUpdate = val15; obj15 = (object)val15; } InfiniteTowerWaveController.FixedUpdate -= (Manipulator)obj15; object obj16 = <>O.<27>__ExtractRNGFromCombatDirector; if (obj16 == null) { Manipulator val16 = HurricaneSimulacrum.ExtractRNGFromCombatDirector; <>O.<27>__ExtractRNGFromCombatDirector = val16; obj16 = (object)val16; } CombatDirector.AttemptSpawnOnTarget -= (Manipulator)obj16; object obj17 = <>O.<28>__CombatDirector_PrepareNewMonsterWave; if (obj17 == null) { hook_PrepareNewMonsterWave val17 = HurricaneSimulacrum.CombatDirector_PrepareNewMonsterWave; <>O.<28>__CombatDirector_PrepareNewMonsterWave = val17; obj17 = (object)val17; } CombatDirector.PrepareNewMonsterWave -= (hook_PrepareNewMonsterWave)obj17; } } internal static void TrackShittersAdd(CharacterBody body) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) if (body.bodyIndex == HurricaneCachedIndexes.bodyCache[BodyCache.FlyingVermin]) { totalBlindPest++; } if (body.bodyIndex == HurricaneCachedIndexes.bodyCache[BodyCache.Lemurian]) { totalLemurians++; } } internal static void TrackShittersRemove(CharacterBody body) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) if (body.bodyIndex == HurricaneCachedIndexes.bodyCache[BodyCache.FlyingVermin]) { totalBlindPest--; } if (body.bodyIndex == HurricaneCachedIndexes.bodyCache[BodyCache.Lemurian]) { totalLemurians--; } } public static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Invalid comparison between Unknown and I4 //IL_012d: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)sender)) { return; } if ((int)sender.teamComponent.teamIndex == 1) { args.baseCurseAdd += InterRunInfo.instance.allyCurse; return; } if (NetworkServer.active) { float num = Random.Range(0f, 1f); float num2 = HurricaneRunInfo.instance.enemyChanceToYap / 100f; if (InterRunInfo.instance.loiterPenaltyActive) { num2 *= 2f; } if (num < num2 && HurricaneRunInfo.instance.enemyChanceToYap > 0f && enemyYapTimer < Run.instance.NetworkfixedTime) { enemyYapTimer = Run.instance.NetworkfixedTime + HurricaneRunInfo.instance.enemyYapCooldown; List<BuffIndex> list = new List<BuffIndex>(); if (sender.isElite) { list.AddRange(((IEnumerable<BuffIndex>)BuffCatalog.eliteBuffIndices).Where((Func<BuffIndex, bool>)sender.HasBuff)); } HurricaneYap.DoYapping(sender.baseNameToken, list); } } if (!HurricaneRunInfo.instance.doEnemyNerfs) { args.attackSpeedMultAdd += 0.5f; args.moveSpeedMultAdd += 0.4f; args.cooldownReductionAdd += 0.5f; return; } HurricaneCachedIndexes.bodyIndex.TryGetValue(sender.bodyIndex, out var value); switch (value) { case BodyCache.BeetleGuard: args.moveSpeedMultAdd += 0.4f; args.cooldownReductionAdd += 0.5f; break; case BodyCache.Vagrant: args.attackSpeedMultAdd += 0.25f; args.moveSpeedMultAdd += 0.4f; args.cooldownReductionAdd += 0.5f; break; case BodyCache.Bell: args.attackSpeedMultAdd += 2f; args.moveSpeedMultAdd += 0.4f; args.cooldownMultAdd += 0.25f; break; case BodyCache.RobNemesis: args.attackSpeedMultAdd += 0.25f; args.moveSpeedMultAdd += 0.15f; args.cooldownReductionAdd += 0.5f; break; case BodyCache.SigmaConstruct: args.attackSpeedMultAdd += 0.25f; args.cooldownReductionAdd += 0.5f; break; case BodyCache.FlyingVermin: args.attackSpeedMultAdd += 0.15f; args.moveSpeedMultAdd += 0.4f; break; case BodyCache.Bison: args.attackSpeedMultAdd += 2f; args.moveSpeedMultAdd += 0.4f; args.cooldownReductionAdd += 0.5f; break; default: args.attackSpeedMultAdd += 0.5f; args.moveSpeedMultAdd += 0.4f; args.cooldownReductionAdd += 0.5f; break; } } internal static void CombatDirector_Awake(orig_Awake origAwake, CombatDirector self) { self.creditMultiplier *= 1.1f; if (HurricaneRunInfo.instance.doGoldPenalty && !isSimulacrumRun) { self.goldRewardCoefficient *= 0.9f; } origAwake.Invoke(self); } internal static void SceneDirector_onPrePopulateSceneServer(SceneDirector self) { self.interactableCredit = (int)((double)self.interactableCredit * 1.2); Log.Info("Updated Credits: " + self.interactableCredit); } internal static void Run_BeginStage(orig_BeginStage beginStage, Run self) { enemyYapTimer = self.NetworkfixedTime + 10f; beginStage.Invoke(self); } } internal enum BodyCache { None, BeetleGuard, Vagrant, Bell, RobNemesis, SigmaConstruct, FlyingVermin, Bison, Lemurian, RobPaladin } internal static class HurricaneCachedIndexes { public static readonly Dictionary<BodyIndex, BodyCache> bodyIndex = new Dictionary<BodyIndex, BodyCache>(); public static readonly Dictionary<BodyCache, BodyIndex> bodyCache = new Dictionary<BodyCache, BodyIndex>(); public static int injector; private static RuleChoiceDef legacyChoiceDef; private static RuleChoiceDef hurricaneChoiceDef; public static void GenerateCache() { //IL_0014: 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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) injector = ProjectileCatalog.FindProjectileIndex("SyringeProjectileHealing"); AddToCollection(BodyCatalog.FindBodyIndex("BeetleGuardBody"), BodyCache.BeetleGuard); AddToCollection(BodyCatalog.FindBodyIndex("VagrantBody"), BodyCache.Vagrant); AddToCollection(BodyCatalog.FindBodyIndex("BellBody"), BodyCache.Bell); AddToCollection(BodyCatalog.FindBodyIndex("FlyingVerminBody"), BodyCache.FlyingVermin); AddToCollection(BodyCatalog.FindBodyIndex("BisonBody"), BodyCache.Bison); AddToCollection(BodyCatalog.FindBodyIndex("LemurianBody"), BodyCache.Lemurian); AddToCollection(BodyCatalog.FindBodyIndex("RobPaladinBody"), BodyCache.RobPaladin); if (Hunk.Enabled) { AddToCollection(BodyCatalog.FindBodyIndex("RobNemesisPlayerBody"), BodyCache.RobNemesis); } if (Spikestrip.Enabled) { AddToCollection(BodyCatalog.FindBodyIndex("SigmaConstructBody"), BodyCache.SigmaConstruct); } hurricaneChoiceDef = RuleCatalog.FindChoiceDef("Difficulty.Hurricane"); hurricaneChoiceDef.availableInSinglePlayer = false; hurricaneChoiceDef.availableInMultiPlayer = false; legacyChoiceDef = RuleCatalog.FindChoiceDef("Difficulty.ChunkyMode"); legacyChoiceDef.availableInSinglePlayer = true; legacyChoiceDef.availableInMultiPlayer = true; legacyChoiceDef.tooltipNameToken = "CHUNKYMODEDIFFMOD_NAME"; Hurricane.LegacyDifficultyDef.nameToken = "CHUNKYMODEDIFFMOD_NAME"; } private static void AddToCollection(BodyIndex index, BodyCache cache) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) bodyIndex.Add(index, cache); bodyCache.Add(cache, index); } } public class HurricaneChatEnemyYap : ChatMessageBase { public string baseToken; public string enemyToken; private int m_eliteLength; public List<BuffIndex> eliteAffix = new List<BuffIndex>(); public override string ConstructChatString() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) string text = Language.GetString(enemyToken); foreach (BuffIndex item in eliteAffix) { text = Language.GetStringFormatted(BuffCatalog.GetBuffDef(item).eliteDef.modifierToken, new object[1] { text }); } return Language.GetStringFormatted("HURRICANE_YAP_FORMAT", new object[2] { Language.GetStringFormatted(text, Array.Empty<object>()), Language.GetString(baseToken) }); } public override void Serialize(NetworkWriter writer) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected I4, but got Unknown writer.Write(baseToken); writer.Write(enemyToken); writer.Write(eliteAffix.Count); foreach (BuffIndex item in eliteAffix) { writer.Write((int)item); } } public override void Deserialize(NetworkReader reader) { baseToken = reader.ReadString(); enemyToken = reader.ReadString(); m_eliteLength = reader.ReadInt32(); if (m_eliteLength != 0) { for (int i = 0; i < m_eliteLength; i++) { eliteAffix.Add((BuffIndex)reader.ReadInt32()); } } } } internal static class HurricaneYap { public static void DoYapping([NotNull("ArgumentNullException")] string enemyToken, List<BuffIndex> eliteAffix) { string baseToken = (Random.RandomRangeInt(0, 100000) % 16) switch { 0 => "BROTHER_SPAWN_PHASE1_1", 1 => "BROTHER_SPAWN_PHASE1_2", 2 => "BROTHER_SPAWN_PHASE1_3", 3 => "BROTHER_SPAWN_PHASE1_4", 4 => "BROTHER_DAMAGEDEALT_7", 5 => "BROTHER_DAMAGEDEALT_6", 6 => "BROTHER_DAMAGEDEALT_2", 7 => "BROTHER_KILL_1", 8 => "BROTHER_DAMAGEDEALT_3", 9 => "FALSESONBOSS_SPAWN_3", 10 => "FALSESONBOSS_EARLYPHASE_HURT_2", 11 => "FALSESONBOSS_EARLYPHASE_HURT_7", 12 => "FALSESONBOSS_FINALPHASE_HURT_6", 13 => "FALSESONBOSS_EARLYPHASE_PLAYERDEATH_4", 14 => "FALSESONBOSS_EARLYPHASE_PLAYERDEATH_5", 15 => "FALSESONBOSS_DRONEDEATH_2", _ => "", }; Chat.SendBroadcastChat((ChatMessageBase)(object)new HurricaneChatEnemyYap { baseToken = baseToken, enemyToken = enemyToken, eliteAffix = eliteAffix }); } } internal static class HurricaneILHooks { [CompilerGenerated] private static class <>O { public static Manipulator <0>__ChefSotSChefsKissBuff; } private static readonly float shieldRechargeOverride = -0.5f; private static readonly float barrierDecayOverride = 1f; public static void HealingOverride(HealthComponent sender, HealEventArgs args) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Invalid comparison between Unknown and I4 if ((int)sender.body.teamComponent.teamIndex == 1 && (!Hurricane.isSimulacrumRun || Hurricane.waveStarted)) { args.enableEclipseHealReduction = true; } } public static void ShieldRechargeAndBarrierDecayRate(HealthComponent sender, UpdateHealthEventArgs args) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Invalid comparison between Unknown and I4 //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) if ((int)sender.body.teamComponent.teamIndex == 1) { float num = barrierDecayOverride; if (sender.body.bodyIndex == HurricaneCachedIndexes.bodyCache[BodyCache.RobPaladin]) { num -= HurricaneRunInfo.instance.paladinBarrierOverride; } args.barrierDecayRateMultAdd += num; if (!Hurricane.isSimulacrumRun || Hurricane.waveStarted) { args.shieldRechargeRateMultAdd += shieldRechargeOverride; } } } public static void REXHealPulse(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext(new Func<Instruction, bool>[5] { (Instruction x) => ILPatternMatchingExt.MatchConvR4(x), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStfld<HealOrb>(x, "healValue"), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 2), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.3f) })) { Log.Error("Failed to hook Tangling Growth!"); return; } val.Index += 2; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<float, TreebotFlower2Projectile, float>>((Func<float, TreebotFlower2Projectile, float>)delegate(float toHeal, TreebotFlower2Projectile tbf) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Invalid comparison between Unknown and I4 if (!Object.op_Implicit((Object)(object)tbf.owner)) { return toHeal; } if (Hurricane.isSimulacrumRun && !Hurricane.waveStarted) { return toHeal; } CharacterBody component = tbf.owner.GetComponent<CharacterBody>(); if (!Object.op_Implicit((Object)(object)component)) { return toHeal; } return ((int)component.teamComponent.teamIndex != 1) ? toHeal : (toHeal * HurricaneRunInfo.instance.rexHealOverride); }); } public static void REXPrimaryAttack(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext(new Func<Instruction, bool>[5] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<ProjectileHealOwnerOnDamageInflicted>(x, "fractionOfDamage"), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStfld<HealOrb>(x, "healValue"), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.3f) })) { Log.Error("Failed to hook DIRECTIVE: Inject!"); return; } val.Index += 2; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<float, ProjectileHealOwnerOnDamageInflicted, float>>((Func<float, ProjectileHealOwnerOnDamageInflicted, float>)delegate(float toHeal, ProjectileHealOwnerOnDamageInflicted self) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Invalid comparison between Unknown and I4 if (Hurricane.isSimulacrumRun && !Hurricane.waveStarted) { return toHeal; } if (self.projectileController.catalogIndex != HurricaneCachedIndexes.injector) { return toHeal; } CharacterBody component = self.projectileController.owner.GetComponent<CharacterBody>(); if (!Object.op_Implicit((Object)(object)component)) { return toHeal; } return ((int)component.teamComponent.teamIndex != 1) ? toHeal : (toHeal * HurricaneRunInfo.instance.rexHealOverride); }); } public static void AcridRegenBuff(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext(new Func<Instruction, bool>[7] { (Instruction x) => ILPatternMatchingExt.MatchCall<CharacterBody>(x, "GetBuffCount"), (Instruction x) => ILPatternMatchingExt.MatchConvR4(x), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCall<CharacterBody>(x, "get_maxHealth"), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.1f), (Instruction x) => ILPatternMatchingExt.MatchMul(x) })) { Log.Error("Failed to hook CrocoRegen!"); return; } val.Index += 6; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<float, CharacterBody, float>>((Func<float, CharacterBody, float>)delegate(float toHeal, CharacterBody cb) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Invalid comparison between Unknown and I4 if (Hurricane.isSimulacrumRun && !Hurricane.waveStarted) { return toHeal; } return ((int)cb.teamComponent.teamIndex != 1) ? toHeal : (toHeal * HurricaneRunInfo.instance.acridHealOverride); }); } public static void CaptainWardBuff(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<HealingWard>(x, "healFraction") })) { Log.Error("Failed to hook HealingWard!"); return; } val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<float, HealingWard, float>>((Func<float, HealingWard, float>)delegate(float toHeal, HealingWard hw) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Invalid comparison between Unknown and I4 if (Hurricane.isSimulacrumRun && !Hurricane.waveStarted) { return toHeal; } if ((int)hw.teamFilter.teamIndex != 1) { return toHeal; } return (((Object)hw).name != "CaptainHealingWard(Clone)") ? toHeal : (toHeal * HurricaneRunInfo.instance.captainHealOverride); }); } public static void VoidFiendSuppressBuff(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallvirt<HealthComponent>(x, "HealFraction") })) { Log.Error("Failed to hook Suppress!"); return; } val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<float, EntityState, float>>((Func<float, EntityState, float>)delegate(float toHeal, EntityState es) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Invalid comparison between Unknown and I4 if (Hurricane.isSimulacrumRun && !Hurricane.waveStarted) { return toHeal; } return ((int)es.teamComponent.teamIndex != 1) ? toHeal : (toHeal * HurricaneRunInfo.instance.voidFiendHealOverride); }); } public static void SeekerUnseenHandBuff(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<DamageReport>(x, "damageDealt") })) { Log.Error("Failed to hook Unseen Hand Healing!"); return; } val.Emit(OpCodes.Ldloc_1); val.EmitDelegate<Func<float, CharacterBody, float>>((Func<float, CharacterBody, float>)delegate(float toHeal, CharacterBody cb) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Invalid comparison between Unknown and I4 if (Hurricane.isSimulacrumRun && !Hurricane.waveStarted) { return toHeal; } return ((int)cb.teamComponent.teamIndex != 1) ? toHeal : (toHeal * HurricaneRunInfo.instance.seekerHealOverride); }); } public static void FalseSonLunarTamperingBuff(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "tamperedHeartRegenBonus") })) { Log.Error("Failed to hook Tampered Heart Regen!"); return; } val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<float, CharacterBody, float>>((Func<float, CharacterBody, float>)delegate(float toHeal, CharacterBody cb) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Invalid comparison between Unknown and I4 if (Hurricane.isSimulacrumRun && !Hurricane.waveStarted) { return toHeal; } return ((int)cb.teamComponent.teamIndex != 1) ? toHeal : (toHeal * HurricaneRunInfo.instance.falseSonHealOverride); }); } public static void ChefSotSChefsKissBuff(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0066: 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_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 68), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 44) })) { Log.Error("Failed to hook Chef's Kiss! (Flat Healing)"); return; } val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<float, DamageReport, float>>((Func<float, DamageReport, float>)delegate(float toHeal, DamageReport dr) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Invalid comparison between Unknown and I4 if (Hurricane.isSimulacrumRun && !Hurricane.waveStarted) { return toHeal; } return ((int)dr.attackerBody.teamComponent.teamIndex != 1) ? toHeal : (toHeal * HurricaneRunInfo.instance.chefSotSHealOverride); }); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 68), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 45) })) { Log.Error("Failed to hook Chef's Kiss! (Fractional Healing)"); object obj = <>O.<0>__ChefSotSChefsKissBuff; if (obj == null) { Manipulator val2 = ChefSotSChefsKissBuff; <>O.<0>__ChefSotSChefsKissBuff = val2; obj = (object)val2; } GlobalEventManager.OnCharacterDeath -= (Manipulator)obj; return; } val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<float, DamageReport, float>>((Func<float, DamageReport, float>)delegate(float toHeal, DamageReport dr) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Invalid comparison between Unknown and I4 if (Hurricane.isSimulacrumRun && !Hurricane.waveStarted) { return toHeal; } return ((int)dr.attackerBody.teamComponent.teamIndex != 1) ? toHeal : (toHeal * HurricaneRunInfo.instance.chefSotSHealOverride); }); } } internal class LocalizedCheckBoxOption : CheckBoxOption { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public LocalizedCheckBoxOption(ConfigEntry<bool> configEntry, bool restart) : base(configEntry, restart) { Language.onCurrentLanguageChanged += ResetDescription; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public override void RegisterTokens() { ((BaseOption)this).Description = Language.GetString(((BaseOption)this).GetDescriptionToken()); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void ResetDescription() { ((BaseOption)this).Description = Language.GetString(((BaseOption)this).GetDescriptionToken()); } } internal class LocalizedIntSliderOption : IntSliderOption { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public LocalizedIntSliderOption(ConfigEntry<int> configEntry, IntSliderConfig config) : base(configEntry, config) { Language.onCurrentLanguageChanged += ResetDescription; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public override void RegisterTokens() { ((BaseOption)this).Description = Language.GetString(((BaseOption)this).GetDescriptionToken()); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void ResetDescription() { ((BaseOption)this).Description = Language.GetString(((BaseOption)this).GetDescriptionToken()); } } internal class LocalizedSliderOption : SliderOption { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public LocalizedSliderOption(ConfigEntry<float> configEntry, SliderConfig config) : base(configEntry, config) { Language.onCurrentLanguageChanged += ResetDescription; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public override void RegisterTokens() { ((BaseOption)this).Description = Language.GetString(((BaseOption)this).GetDescriptionToken()); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void ResetDescription() { ((BaseOption)this).Description = Language.GetString(((BaseOption)this).GetDescriptionToken()); } } internal class LocalizedSliderStepOption : StepSliderOption { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public LocalizedSliderStepOption(ConfigEntry<float> configEntry, StepSliderConfig config) : base(configEntry, config) { Language.onCurrentLanguageChanged += ResetDescription; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public override void RegisterTokens() { ((BaseOption)this).Description = Language.GetString(((BaseOption)this).GetDescriptionToken()); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void ResetDescription() { ((BaseOption)this).Description = Language.GetString(((BaseOption)this).GetDescriptionToken()); } } internal class LocalizedButtonOption : GenericButtonOption { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public LocalizedButtonOption(string name, string category, string description, string buttonText, UnityAction onButtonPressed) : base(name, category, description, buttonText, onButtonPressed) { Language.onCurrentLanguageChanged += ResetDescription; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public override void RegisterTokens() { ((BaseOption)this).Description = Language.GetString(((BaseOption)this).GetDescriptionToken()); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void ResetDescription() { ((BaseOption)this).Description = Language.GetString(((BaseOption)this).GetDescriptionToken()); } } internal class HurricaneRunInfo : NetworkBehaviour { public static HurricaneRunInfo instance; public static bool preSet; public static HurricaneSaveData saveData; [SyncVar] [FormerlySerializedAs("doNerfsThisRun")] public bool doEnemyNerfs; [FormerlySerializedAs("doGoldThisRun")] public bool doGoldPenalty; [FormerlySerializedAs("doHealBuffThisRun")] public bool doHealingBuffs; [FormerlySerializedAs("doEnemyBoostThisRun")] public bool doEnemyLimitBoost; [FormerlySerializedAs("enemyChanceToYapThisRun")] public float enemyChanceToYap; [FormerlySerializedAs("enemyYapCooldownThisRun")] public float enemyYapCooldown; [FormerlySerializedAs("limitPestsThisRun")] public bool limitPest; [FormerlySerializedAs("limitPestsAmountThisRun")] public float limitPestAmount; public float rexHealOverride; public float acridHealOverride; public float captainHealOverride; public float voidFiendHealOverride; public float seekerHealOverride; public float falseSonHealOverride; public float chefSotSHealOverride; public float chirrHealOverride; public float aliemHealOverride; public float submarinerHealOverride; public float ravagerHealOverride; public float paladinBarrierOverride; public bool NetworkdoEnemyNerfs { get { return doEnemyNerfs; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar<bool>(value, ref doEnemyNerfs, 1u); } } public void Awake() { instance = this; Object.DontDestroyOnLoad((Object)(object)this); if (preSet) { doEnemyLimitBoost = saveData.doEnemyLimitBoost; doHealingBuffs = saveData.doHealingBuffs; doGoldPenalty = saveData.doGoldPenalty; NetworkdoEnemyNerfs = saveData.doEnemyNerfs; enemyChanceToYap = saveData.enemyChanceToYap; enemyYapCooldown = saveData.enemyYapCooldown; limitPest = saveData.limitPest; limitPestAmount = saveData.limitPestAmount; rexHealOverride = saveData.rexHealOverride; acridHealOverride = saveData.acridHealOverride; captainHealOverride = saveData.captainHealOverride; voidFiendHealOverride = saveData.voidFiendHealOverride; seekerHealOverride = saveData.seekerHealOverride; falseSonHealOverride = saveData.falseSonHealOverride; chefSotSHealOverride = saveData.chefSotSHealOverride; chirrHealOverride = saveData.chirrHealOverride; aliemHealOverride = saveData.aliemHealOverride; submarinerHealOverride = saveData.submarinerHealOverride; ravagerHealOverride = saveData.ravagerHealOverride; paladinBarrierOverride = saveData.paladinBarrierOverride; } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(doEnemyNerfs); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(doEnemyNerfs); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { doEnemyNerfs = reader.ReadBoolean(); return; } int num = (int)reader.ReadPackedUInt32(); if (((uint)num & (true ? 1u : 0u)) != 0) { doEnemyNerfs = reader.ReadBoolean(); } } } public struct HurricaneSaveData { [DataMember(Name = "validCheck")] public bool isValidSave; [DataMember(Name = "gold")] public bool doGoldPenalty; [DataMember(Name = "nerf")] public bool doEnemyNerfs; [DataMember(Name = "heal")] public bool doHealingBuffs; [DataMember(Name = "boost")] public bool doEnemyLimitBoost; [DataMember(Name = "yapChance")] public float enemyChanceToYap; [DataMember(Name = "yapTime")] public float enemyYapCooldown; [DataMember(Name = "exLimitPest")] public bool limitPest; [DataMember(Name = "exPestCount")] public float limitPestAmount; [DataMember(Name = "rexHeal")] public float rexHealOverride; [DataMember(Name = "acridHeal")] public float acridHealOverride; [DataMember(Name = "captainHeal")] public float captainHealOverride; [DataMember(Name = "voidFiendHeal")] public float voidFiendHealOverride; [DataMember(Name = "seekerHeal")] public float seekerHealOverride; [DataMember(Name = "falseSonHeal")] public float falseSonHealOverride; [DataMember(Name = "chefSotSHeal")] public float chefSotSHealOverride; [DataMember(Name = "chirrHeal")] public float chirrHealOverride; [DataMember(Name = "aliemHeal")] public float aliemHealOverride; [DataMember(Name = "submarinerHeal")] public float submarinerHealOverride; [DataMember(Name = "ravagerHeal")] public float ravagerHealOverride; [DataMember(Name = "paladinBarrier")] public float paladinBarrierOverride; } internal static class HurricaneSimulacrum { [CompilerGenerated] private static class <>O { public static Manipulator <0>__ExtractRNGFromCombatDirector; } private static bool rngExtracted; private static Xoroshiro128Plus rng; public static void OnAllEnemiesDefeatedServer(InfiniteTowerWaveController waveController) { Hurricane.waveStarted = false; } public static void InfiniteTowerRun_BeginNextWave(orig_BeginNextWave beginNextWave, InfiniteTowerRun self) { Hurricane.waveStarted = true; beginNextWave.Invoke(self); } public static void InfiniteTowerWaveController_Initialize(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<Run>(x, "difficultyCoefficient") })) { Log.Fatal("Failed to hook into InfiniteTowerWaveController.Initialize!"); return; } val.EmitDelegate<Func<float, float>>((Func<float, float>)((float b) => b * 1.1f)); } public static void InfiniteTowerWaveController_FixedUpdate(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<InfiniteTowerWaveController>(x, "maxSquadSize") })) { Log.Fatal("Failed to hook into InfiniteTowerWaveController.FixedUpdate!"); return; } val.EmitDelegate<Func<int, int>>((Func<int, int>)((int b) => (!HurricaneRunInfo.instance.doEnemyLimitBoost) ? b : ((int)((float)b * 1.5f)))); } public static void ExtractRNGFromCombatDirector(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CombatDirector>(x, "rng") })) { Log.Error("Could not get RNG! Uninstalling hook!"); object obj = <>O.<0>__ExtractRNGFromCombatDirector; if (obj == null) { Manipulator val2 = ExtractRNGFromCombatDirector; <>O.<0>__ExtractRNGFromCombatDirector = val2; obj = (object)val2; } CombatDirector.AttemptSpawnOnTarget -= (Manipulator)obj; rngExtracted = false; } else { val.EmitDelegate<Func<Xoroshiro128Plus, Xoroshiro128Plus>>((Func<Xoroshiro128Plus, Xoroshiro128Plus>)delegate(Xoroshiro128Plus rngThing) { rng = rngThing; rngExtracted = true; return rngThing; }); } } public static void CombatDirector_PrepareNewMonsterWave(orig_PrepareNewMonsterWave prep, CombatDirector self, DirectorCard card) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) if (!HurricaneRunInfo.instance.limitPest || !rngExtracted) { prep.Invoke(self, card); return; } GameObject bodyPrefab = BodyCatalog.GetBodyPrefab(HurricaneCachedIndexes.bodyCache[BodyCache.FlyingVermin]); GameObject bodyPrefab2 = BodyCatalog.GetBodyPrefab(HurricaneCachedIndexes.bodyCache[BodyCache.Lemurian]); GameObject bodyPrefab3 = card.spawnCard.prefab.GetComponent<CharacterMaster>().bodyPrefab; while ((Object)(object)bodyPrefab3 == (Object)(object)bodyPrefab || (Object)(object)bodyPrefab3 == (Object)(object)bodyPrefab2) { int num = 0; num += TeamComponent.GetTeamMembers((TeamIndex)2).Count; num += TeamComponent.GetTeamMembers((TeamIndex)4).Count; num += TeamComponent.GetTeamMembers((TeamIndex)3).Count; int num2 = (int)((float)num * (HurricaneRunInfo.instance.limitPestAmount / 100f)); if ((Hurricane.totalBlindPest <= num2 || !((Object)(object)bodyPrefab3 == (Object)(object)bodyPrefab)) && (Hurricane.totalLemurians <= num2 || !((Object)(object)bodyPrefab3 == (Object)(object)bodyPrefab2))) { break; } Log.Warning("Too many bastards. Generating new director card."); card = GenerateNewDirectorCard(); bodyPrefab3 = card.spawnCard.prefab.GetComponent<CharacterMaster>().bodyPrefab; } prep.Invoke(self, card); } private static DirectorCard GenerateNewDirectorCard() { return ClassicStageInfo.instance.monsterSelection.Evaluate(rng.nextNormalizedFloat); } } internal static class HurricaneSurvivorBuffs { [CompilerGenerated] private static class <>O { public static UnityAction <0>__ResetToDefault; } public static ConfigEntry<float> RexHealOverride { get; set; } public static ConfigEntry<float> AcridHealOverride { get; set; } public static ConfigEntry<float> CaptainHealOverride { get; set; } public static ConfigEntry<float> VoidFiendHealOverride { get; set; } public static ConfigEntry<float> SeekerHealOverride { get; set; } public static ConfigEntry<float> FalseSonHealOverride { get; set; } public static ConfigEntry<float> ChefSotSHealOverride { get; set; } public static ConfigEntry<float> ChirrHealOverride { get; set; } public static ConfigEntry<float> AliemHealOverride { get; set; } public static ConfigEntry<float> SubmarinerHealOverride { get; set; } public static ConfigEntry<float> RavagerHealOverride { get; set; } public static ConfigEntry<float> PaladinBarrierOverride { get; set; } public static void ClampValues() { RexHealOverride.Value = Math.Clamp(RexHealOverride.Value, 0.5f, 2f); AcridHealOverride.Value = Math.Clamp(AcridHealOverride.Value, 0.5f, 2f); CaptainHealOverride.Value = Math.Clamp(CaptainHealOverride.Value, 0.5f, 2f); VoidFiendHealOverride.Value = Math.Clamp(VoidFiendHealOverride.Value, 0.5f, 2f); SeekerHealOverride.Value = Math.Clamp(SeekerHealOverride.Value, 0.5f, 2f); FalseSonHealOverride.Value = Math.Clamp(FalseSonHealOverride.Value, 0.5f, 2f); ChefSotSHealOverride.Value = Math.Clamp(ChefSotSHealOverride.Value, 0.5f, 2f); ChirrHealOverride.Value = Math.Clamp(ChirrHealOverride.Value, 0.5f, 2f); AliemHealOverride.Value = Math.Clamp(AliemHealOverride.Value, 0.5f, 2f); SubmarinerHealOverride.Value = Math.Clamp(SubmarinerHealOverride.Value, 0.5f, 2f); RavagerHealOverride.Value = Math.Clamp(RavagerHealOverride.Value, 0.5f, 2f); PaladinBarrierOverride.Value = Math.Clamp(PaladinBarrierOverride.Value, 0f, 100f); } public static void RegisterOptions() { RexHealOverride = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<float>("Healing Buffs", "REX Override", 1.5f, "The amount to multiply Tangling Growth and DIRECTIVE: Inject healing by."); AcridHealOverride = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<float>("Healing Buffs", "Acrid Override", 2f, "The amount to multiply regenerative buff healing by."); CaptainHealOverride = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<float>("Healing Buffs", "Captain Override", 1f, "The amount to multiply healing beacon healing by."); VoidFiendHealOverride = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<float>("Healing Buffs", "Void Fiend Override", 1f, "The amount to multiply 【Sup??ress』 healing by."); SeekerHealOverride = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<float>("Healing Buffs", "Seeker Override", 1.5f, "The amount to multiply Unseen Hand and Meditate healing by."); FalseSonHealOverride = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<float>("Healing Buffs", "False Son Override", 1f, "The amount to multiply Lunar Tampering healing by."); ChefSotSHealOverride = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<float>("Healing Buffs", "Chef Override", 2f, "The amount to multiply Chef's Kiss healing by."); ChirrHealOverride = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<float>("Healing Buffs", "Chirr Override", 2f, "The amount to multiply Soothing Venom buff healing by."); AliemHealOverride = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<float>("Healing Buffs", "Alien Hominid Override", 2f, "The amount to multiply Chomp healing by."); SubmarinerHealOverride = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<float>("Healing Buffs", "Submariner Override", 2f, "The amount to multiply N'kuhanna's Restoration healing by."); RavagerHealOverride = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<float>("Healing Buffs", "Ravager Override", 1.5f, "The amount to multiply Consume healing by."); PaladinBarrierOverride = ((BaseUnityPlugin)HurricanePlugin.instance).Config.Bind<float>("Healing Buffs", "Paladin Override", 81f, "The amount to subtract from barrier decay rate multiplier."); } public static void RegisterRiskOfOptions() { //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown string format = "{0}x"; RoO.AddFloatStep(RexHealOverride, 0.5f, 2f, 0.025f, format); RoO.AddFloatStep(AcridHealOverride, 0.5f, 2f, 0.025f, format); RoO.AddFloatStep(CaptainHealOverride, 0.5f, 2f, 0.025f, format); RoO.AddFloatStep(VoidFiendHealOverride, 0.5f, 2f, 0.025f, format); RoO.AddFloatStep(SeekerHealOverride, 0.5f, 2f, 0.025f, format); RoO.AddFloatStep(FalseSonHealOverride, 0.5f, 2f, 0.025f, format); RoO.AddFloatStep(ChefSotSHealOverride, 0.5f, 2f, 0.025f, format); RoO.AddFloatStep(ChirrHealOverride, 0.5f, 2f, 0.025f, format); RoO.AddFloatStep(AliemHealOverride, 0.5f, 2f, 0.025f, format); RoO.AddFloatStep(SubmarinerHealOverride, 0.5f, 2f, 0.025f, format); RoO.AddFloatStep(RavagerHealOverride, 0.5f, 2f, 0.025f, format); RoO.AddFloatStep(PaladinBarrierOverride, 0f, 100f, 1f, "{0}%"); object obj = <>O.<0>__ResetToDefault; if (obj == null) { UnityAction val = RoO.ResetToDefault; <>O.<0>__ResetToDefault = val; obj = (object)val; } RoO.AddButton("Reset to default", "Healing Buffs", (UnityAction)obj); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.HDeDeDe.ChunkyMode", "ChunkyMode", "0.4.12")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class HurricanePlugin : BaseUnityPlugin { public const string PluginGUID = "com.HDeDeDe.ChunkyMode"; public const string PluginAuthor = "HDeDeDe"; public const string PluginName = "ChunkyMode"; public const string PluginVersion = "0.4.12"; public static HurricanePlugin instance; private void Awake() { if ((Object)(object)instance != (Object)null) { Log.Error("There can be only 1 instance of ChunkyMode!"); Object.Destroy((Object)(object)this); } else { Log.Init(((BaseUnityPlugin)this).Logger); instance = this; Hurricane.StartUp(); } } } } namespace HDeMods.CM { internal static class Log { private static ManualLogSource logSource; internal static void Init(ManualLogSource log) { logSource = log; } internal static void Debug(object data) { logSource.LogDebug(data); } internal static void Error(object data) { logSource.LogError(data); } internal static void Fatal(object data) { logSource.LogFatal(data); } internal static void Info(object data) { logSource.LogInfo(data); } internal static void Message(object data) { logSource.LogMessage(data); } internal static void Warning(object data) { logSource.LogWarning(data); } } } namespace HDeMods.HurricaneOptionalMods { internal static class Hunk { public static bool Enabled => Chainloader.PluginInfos.ContainsKey("com.rob.Hunk"); } internal static class Spikestrip { private static string unusedString = "https://github.com/HDeDeDe/ChunkyMode/blob/main/Resources/922279cb37ba22c549cb24845246cab250b7a671b7e1997d10e742e81c945785_1.jpg?raw=true"; public static bool Enabled => Chainloader.PluginInfos.ContainsKey("_com.prodzpod.ProdzpodSpikestripContent"); } internal static class RiskUI { public static bool Enabled => Chainloader.PluginInfos.ContainsKey("bubbet.riskui"); [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void AddLegacyDifficulty() { RiskUIPlugin.DifficultyIconMap["CHUNKYMODEDIFFMOD_NAME"] = Hurricane.HurricaneBundle.LoadAsset<Sprite>("texChunkyModeRiskUI"); } } internal static class Starstorm2 { [CompilerGenerated] private static class <>O { public static Manipulator <0>__BuffChirr; } private static ILHook chirrHook; public static bool Enabled => Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm"); [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void GenerateHooks() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(Chirr), "ModifyStats", (Type[])null, (Type[])null); object obj = <>O.<0>__BuffChirr; if (obj == null) { Manipulator val = BuffChirr; <>O.<0>__BuffChirr = val; obj = (object)val; } chirrHook = new ILHook((MethodBase)methodInfo, (Manipulator)obj); chirrHook.Undo(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void SetHooks() { chirrHook.Apply(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void RemoveHooks() { chirrHook.Undo(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void BuffChirr(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "SS2.Survivors.Chirr", "_percentHealthRegen") })) { Log.Error("Failed to hook Soothing Venom buff!"); return; } val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<float, CharacterBody, float>>((Func<float, CharacterBody, float>)delegate(float toHeal, CharacterBody cb) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 if ((int)cb.teamComponent.teamIndex != 1) { return toHeal; } return (Hurricane.isSimulacrumRun && !Hurricane.waveStarted) ? toHeal : (toHeal * HurricaneRunInfo.instance.chirrHealOverride); }); } } internal static class AlienHominid { [CompilerGenerated] private static class <>O { public static Manipulator <0>__BuffAliem; } private static ILHook aliemHook; public static bool Enabled => Chainloader.PluginInfos.ContainsKey("com.TheTimeSweeper.Aliem"); [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void GenerateHooks() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(AliemRidingChomp), "FuckinHealInMultiplayerPlease", (Type[])null, (Type[])null); object obj = <>O.<0>__BuffAliem; if (obj == null) { Manipulator val = BuffAliem; <>O.<0>__BuffAliem = val; obj = (object)val; } aliemHook = new ILHook((MethodBase)methodInfo, (Manipulator)obj); aliemHook.Undo(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void SetHooks() { aliemHook.Apply(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void RemoveHooks() { aliemHook.Undo(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void BuffAliem(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "AliemMod.Content.AliemConfig", "M3_Chomp_Healing") })) { Log.Error("Failed to hook Chomp!"); return; } int index = val.Index; val.Index = index + 1; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<float, EntityState, float>>((Func<float, EntityState, float>)delegate(float toHeal, EntityState es) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Invalid comparison between Unknown and I4 HealthComponent healthComponent = es.healthComponent; if ((int)healthComponent.body.teamComponent.teamIndex != 1) { return toHeal; } return (Hurricane.isSimulacrumRun && !Hurricane.waveStarted) ? toHeal : (toHeal * HurricaneRunInfo.instance.aliemHealOverride); }); } } internal static class Ravager { [CompilerGenerated] private static class <>O { public static Manipulator <0>__BuffRavager; } private static ILHook ravagerHook; public static bool Enabled => Chainloader.PluginInfos.ContainsKey("com.rob.Ravager"); [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void GenerateHooks() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(ConsumeOrb), "OnArrival", (Type[])null, (Type[])null); object obj = <>O.<0>__BuffRavager; if (obj == null) { Manipulator val = BuffRavager; <>O.<0>__BuffRavager = val; obj = (object)val; } ravagerHook = new ILHook((MethodBase)methodInfo, (Manipulator)obj); ravagerHook.Undo(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void SetHooks() { ravagerHook.Apply(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void RemoveHooks() { ravagerHook.Undo(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void BuffRavager(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<HurtBox>(x, "healthComponent"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<ConsumeOrb>(x, "healOverride") })) { Log.Error("Failed to hook ConsumeOrb!"); return; } val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<float, Orb, float>>((Func<float, Orb, float>)delegate(float toHeal, Orb orb) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 if ((int)orb.target.teamIndex != 1) { return toHeal; } return (Hurricane.isSimulacrumRun && !Hurricane.waveStarted) ? toHeal : (toHeal * HurricaneRunInfo.instance.ravagerHealOverride); }); float num = default(float); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<HurtBox>(x, "healthComponent"), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num) })) { Log.Error("Failed to hook ConsumeOrb!"); return; } val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<float, Orb, float>>((Func<float, Orb, float>)delegate(float toHeal, Orb orb) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 if ((int)orb.target.teamIndex != 1) { return toHeal; } return (Hurricane.isSimulacrumRun && !Hurricane.waveStarted) ? toHeal : (toHeal * HurricaneRunInfo.instance.ravagerHealOverride); }); } } internal static class Submariner { [CompilerGenerated] private static class <>O { public static Manipulator <0>__BuffSubmariner; } private static ILHook submarinerHook; public static bool Enabled => Chainloader.PluginInfos.ContainsKey("com.kenko.Submariner"); [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void GenerateHooks() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(SubmarinerSurvivor), "CharacterBody_RecalculateStats", (Type[])null, (Type[])null); object obj = <>O.<0>__BuffSubmariner; if (obj == null) { Manipulator val = BuffSubmariner; <>O.<0>__BuffSubmariner = val; obj = (object)val; } submarinerHook = new ILHook((MethodBase)methodInfo, (Manipulator)obj); submarinerHook.Undo(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void SetHooks() { submarinerHook.Apply(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void RemoveHooks() { submarinerHook.Undo(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void BuffSubmariner(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "SubmarinerMod.SubmarinerCharacter.Content.SubmarinerBuffs", "SubmarinerRegenBuff"), (Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterBody>(x, "GetBuffCount"), (Instruction x) => ILPatternMatchingExt.MatchConvR4(x) })) { Log.Error("Failed to hook Submariner Recalculate Stats!"); return; } val.Emit(OpCodes.Ldarg_2); val.EmitDelegate<Func<float, CharacterBody, float>>((Func<float, CharacterBody, float>)delegate(float toHeal, CharacterBody cb) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Invalid comparison between Unknown and I4 if ((int)cb.teamComponent.teamIndex != 1) { return toHeal; } return (Hurricane.isSimulacrumRun && !Hurricane.waveStarted) ? toHeal : (toHeal * HurricaneRunInfo.instance.submarinerHealOverride); }); } } internal static class RoO { public delegate void LogFunc(object data); private static string modGUID; private static string modNAME; private static LogFunc logError; private static bool initialized; public static bool Enabled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); public static void Init(string modGuid, string modName, LogFunc errorFunc, LogFunc debugFunc = null) { logError = errorFunc; modGUID = modGuid; modNAME = modName; if (!Enabled) { logError("Risk of Options is not present, the author of " + modNAME + " did not check for this! Mod GUID: " + modGUID); } else { initialized = true; } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void AddCheck(ConfigEntry<bool> option, bool requireRestart = false) { if (initialized) { LocalizedCheckBoxOption localizedCheckBoxOption = new LocalizedCheckBoxOption(option, requireRestart); ModSettingsManager.AddOption((BaseOption)(object)localizedCheckBoxOption, modGUID, modNAME); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void AddInt(ConfigEntry<int> option, int minimum, int maximum) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown if (initialized) { LocalizedIntSliderOption localizedIntSliderOption = new LocalizedIntSliderOption(option, new IntSliderConfig { min = minimum, max = maximum }); ModSettingsManager.AddOption((BaseOption)(object)localizedIntSliderOption, modGUID, modNAME); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void AddFloat(ConfigEntry<float> option, float minimum, float maximum, string format = "{0:0}%") { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown if (initialized) { LocalizedSliderOption localizedSliderOption = new LocalizedSliderOption(option, new SliderConfig { min = minimum, max = maximum, FormatString = format }); ModSettingsManager.AddOption((BaseOption)(object)localizedSliderOption, modGUID, modNAME); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void AddFloatStep(ConfigEntry<float> option, float minimum, float maximum, float step, string format = "{0:0}%") { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown if (initialized) { LocalizedSliderStepOption localizedSliderStepOption = new LocalizedSliderStepOption(option, new StepSliderConfig { min = minimum, max = maximum, FormatString = format, increment = step }); ModSettingsManager.AddOption((BaseOption)(object)localizedSliderStepOption, modGUID, modNAME); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void AddButton(string name, string category, UnityAction onButtonPressed) { if (initialized) { LocalizedButtonOption localizedButtonOption = new LocalizedButtonOption(name, category, "", "", onButtonPressed); ModSettingsManager.AddOption((BaseOption)(object)localizedButtonOption, modGUID, modNAME); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void SetSprite(Sprite sprite) { ModSettingsManager.SetModIcon(sprite); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void SetDescriptionToken(string description) { ModSettingsManager.SetModDescriptionToken(description); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void ResetToDefault() { if (!initialized) { return; } GameObject val = GameObject.Find("SettingsPanelTitle(Clone)"); if ((Object)(object)val == (Object)null) { val = GameObject.Find("SettingsPanel(Clone)"); } ModOptionPanelController component = val.GetComponent<ModOptionPanelController>(); ModSetting[] modSettings = component._modSettings; foreach (ModSetting val2 in modSettings) { if (!(((object)val2).GetType() == typeof(GenericButtonController))) { AccessTools.Method(((object)val2).GetType(), "ResetToDefault", (Type[])null, (Type[])null)?.Invoke(val2, null); } } } } public static class Saving { public static bool Enabled => Chainloader.PluginInfos.ContainsKey("com.KingEnderBrine.ProperSave"); [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void SetUp() { Loading.OnLoadingStarted += LoadFromSave; SaveFile.OnGatherSaveData += SaveRunInfo; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void LoadFromSave(SaveFile save) { if (Loading.IsLoading) { ModdedData value2; if (save.ModdedData.TryGetValue("CHUNKYMODE_RunInfo", out var value) && ((value != null) ? value.Value : null) is HurricaneSaveData saveData && saveData.isValidSave) { HurricaneRunInfo.saveData = saveData; HurricaneRunInfo.preSet = true; } else if (save.ModdedData.TryGetValue("HURRICANE_RunInfo", out val