using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using EntityStates; using EntityStates.BeetleQueenMonster; using EntityStates.ClayBruiser.Weapon; using EntityStates.GoldGat; using EntityStates.Gup; using EntityStates.ImpBossMonster; using EntityStates.LunarWisp; using EntityStates.Missions.Arena.NullWard; using EntityStates.NullifierMonster; using EntityStates.QuestVolatileBattery; using EntityStates.ShrineHalcyonite; using EntityStates.VagrantMonster; using EntityStates.VagrantNovaItem; using HG; using IL.RoR2; using IL.RoR2.Artifacts; using IL.RoR2.Items; using IL.RoR2.Orbs; using IL.RoR2.Projectile; using IL.RoR2.Skills; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using MoreStats; using On.EntityStates.CaptainSupplyDrop; using On.EntityStates.ClayBruiser.Weapon; using On.EntityStates.Gup; using On.EntityStates.LunarWisp; using On.EntityStates.Missions.Arena.NullWard; using On.EntityStates.NullifierMonster; using On.EntityStates.QuestVolatileBattery; using On.EntityStates.ShrineHalcyonite; using On.EntityStates.VagrantMonster; using On.EntityStates.VagrantNovaItem; using On.RoR2; using On.RoR2.Items; using On.RoR2.Orbs; using On.RoR2.UI; using R2API; using R2API.Utils; using RainrotSharedUtils.Difficulties; using RainrotSharedUtils.Shelters; using RiskierRain.Changes; using RiskierRain.Changes.Components; using RiskierRain.Components; using RiskierRain.CoreModules; using RoR2; using RoR2.ContentManagement; using RoR2.Items; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using RoR2BepInExPack.GameAssetPaths.Version_1_39_0; using RoR2BepInExPack.GameAssetPathsBetter; using SwanSongExtended.Modules; using SwanSongExtended.Storms; using ThreeEyedGames; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.ResourceManagement.AsyncOperations; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: AssemblyCompany("RiskierRain")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("RiskierRain")] [assembly: AssemblyTitle("RiskierRain")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] namespace RiskierRain { [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.*/)] [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.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.RiskOfBrainrot.RiskierRain", "RiskierRain", "1.3.38")] [R2APISubmoduleDependency(new string[] { "LanguageAPI", "PrefabAPI", "DirectorAPI", "ItemAPI", "RecalculateStatsAPI", "EliteAPI" })] internal class RiskierRainPlugin : BaseUnityPlugin { public static int sacrificeDropCount = 12; public static int sacrificeDropCountRestricted = 5; public static float sacrificeDropRate = 8f; public static float sacrificeDropRateLimited = 20f; public static int sonorousDropCountBase = 4; public static int sonorousDropCountStack = 2; public static int sonorousDropCountRestrictedBase = 5; public static int sonorousDropCountRestrictedStack = 1; public static float sonorousDropRateBase = 5f; public static float sonorousDropRateStack = 5f; public static float sonorousDropRateLimited = 20f; private static int serverSacrificeDropTally = 0; private static int serverSonorousDropTally = 0; public static int minSpikes = 3; public static int maxSpikes = 4; public static int baseSpikesPerBuff = 2; public static int stackSpikesPerBuff = 1; public static float minDamageCoefficient = 5f; public static float releaseSpeed = 2f; public static float spikeDamageCoefficient = 0.3f; public static float spikeProcCoefficient = 1f; public static int shatterspleenBleedChance = 20; public static GameObject impBleedSpikePrefab; public const string guid = "com.RiskOfBrainrot.RiskierRain"; public const string teamName = "RiskOfBrainrot"; public const string modName = "RiskierRain"; public const string version = "1.3.38"; public static bool isAELoaded = Tools.isLoaded("com.Borbo.ArtificerExtended"); public static bool isHBULoaded = Tools.isLoaded("com.Borbo.HuntressBuffULTIMATE"); public static bool isScepterLoaded = Tools.isLoaded("com.DestroyedClone.AncientScepter"); public static bool autosprintLoaded = Tools.isLoaded("com.johnedwa.RTAutoSprintEx"); public static bool acridLungeLoaded = Tools.isLoaded("Withor.AcridBiteLunge"); public static bool ucrLoaded = Tools.isLoaded("HIFU.UltimateCustomRun"); public static string drizzleDesc = "Simplifies difficulty for players new to the game. Weeping and gnashing is replaced by laughter and tickles.\n\n>Player Health Regeneration: +50% \n>Difficulty Scaling: -50% \n>Player Damage Reduction: +38%"; public static string rainstormDesc = "This is the way the game is meant to be played! Test your abilities and skills against formidable foes.\n\n>Player Health Regeneration: +0% \n>Difficulty Scaling: +0% "; public static string monsoonDesc = "For hardcore players. Every bend introduces pain and horrors of the planet. You will die.\n\n>Player Health Regeneration: -40% \n>Difficulty Scaling: +50%"; public static GameObject meatballNapalmPool; public static PluginInfo PInfo { get; private set; } public static string dropPrefabsPath => Assets.dropPrefabsPath; public static string iconsPath => Assets.iconsPath; public static string eliteMaterialsPath => Assets.eliteMaterialsPath; internal static ConfigFile CustomConfigFile { get; set; } public static ConfigEntry EnableConfig { get; set; } public static void DoSacrificeDropLimit() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown SacrificeArtifactManager.OnServerCharacterDeath += new Manipulator(DropLimitForSacrifice); GlobalEventManager.OnCharacterDeath += new Manipulator(DropLimitForSonorous); Stage.onServerStageBegin += ResetServerDropCount; LanguageAPI.Add("ITEM_ITEMDROPCHANCEONKILL_DESC", "On killing a large monster, it will always drop an item. " + $"Elite monsters have a {sonorousDropRateBase}% chance of " + $"dropping an item (+{sonorousDropRateStack}% per stack)."); } public static int GetDropCountForSacrifice() { if (!Object.op_Implicit((Object)(object)Run.instance)) { return 0; } if (UsingRestrictedSacrifice()) { return sacrificeDropCountRestricted * Run.instance.participatingPlayerCount; } return sacrificeDropCount * Run.instance.participatingPlayerCount; } public static int GetDropCountForSonorous() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)Run.instance)) { return 0; } int itemCountForTeam = Util.GetItemCountForTeam((TeamIndex)1, Items.ItemDropChanceOnKill.itemIndex, false, true); if (UsingRestrictedSacrifice()) { return sonorousDropCountRestrictedBase + sonorousDropCountRestrictedStack * (itemCountForTeam - 1); } return sonorousDropCountBase + sonorousDropCountStack * (itemCountForTeam - 1); } internal static bool UsingRestrictedSacrifice() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Invalid comparison between Unknown and I4 //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Invalid comparison between Unknown and I4 return (int)Stage.instance.sceneDef.sceneType == 2 || (int)Stage.instance.sceneDef.sceneType == 5; } private static void ResetServerDropCount(Stage obj) { serverSacrificeDropTally = 0; serverSonorousDropTally = 0; } private static void DropLimitForSacrifice(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); FixSacrificeDropChance(val); val.Index = 0; AddSacrificeDropTally(val); } private static void FixSacrificeDropChance(ILCursor c) { float num = default(float); if (!c.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "GetExpAdjustedDropChancePercent") }) || !c.TryGotoPrev((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num) })) { DebugBreakpoint("FixSacrificeDropChance"); return; } c.EmitDelegate>((Func)((float _) => (serverSacrificeDropTally >= GetDropCountForSacrifice() && !Util.CheckRoll(sacrificeDropRateLimited, 0f, (CharacterMaster)null)) ? 0f : sacrificeDropRate)); } private static void AddSacrificeDropTally(ILCursor c) { if (!c.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "CreatePickupDroplet") })) { DebugBreakpoint("AddSacrificeDropTally"); return; } c.EmitDelegate((Action)delegate { serverSacrificeDropTally++; }); } private static void DropLimitForSonorous(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown ILCursor val = new ILCursor(il); ILLabel val2 = val.DefineLabel(); int masterLoc = 17; int itemCountLoc = 102; if (!val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "ItemDropChanceOnKill") }) || !val.TryGotoPrev((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref masterLoc) }) || !val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCountEffective") })) { DebugBreakpoint("DropLimitForSonorous", 1); return; } SonorousUseTeamItemCount(val, masterLoc); if (!val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref itemCountLoc) })) { DebugBreakpoint("DropLimitForSonorous", 2); return; } val2 = val.MarkLabel(); FixSonorousDropChance(val, itemCountLoc, masterLoc); val.GotoLabel(val2, (MoveType)1, false); AddSonorousDropTally(val, itemCountLoc); } private static void SonorousUseTeamItemCount(ILCursor c, int masterLoc) { DoTheRoar(); if (!c.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCountEffective") })) { DebugBreakpoint("SonorousUseTeamItemCount"); } else { DoTheRoar(); } void DoTheRoar() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) c.Emit(OpCodes.Ldloc, masterLoc); c.EmitDelegate>((Func)((int oldItemCount, CharacterMaster master) => Util.GetItemCountForTeam(master.teamIndex, Items.ItemDropChanceOnKill.itemIndex, true, true))); } } private static void FixSonorousDropChance(ILCursor c, int itemCountLoc, int masterLoc) { //IL_009c: Unknown result type (might be due to invalid IL or missing references) if (!c.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_isElite") }) || !c.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, itemCountLoc) }) || !c.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, masterLoc) })) { DebugBreakpoint("FixSonorousDropChance"); return; } c.Emit(OpCodes.Ldloc, itemCountLoc); c.EmitDelegate>((Func)((float chanceIn, int stack) => (serverSonorousDropTally >= GetDropCountForSacrifice() && !Util.CheckRoll(sonorousDropRateLimited, 0f, (CharacterMaster)null)) ? 0f : (sonorousDropRateBase + sonorousDropRateStack * (float)(stack - 1)))); } private static void AddSonorousDropTally(ILCursor c, int itemCountLoc) { if (!c.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_isElite") }) || !c.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, itemCountLoc) }) || !c.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "CreatePickupDroplet") })) { DebugBreakpoint("AddSonorousDropTally"); return; } c.EmitDelegate((Action)delegate { serverSonorousDropTally++; }); } private void ReworkShatterspleen() { //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Expected O, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Expected O, but got Unknown //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Expected O, but got Unknown //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Expected O, but got Unknown impBleedSpikePrefab = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load("prefabs/projectiles/ImpVoidspikeProjectile"), "ShatterspleenBleedSpike", true); ProjectileController component = impBleedSpikePrefab.GetComponent(); component.procCoefficient = 1f; ProjectileImpactExplosion component2 = impBleedSpikePrefab.GetComponent(); ((ProjectileExplosion)component2).blastRadius = 4f; Rigidbody component3 = impBleedSpikePrefab.GetComponent(); component3.useGravity = true; AntiGravityForce val = impBleedSpikePrefab.AddComponent(); val.antiGravityCoefficient = -1f; val.rb = component3; ProjectileDirectionalTargetFinder val2 = impBleedSpikePrefab.AddComponent(); ((Behaviour)val2).enabled = true; val2.lookRange = 50f; val2.lookCone = 10f; ProjectileSteerTowardTarget val3 = impBleedSpikePrefab.AddComponent(); val3.yAxisOnly = false; val3.rotationSpeed = 50f; Assets.projectilePrefabs.Add(impBleedSpikePrefab); GlobalEventManager.ProcessHitEnemy += new Manipulator(RevokeShatterspleenBleedRights); GlobalEventManager.OnCharacterDeath += new Manipulator(RevokeShatterspleenDeathRights); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RemoveShatterspleenCrit); CharacterBody.RecalculateStats += new hook_RecalculateStats(ShatterspleenBleedChance); GlobalEventManager.ProcessHitEnemy += new hook_ProcessHitEnemy(NewShatterspleenFunctionality); CharacterBody.RemoveBuff_BuffIndex += new hook_RemoveBuff_BuffIndex(FireShatterspleenBleedSpike); LanguageAPI.Add("ITEM_BLEEDONHITANDEXPLODE_PICKUP", "Massive hits charge a volley of bleed spikes."); LanguageAPI.Add("ITEM_BLEEDONHITANDEXPLODE_DESC", $"Gain {shatterspleenBleedChance}% bleed chance. " + "Hits that deal more than " + Tools.ConvertDecimal(minDamageCoefficient) + " damage also " + $"charge {minSpikes}-{maxSpikes} volleys of " + $"{baseSpikesPerBuff} void spikes (+{stackSpikesPerBuff} per stack). " + $"These spikes release {releaseSpeed} seconds at a time, " + "dealing " + Tools.ConvertDecimal(spikeDamageCoefficient) + " BASE damage and bleeding enemies hit for " + Tools.ConvertDecimal(2.4f * spikeProcCoefficient) + " base damage."); } private void ShatterspleenBleedChance(orig_RecalculateStats orig, CharacterBody self) { orig.Invoke(self); Inventory inventory = self.inventory; if (inventory != null && inventory.GetItemCountEffective(Items.BleedOnHitAndExplode) > 0) { self.bleedChance += (float)shatterspleenBleedChance; } } private void RemoveShatterspleenCrit(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender.inventory)) { Inventory inventory = sender.inventory; if (inventory.GetItemCountEffective(Items.BleedOnHitAndExplode) > 0) { args.critAdd -= 5f; } } } private void FireShatterspleenBleedSpike(orig_RemoveBuff_BuffIndex orig, CharacterBody self, BuffIndex buffType) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) if (buffType == Assets.shatterspleenSpikeBuff.buffIndex) { int itemCountEffective = self.inventory.GetItemCountEffective(Items.BleedOnHitAndExplode); if (itemCountEffective > 0) { Util.PlaySound(FireVoidspikes.attackSoundString, ((Component)self).gameObject); EffectManager.SimpleMuzzleFlash(FireVoidspikes.swipeEffectPrefab, ((Component)self).gameObject, "Head", false); Ray val = default(Ray); ((Ray)(ref val))..ctor(self.inputBank.aimOrigin, self.inputBank.aimDirection); int num = baseSpikesPerBuff + stackSpikesPerBuff * (itemCountEffective - 1); Debug.Log((object)num); for (int i = 0; i < num; i++) { float num2 = 0f; float num3 = FireVoidspikes.projectileSpeed * 0.3f * (float)(i + 1); Vector3 val2 = Util.ApplySpread(((Ray)(ref val)).direction, 0f, 0f, 1f, 1f, num2, 0f); ProjectileManager.instance.FireProjectile(impBleedSpikePrefab, ((Ray)(ref val)).origin, Util.QuaternionSafeLookRotation(val2), ((Component)self).gameObject, self.damage * spikeDamageCoefficient, 0f, Util.CheckRoll(self.crit, self.master), (DamageColorIndex)0, (GameObject)null, num3, (DamageTypeCombo?)null); } } } orig.Invoke(self, buffType); } private void NewShatterspleenFunctionality(orig_ProcessHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_00fa: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.procCoefficient > 0f && !((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)5)) { CharacterBody component = damageInfo.attacker.GetComponent(); CharacterBody component2 = victim.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { int num = 0; Inventory inventory = component.inventory; if (Object.op_Implicit((Object)(object)inventory)) { num = inventory.GetItemCountEffective(Items.BleedOnHitAndExplode); if ((Object)(object)component2 != (Object)null && num > 0) { int num2 = Random.Range(minSpikes, maxSpikes + 1); int buffCount = component.GetBuffCount(Assets.shatterspleenSpikeBuff); if (damageInfo.damage / component.damage >= minDamageCoefficient && num2 > buffCount) { ((ProcChainMask)(ref damageInfo.procChainMask)).AddProc((ProcType)5); for (int i = buffCount; i < num2; i++) { component.AddTimedBuffAuthority(Assets.shatterspleenSpikeBuff.buffIndex, releaseSpeed * (float)(i + 1)); } } } } } } orig.Invoke(self, damageInfo, victim); } private void RevokeShatterspleenBleedRights(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.GotoNext((MoveType)2, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "BleedOnHitAndExplode"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCountEffective") }); val.Emit(OpCodes.Ldc_I4, 0); val.Emit(OpCodes.Mul); } private void RevokeShatterspleenDeathRights(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.GotoNext((MoveType)2, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "BleedOnHitAndExplode"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCountEffective") }); val.Emit(OpCodes.Ldc_I4, 0); val.Emit(OpCodes.Mul); } private bool IsCategoryEnabled(bool category) { return category; } private void Awake() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown PInfo = ((BaseUnityPlugin)this).Info; InitializeCoreModules(); InitializeConfig(); InitializeEverything(); CharacterBody.RemoveBuff_BuffDef += new hook_RemoveBuff_BuffDef(Gah); SaveConfig(); new ContentPacks().Initialize(); } public static void DebugBreakpoint(string methodName, int breakpointNumber = -1) { string text = "RiskierRain: " + methodName + " IL hook failed!"; if (breakpointNumber >= 0) { text += $" (breakpoint {breakpointNumber})"; } Debug.LogError((object)text); } private void Gah(orig_RemoveBuff_BuffDef orig, CharacterBody self, BuffDef buffType) { if (!NetworkServer.active) { Debug.Log((object)((Object)buffType).name); } orig.Invoke(self, buffType); } private void InitializeEverything() { ItemChanges.Initialize(); EquipmentChanges.Initialize(); DifficultyChanges.Initialize(); EnemyChanges.Initialize(); InteractableChanges.Initialize(); DoSacrificeDropLimit(); LanguageAPI.Add("DIFFICULTY_EASY_DESCRIPTION", drizzleDesc + ""); LanguageAPI.Add("DIFFICULTY_NORMAL_DESCRIPTION", rainstormDesc + ""); LanguageAPI.Add("DIFFICULTY_HARD_DESCRIPTION", monsoonDesc + ""); } public static AssetReferenceT LoadAsync(string guid, Action callback) where T : Object { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) AssetReferenceT val = new AssetReferenceT(guid); AsyncOperationHandle handle2 = AssetAsyncReferenceManager.LoadAsset(val, (AsyncReferenceHandleUnloadType)2); if (callback == null) { return val; } if (handle2.IsDone) { onCompleted(handle2); return val; } handle2.Completed += onCompleted; return val; void onCompleted(AsyncOperationHandle handle) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Invalid comparison between Unknown and I4 if (handle.Result == null || (int)handle.Status != 1) { Debug.LogError((object)$"Failed to load asset [{handle.DebugName}] : {handle.OperationException}"); } else { callback(handle.Result); } } } public static void RetierItemAsync(string itemGuid, ItemTier tier = 5, Action callback = null) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) AssetReferenceT val = new AssetReferenceT(itemGuid); AsyncOperationHandle val2 = AssetAsyncReferenceManager.LoadAsset(val, (AsyncReferenceHandleUnloadType)2); val2.Completed += delegate(AsyncOperationHandle ctx) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) ItemDef result = ctx.Result; result.tier = tier; result.deprecatedTier = tier; if (callback != null) { callback(result); } }; } public static void RemoveEquipmentAsync(string equipmentGuid, Action callback = null) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) AssetReferenceT val = new AssetReferenceT(equipmentGuid); AsyncOperationHandle val2 = AssetAsyncReferenceManager.LoadAsset(val, (AsyncReferenceHandleUnloadType)2); val2.Completed += delegate(AsyncOperationHandle ctx) { EquipmentDef result = ctx.Result; result.canDrop = false; result.canBeRandomlyTriggered = false; result.enigmaCompatible = false; result.dropOnDeathChance = 0f; if (callback != null) { callback(result); } }; } public static void ChangeEquipmentEnigma(string equipName, bool canEnigma) { EquipmentDef val = LoadEquipDef(equipName); if ((Object)(object)val != (Object)null) { val.enigmaCompatible = canEnigma; } } public static void ChangeBuffStacking(string buffName, bool canStack) { BuffDef val = LoadBuffDef(buffName); if ((Object)(object)val != (Object)null) { val.canStack = canStack; } } public static ItemDef LoadItemDef(string name) { return LegacyResourcesAPI.Load("ItemDefs/" + name); } public static EquipmentDef LoadEquipDef(string name) { return LegacyResourcesAPI.Load("EquipmentDefs/" + name); } public static BuffDef LoadBuffDef(string name) { return LegacyResourcesAPI.Load("BuffDefs/" + name); } public static void CreateMeatballNapalm() { //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_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) meatballNapalmPool = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load("prefabs/projectiles/beetlequeenacid"), "NapalmFire", true); Color val = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)120, (byte)0, byte.MaxValue)); Transform val2 = meatballNapalmPool.transform.Find("FX/Decal"); Material val3 = new Material(((Component)val2).GetComponent().Material); val3.SetColor("_Color", val); ((Component)val2).GetComponent().Material = val3; ProjectileDotZone component = meatballNapalmPool.GetComponent(); component.lifetime = 5f; component.fireFrequency = 2f; component.damageCoefficient = 0.5f; component.overlapProcCoefficient = 0.5f; component.attackerFiltering = (AttackerFiltering)0; meatballNapalmPool.GetComponent().damageType = DamageTypeCombo.op_Implicit((DamageType)128); meatballNapalmPool.GetComponent().procCoefficient = 1f; float num = 2.5f; meatballNapalmPool.GetComponent().localScale = new Vector3(num, num, num); Transform val4 = meatballNapalmPool.transform.Find("FX"); ((Component)val4.Find("Spittle")).gameObject.SetActive(false); GameObject val5 = Object.Instantiate(LegacyResourcesAPI.Load("prefabs/FireTrail").GetComponent().segmentPrefab, ((Component)val4).transform); MainModule main = val5.GetComponent().main; ((MainModule)(ref main)).duration = 8f; ((MainModule)(ref main)).gravityModifier = MinMaxCurve.op_Implicit(-0.075f); MinMaxCurve startSizeX = ((MainModule)(ref main)).startSizeX; ((MinMaxCurve)(ref startSizeX)).constantMin = ((MinMaxCurve)(ref startSizeX)).constantMin * 0.6f; ((MinMaxCurve)(ref startSizeX)).constantMax = ((MinMaxCurve)(ref startSizeX)).constantMax * 0.8f; MinMaxCurve startSizeY = ((MainModule)(ref main)).startSizeY; ((MinMaxCurve)(ref startSizeY)).constantMin = ((MinMaxCurve)(ref startSizeY)).constantMin * 0.8f; ((MinMaxCurve)(ref startSizeY)).constantMax = ((MinMaxCurve)(ref startSizeY)).constantMax * 1f; MinMaxCurve startSizeZ = ((MainModule)(ref main)).startSizeZ; ((MinMaxCurve)(ref startSizeZ)).constantMin = ((MinMaxCurve)(ref startSizeZ)).constantMin * 0.6f; ((MinMaxCurve)(ref startSizeZ)).constantMax = ((MinMaxCurve)(ref startSizeZ)).constantMax * 0.8f; MinMaxCurve startLifetime = ((MainModule)(ref main)).startLifetime; ((MinMaxCurve)(ref startLifetime)).constantMin = 0.9f; ((MinMaxCurve)(ref startLifetime)).constantMax = 1.1f; ((Behaviour)val5.GetComponent()).enabled = false; val5.transform.localPosition = Vector3.zero; val5.transform.localPosition = Vector3.zero; val5.transform.localScale = Vector3.one; ShapeModule shape = val5.GetComponent().shape; ((ShapeModule)(ref shape)).shapeType = (ParticleSystemShapeType)0; ((ShapeModule)(ref shape)).scale = Vector3.one * 0.5f; GameObject gameObject = ((Component)val4.Find("Point Light")).gameObject; Light component2 = gameObject.GetComponent(); component2.color = new Color(1f, 0.5f, 0f); component2.intensity = 6f; component2.range = 12f; Assets.projectilePrefabs.Add(meatballNapalmPool); } private bool GetConfigBool(bool defaultValue, string packetTitle, string desc = "") { if (desc != "") { return CustomConfigFile.Bind("Packets - See README For Details.", packetTitle + " Packet", defaultValue, "The changes in this Packet will be enabled if set to true.").Value; } return CustomConfigFile.Bind("Packets", packetTitle + " Packet", defaultValue, "(The following changes will be enabled if set to true) " + desc).Value; } private void InitializeConfig() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown CustomConfigFile = new ConfigFile(Paths.ConfigPath + "\\RiskierRain.cfg", true); CustomConfigFile.SaveOnConfigSet = false; EnableConfig = CustomConfigFile.Bind("Allow Config Options", "Enable Config", false, "Set this to true to enable config options. Please keep in mind that it was not within my design intentions to play this way. This is primarily meant for modpack users with tons of mods installed. If you have any issues or feedback on my mod balance, please feel free to send in feedback with the contact info in the README or Thunderstore description."); Debug.Log((object)"Config initialized!"); } private void SaveConfig() { CustomConfigFile.SaveOnConfigSet = true; CustomConfigFile.Save(); } private void InitializeCoreModules() { IEnumerable enumerable = from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(CoreModule)) select type; foreach (Type item in enumerable) { CoreModule coreModule = (CoreModule)Activator.CreateInstance(item); coreModule.Init(); Debug.Log((object)("Core Module: " + coreModule?.ToString() + " Initialized!")); } } } public static class Extensions { public static string AsPercent(this float d) { return d * 100f + "%"; } } public static class Tools { public static string modPrefix = string.Format("@{0}+{1}", "ArtificerExtended", "artiskillicons"); public static AssetBundle LoadAssetBundle(byte[] resourceBytes) { if (resourceBytes == null) { throw new ArgumentNullException("resourceBytes"); } return AssetBundle.LoadFromMemory(resourceBytes); } public static string GetModPrefix(this BaseUnityPlugin plugin, string bundleName) { return $"@{plugin.Info.Metadata.Name}+{bundleName}"; } internal static bool isLoaded(string modguid) { foreach (KeyValuePair pluginInfo in Chainloader.PluginInfos) { string key = pluginInfo.Key; PluginInfo value = pluginInfo.Value; if (key == modguid) { return true; } } return false; } internal static string ConvertDecimal(float d) { return d.AsPercent(); } internal static void GetMaterial(GameObject model, string childObject, Color color, ref Material material, float scaleMultiplier = 1f, bool replaceAll = false) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) Renderer[] componentsInChildren = model.GetComponentsInChildren(); Renderer[] array = componentsInChildren; foreach (Renderer val in array) { Renderer val2 = val; if (string.Equals(((Object)val).name, childObject)) { if (color == Color.clear) { Object.Destroy((Object)(object)val); break; } if ((Object)(object)material == (Object)null) { material = new Material(val.material); material.mainTexture = val.material.mainTexture; material.shader = val.material.shader; material.color = color; } val.material = material; Transform transform = ((Component)val).transform; transform.localScale *= scaleMultiplier; if (!replaceAll) { break; } } } } internal static void DebugMaterial(GameObject model) { Renderer[] componentsInChildren = model.GetComponentsInChildren(); Renderer[] array = componentsInChildren; foreach (Renderer val in array) { Renderer val2 = val; Debug.Log((object)("Material: " + ((Object)val2).name.ToString())); } } internal static void GetParticle(GameObject model, string childObject, Color color, float sizeMultiplier = 1f, bool replaceAll = false) { //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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) ParticleSystem[] componentsInChildren = model.GetComponentsInChildren(); ParticleSystem[] array = componentsInChildren; foreach (ParticleSystem val in array) { ParticleSystem val2 = val; MainModule main = val2.main; ColorOverLifetimeModule colorOverLifetime = val2.colorOverLifetime; ColorBySpeedModule colorBySpeed = val2.colorBySpeed; if (string.Equals(((Object)val2).name, childObject)) { ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(color); ((MainModule)(ref main)).startSizeMultiplier = ((MainModule)(ref main)).startSizeMultiplier * sizeMultiplier; ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = MinMaxGradient.op_Implicit(color); ((ColorBySpeedModule)(ref colorBySpeed)).color = MinMaxGradient.op_Implicit(color); if (!replaceAll) { break; } } } } internal static void DebugParticleSystem(GameObject model) { ParticleSystem[] components = model.GetComponents(); ParticleSystem[] array = components; foreach (ParticleSystem val in array) { ParticleSystem val2 = val; Debug.Log((object)("Particle: " + ((Object)val2).name.ToString())); } } internal static void GetLight(GameObject model, string childObject, Color color, bool replaceAll = false) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) Light[] componentsInChildren = model.GetComponentsInChildren(); Light[] array = componentsInChildren; foreach (Light val in array) { Light val2 = val; if (string.Equals(((Object)val2).name, childObject)) { val2.color = color; if (!replaceAll) { break; } } } } internal static void DebugLight(GameObject model) { Light[] componentsInChildren = model.GetComponentsInChildren(); Light[] array = componentsInChildren; foreach (Light val in array) { Light val2 = val; Debug.Log((object)("Light: " + ((Object)val2).name.ToString())); } } public static void ClearDotStacksForType(this DotController dotController, DotIndex dotIndex) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) for (int num = dotController.dotStackList.Count - 1; num >= 0; num--) { if (dotController.dotStackList[num].dotIndex == dotIndex) { dotController.RemoveDotStackAtServer(num); } } } public static void LoadCharacterBodyAsync(string guid, Action callback) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) AssetReferenceT val = new AssetReferenceT(guid); AsyncOperationHandle val2 = AssetAsyncReferenceManager.LoadAsset(val, (AsyncReferenceHandleUnloadType)2); val2.Completed += delegate(AsyncOperationHandle ctx) { GameObject result = ctx.Result; CharacterBody obj = default(CharacterBody); if (!((Object)(object)result == (Object)null) && result.TryGetComponent(ref obj)) { callback(obj); } }; } } } namespace RiskierRain.CoreModules { public class Assets : CoreModule { public static AssetBundle _retierAssetBundle; public static string dropPrefabsPath = "Assets/Models/DropPrefabs"; public static string iconsPath = "Assets/Textures/Icons/"; public static string eliteMaterialsPath = "Assets/Textures/Materials/Elite/"; public static List artifactDefs = new List(); public static List buffDefs = new List(); public static List effectDefs = new List(); public static List skillFamilies = new List(); public static List skillDefs = new List(); public static List projectilePrefabs = new List(); public static List networkedObjectPrefabs = new List(); public static List entityStates = new List(); public static List itemDefs = new List(); public static List equipDefs = new List(); public static List eliteDefs = new List(); public static List masterPrefabs = new List(); public static List bodyPrefabs = new List(); public static string shredKeywordToken = "DUCK_SHRED_KEYWORD"; public static BuffDef soulShrineLuckBuff; public static BuffDef voidCradleCurse; public static BuffDef shockMarker; public static int shockMarkerDuration = 4; public static BuffDef shockHealCooldown; public static float survivorExecuteThreshold = 0.15f; public static float banditExecutionThreshold = 0.1f; public static float harvestExecutionThreshold = 0.2f; public static BuffDef shatterspleenSpikeBuff; public static BuffDef noRazorwire; public static AssetBundle retierAssetBundle { get { if ((Object)(object)_retierAssetBundle == (Object)null) { _retierAssetBundle = AssetBundle.LoadFromFile(GetAssetBundlePath("retier2")); } return _retierAssetBundle; } set { _retierAssetBundle = value; } } public static List MaterialsWithSwappedShaders { get; } = new List(); public static string GetAssetBundlePath(string bundleName) { return Path.Combine(Path.GetDirectoryName(RiskierRainPlugin.PInfo.Location), bundleName); } public static bool RegisterEntityState(Type entityState) { if (entityStates.Contains(entityState) || !entityState.IsSubclassOf(typeof(EntityState)) || entityState.IsAbstract) { return false; } entityStates.Add(entityState); return true; } public static EffectDef CreateEffect(GameObject effect) { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0095: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown if ((Object)(object)effect == (Object)null) { Debug.LogError((object)"Effect prefab was null"); return null; } EffectComponent component = effect.GetComponent(); if ((Object)(object)component == (Object)null) { Debug.LogErrorFormat("Effect prefab: \"{0}\" does not have an EffectComponent.", new object[1] { ((Object)effect).name }); return null; } VFXAttributes component2 = effect.GetComponent(); if ((Object)(object)component2 == (Object)null) { Debug.LogErrorFormat("Effect prefab: \"{0}\" does not have a VFXAttributes component.", new object[1] { ((Object)effect).name }); return null; } EffectDef val = new EffectDef { prefab = effect, prefabEffectComponent = component, prefabVfxAttributes = component2, prefabName = ((Object)effect).name, spawnSoundEventName = component.soundName }; effectDefs.Add(val); return val; } public override void Init() { AddShatterspleenSpikeBuff(); AddRazorwireCooldown(); AddVoidCradleCurse(); AddShockDebuff(); AddShockCooldown(); AddSoulShrineLuckBuff(); } private void AddSoulShrineLuckBuff() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown BuffDef val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/bdExtraLifeBuff.asset").WaitForCompletion(); soulShrineLuckBuff = ScriptableObject.CreateInstance(); soulShrineLuckBuff.buffColor = val.buffColor; soulShrineLuckBuff.canStack = true; soulShrineLuckBuff.isDebuff = val.isDebuff; soulShrineLuckBuff.flags = val.flags; ((Object)soulShrineLuckBuff).name = "bdExtraLuckBuff"; soulShrineLuckBuff.iconSprite = val.iconSprite; buffDefs.Add(soulShrineLuckBuff); StatHooks.GetMoreStatCoefficients += new MoreStatHookEventHandler(SoulShrineLuck); } private void SoulShrineLuck(CharacterBody sender, MoreStatHookEventArgs args) { int buffCount = sender.GetBuffCount(soulShrineLuckBuff); if (buffCount > 0) { args.luckAdd += (float)(buffCount * InteractableChanges.soulShrineLuckIncrease); } } private void AddVoidCradleCurse() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) voidCradleCurse = ScriptableObject.CreateInstance(); voidCradleCurse.buffColor = Color.black; voidCradleCurse.canStack = false; voidCradleCurse.isDebuff = false; ((Object)voidCradleCurse).name = "VoidCradleCurse"; voidCradleCurse.iconSprite = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/texBuffVoidFog.tif").WaitForCompletion(); buffDefs.Add(voidCradleCurse); } private void AddShockDebuff() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) shockMarker = ScriptableObject.CreateInstance(); ((Object)shockMarker).name = "Shock"; shockMarker.buffColor = new Color(0f, 0f, 0.6f); shockMarker.canStack = false; shockMarker.isDebuff = true; BuffDef obj = shockMarker; obj.flags = (Flags)(obj.flags | 1); shockMarker.isHidden = true; shockMarker.iconSprite = null; buffDefs.Add(shockMarker); } private void AddShockCooldown() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) shockHealCooldown = ScriptableObject.CreateInstance(); ((Object)shockHealCooldown).name = "Shock"; shockHealCooldown.buffColor = new Color(0f, 0f, 0.6f); shockHealCooldown.canStack = true; shockHealCooldown.isDebuff = false; shockHealCooldown.isCooldown = true; shockHealCooldown.iconSprite = null; buffDefs.Add(shockHealCooldown); } private void AddShatterspleenSpikeBuff() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) shatterspleenSpikeBuff = ScriptableObject.CreateInstance(); shatterspleenSpikeBuff.buffColor = new Color(0.7f, 0f, 0.2f, 1f); shatterspleenSpikeBuff.canStack = true; shatterspleenSpikeBuff.isDebuff = false; ((Object)shatterspleenSpikeBuff).name = "ShatterspleenSpikeCharge"; shatterspleenSpikeBuff.iconSprite = Addressables.LoadAssetAsync((object)"RoR2/Base/LunarSkillReplacements/texBuffLunarDetonatorIcon.tif").WaitForCompletion(); buffDefs.Add(shatterspleenSpikeBuff); } private void AddRazorwireCooldown() { //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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) noRazorwire = ScriptableObject.CreateInstance(); noRazorwire.buffColor = Color.black; noRazorwire.canStack = false; noRazorwire.isDebuff = true; BuffDef obj = noRazorwire; obj.flags = (Flags)(obj.flags | 1); ((Object)noRazorwire).name = "NoRazorwire"; noRazorwire.iconSprite = null; buffDefs.Add(noRazorwire); } public static void SwapShadersFromMaterialsInBundle(AssetBundle bundle) { if (bundle.isStreamedSceneAssetBundle) { Debug.LogWarning((object)"Cannot swap material shaders from a streamed scene assetbundle."); return; } Material[] array = (from mat in bundle.LoadAllAssets() where ((Object)mat.shader).name.StartsWith("Stubbed") select mat).ToArray(); foreach (Material val in array) { if (!((Object)val.shader).name.StartsWith("Stubbed")) { Debug.LogWarning((object)$"The material {val} has a shader which's name doesnt start with \"Stubbed\" ({((Object)val.shader).name}), this is not allowed for stubbed shaders for MSU. not swapping shader."); continue; } try { SwapShader(val); } catch (Exception arg) { Debug.LogError((object)$"Failed to swap shader of material {val}: {arg}"); } } } private static void SwapShader(Material material) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) string text = ((Object)material.shader).name.Substring("Stubbed".Length); string text2 = text + ".shader"; Shader shader = Addressables.LoadAssetAsync((object)text2).WaitForCompletion(); material.shader = shader; MaterialsWithSwappedShaders.Add(material); } } internal class ContentPacks : IContentPackProvider { internal ContentPack contentPack = new ContentPack(); public string identifier => "RiskierRain"; public void Initialize() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); } private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)this); } public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { contentPack.identifier = identifier; contentPack.artifactDefs.Add(Assets.artifactDefs.ToArray()); contentPack.buffDefs.Add(Assets.buffDefs.ToArray()); contentPack.effectDefs.Add(Assets.effectDefs.ToArray()); contentPack.equipmentDefs.Add(Assets.equipDefs.ToArray()); contentPack.itemDefs.Add(Assets.itemDefs.ToArray()); contentPack.eliteDefs.Add(Assets.eliteDefs.ToArray()); contentPack.projectilePrefabs.Add(Assets.projectilePrefabs.ToArray()); contentPack.bodyPrefabs.Add(Assets.bodyPrefabs.ToArray()); contentPack.masterPrefabs.Add(Assets.masterPrefabs.ToArray()); contentPack.entityStateTypes.Add(Assets.entityStates.ToArray()); args.ReportProgress(1f); yield break; } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { ContentPack.Copy(contentPack, args.output); args.ReportProgress(1f); yield break; } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(1f); yield break; } } public abstract class CoreModule { public abstract void Init(); } public class EliteModule : CoreModule { public class CustomEliteDef : ScriptableObject { public EliteDef eliteDef; public EliteTiers eliteTier; public Color lightColor = Color.clear; public Texture eliteRamp; public Material overlayMaterial; public GameObject spawnEffect; } public enum EliteTiers { Tier1, Tier2, Other } public static List Elites = new List(); public static Texture defaultShaderRamp = null; public override void Init() { RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(AddElites)); } private static void AddElites() { foreach (CustomEliteDef elite in Elites) { switch (elite.eliteTier) { case EliteTiers.Tier1: ArrayUtils.ArrayAppend(ref CombatDirector.eliteTiers[1].eliteTypes, ref elite.eliteDef); ArrayUtils.ArrayAppend(ref CombatDirector.eliteTiers[2].eliteTypes, ref elite.eliteDef); break; case EliteTiers.Tier2: ArrayUtils.ArrayAppend(ref CombatDirector.eliteTiers[3].eliteTypes, ref elite.eliteDef); break; } } } } public class Spawnlists : CoreModule { public override void Init() { SpawnCards.Init(); } public static void AddMonsterCardToSpawnlist(DirectorCardCategorySelection categorySelection, DirectorCard directorCard, MonsterCategory monsterCategory) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Expected I4, but got Unknown categorySelection.AddCard((int)monsterCategory, directorCard); } } public static class SpawnCards { public static bool initialized; public static CharacterSpawnCard AlphaConstruct; public static CharacterSpawnCard Beetle; public static CharacterSpawnCard Lemurian; public static CharacterSpawnCard Larva; public static CharacterSpawnCard Wisp; public static CharacterSpawnCard Jellyfish; public static CharacterSpawnCard BlindPestSnowy; public static CharacterSpawnCard BlindVerminSnowy; public static CharacterSpawnCard Imp; public static CharacterSpawnCard Vulture; public static CharacterSpawnCard Golem; public static CharacterSpawnCard BeetleGuard; public static CharacterSpawnCard Mushrum; public static CharacterSpawnCard Bison; public static CharacterSpawnCard ClayApothecary; public static CharacterSpawnCard ElderLemurian; public static CharacterSpawnCard Parent; public static CharacterSpawnCard Gup; public static CharacterSpawnCard Bronzong; public static CharacterSpawnCard GreaterWisp; public static CharacterSpawnCard TitanBlackBeach; public static CharacterSpawnCard TitanDampCave; public static CharacterSpawnCard TitanGolemPlains; public static CharacterSpawnCard TitanGooLake; public static CharacterSpawnCard Vagrant; public static CharacterSpawnCard BeetleQueen; public static CharacterSpawnCard Dunestrider; public static CharacterSpawnCard MagmaWorm; public static CharacterSpawnCard ImpOverlord; public static CharacterSpawnCard Grovetender; public static CharacterSpawnCard RoboBall; public static CharacterSpawnCard XiConstruct; public static CharacterSpawnCard Grandparent; public static CharacterSpawnCard OverloadingWorm; public static CharacterSpawnCard solusInvalidator; public static CharacterSpawnCard solusScorcher; public static CharacterSpawnCard solusTransporter; public static CharacterSpawnCard solusExtractor; public static CharacterSpawnCard solusProspector; public static CharacterSpawnCard solusDistributor; public static CharacterSpawnCard solusAmalgamator; public static void Init() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) if (!initialized) { initialized = true; AlphaConstruct = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MajorAndMinorConstruct/cscMinorConstruct.asset").WaitForCompletion(); Beetle = LegacyResourcesAPI.Load("spawncards/characterspawncards/cscbeetle"); Lemurian = LegacyResourcesAPI.Load("spawncards/characterspawncards/csclemurian"); Wisp = LegacyResourcesAPI.Load("spawncards/characterspawncards/csclesserwisp"); Jellyfish = LegacyResourcesAPI.Load("spawncards/characterspawncards/cscjellyfish"); Imp = LegacyResourcesAPI.Load("spawncards/characterspawncards/cscimp"); Vulture = LegacyResourcesAPI.Load("spawncards/characterspawncards/cscvulture"); Golem = Addressables.LoadAssetAsync((object)"RoR2/Base/Golem/cscGolem.asset").WaitForCompletion(); BeetleGuard = LegacyResourcesAPI.Load("spawncards/characterspawncards/cscbeetleguard"); Mushrum = LegacyResourcesAPI.Load("spawncards/characterspawncards/cscminimushroom"); Bison = Addressables.LoadAssetAsync((object)"RoR2/Base/Bison/cscBison.asset").WaitForCompletion(); ElderLemurian = Addressables.LoadAssetAsync((object)"RoR2/Base/LemurianBruiser/cscLemurianBruiser.asset").WaitForCompletion(); Parent = Addressables.LoadAssetAsync((object)"RoR2/Base/Parent/cscParent.asset").WaitForCompletion(); Gup = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Gup/cscGupBody.asset").WaitForCompletion(); Bronzong = LegacyResourcesAPI.Load("spawncards/characterspawncards/cscbell"); GreaterWisp = LegacyResourcesAPI.Load("spawncards/characterspawncards/cscgreaterwisp"); TitanBlackBeach = LegacyResourcesAPI.Load("spawncards/characterspawncards/csctitanblackbeach"); TitanDampCave = LegacyResourcesAPI.Load("spawncards/characterspawncards/csctitandampcave"); TitanGolemPlains = LegacyResourcesAPI.Load("spawncards/characterspawncards/csctitangolemplains"); TitanGooLake = LegacyResourcesAPI.Load("spawncards/characterspawncards/csctitangoolake"); Vagrant = LegacyResourcesAPI.Load("spawncards/characterspawncards/cscvagrant"); BeetleQueen = LegacyResourcesAPI.Load("spawncards/characterspawncards/cscbeetlequeen"); Dunestrider = LegacyResourcesAPI.Load("spawncards/characterspawncards/cscclayboss"); MagmaWorm = LegacyResourcesAPI.Load("spawncards/characterspawncards/cscmagmaworm"); ImpOverlord = LegacyResourcesAPI.Load("spawncards/characterspawncards/cscimpboss"); Grovetender = LegacyResourcesAPI.Load("spawncards/characterspawncards/cscgravekeeper"); RoboBall = LegacyResourcesAPI.Load("spawncards/characterspawncards/cscroboballboss"); Grandparent = Addressables.LoadAssetAsync((object)"RoR2/Base/Grandparent/cscGrandparent.asset").WaitForCompletion(); OverloadingWorm = LegacyResourcesAPI.Load("spawncards/characterspawncards/cscelectricworm"); BlindVerminSnowy = Addressables.LoadAssetAsync((object)"RoR2/DLC1/Vermin/cscVerminSnowy.asset").WaitForCompletion(); BlindPestSnowy = Addressables.LoadAssetAsync((object)"RoR2/DLC1/FlyingVermin/cscFlyingVerminSnowy.asset").WaitForCompletion(); ClayApothecary = Addressables.LoadAssetAsync((object)"RoR2/DLC1/ClayGrenadier/cscClayGrenadier.asset").WaitForCompletion(); Larva = Addressables.LoadAssetAsync((object)"RoR2/DLC1/AcidLarva/cscAcidLarva.asset").WaitForCompletion(); XiConstruct = Addressables.LoadAssetAsync((object)"RoR2/DLC1/MajorAndMinorConstruct/cscMegaConstruct.asset").WaitForCompletion(); solusDistributor = Addressables.LoadAssetAsync((object)"RoR2/DLC3/MinePod/cscMinePod.asset").WaitForCompletion(); solusExtractor = Addressables.LoadAssetAsync((object)"RoR2/DLC3/ExtractorUnit/cscExtractorUnit.asset ").WaitForCompletion(); solusInvalidator = Addressables.LoadAssetAsync((object)"RoR2/DLC3/DefectiveUnit/cscDefectiveUnit.asset").WaitForCompletion(); solusProspector = Addressables.LoadAssetAsync((object)"RoR2/DLC3/WorkerUnit/cscWorkerUnit.asset").WaitForCompletion(); solusScorcher = Addressables.LoadAssetAsync((object)"RoR2/DLC3/Tanker/cscTanker.asset").WaitForCompletion(); solusTransporter = Addressables.LoadAssetAsync((object)"RoR2/DLC3/IronHauler/cscIronHauler.asset").WaitForCompletion(); solusAmalgamator = Addressables.LoadAssetAsync((object)"RoR2/DLC3/SolusAmalgamator/cscSolusAmalgamator.asset").WaitForCompletion(); DirectorCards.Init(); } } } public static class DirectorCards { public static bool initialized; public static DirectorCard AlphaConstruct; public static DirectorCard AlphaConstructNear; public static DirectorCard Beetle; public static DirectorCard Lemurian; public static DirectorCard Larva; public static DirectorCard Wisp; public static DirectorCard Jellyfish; public static DirectorCard BlindPestSnowy; public static DirectorCard BlindVerminSnowy; public static DirectorCard Imp; public static DirectorCard Vulture; public static DirectorCard Golem; public static DirectorCard BeetleGuard; public static DirectorCard Mushrum; public static DirectorCard ClayApothecary; public static DirectorCard Bison; public static DirectorCard BisonLoop; public static DirectorCard ElderLemurian; public static DirectorCard Parent; public static DirectorCard Gup; public static DirectorCard Bronzong; public static DirectorCard GreaterWisp; public static DirectorCard TitanBlackBeach; public static DirectorCard TitanDampCave; public static DirectorCard TitanGolemPlains; public static DirectorCard TitanGooLake; public static DirectorCard Vagrant; public static DirectorCard BeetleQueen; public static DirectorCard Dunestrider; public static DirectorCard MagmaWorm; public static DirectorCard ImpOverlord; public static DirectorCard Grovetender; public static DirectorCard RoboBall; public static DirectorCard Grandparent; public static DirectorCard OverloadingWorm; public static DirectorCard XiConstruct; public static DirectorCard LunarGolemSkyMeadow; public static DirectorCard LunarGolemSkyMeadowBasic; public static DirectorCard SolusInvalidator; public static DirectorCard SolusScorcher; public static DirectorCard SolusTransporter; public static DirectorCard SolusExtractor; public static DirectorCard SolusProspector; public static DirectorCard SolusDistributor; public static DirectorCard SolusAmalgamator; public static bool logCardInfo; public static void Init() { if (!initialized) { initialized = true; AlphaConstruct = BuildDirectorCard(SpawnCards.AlphaConstruct, 1, 1, (MonsterSpawnDistance)0); AlphaConstructNear = BuildDirectorCard(SpawnCards.AlphaConstruct, 1, 1, (MonsterSpawnDistance)1); Beetle = BuildDirectorCard(SpawnCards.Beetle); Lemurian = BuildDirectorCard(SpawnCards.Lemurian); Larva = BuildDirectorCard(SpawnCards.Larva); Wisp = BuildDirectorCard(SpawnCards.Wisp); Jellyfish = BuildDirectorCard(SpawnCards.Jellyfish, 1, 0, (MonsterSpawnDistance)2); BlindPestSnowy = BuildDirectorCard(SpawnCards.BlindPestSnowy); BlindVerminSnowy = BuildDirectorCard(SpawnCards.BlindVerminSnowy); Imp = BuildDirectorCard(SpawnCards.Imp); Vulture = BuildDirectorCard(SpawnCards.Vulture, 1, 3, (MonsterSpawnDistance)0); Golem = BuildDirectorCard(SpawnCards.Golem); BeetleGuard = BuildDirectorCard(SpawnCards.BeetleGuard); Mushrum = BuildDirectorCard(SpawnCards.Mushrum); ClayApothecary = BuildDirectorCard(SpawnCards.ClayApothecary); Bison = BuildDirectorCard(SpawnCards.Bison, 1, 2, (MonsterSpawnDistance)0); Bronzong = BuildDirectorCard(SpawnCards.Bronzong); GreaterWisp = BuildDirectorCard(SpawnCards.GreaterWisp); ElderLemurian = BuildDirectorCard(SpawnCards.ElderLemurian, 1, 3, (MonsterSpawnDistance)0); Parent = BuildDirectorCard(SpawnCards.Parent, 1, 3, (MonsterSpawnDistance)0); Gup = BuildDirectorCard(SpawnCards.Gup, 1, 3, (MonsterSpawnDistance)0); TitanBlackBeach = BuildDirectorCard(SpawnCards.TitanBlackBeach); TitanDampCave = BuildDirectorCard(SpawnCards.TitanDampCave); TitanGolemPlains = BuildDirectorCard(SpawnCards.TitanGolemPlains); TitanGooLake = BuildDirectorCard(SpawnCards.TitanGooLake); Vagrant = BuildDirectorCard(SpawnCards.Vagrant); BeetleQueen = BuildDirectorCard(SpawnCards.BeetleQueen); Dunestrider = BuildDirectorCard(SpawnCards.Dunestrider); ImpOverlord = BuildDirectorCard(SpawnCards.ImpOverlord, 1, 1, (MonsterSpawnDistance)0); Grovetender = BuildDirectorCard(SpawnCards.Grovetender); RoboBall = BuildDirectorCard(SpawnCards.RoboBall, 1, 3, (MonsterSpawnDistance)0); MagmaWorm = BuildDirectorCard(SpawnCards.MagmaWorm, 1, 2, (MonsterSpawnDistance)0); Grandparent = BuildDirectorCard(SpawnCards.Grandparent, 1, 2, (MonsterSpawnDistance)0); OverloadingWorm = BuildDirectorCard(SpawnCards.OverloadingWorm); XiConstruct = BuildDirectorCard(SpawnCards.XiConstruct, 1, 2, (MonsterSpawnDistance)0); SolusInvalidator = BuildDirectorCard(SpawnCards.solusInvalidator); SolusScorcher = BuildDirectorCard(SpawnCards.solusScorcher); SolusTransporter = BuildDirectorCard(SpawnCards.solusTransporter); SolusExtractor = BuildDirectorCard(SpawnCards.solusExtractor); SolusProspector = BuildDirectorCard(SpawnCards.solusProspector); SolusDistributor = BuildDirectorCard(SpawnCards.solusDistributor); SolusAmalgamator = BuildDirectorCard(SpawnCards.solusAmalgamator); } } public static DirectorCard BuildDirectorCard(CharacterSpawnCard spawnCard) { return BuildDirectorCard(spawnCard, 1, 0, (MonsterSpawnDistance)0); } public static DirectorCard BuildDirectorCard(CharacterSpawnCard spawnCard, int weight, int minStages, MonsterSpawnDistance spawnDistance) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown return new DirectorCard { spawnCard = (SpawnCard)(object)spawnCard, selectionWeight = weight, preventOverhead = false, minimumStageCompletions = minStages, spawnDistance = spawnDistance }; } public static DirectorCard BuildDirectorCard(InteractableSpawnCard spawnCard, int weight, int minStages) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown return new DirectorCard { spawnCard = (SpawnCard)(object)spawnCard, selectionWeight = weight, preventOverhead = false, minimumStageCompletions = minStages }; } } public class StatHooks : CoreModule { public class BorboStatHookEventArgs : EventArgs { public float attackSpeedMultAdd = 1f; public float attackSpeedDivAdd = 1f; } public delegate void StatHookEventHandler(CharacterBody sender, BorboStatHookEventArgs args); public static event StatHookEventHandler BorboStatCoefficients; public static void ApplyCooldownScale(GenericSkill skillSlot, float cooldownScale) { if ((Object)(object)skillSlot != (Object)null) { skillSlot.cooldownScale *= cooldownScale; } } public override void Init() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CharacterBody.RecalculateStats += new hook_RecalculateStats(AttackSpeedBs); } private void AttackSpeedBs(orig_RecalculateStats orig, CharacterBody self) { orig.Invoke(self); BorboStatHookEventArgs borboStatHookEventArgs = new BorboStatHookEventArgs(); StatHooks.BorboStatCoefficients?.Invoke(self, borboStatHookEventArgs); float num = borboStatHookEventArgs.attackSpeedMultAdd / borboStatHookEventArgs.attackSpeedDivAdd; self.attackSpeed *= num; } } } namespace RiskierRain.Components { internal class CopyInventoryFromOwner : MonoBehaviour { public Func inventoryItemCopyFilter = Inventory.defaultItemCopyFilterDelegate.Invoke; public bool copyInventory = true; public bool copyEquipment = true; public void Start() { CharacterMaster component = ((Component)this).gameObject.GetComponent(); MinionOwnership component2 = ((Component)this).gameObject.GetComponent(); if (!((Object)(object)component2 != (Object)null) || !((Object)(object)component != (Object)null)) { return; } CharacterMaster ownerMaster = component2.ownerMaster; Inventory val = ((ownerMaster != null) ? ownerMaster.inventory : null); if (Object.op_Implicit((Object)(object)val)) { if (copyEquipment) { component.inventory.CopyEquipmentFrom(val); } if (copyInventory) { component.inventory.CopyItemsFrom(val, inventoryItemCopyFilter); } } } } internal class InteractableBuffController : MonoBehaviour { private PurchaseInteraction _purchaseInteraction; public BuffDef buffDef; public float duration = -1f; public PurchaseInteraction purchaseInteraction { get { if (Object.op_Implicit((Object)(object)_purchaseInteraction)) { return _purchaseInteraction; } _purchaseInteraction = ((Component)this).GetComponent(); return _purchaseInteraction; } } internal virtual void Start() { ((UnityEvent)(object)purchaseInteraction.onPurchase).AddListener((UnityAction)OnPurchase); } private void OnPurchase(Interactor interactor) { if (!((Object)(object)buffDef == (Object)null)) { CharacterBody component = ((Component)interactor).GetComponent(); if (Object.op_Implicit((Object)(object)component) && NetworkServer.active) { AddDebuff(component); } } } internal virtual void AddDebuff(CharacterBody interactorBody) { if (duration <= 0f) { interactorBody.AddBuff(buffDef); } else { interactorBody.AddTimedBuff(buffDef, duration); } } } internal class StatBuffer : MonoBehaviour { public int levelOffset = 0; public float levelDamage = 0f; public float levelAttackSpeed = 0f; public float levelMoveSpeed = 0f; public float levelShield = 0f; public float levelArmor = 0f; } } namespace RiskierRain.Changes { public static class DifficultyChanges { public delegate bool orig_getHasOneShotProtection(CharacterBody self); [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Manipulator <>9__79_0; public static Manipulator <>9__79_1; public static Manipulator <>9__79_2; public static Manipulator <>9__79_3; public static Func <>9__85_0; public static Func <>9__85_2; public static Func <>9__87_0; public static Func <>9__89_0; public static Func <>9__89_1; public static Func <>9__89_2; public static Func <>9__103_0; public static Func <>9__103_1; public static Func <>9__103_2; public static Func <>9__103_3; public static Func <>9__103_4; public static Func <>9__104_1; public static Func <>9__104_2; public static Func <>9__104_3; public static Func <>9__104_4; public static Func <>9__104_5; public static Func <>9__104_6; public static Func <>9__104_8; public static Func <>9__104_9; public static Func <>9__104_10; public static Func <>9__104_11; public static Func <>9__104_12; public static Func <>9__104_13; public static Func <>9__104_14; internal void b__79_0(ILContext ctx) { RemoveEclipseEffect(ctx, "E1"); } internal void b__79_1(ILContext ctx) { RemoveEclipseEffect(ctx, "E3"); } internal void b__79_2(ILContext ctx) { RemoveEclipseEffect(ctx, "E5"); } internal void b__79_3(ILContext ctx) { RemoveEclipseEffect(ctx, "E6"); } internal bool b__85_0(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_selectedDifficulty"); } internal bool b__85_2(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__87_0(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_selectedDifficulty"); } internal bool b__89_0(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_selectedDifficulty"); } internal bool b__89_1(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdcI4(x, ref num); } internal bool b__89_2(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_fullHealth"); } internal bool b__103_0(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__103_1(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__103_2(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__103_3(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchStloc(x, ref num); } internal bool b__103_4(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__104_1(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__104_2(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool b__104_3(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "Floor"); } internal bool b__104_4(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__104_5(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__104_6(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "stageClearCount"); } internal bool b__104_8(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__104_9(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool b__104_10(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__104_11(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__104_12(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "stageClearCount"); } internal bool b__104_13(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "ambientLevelCap"); } internal float b__104_14(float levelIn) { float ambientLevelBoost = GetAmbientLevelBoost(); return levelIn + ambientLevelBoost; } } public static string Tier2EliteName = "Rare"; public static bool potentialProtectionVisibility = true; public static float potentialProtectionDuration = 4f; public static bool pityChargeOn = false; public static float pityChargeShrinkDelta = 0f; public static float pityChargeRecolorDelta = 0f; public static float fastDirectorEliteBias = 1.2f; public static float fastDirectorCreditMultiplier = 0.75f; public static float slowDirectorEliteBias = 1.2f; public static float slowDirectorCreditMultiplier = 1f; public static float teleLesserEliteBias = 1f; public static float teleLesserCreditMultiplier = 0.8f; public static float teleBossEliteBias = 1f; public static float teleBossCreditMultiplier = 1f; public static float teleBossCreditMultiplierStage1 = 0.5f; public static float interactableCreditsAdd = 125f; public static float monsterCreditsMultiplier = 1f; public static float drizzleDifficultyBoost = 0f; public static float rainstormDifficultyBoost = 0f; public static float monsoonDifficultyBoost = 3f; public static float eclipseDifficultyBoost = 6f; public static int ambientLevelCapDrizzle = 99; public static int ambientLevelCap = 999; public static float easyTeleParticleRadius = 1f; public static float normalTeleParticleRadius = 0.8f; public static float hardTeleParticleRadius = 0.4f; public static float eclipseTeleParticleRadius = 0.4f; public static float defaultTeleParticleRadius = 0.9f; public static int Tier2EliteMinimumStageDefault = 6; public static int Tier2EliteMinimumStageDrizzle = 11; public static int Tier2EliteMinimumStageRainstorm = 6; public static int Tier2EliteMinimumStageMonsoon = 4; public static int Tier2EliteMinimumStageEclipse = 4; public static DifficultyIndex eclipseLevelBossElite = (DifficultyIndex)3; public static string eclipseOneDesc = "\n(1) Boss Enemies: Always Elite"; public static DifficultyIndex eclipseLevelEnemyMspd = (DifficultyIndex)4; public static float eclipseEnemyMspd = 0.3f; public static string eclipseTwoDesc = "\n(2) Enemy Speed: +" + eclipseEnemyMspd.AsPercent() + ""; public static DifficultyIndex eclipseLevelSmallHoldout = (DifficultyIndex)5; public static DifficultyIndex eclipseLevelHoldoutLoss = (DifficultyIndex)5; public static float eclipseHoldoutLossRate = 0.02f; public static float eclipseHoldoutScale = 0.6f; public static string eclipseThreeDesc = "\n(3) All Holdout Zones are Eclipsed"; public static DifficultyIndex eclipseHealingLoss = (DifficultyIndex)6; public static float eclipseHealingMultiplier = 0.75f; public static string eclipseFourDesc = "\n(4) Ally Healing: -" + (1f - eclipseHealingMultiplier).AsPercent() + ""; public static DifficultyIndex eclipseLevelEnemyCdr = (DifficultyIndex)7; public static float eclipseEnemyCooldownScale = 0.6f; public static string eclipseFiveDesc = "\n(5) Enemy Cooldowns: -" + (1f - eclipseEnemyCooldownScale).AsPercent() + ""; public static DifficultyIndex eclipseLevelSpiteArtifact = (DifficultyIndex)8; public static string eclipseSixDesc = "\n(6) On Kill: Enemies drop exploding bombs"; public static DifficultyIndex eclipseLevelItemTax = (DifficultyIndex)9; public static int eclipseItemTaxCount = 2; public static float eclipseItemTaxPercent = 0.2f; public static string eclipseSevenDesc = "\n(7) Item Tax: " + eclipseItemTaxPercent.AsPercent() + " per Stage"; public static string eclipseEightDesc = "\n(8) Allies recieve permanent damage"; public static float baseScalingMultiplier = 0.8f; public static float difficultyIncreasePerMinutePerDifficulty = 0.01f; public static float difficultyIncreasePerMinuteBase = 1f; public static float difficultyIncreasePerStage = 0.9f; public static float difficultyIncreasePerLoop = 1.3f; public static float playerBaseDifficultyFactor = 0.2f; public static float playerScalingDifficultyFactor = 0.2f; public static float playerSpawnRateFactor = 0.5f; public static float difficultySpawnRateFactor = 0.4f; public static float voidFieldsTimeCost = 120f; private static GameObject awu = LegacyResourcesAPI.Load("prefabs/characterbodies/SuperRoboBallBossBody"); private static CharacterBody awuBody; private static float awuArmor = 40f; private static float awuAdditionalArmor = 0f; private static int awuAdaptiveArmorCount = 1; private static float costExponent = 1f; private static float goldRewardMultiplierGlobal = 0.35f; private static float expRewardMultiplierGlobal = 0.4f; private static float compensationForStartingLevel = 1f; internal static float GetAmbientLevelBoost() { return DifficultyUtilsModule.GetAmbientLevelBoost(); } public static void Initialize() { RemoveOspForever(); AddPotentialProtection(); AddPityCharge(); FreezeDifficultyScalingOnFinalLevels(); ChangeDifficultyCoefficientCalculation(); ChangeEnemyRewards(); DifficultyUtilsModule.EnableAll(); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(AddDifficultyStats)); AddMonsoonScalingStats(); ChangeEclipse(); ChangeDirectorStats(); DirectorAPI.StageSettingsActions += IncreaseStageInteractableCredits; DirectorAPI.StageSettingsActions += IncreaseStageMonsterCredits; } public static void RemoveOspForever() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown Hook val = new Hook((MethodBase)typeof(CharacterBody).GetMethod("get_hasOneShotProtection", (BindingFlags)(-1)), typeof(DifficultyChanges).GetMethod("ReflectOnThatThang", (BindingFlags)(-1))); } public static bool ReflectOnThatThang(orig_getHasOneShotProtection orig, CharacterBody self) { return false; } public static void AddPotentialProtection() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown PickupPickerPanel.Awake += new hook_Awake(CommandOrPotentialArmor); static void CommandOrPotentialArmor(orig_Awake orig, PickupPickerPanel self) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); CharacterBody cachedBody = firstLocalUser.cachedBody; cachedBody.AddTimedBuffAuthority(GetBuffIndex(), potentialProtectionDuration); orig.Invoke(self); } static BuffIndex GetBuffIndex() { //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_000f: Unknown result type (might be due to invalid IL or missing references) //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) if (potentialProtectionVisibility) { return Buffs.Immune.buffIndex; } return Buffs.HiddenInvincibility.buffIndex; } } public static void AddPityCharge() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown ChargingState.FixedUpdate += new hook_FixedUpdate(WeakenBossPostTpCharge); ChargingState.OnExit += new hook_OnExit(PityChargeOnExit); } public static void PityChargeOnExit(orig_OnExit orig, ChargingState self) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown orig.Invoke(self); if (pityChargeOn) { pityChargeOn = false; pityChargeShrinkDelta = 0f; pityChargeRecolorDelta = 0f; ((BaseTeleporterState)self).teleporterInteraction.holdoutZoneController.calcColor -= new CalcColorDelegate(PityChargeCalcColor); ((BaseTeleporterState)self).teleporterInteraction.holdoutZoneController.calcRadius -= new CalcRadiusDelegate(PityChargeCalcRadius); } } public static void PityChargeCalcRadius(ref float radius) { radius = Mathf.Max(radius * (1f - pityChargeShrinkDelta), 10f); } public static void PityChargeCalcColor(ref Color color) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) color = FocusConvergenceController.convergenceMaterialColor; } public static void WeakenBossPostTpCharge(orig_FixedUpdate orig, ChargingState baseState) { //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Expected O, but got Unknown //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Expected O, but got Unknown //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_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_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(baseState); if (!StormRunBehavior.IsStormStage(Stage.instance.sceneDef)) { return; } if (((BaseTeleporterState)baseState).teleporterInteraction.holdoutZoneController.charge >= 1f) { if (((BaseTeleporterState)baseState).teleporterInteraction.monstersCleared || !((BaseTeleporterState)baseState).teleporterInteraction.holdoutZoneController.isAnyoneCharging) { return; } if (!pityChargeOn) { pityChargeOn = true; ((BaseTeleporterState)baseState).teleporterInteraction.holdoutZoneController.calcColor += new CalcColorDelegate(PityChargeCalcColor); ((BaseTeleporterState)baseState).teleporterInteraction.holdoutZoneController.calcRadius += new CalcRadiusDelegate(PityChargeCalcRadius); Chat.AddMessage("The overcharged teleporter begins its Convergence..."); } if (pityChargeRecolorDelta < 1f) { pityChargeRecolorDelta += Time.fixedDeltaTime; } pityChargeShrinkDelta += Time.fixedDeltaTime * 0.01f; if (!NetworkServer.active) { return; } BossGroup bossGroup = ((BaseTeleporterState)baseState).teleporterInteraction.bossGroup; BossMemory[] bossMemories = bossGroup.bossMemories; foreach (BossMemory val in bossMemories) { CharacterBody val2 = val.cachedBody; if ((Object)(object)val2 == (Object)null && (Object)(object)val.cachedMaster != (Object)null) { val2 = val.cachedMaster.GetBody(); } if ((Object)(object)val2 != (Object)null) { val2.AddTimedBuff(Buffs.Cripple, 9999f); val2.AddTimedBuff(Buffs.HealingDisabled, 9999f); HealthComponent healthComponent = val2.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent) && healthComponent.health > 1f) { DamageInfo val3 = new DamageInfo(); val3.damage = (val2.maxHealth + val2.maxShield) * 0.01f * Time.fixedDeltaTime; val3.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)2048), (DamageTypeExtended)0, (DamageSource)0); val3.damageType |= DamageTypeCombo.op_Implicit((DamageType)2); val3.damageType |= DamageTypeCombo.op_Implicit((DamageType)64); val3.procCoefficient = 1f; val3.position = val2.corePosition; healthComponent.TakeDamage(val3); } } } } else { pityChargeOn = false; } } public static void ChangeDirectorStats() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/Director.prefab").WaitForCompletion(); CombatDirector[] components = val.GetComponents(); if (components.Length != 0) { CombatDirector val2 = components[0]; if ((Object)(object)val2 != (Object)null) { val2.eliteBias = fastDirectorEliteBias; val2.eliteBias = fastDirectorCreditMultiplier; } CombatDirector val3 = components[1]; if ((Object)(object)val3 != (Object)null) { val3.eliteBias = slowDirectorEliteBias; val3.eliteBias = slowDirectorCreditMultiplier; } } CombatDirector.Awake += new hook_Awake(AdjustTpDirectors); CombatDirector.SetNextSpawnAsBoss += new hook_SetNextSpawnAsBoss(FixBossDirectorCredits); } private static void FixBossDirectorCredits(orig_SetNextSpawnAsBoss orig, CombatDirector self) { self.monsterCredit *= teleBossCreditMultiplier; orig.Invoke(self); } private static void AdjustTpDirectors(orig_Awake orig, CombatDirector director) { if (director.customName == "Boss") { AdjustTpBossDirector(director); } if (director.customName == "Monsters") { AdjustTpMonsterDirector(director); } orig.Invoke(director); } private static void AdjustDirectorsForTeleporter(orig_Awake orig, TeleporterInteraction self) { AdjustTpBossDirector(self.bossDirector); AdjustTpBossDirector(self.companionBoss); AdjustTpMonsterDirector(self.bonusDirector); orig.Invoke(self); } private static void AdjustTeleporterDirectors(CombatDirector[] directors) { if (directors != null && directors.Length != 0) { foreach (CombatDirector val in directors) { } } } private static void AdjustTpBossDirector(CombatDirector director) { director.eliteBias = teleBossEliteBias; director.creditMultiplier = teleBossCreditMultiplier; if (Run.instance.stageClearCount == 0) { director.creditMultiplier *= teleBossCreditMultiplierStage1; } } private static void AdjustTpMonsterDirector(CombatDirector director) { director.eliteBias = teleLesserEliteBias; director.creditMultiplier = teleLesserCreditMultiplier; } public static void IncreaseStageInteractableCredits(StageSettings settings, StageInfo currentStage) { settings.SceneDirectorInteractableCredits = (int)((float)settings.SceneDirectorInteractableCredits + interactableCreditsAdd); } public static void IncreaseStageMonsterCredits(StageSettings settings, StageInfo currentStage) { settings.SceneDirectorMonsterCredits = (int)((float)settings.SceneDirectorMonsterCredits * monsterCreditsMultiplier); } public static void AddDifficultyStats() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected I4, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_00a9: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 11; i++) { DifficultyIndex val = (DifficultyIndex)i; DifficultyDef difficultyDef = DifficultyCatalog.GetDifficultyDef(val); StartingDifficulty val2 = (StartingDifficulty)0; float num = 0f; float startingDifficultyCoefficientBoost = difficultyDef.scalingValue - 1f; int num2 = ambientLevelCap; int num3 = 5; float num4 = 1f; DifficultyIndex val3 = val; DifficultyIndex val4 = val3; switch ((int)val4) { case 0: val2 = (StartingDifficulty)0; num = drizzleDifficultyBoost; num3 = Tier2EliteMinimumStageDrizzle; num4 = easyTeleParticleRadius; num2 = ambientLevelCapDrizzle; break; case 1: val2 = (StartingDifficulty)3; num = rainstormDifficultyBoost; num3 = Tier2EliteMinimumStageRainstorm; num4 = normalTeleParticleRadius; break; case 2: val2 = (StartingDifficulty)6; num = monsoonDifficultyBoost; num3 = Tier2EliteMinimumStageMonsoon; num4 = hardTeleParticleRadius; break; default: val2 = (StartingDifficulty)6; num = monsoonDifficultyBoost; num3 = Tier2EliteMinimumStageMonsoon; num4 = hardTeleParticleRadius; break; } MoreDifficultyStats moreDifficultyStats = DifficultyUtilsModule.GetMoreDifficultyStats(val); moreDifficultyStats.startingDifficultyDisplay = (float)val2; moreDifficultyStats.startingLevelBoost = num; moreDifficultyStats.startingDifficultyCoefficientBoost = startingDifficultyCoefficientBoost; moreDifficultyStats.ambientLevelCap = num2; moreDifficultyStats.tier2EliteStage = num3; moreDifficultyStats.teleporterParticleRangeMultiplier = num4; DifficultyUtilsModule.difficultyCustomStats[val] = moreDifficultyStats; } } public static void AddMonsoonScalingStats() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown RiskierRainPlugin.monsoonDesc += "\n>Enemies gain unique scaling"; RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(MonsoonPlusStatBuffs2); } private static void MonsoonPlusStatBuffs2(CharacterBody sender, StatHookEventArgs args) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Invalid comparison between Unknown and I4 //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Invalid comparison between Unknown and I4 DifficultyIndex selectedDifficulty = Run.instance.selectedDifficulty; float ambientLevelBoost = GetAmbientLevelBoost(); if ((int)sender.teamComponent.teamIndex != 1 && (int)selectedDifficulty >= 2) { float num = sender.level - ambientLevelBoost; float num2 = Mathf.Clamp01(num / 300f); float num3 = ((sender.baseNameToken == "CLAYBRUISER_BODY_NAME" || sender.baseNameToken == "LUNARWISP_BODY_NAME" || sender.baseNameToken == "JELLYFISH_BODY_NAME") ? 2f : 4f); args.attackSpeedMultAdd += num2 * num3; if (sender.isChampion) { args.armorAdd += 3f * num; } else { args.moveSpeedMultAdd += num2 * 2f; } } } public static void ChangeEclipse() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown object obj = <>c.<>9__79_0; if (obj == null) { Manipulator val = delegate(ILContext ctx) { RemoveEclipseEffect(ctx, "E1"); }; <>c.<>9__79_0 = val; obj = (object)val; } CharacterMaster.OnBodyStart += (Manipulator)obj; object obj2 = <>c.<>9__79_1; if (obj2 == null) { Manipulator val2 = delegate(ILContext ctx) { RemoveEclipseEffect(ctx, "E3"); }; <>c.<>9__79_1 = val2; obj2 = (object)val2; } GlobalEventManager.OnCharacterHitGroundServer += (Manipulator)obj2; object obj3 = <>c.<>9__79_2; if (obj3 == null) { Manipulator val3 = delegate(ILContext ctx) { RemoveEclipseEffect(ctx, "E5"); }; <>c.<>9__79_2 = val3; obj3 = (object)val3; } HealthComponent.Heal += (Manipulator)obj3; object obj4 = <>c.<>9__79_3; if (obj4 == null) { Manipulator val4 = delegate(ILContext ctx) { RemoveEclipseEffect(ctx, "E6"); }; <>c.<>9__79_3 = val4; obj4 = (object)val4; } DeathRewards.OnKilledServer += (Manipulator)obj4; CharacterBody.RecalculateStats += new Manipulator(RemoveEclipseStats); DifficultyUtilsModule.ForceEliteMasterProvider += new ForceEliteMasterEventHandler(EclipseForceEliteMaster); StatHooks.GetMoreStatCoefficients += new MoreStatHookEventHandler(EclipseStatBuffs2); RunArtifactManager.SetArtifactEnabled += new hook_SetArtifactEnabled(EclipseSpiteArtifact); HoldoutZoneController.DoUpdate += new Manipulator(EclipseHoldoutScale); HoldoutZoneController.Start += new hook_Start(EclipseHoldoutDischarge); Stage.onServerStageBegin += EclipseItemTax; string text = "\"You only celebrate in the light... because I allow it.\" \n\n"; string text2 = "Starts at baseline Monsoon difficulty.\n"; string text3 = ""; LanguageAPI.Add("ECLIPSE_1_DESCRIPTION", text2 + eclipseOneDesc + text3); LanguageAPI.Add("ECLIPSE_2_DESCRIPTION", text2 + eclipseOneDesc + eclipseTwoDesc + text3); LanguageAPI.Add("ECLIPSE_3_DESCRIPTION", text2 + eclipseOneDesc + eclipseTwoDesc + eclipseThreeDesc + text3); LanguageAPI.Add("ECLIPSE_4_DESCRIPTION", text2 + eclipseOneDesc + eclipseTwoDesc + eclipseThreeDesc + eclipseFourDesc + text3); LanguageAPI.Add("ECLIPSE_5_DESCRIPTION", text2 + eclipseOneDesc + eclipseTwoDesc + eclipseThreeDesc + eclipseFourDesc + eclipseFiveDesc + text3); LanguageAPI.Add("ECLIPSE_6_DESCRIPTION", text2 + eclipseOneDesc + eclipseTwoDesc + eclipseThreeDesc + eclipseFourDesc + eclipseFiveDesc + eclipseSixDesc + text3); LanguageAPI.Add("ECLIPSE_7_DESCRIPTION", text2 + eclipseOneDesc + eclipseTwoDesc + eclipseThreeDesc + eclipseFourDesc + eclipseFiveDesc + eclipseSixDesc + eclipseSevenDesc + text3); LanguageAPI.Add("ECLIPSE_8_DESCRIPTION", text + text2 + eclipseOneDesc + eclipseTwoDesc + eclipseThreeDesc + eclipseFourDesc + eclipseFiveDesc + eclipseSixDesc + eclipseSevenDesc + eclipseEightDesc + text3); } private static void EclipseStatBuffs2(CharacterBody sender, MoreStatHookEventArgs args) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Invalid comparison between Unknown and I4 //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) if ((int)sender.teamComponent.teamIndex == 1 && Run.instance.selectedDifficulty > eclipseLevelItemTax) { args.healingPercentIncreaseMult *= eclipseHealingMultiplier; } } private static void EclipseItemTax(Stage obj) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Invalid comparison between Unknown and I4 //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Invalid comparison between Unknown and I4 //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) if ((int)obj.sceneDef.sceneType != 1 && (int)obj.sceneDef.sceneType != 5) { return; } EclipseItemTaxer eclipseItemTaxer = default(EclipseItemTaxer); foreach (CharacterMaster readOnlyInstances in CharacterMaster.readOnlyInstancesList) { if ((int)readOnlyInstances.teamIndex == 1 && Run.instance.selectedDifficulty > eclipseLevelItemTax && !((Object)(object)readOnlyInstances.inventory == (Object)null)) { if (!((Component)readOnlyInstances).TryGetComponent(ref eclipseItemTaxer)) { eclipseItemTaxer = ((Component)readOnlyInstances).gameObject.AddComponent(); eclipseItemTaxer.master = readOnlyInstances; } eclipseItemTaxer.TaxItems(); } } } private static bool EclipseForceEliteSpawn(CharacterSpawnCard card) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)Run.instance) || Run.instance.selectedDifficulty < eclipseLevelBossElite) { return false; } if (card.noElites) { return false; } CharacterMaster sender = default(CharacterMaster); if (Object.op_Implicit((Object)(object)((SpawnCard)card).prefab) && ((SpawnCard)card).prefab.TryGetComponent(ref sender)) { return EclipseForceEliteMasterInternal(sender); } return false; } private static bool EclipseForceEliteMaster(CharacterMaster sender) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)Run.instance) || Run.instance.selectedDifficulty < eclipseLevelBossElite) { return false; } if (sender.isBoss) { return true; } return EclipseForceEliteMasterInternal(sender); } private static bool EclipseForceEliteMasterInternal(CharacterMaster sender) { CharacterBody val = default(CharacterBody); if (Object.op_Implicit((Object)(object)sender.bodyPrefab) && sender.bodyPrefab.TryGetComponent(ref val) && val.isChampion) { return true; } return false; } internal static void ChangeRequiredDifficultyLevelForStats(ILCursor c, DifficultyIndex difficulty, DifficultyIndex difficultyNew = 11, float newFloatValue = -1f) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected I4, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) c.Index = 0; if (!c.TryGotoNext((MoveType)2, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_selectedDifficulty"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, (int)difficulty) })) { RiskierRainPlugin.DebugBreakpoint(string.Format("{0}/{1}", "ChangeRequiredDifficultyLevelForStats", difficulty), 1); return; } int index = c.Index; c.Index = index - 1; c.Next.Operand = (int)difficultyNew; if (newFloatValue != -1f) { float num = default(float); if (!c.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num) })) { RiskierRainPlugin.DebugBreakpoint(string.Format("{0}/{1}", "ChangeRequiredDifficultyLevelForStats", difficulty), 2); } else { c.Next.Operand = newFloatValue; } } } private static void RemoveEclipseStats(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) ILCursor c = new ILCursor(il); ChangeRequiredDifficultyLevelForStats(c, (DifficultyIndex)6, eclipseLevelEnemyMspd, eclipseEnemyMspd); ChangeRequiredDifficultyLevelForStats(c, (DifficultyIndex)9, eclipseLevelEnemyCdr, eclipseEnemyCooldownScale); } private static void RemoveEclipseEffect(ILContext il, string identifier) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0056: 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) ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_selectedDifficulty") })) { RiskierRainPlugin.DebugBreakpoint("RemoveEclipseEffect/" + identifier); return; } val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldc_I4, -1); } private static void EclipseHoldoutDischarge(orig_Start orig, HoldoutZoneController self) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) if (Run.instance.selectedDifficulty >= eclipseLevelHoldoutLoss) { self.baseIndicatorColor = new Color(0.9f, 0.9f, 0.9f); self.dischargeRate = Mathf.Max(self.dischargeRate, eclipseHoldoutLossRate); if (NetworkServer.active) { Chat.ServerAttemptBroadcastChat("The holdout zone is Eclipsed!"); } } orig.Invoke(self); } private static void EclipseHoldoutScale(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_000a: Unknown result type (might be due to invalid IL or missing references) ILCursor c = new ILCursor(il); ChangeRequiredDifficultyLevelForStats(c, (DifficultyIndex)4, eclipseLevelSmallHoldout, eclipseHoldoutScale); } private static void EclipseSpiteArtifact(orig_SetArtifactEnabled orig, RunArtifactManager self, ArtifactDef artifactDef, bool newEnabled) { //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) if ((Object)(object)Run.instance == (Object)null) { orig.Invoke(self, artifactDef, newEnabled); return; } if (Run.instance.selectedDifficulty >= eclipseLevelSpiteArtifact && (Object)(object)artifactDef == (Object)(object)Artifacts.bombArtifactDef) { newEnabled = true; } orig.Invoke(self, artifactDef, newEnabled); } public static void FreezeDifficultyScalingOnFinalLevels() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown Run.ShouldUpdateRunStopwatch += new hook_ShouldUpdateRunStopwatch(ModifyShouldUpdateRunStopwatch); } public static bool ModifyShouldUpdateRunStopwatch(orig_ShouldUpdateRunStopwatch orig, Run self) { bool flag = orig.Invoke(self); if (!flag) { return flag; } return !SceneCatalog.mostRecentSceneDef.isFinalStage; } public static void ChangeDifficultyCoefficientCalculation() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown Run.ambientLevelCap = ambientLevelCap; Run.RecalculateDifficultyCoefficentInternal += new hook_RecalculateDifficultyCoefficentInternal(DifficultyCoefficientChanges); DirectorMoneyWave.Update += new Manipulator(DirectorCreditGainChanges); RiskierRainPlugin.drizzleDesc = RiskierRainPlugin.drizzleDesc + "\n>Starting Difficulty: Easy" + $"\n>Max Enemy Level: {ambientLevelCapDrizzle - ambientLevelCap} " + $"\n>{Tier2EliteName} Elites: Stage {Tier2EliteMinimumStageDrizzle}" + "\n>Teleporter Visuals: +" + Tools.ConvertDecimal(easyTeleParticleRadius / normalTeleParticleRadius - 1f) + " "; RiskierRainPlugin.rainstormDesc = RiskierRainPlugin.rainstormDesc + "\n>Starting Difficulty: Medium" + $"\n>{Tier2EliteName} Elites: Stage {Tier2EliteMinimumStageRainstorm}" + "\n>Teleporter Visuals: +" + Tools.ConvertDecimal(normalTeleParticleRadius / normalTeleParticleRadius - 1f) + " "; RiskierRainPlugin.monsoonDesc = RiskierRainPlugin.monsoonDesc + "\n>Starting Difficulty: Hard" + $"\n>{Tier2EliteName} Elites: Stage {Tier2EliteMinimumStageMonsoon}" + "\n>Teleporter Visuals: " + Tools.ConvertDecimal(1f - hardTeleParticleRadius / normalTeleParticleRadius) + " "; } public static void DirectorCreditGainChanges(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); float num5 = default(float); val.GotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num5) }); int index = val.Index; val.Index = index - 1; val.Remove(); val.Emit(OpCodes.Ldc_R4, 1f - playerSpawnRateFactor); float num4 = default(float); val.GotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num4) }); index = val.Index; val.Index = index - 1; val.Remove(); val.Emit(OpCodes.Ldc_R4, playerSpawnRateFactor); float num3 = default(float); int num2 = default(int); float num = default(float); val.GotoNext((MoveType)2, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num3), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num) }); index = val.Index; val.Index = index - 1; val.Remove(); val.Emit(OpCodes.Ldc_R4, difficultySpawnRateFactor); } public static void AmbientLevelChanges(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_00ac: 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_0144: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int timeLoc = 2; int num = 2; float num5 = default(float); val.GotoNext((MoveType)2, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref timeLoc), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num5), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "Floor") }); int index = val.Index; val.Index = index - 1; val.Emit(OpCodes.Ldc_R4, baseScalingMultiplier); val.Emit(OpCodes.Mul); float num4 = default(float); val.GotoNext((MoveType)0, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num4), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "stageClearCount") }); val.Remove(); val.Emit(OpCodes.Ldc_R4, difficultyIncreasePerStage); float num3 = default(float); val.GotoNext((MoveType)2, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref timeLoc), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num3), (Instruction x) => ILPatternMatchingExt.MatchMul(x) }); val.Emit(OpCodes.Ldc_R4, baseScalingMultiplier); val.Emit(OpCodes.Mul); float num2 = default(float); val.GotoNext((MoveType)0, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "stageClearCount") }); val.Remove(); val.Emit(OpCodes.Ldc_R4, difficultyIncreasePerStage); val.GotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "ambientLevelCap") }); val.EmitDelegate>((Func)delegate(float levelIn) { float ambientLevelBoost = GetAmbientLevelBoost(); return levelIn + ambientLevelBoost; }); } public static void DifficultyCoefficientChanges(orig_RecalculateDifficultyCoefficentInternal orig, Run self) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) float timeInMinutes = self.GetRunStopwatch() * (1f / 60f); int stageClearCount = self.stageClearCount; float playerBaseFactor; float difficultyCoefficient = GetDifficultyCoefficient(self, timeInMinutes, stageClearCount, out playerBaseFactor); float coefficientBoostForDifficulty = GetCoefficientBoostForDifficulty(self.selectedDifficulty); self.difficultyCoefficient = difficultyCoefficient; self.compensatedDifficultyCoefficient = difficultyCoefficient + coefficientBoostForDifficulty; self.oneOverCompensatedDifficultyCoefficientSquared = 1f / (self.compensatedDifficultyCoefficient * self.compensatedDifficultyCoefficient); self.ambientLevel = Mathf.Min(1f + GetAmbientLevelBoost() + 3f * (difficultyCoefficient - playerBaseFactor), (float)Run.ambientLevelCap); int ambientLevelFloor = self.ambientLevelFloor; self.ambientLevelFloor = Mathf.FloorToInt(self.ambientLevel); if (ambientLevelFloor != self.ambientLevelFloor && ambientLevelFloor != 0 && self.ambientLevelFloor > ambientLevelFloor) { self.OnAmbientLevelUp(); } } public static float GetCoefficientBoostForDifficulty(DifficultyIndex difficulty) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) DifficultyDef difficultyDef = DifficultyCatalog.GetDifficultyDef(difficulty); float result = 0f; if (DifficultyUtilsModule.ValidateCachedDifficultyStats()) { result = DifficultyUtilsModule.cachedDifficultyStats.startingDifficultyCoefficientBoost; } return result; } public static float GetScalingValueForDifficulty(DifficultyIndex difficulty) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) DifficultyDef difficultyDef = DifficultyCatalog.GetDifficultyDef(difficulty); return difficultyDef.scalingValue; } public static float GetDifficultyCoefficient(Run run, float timeInMinutes, int stageClearCount, out float playerBaseFactor) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) float scalingValueForDifficulty = GetScalingValueForDifficulty(run.selectedDifficulty); float num = 0.0506f * baseScalingMultiplier; float num2 = GetTimeDifficultyFactor(timeInMinutes, scalingValueForDifficulty); float num3 = GetStageDifficultyFactor(stageClearCount); playerBaseFactor = 1f + playerBaseDifficultyFactor * (float)(run.participatingPlayerCount - 1); float num4 = Mathf.Pow((float)run.participatingPlayerCount, playerScalingDifficultyFactor); float num5 = num * scalingValueForDifficulty * num4; return (playerBaseFactor + num5 * timeInMinutes) * num2 * num3; static float GetStageDifficultyFactor(int stageClearCount) { float num6 = Mathf.Pow(difficultyIncreasePerStage, (float)stageClearCount); int num7 = Mathf.FloorToInt((float)stageClearCount / 5f); if (stageClearCount % 5 <= 1 && Object.op_Implicit((Object)(object)Stage.instance) && SceneCatalog.GetSceneDefForCurrentScene().isFinalStage) { num7--; } float num8 = Mathf.Pow(difficultyIncreasePerLoop, (float)num7); return num6 * num8; } static float GetTimeDifficultyFactor(float timeInMinutes, float scalingValue) { return Mathf.Pow(difficultyIncreasePerMinuteBase + difficultyIncreasePerMinutePerDifficulty * scalingValue, timeInMinutes); } } public static void VoidFieldsStageType() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) SceneDef val = Addressables.LoadAssetAsync((object)"RoR2/Base/arena/arena.asset").WaitForCompletion(); val.sceneType = (SceneType)2; } public static void VoidFieldsTimeCost() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown WardOnAndReady.OnExit += new hook_OnExit(AddVoidFieldsTimeCost); } public static void AddVoidFieldsTimeCost(orig_OnExit orig, WardOnAndReady self) { orig.Invoke(self); Run.instance.SetRunStopwatch(Run.instance.GetRunStopwatch() + voidFieldsTimeCost); } public static void ChangeChestCostScaling() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) Run.GetDifficultyScaledCost_int_float += new hook_GetDifficultyScaledCost_int_float(ChangeScaledCost); awuBody = awu.GetComponent(); if (!Object.op_Implicit((Object)(object)awuBody)) { return; } awuBody.baseArmor = awuArmor; if (awuAdaptiveArmorCount <= 0) { CharacterBody obj = awuBody; obj.armor += awuAdditionalArmor; return; } GivePickupsOnStart val = ((Component)awuBody).gameObject.AddComponent(); if (Object.op_Implicit((Object)(object)val)) { ItemInfo val2 = default(ItemInfo); val2.count = awuAdaptiveArmorCount; val2.itemString = Addressables.LoadAssetAsync((object)"RoR2/Base/AdaptiveArmor/AdaptiveArmor.asset").WaitForCompletion().nameToken; val.itemInfos = (ItemInfo[])(object)new ItemInfo[1] { val2 }; } } private static int ChangeScaledCost(orig_GetDifficultyScaledCost_int_float orig, Run self, int baseCost, float difficultyCoefficient) { switch (baseCost) { case 350: baseCost = InteractableChanges.bigDroneTypeCost; break; case 400: baseCost = InteractableChanges.goldChestTypeCost; break; } float num = Mathf.Pow(difficultyCoefficient, costExponent); float num2 = difficultyCoefficient * 2.5f - 1.5f; float num3 = num; if (num2 < num) { } return (int)((float)baseCost * num3); } private static void ChangeEnemyRewards() { DifficultyUtilsModule.BoostedRewardCompensationCoefficient = compensationForStartingLevel; DifficultyUtilsModule.GoldRewardMultiplierGlobal = goldRewardMultiplierGlobal; DifficultyUtilsModule.ExpRewardMultiplierGlobal = expRewardMultiplierGlobal; } } public static class EnemyChanges { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnEnter <>9__5_1; public static hook_OnEnter <>9__28_1; public static hook_OnEnter <>9__28_2; public static hook_OnEnter <>9__28_3; public static hook_OnEnter <>9__34_1; public static hook_OnEnter <>9__34_2; public static hook_OnEnter <>9__34_3; public static hook_OnEnter <>9__51_0; internal void b__5_1(orig_OnEnter orig, ChargeMegaNova self) { orig.Invoke(self); self.duration = ChargeMegaNova.baseDuration; if (((EntityState)self).characterBody.attackSpeed > 1.5f) { self.duration = 2f; } } internal void b__28_1(orig_OnEnter orig, MinigunFire self) { MinigunFire.baseFireInterval = templarFireInterval * templarBaseAttackSpeed; orig.Invoke(self); } internal void b__28_2(orig_OnEnter orig, MinigunSpinUp self) { MinigunSpinUp.baseDuration = templarSpinUpDuration * templarBaseAttackSpeed; orig.Invoke(self); } internal void b__28_3(orig_OnEnter orig, MinigunSpinDown self) { MinigunSpinDown.baseDuration = templarSpinDownDuration * templarBaseAttackSpeed; orig.Invoke(self); } internal void b__34_1(orig_OnEnter orig, FireLunarGuns self) { FireLunarGuns.baseFireInterval = 0.1f * chimeraWispBaseAttackSpeed; FireLunarGuns.baseDuration = 4f * chimeraWispBaseAttackSpeed; orig.Invoke(self); } internal void b__34_2(orig_OnEnter orig, ChargeLunarGuns self) { ChargeLunarGuns.baseDuration = chimeraWispChargeDuration * chimeraWispBaseAttackSpeed; ChargeLunarGuns.spinUpDuration = chimeraWispChargeDuration * chimeraWispBaseAttackSpeed; orig.Invoke(self); } internal void b__34_3(orig_OnEnter orig, SeekingBomb self) { SeekingBomb.spinUpDuration = 2f * chimeraWispBaseAttackSpeed; SeekingBomb.baseDuration = 3f * chimeraWispBaseAttackSpeed; orig.Invoke(self); } internal void b__51_0(orig_OnEnter orig, BaseSplitDeath self) { self.moneyMultiplier = 0f; orig.Invoke(self); } } private static float vagrantBaseHealth = 1600f; private static GameObject vagrantPrefab; private static GameObject pestPrefab; private static GameObject pestSpit; private static float pestBaseHealth = 50f; private static float pestBaseDamage = 6f; private static float pestBaseSpeed = 4f; private static float pestSpitVelocity = 70f; private static float spitDamageCoefficient = 0.4f; private static float acidSize = 2f; private static float acidDamageCoefficient = 2.5f; private static float acidDamageFrequency = 4f; private static int nulliferBombCount = 10; private static float fuckBarnacleRegen = 0f; public static float templarBaseDamage = 9f; public static float templarBaseAttackSpeed = 1f; public static float templarFireInterval = 0.05f; public static float templarSpinUpDuration = 1.5f; public static float templarSpinDownDuration = 2f; public static float chimeraWispBaseDamage = 5f; public static float chimeraWispBaseAttackSpeed = 1f; public static float chimeraWispFireInterval = 0.1f; public static float chimeraWispFireDuration = 4f; public static float chimeraWispChargeDuration = 3.33f; private static int gupCreditCost = 200; private static float gupBaseHealth = 1000f; private static float gupBaseArmor = 0f; private static float gupBaseDamage = 12f; private static float gupBaseSpeed = 14f; private static float gupBaseRegen = 0f; private static float geepBaseHealth = 500f; private static float geepBaseArmor = 0f; private static float geepBaseDamage = 8f; private static float geepBaseSpeed = 10f; private static float geepBaseRegen = 0f; private static float gipBaseHealth = 250f; private static float gipBaseArmor = 0f; private static float gipBaseDamage = 5f; private static float gipBaseSpeed = 6f; private static float gipBaseRegen = 0f; public static int solusScorcherCreditCost = 18; public static float solusScorcherBaseHealth = 111f; public static float solusScorcherBaseMovespeed = 9f; public static int solusProspectorCreditCost = 11; public static float solusProspectorBaseHealth = 110f; public static float solusProspectorBaseMovespeed = 11.5f; private static float wispBaseDamage = 2f; public static void Initialize() { ChangeSpawnlists(); ChangeVagrant(); ChangePest(); ChangeQueen(); ChangeVoidReaver(); ChangeBarnacle(); ChangeTemplar(); ChangeChimeraWisp(); ChangeGup(); ChangeSolusScorcher(); ChangeSolusProspector(); ChangeLesserWisp(); } public static void MakeEnemiesuseEquipment() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown Debug.Log((object)"Enemies using equipment needs to be fixed"); EquipmentSlot.FixedUpdate += new hook_FixedUpdate(TryUseEquip); } private static void TryUseEquip(orig_FixedUpdate orig, EquipmentSlot self) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Invalid comparison between Unknown and I4 orig.Invoke(self); if (!self.characterBody.isPlayerControlled && (int)self.characterBody.teamComponent.teamIndex != 1 && !self.characterBody.outOfCombat && self.characterBody.isEquipmentActivationAllowed) { if (NetworkServer.active) { self.ExecuteIfReady(); } else { self.CallCmdExecuteIfReady(); } } } private static void ChangeVagrant() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown RiskierRainPlugin.LoadAsync(RoR2_Base_Vagrant.VagrantBody_prefab, (Action)BodyStats); object obj = <>c.<>9__5_1; if (obj == null) { hook_OnEnter val = delegate(orig_OnEnter orig, ChargeMegaNova self) { orig.Invoke(self); self.duration = ChargeMegaNova.baseDuration; if (((EntityState)self).characterBody.attackSpeed > 1.5f) { self.duration = 2f; } }; <>c.<>9__5_1 = val; obj = (object)val; } ChargeMegaNova.OnEnter += (hook_OnEnter)obj; static void BodyStats(CharacterBody body) { body.baseMaxHealth = vagrantBaseHealth; body.levelMaxHealth = vagrantBaseHealth * 0.3f; } } private static void ChangePest() { Tools.LoadCharacterBodyAsync(RoR2_DLC1_FlyingVermin.FlyingVerminBody_prefab, BodyStats); RiskierRainPlugin.LoadAsync(RoR2_DLC1_FlyingVermin.VerminSpitProjectile_prefab, (Action)NerfSpit); static void BodyStats(CharacterBody body) { body.baseMaxHealth = pestBaseHealth; body.levelMaxHealth = pestBaseHealth * 0.3f; body.baseDamage = pestBaseDamage; body.levelDamage = pestBaseDamage * 0.2f; body.baseMoveSpeed = pestBaseSpeed; } static void NerfSpit(GameObject pestSpit) { ProjectileSimple component = pestSpit.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.desiredForwardSpeed = pestSpitVelocity; } } } private static void ChangeQueen() { FireSpit.damageCoefficient = spitDamageCoefficient; RiskierRainPlugin.LoadAsync(RoR2_Base_BeetleQueen.BeetleQueenAcid_prefab, (Action)NerfAcid); SummonEggs.maxSummonCount = 2; static void NerfAcid(GameObject queenAcidPrefab) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) queenAcidPrefab.transform.localScale = Vector3.one * acidSize; ProjectileDotZone component = queenAcidPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.damageCoefficient = acidDamageCoefficient; component.resetFrequency = acidDamageFrequency; } } } private static void ChangeVoidReaver() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown FirePortalBomb.OnEnter += new hook_OnEnter(BuffFirePortalBomb); } private static void BuffFirePortalBomb(orig_OnEnter orig, FirePortalBomb self) { FirePortalBomb.portalBombCount = nulliferBombCount; orig.Invoke(self); } private static void ChangeBarnacle() { Tools.LoadCharacterBodyAsync(RoR2_DLC1_VoidBarnacle.VoidBarnacleBody_png, BodyStats); static void BodyStats(CharacterBody body) { body.baseRegen = fuckBarnacleRegen; body.levelRegen = fuckBarnacleRegen * 0.2f; } } private static void ChangeTemplar() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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 //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown Tools.LoadCharacterBodyAsync(RoR2_Base_ClayBruiser.ClayBruiserBody_prefab, BodyStats); object obj = <>c.<>9__28_1; if (obj == null) { hook_OnEnter val = delegate(orig_OnEnter orig, MinigunFire self) { MinigunFire.baseFireInterval = templarFireInterval * templarBaseAttackSpeed; orig.Invoke(self); }; <>c.<>9__28_1 = val; obj = (object)val; } MinigunFire.OnEnter += (hook_OnEnter)obj; object obj2 = <>c.<>9__28_2; if (obj2 == null) { hook_OnEnter val2 = delegate(orig_OnEnter orig, MinigunSpinUp self) { MinigunSpinUp.baseDuration = templarSpinUpDuration * templarBaseAttackSpeed; orig.Invoke(self); }; <>c.<>9__28_2 = val2; obj2 = (object)val2; } MinigunSpinUp.OnEnter += (hook_OnEnter)obj2; object obj3 = <>c.<>9__28_3; if (obj3 == null) { hook_OnEnter val3 = delegate(orig_OnEnter orig, MinigunSpinDown self) { MinigunSpinDown.baseDuration = templarSpinDownDuration * templarBaseAttackSpeed; orig.Invoke(self); }; <>c.<>9__28_3 = val3; obj3 = (object)val3; } MinigunSpinDown.OnEnter += (hook_OnEnter)obj3; static void BodyStats(CharacterBody body) { body.baseAttackSpeed = templarBaseAttackSpeed; body.baseDamage = templarBaseDamage; body.levelDamage = body.baseDamage * 0.2f; } } private static void ChangeChimeraWisp() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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 //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown Tools.LoadCharacterBodyAsync(RoR2_Base_LunarWisp.LunarWispBody_prefab, BodyStats); object obj = <>c.<>9__34_1; if (obj == null) { hook_OnEnter val = delegate(orig_OnEnter orig, FireLunarGuns self) { FireLunarGuns.baseFireInterval = 0.1f * chimeraWispBaseAttackSpeed; FireLunarGuns.baseDuration = 4f * chimeraWispBaseAttackSpeed; orig.Invoke(self); }; <>c.<>9__34_1 = val; obj = (object)val; } FireLunarGuns.OnEnter += (hook_OnEnter)obj; object obj2 = <>c.<>9__34_2; if (obj2 == null) { hook_OnEnter val2 = delegate(orig_OnEnter orig, ChargeLunarGuns self) { ChargeLunarGuns.baseDuration = chimeraWispChargeDuration * chimeraWispBaseAttackSpeed; ChargeLunarGuns.spinUpDuration = chimeraWispChargeDuration * chimeraWispBaseAttackSpeed; orig.Invoke(self); }; <>c.<>9__34_2 = val2; obj2 = (object)val2; } ChargeLunarGuns.OnEnter += (hook_OnEnter)obj2; object obj3 = <>c.<>9__34_3; if (obj3 == null) { hook_OnEnter val3 = delegate(orig_OnEnter orig, SeekingBomb self) { SeekingBomb.spinUpDuration = 2f * chimeraWispBaseAttackSpeed; SeekingBomb.baseDuration = 3f * chimeraWispBaseAttackSpeed; orig.Invoke(self); }; <>c.<>9__34_3 = val3; obj3 = (object)val3; } SeekingBomb.OnEnter += (hook_OnEnter)obj3; static void BodyStats(CharacterBody body) { body.baseAttackSpeed = chimeraWispBaseAttackSpeed; body.baseDamage = chimeraWispBaseDamage; body.levelDamage = body.baseDamage * 0.2f; } } private static void ChangeGup() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__51_0; if (obj == null) { hook_OnEnter val = delegate(orig_OnEnter orig, BaseSplitDeath self) { self.moneyMultiplier = 0f; orig.Invoke(self); }; <>c.<>9__51_0 = val; obj = (object)val; } BaseSplitDeath.OnEnter += (hook_OnEnter)obj; SpawnCards.LoadSpawnCardAsync(RoR2_DLC1_Gup.cscGupBody_asset, (Action)GupCredits); Tools.LoadCharacterBodyAsync(RoR2_DLC1_Gup.GupBody_prefab, GupStats); Tools.LoadCharacterBodyAsync(RoR2_DLC1_Gup.GeepBody_prefab, GeepStats); Tools.LoadCharacterBodyAsync(RoR2_DLC1_Gup.GipBody_prefab, GipStats); static void GeepStats(CharacterBody body) { body.baseMaxHealth = geepBaseHealth; body.levelMaxHealth = body.baseMaxHealth * 0.3f; body.baseArmor = geepBaseArmor; body.baseDamage = geepBaseDamage; body.levelDamage = body.baseDamage * 0.2f; body.baseMoveSpeed = geepBaseSpeed; body.baseRegen = geepBaseRegen; body.levelRegen = body.baseRegen * 0.2f; } static void GipStats(CharacterBody body) { body.baseMaxHealth = gipBaseHealth; body.levelMaxHealth = body.baseMaxHealth * 0.3f; body.baseArmor = gipBaseArmor; body.baseDamage = gipBaseDamage; body.levelDamage = body.baseDamage * 0.2f; body.baseMoveSpeed = gipBaseSpeed; body.baseRegen = gipBaseRegen; body.levelRegen = body.baseRegen * 0.2f; } static void GupCredits(CharacterSpawnCard spawnCard) { ((SpawnCard)spawnCard).directorCreditCost = gupCreditCost; } static void GupStats(CharacterBody body) { body.baseMaxHealth = gupBaseHealth; body.levelMaxHealth = body.baseMaxHealth * 0.3f; body.baseArmor = gupBaseArmor; body.baseDamage = gupBaseDamage; body.levelDamage = body.baseDamage * 0.2f; body.baseMoveSpeed = gupBaseSpeed; body.baseRegen = gupBaseRegen; body.levelRegen = body.baseRegen * 0.2f; } } private static void ChangeSolusScorcher() { SpawnCards.LoadSpawnCardAsync(RoR2_DLC3_Tanker.cscTanker_asset, (Action)ScorcherCredits); Tools.LoadCharacterBodyAsync(RoR2_DLC3_Tanker.TankerBody_prefab, ScorcherStats); static void ScorcherCredits(CharacterSpawnCard spawnCard) { ((SpawnCard)spawnCard).directorCreditCost = solusScorcherCreditCost; } static void ScorcherStats(CharacterBody body) { body.baseMoveSpeed = solusScorcherBaseMovespeed; body.baseMaxHealth = solusScorcherBaseHealth; body.levelMaxHealth = solusScorcherBaseHealth * 0.3f; } } private static void ChangeSolusProspector() { SpawnCards.LoadSpawnCardAsync(RoR2_DLC3_WorkerUnit.cscWorkerUnit_asset, (Action)ProspectorCredits); Tools.LoadCharacterBodyAsync(RoR2_DLC3_WorkerUnit.WorkerUnitBody_prefab, ProspectorStats); static void ProspectorCredits(CharacterSpawnCard spawnCard) { ((SpawnCard)spawnCard).directorCreditCost = solusProspectorCreditCost; } static void ProspectorStats(CharacterBody body) { body.baseMoveSpeed = solusProspectorBaseMovespeed; body.baseMaxHealth = solusProspectorBaseHealth; body.levelMaxHealth = solusProspectorBaseHealth * 0.3f; } } private static void ChangeLesserWisp() { Tools.LoadCharacterBodyAsync(RoR2_Base_Wisp.WispBody_prefab, BodyStats); static void BodyStats(CharacterBody lesserWispBody) { lesserWispBody.baseDamage = wispBaseDamage; lesserWispBody.levelDamage = wispBaseDamage * 0.2f; } } private static void AddNewMonsterToStage(DirectorCard card, MonsterCategory category, Stage stage, bool addToFamilies = false) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: 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_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown //IL_0017: Unknown result type (might be due to invalid IL or missing references) DirectorCardHolder val = new DirectorCardHolder { Card = card, MonsterCategory = category }; Helpers.AddNewMonsterToStage(val, addToFamilies, stage, ""); } private static void AddMonsterCardToSpawnlist(DirectorCardCategorySelection categorySelection, DirectorCard directorCard, MonsterCategory monsterCategory) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Expected I4, but got Unknown categorySelection.AddCard((int)monsterCategory, directorCard); } public static void ChangeSpawnlists() { ChangeSpawnlistRoost(); ChangeSpawnlistPlains(); ChangeSpawnlistSiphoned(); ChangeSpawnlistFalls(); ChangeSpawnlistAbodes(); ChangeSpawnlistWetland(); ChangeSpawnlistAqueduct(); ChangeSpawnlistSanctuary(); ChangeSpawnlistPrecipice(); ChangeSpawnlistScorched(); ChangeSpawnlistRallypoint(); ChangeSpawnlistSulfur(); ChangeSpawnlistTreeborn(); ChangeSpawnlistAbyssal(); ChangeSpawnlistSirens(); ChangeSpawnlistGrove(); ChangeSpawnlistConduit(); ChangeSpawnlistMeadow(); } private static void ChangeSpawnlistMeadow() { Helpers.RemoveExistingMonsterFromStage(MonsterNames.LesserWisp, (Stage)16384, ""); Helpers.RemoveExistingMonsterFromStage(MonsterNames.ElderLemurian, (Stage)16384, ""); AddNewMonsterToStage(DirectorCards.MagmaWorm, (MonsterCategory)4, (Stage)16384); } private static void ChangeSpawnlistConduit() { Helpers.RemoveExistingMonsterFromStage(MonsterNames.ClayTemplar, (Stage)8796093022208L, ""); AddNewMonsterToStage(DirectorCards.Imp, (MonsterCategory)2, (Stage)8796093022208L); AddNewMonsterToStage(DirectorCards.Bronzong, (MonsterCategory)2, (Stage)8796093022208L); } private static void ChangeSpawnlistGrove() { Helpers.RemoveExistingMonsterFromStage(MonsterNames.ElderLemurian, (Stage)131072, ""); Helpers.RemoveExistingMonsterFromStage(MonsterNames.StoneTitan, (Stage)131072, ""); AddNewMonsterToStage(DirectorCards.AlphaConstruct, (MonsterCategory)2, (Stage)131072); AddNewMonsterToStage(DirectorCards.XiConstruct, (MonsterCategory)4, (Stage)131072); AddNewMonsterToStage(DirectorCards.Grovetender, (MonsterCategory)4, (Stage)131072); } private static void ChangeSpawnlistSirens() { Helpers.RemoveExistingMonsterFromStage(MonsterNames.Beetle, (Stage)256, ""); Helpers.RemoveExistingMonsterFromStage(MonsterNames.Gup, (Stage)256, ""); AddNewMonsterToStage(DirectorCards.SolusProspector, (MonsterCategory)2, (Stage)256); } private static void ChangeSpawnlistAbyssal() { Helpers.RemoveExistingMonsterFromStage(MonsterNames.SolusScorcher, (Stage)128, ""); } private static void ChangeSpawnlistTreeborn() { AddNewMonsterToStage(DirectorCards.Grandparent, (MonsterCategory)4, (Stage)274877906944L); AddNewMonsterToStage(DirectorCards.Grandparent, (MonsterCategory)4, (Stage)549755813888L); } private static void ChangeSpawnlistSulfur() { AddNewMonsterToStage(DirectorCards.Larva, (MonsterCategory)2, (Stage)134217728); AddNewMonsterToStage(DirectorCards.ClayApothecary, (MonsterCategory)3, (Stage)134217728); AddNewMonsterToStage(DirectorCards.Parent, (MonsterCategory)3, (Stage)134217728); } private static void ChangeSpawnlistRallypoint() { AddNewMonsterToStage(DirectorCards.RoboBall, (MonsterCategory)4, (Stage)32); AddNewMonsterToStage(DirectorCards.SolusInvalidator, (MonsterCategory)3, (Stage)32); } private static void ChangeSpawnlistScorched() { Helpers.RemoveExistingMonsterFromStage(MonsterNames.Beetle, (Stage)64, ""); AddNewMonsterToStage(DirectorCards.Gup, (MonsterCategory)3, (Stage)64); } private static void ChangeSpawnlistPrecipice() { Helpers.RemoveExistingMonsterFromStage(MonsterNames.SolusScorcher, (Stage)70368744177664L, ""); AddNewMonsterToStage(DirectorCards.SolusProspector, (MonsterCategory)2, (Stage)70368744177664L); AddNewMonsterToStage(DirectorCards.SolusExtractor, (MonsterCategory)2, (Stage)70368744177664L); AddNewMonsterToStage(DirectorCards.SolusTransporter, (MonsterCategory)3, (Stage)70368744177664L); } private static void ChangeSpawnlistSanctuary() { Helpers.RemoveExistingMonsterFromStage(MonsterNames.Beetle, (Stage)262144, ""); Helpers.RemoveExistingMonsterFromStage(MonsterNames.BeetleQueen, (Stage)262144, ""); AddNewMonsterToStage(DirectorCards.Parent, (MonsterCategory)3, (Stage)262144); AddNewMonsterToStage(DirectorCards.Grovetender, (MonsterCategory)4, (Stage)262144); } private static void ChangeSpawnlistAqueduct() { Helpers.RemoveExistingMonsterFromStage(MonsterNames.SolusInvalidator, (Stage)16, ""); AddNewMonsterToStage(DirectorCards.ElderLemurian, (MonsterCategory)3, (Stage)16); AddNewMonsterToStage(DirectorCards.MagmaWorm, (MonsterCategory)4, (Stage)16); AddNewMonsterToStage(DirectorCards.SolusScorcher, (MonsterCategory)2, (Stage)16); } private static void ChangeSpawnlistWetland() { Helpers.RemoveExistingMonsterFromStage(MonsterNames.SolusTransporter, (Stage)8, ""); AddNewMonsterToStage(DirectorCards.AlphaConstruct, (MonsterCategory)2, (Stage)8); AddNewMonsterToStage(DirectorCards.ElderLemurian, (MonsterCategory)3, (Stage)8); } private static void ChangeSpawnlistAbodes() { Helpers.RemoveExistingMonsterFromStage(MonsterNames.SolusProspector, (Stage)34359738368L, ""); Helpers.RemoveExistingMonsterFromStage(MonsterNames.BeetleQueen, (Stage)34359738368L, ""); AddNewMonsterToStage(DirectorCards.Dunestrider, (MonsterCategory)4, (Stage)34359738368L); Helpers.RemoveExistingMonsterFromStage(MonsterNames.BeetleQueen, (Stage)68719476736L, ""); AddNewMonsterToStage(DirectorCards.SolusProspector, (MonsterCategory)2, (Stage)68719476736L); AddNewMonsterToStage(DirectorCards.Dunestrider, (MonsterCategory)4, (Stage)68719476736L); } private static void ChangeSpawnlistFalls() { Helpers.RemoveExistingMonsterFromStage(MonsterNames.SolusScorcher, (Stage)1073741824, ""); AddNewMonsterToStage(DirectorCards.SolusScorcher, (MonsterCategory)2, (Stage)2147483648u); } private static void ChangeSpawnlistSiphoned() { Helpers.RemoveExistingMonsterFromStage(MonsterNames.LesserWisp, (Stage)67108864, ""); Helpers.RemoveExistingMonsterFromStage(MonsterNames.Beetle, (Stage)67108864, ""); Helpers.RemoveExistingMonsterFromStage(MonsterNames.WanderingVagrant, (Stage)67108864, ""); AddNewMonsterToStage(DirectorCards.BlindVerminSnowy, (MonsterCategory)2, (Stage)67108864); AddNewMonsterToStage(DirectorCards.Bison, (MonsterCategory)3, (Stage)67108864); AddNewMonsterToStage(DirectorCards.MagmaWorm, (MonsterCategory)4, (Stage)67108864); AddNewMonsterToStage(DirectorCards.XiConstruct, (MonsterCategory)4, (Stage)67108864); } private static void ChangeSpawnlistPlains() { Helpers.RemoveExistingMonsterFromStage(MonsterNames.SolusInvalidator, (Stage)2, ""); } private static void ChangeSpawnlistRoost() { AddNewMonsterToStage(DirectorCards.RoboBall, (MonsterCategory)4, (Stage)4); AddNewMonsterToStage(DirectorCards.SolusTransporter, (MonsterCategory)3, (Stage)4); AddNewMonsterToStage(DirectorCards.Vulture, (MonsterCategory)3, (Stage)4); } } public static class EquipmentChanges { public static float elephantBuffDuration = 10f; public static int elephantArmor = 300; public static float capacitorDamageCoefficient = 10f; public static float capacitorBlastRadius = 13f; public static float capacitorCooldown = 20f; public static FalloffModel capacitorFalloff = (FalloffModel)2; public static float backupCooldown = 60f; public static Func gooboItemCopyFilter = Inventory.defaultItemCopyFilterDelegate.Invoke; private static float gummyLifetime = 30f; private static int gummyDamage = 0; private static float gummyDamageMultiplier = 0.7f; private static int gummyHealth = 20; private static float gummyHealthMultiplier = 1f; public static float critHudDamageMul = 1f; private static FalloffModel meteorFalloff = (FalloffModel)0; public static float crunderFunnyMoneyProcChance = 10f; public static EquipmentDef[] scavBlacklistedEquips = (EquipmentDef[])(object)new EquipmentDef[3] { Equipment.PassiveHealing, Equipment.Fruit, Equipment.LifestealOnHit }; private static int blastShowerBuffCount = 3; public static void Initialize() { RiskierRainPlugin.RemoveEquipmentAsync(RoR2_Base_Gateway.Gateway_asset); ChangeJadeElephant(); ChangeCapacitor(); ChangeTheBackup(); ChangeFuelArray(); ChangeGoobo(); ChangeOcularHud(); ChangeGlowingMeteorite(); ChangeCrowdfunder(); ChangeEnigmaBlacklists(); ChangeEquipmentBlacklists(); } public static void ChangeJadeElephant() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown RiskierRainPlugin.ChangeBuffStacking("ElephantArmorBoost", canStack: true); EquipmentSlot.FireGainArmor += new hook_FireGainArmor(ChangeElephantDuration); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(ReduceElephantArmor); LanguageAPI.Add("EQUIPMENT_GAINARMOR_PICKUP", "Gain massive armor for 10 seconds."); LanguageAPI.Add("EQUIPMENT_GAINARMOR_DESC", "Gain 200 armor for 10 seconds."); } public static void ReduceElephantArmor(CharacterBody sender, StatHookEventArgs args) { int buffCount = sender.GetBuffCount(Buffs.ElephantArmorBoost); if (buffCount > 0) { args.armorAdd += (float)(buffCount * elephantArmor - 500); } } public static bool ChangeElephantDuration(orig_FireGainArmor orig, EquipmentSlot self) { self.characterBody.AddTimedBuff(Buffs.ElephantArmorBoost, elephantBuffDuration); return true; } public static void ChangeCapacitor() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown RiskierRainPlugin.LoadEquipDef("Lightning").cooldown = capacitorCooldown; EquipmentSlot.FireLightning += new Manipulator(CapacitorNerf); LightningStrikeOrb.OnArrival += new Manipulator(CapacitorBuff); LanguageAPI.Add("EQUIPMENT_LIGHTNING_DESC", "Call down a lightning strike on a targeted monster, dealing " + Tools.ConvertDecimal(capacitorDamageCoefficient) + " damage and stunning nearby monsters in a large radius."); } public static void CapacitorNerf(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); float num = default(float); if (!val.TryGotoNext((MoveType)0, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "damageValue") })) { RiskierRainPlugin.DebugBreakpoint("CapacitorNerf"); return; } val.Remove(); val.Emit(OpCodes.Ldc_R4, capacitorDamageCoefficient); } public static void CapacitorBuff(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected I4, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int num2 = default(int); if (!val.TryGotoNext((MoveType)0, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "falloffModel") })) { RiskierRainPlugin.DebugBreakpoint("CapacitorBuff", 1); return; } val.Remove(); val.Emit(OpCodes.Ldc_I4, (int)capacitorFalloff); float num = default(float); if (!val.TryGotoNext((MoveType)0, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "radius") })) { RiskierRainPlugin.DebugBreakpoint("CapacitorBuff", 2); return; } val.Remove(); val.Emit(OpCodes.Ldc_R4, capacitorBlastRadius); } public static void ChangeTheBackup() { RiskierRainPlugin.LoadAsync(RoR2_Base_DroneBackup.DroneBackup_asset, (Action)delegate(EquipmentDef equip) { equip.cooldown = 60f; }); } public static void ChangeFuelArray() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CountDown.OnEnter += new hook_OnEnter(FuelArrayUseEquipmentEffects); } public static void FuelArrayUseEquipmentEffects(orig_OnEnter orig, CountDown self) { orig.Invoke(self); CharacterBody attachedBody = ((QuestVolatileBatteryBaseState)self).networkedBodyAttachment.attachedBody; if (Object.op_Implicit((Object)(object)attachedBody) && Object.op_Implicit((Object)(object)attachedBody.equipmentSlot) && ((NetworkBehaviour)attachedBody).hasAuthority) { attachedBody.equipmentSlot.OnEquipmentExecuted(); } } public static void ChangeGoobo() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown RiskierRainPlugin.LoadAsync(RoR2_Base_Engi.EngiTurretMaster_prefab, (Action)delegate(GameObject turretMaster) { MasterSummon component2 = turretMaster.GetComponent(); if (component2 != null) { gooboItemCopyFilter = component2.inventoryItemCopyFilter; } }); RiskierRainPlugin.LoadAsync(RoR2_DLC1_GummyClone.GummyCloneProjectile_prefab, (Action)delegate(GameObject gummyCloneProjectilePrefab) { GummyCloneProjectile component = gummyCloneProjectilePrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.damageBoostCount = gummyDamage; component.hpBoostCount = gummyHealth; component.maxLifetime = gummyLifetime; } }); GummyCloneProjectile.SpawnGummyClone += new Manipulator(GummyInheritItems); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(GummyStats); LanguageAPI.Add("EQUIPMENT_GUMMYCLONE_DESC", "Spawn a gummy clone with all of your items, that has " + Tools.ConvertDecimal((1f + (float)gummyDamage * 0.1f) * gummyDamageMultiplier) + " damage and " + Tools.ConvertDecimal((1f + (float)gummyDamage * 0.1f) * gummyDamageMultiplier) + " health. " + $"Expires in {gummyLifetime} seconds."); } private static void GummyStats(CharacterBody sender, StatHookEventArgs args) { //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_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) EquipmentIndex? obj; if (sender == null) { obj = null; } else { EquipmentSlot equipmentSlot = sender.equipmentSlot; obj = ((equipmentSlot != null) ? new EquipmentIndex?(equipmentSlot.equipmentIndex) : null); } if (obj == (EquipmentIndex?)Equipment.GummyClone.equipmentIndex) { args.healthMultAdd -= 1f - gummyHealthMultiplier; args.damageMultAdd -= 1f - gummyDamageMultiplier; } } private static void GummyInheritItems(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_006c: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int i = 5; if (!val.TryGotoNext((MoveType)2, new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchNewobj(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref i) })) { RiskierRainPlugin.DebugBreakpoint("GummyInheritItems"); return; } val.Emit(OpCodes.Ldloc, i); val.EmitDelegate>((Action)delegate(DirectorSpawnRequest spawnRequest) { spawnRequest.onSpawnedServer = (Action)Delegate.Combine(spawnRequest.onSpawnedServer, (Action)delegate(SpawnResult spawnResult) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) CopyInventoryFromOwner copyInventoryFromOwner = spawnResult.spawnedInstance.AddComponent(); copyInventoryFromOwner.inventoryItemCopyFilter = gooboItemCopyFilter; copyInventoryFromOwner.copyEquipment = false; }); }); } private static void ChangeOcularHud() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(HudCritDamage); LanguageAPI.Add("EQUIPMENT_CRITONUSE_PICKUP", "Increased 'Critical Strike' damage. Gain 100% Critical Strike Chance for 8 seconds."); LanguageAPI.Add("EQUIPMENT_CRITONUSE_DESC", "Passively double Critical Strike Damage. On use, gain +100% Critical Strike Chance for 8 seconds."); } private static void HudCritDamage(CharacterBody sender, StatHookEventArgs args) { //IL_0017: 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) if (Object.op_Implicit((Object)(object)sender.equipmentSlot) && sender.equipmentSlot.equipmentIndex == Equipment.CritOnUse.equipmentIndex) { args.critDamageMultAdd += critHudDamageMul; } } private static void ChangeGlowingMeteorite() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown MeteorStormController.DetonateMeteor += new Manipulator(FixMeteorFalloff); } private static void FixMeteorFalloff(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected I4, but got Unknown ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "falloffModel") })) { RiskierRainPlugin.DebugBreakpoint("FixMeteorFalloff"); return; } int index = val.Index; val.Index = index - 1; val.Remove(); val.Emit(OpCodes.Ldc_I4, (int)meteorFalloff); } private static void ChangeCrowdfunder() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown GlobalEventManager.ProcessHitEnemy += new hook_ProcessHitEnemy(CrunderFunnyMoney); LanguageAPI.Add("EQUIPMENT_GOLDGAT_PICKUP", "Toggle to fire. Costs gold per bullet. Passively has a chance to gain gold on hit."); LanguageAPI.Add("EQUIPMENT_GOLDGAT_DESC", "Fires a continuous barrage that deals 100% damage per bullet. " + $"Costs $1 per bullet. Hitting enemies has a {crunderFunnyMoneyProcChance}% chance to refund the cost. Cost increases over time."); } private static void CrunderFunnyMoney(orig_ProcessHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) if (!damageInfo.rejected && damageInfo.procCoefficient > 0f && Object.op_Implicit((Object)(object)damageInfo.attacker)) { CharacterBody component = damageInfo.attacker.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Inventory inventory = component.inventory; if (Object.op_Implicit((Object)(object)inventory) && inventory.currentEquipmentIndex == Equipment.GoldGat._equipmentIndex && Util.CheckRoll(crunderFunnyMoneyProcChance * damageInfo.procCoefficient, component.master)) { uint goldAmount = (uint)((float)GoldGatFire.baseMoneyCostPerBullet * (1f + ((float)TeamManager.instance.GetTeamLevel(component.master.teamIndex) - 1f) * 0.25f)); GoldOrb val = new GoldOrb(); ((Orb)val).origin = damageInfo.position; ((Orb)val).target = component.mainHurtBox; val.goldAmount = goldAmount; OrbManager.instance.AddOrb((Orb)(object)val); } } } orig.Invoke(self, damageInfo, victim); } private static void ChangeEnigmaBlacklists() { RiskierRainPlugin.ChangeEquipmentEnigma("CrippleWard", canEnigma: true); RiskierRainPlugin.ChangeEquipmentEnigma("Jetpack", canEnigma: true); } private static void ChangeEquipmentBlacklists() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown Inventory.SetEquipmentIndex_EquipmentIndex_bool += new hook_SetEquipmentIndex_EquipmentIndex_bool(BlacklistEquipmentFromScavengers); } private static void BlacklistEquipmentFromScavengers(orig_SetEquipmentIndex_EquipmentIndex_bool orig, Inventory self, EquipmentIndex newEquipmentIndex, bool isRemovingEquipment) { //IL_0017: 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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) CharacterBody component = ((Component)self).gameObject.GetComponent(); if ((Object)(object)component != (Object)null && component.bodyIndex == BodyCatalog.FindBodyIndex("ScavBody")) { bool flag = false; EquipmentDef[] array = scavBlacklistedEquips; foreach (EquipmentDef val in array) { if (newEquipmentIndex == val.equipmentIndex) { flag = true; } } if (flag) { Debug.Log((object)"A scavenger almost spawned with a healing equipment! But they didnt ;)"); newEquipmentIndex = (EquipmentIndex)(-1); } } orig.Invoke(self, newEquipmentIndex, isRemovingEquipment); } private static void ChangeTincture() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(MakeTinctureIgnoreArmor); } private static void MakeTinctureIgnoreArmor(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (((Enum)damageInfo.dotIndex).HasFlag((Enum)(object)(DotIndex)2)) { damageInfo.damageType |= DamageTypeCombo.op_Implicit((DamageType)2); } orig.Invoke(self, damageInfo); } private static void ChangeShower() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown EquipmentSlot.FireCleanse += new hook_FireCleanse(BlastShowerProtectionBuffs); } private static bool BlastShowerProtectionBuffs(orig_FireCleanse orig, EquipmentSlot self) { if (orig.Invoke(self)) { for (int i = 0; i < blastShowerBuffCount; i++) { self.characterBody.AddBuff(Buffs.ImmuneToDebuffReady); } return true; } return false; } } public static class InteractableChanges { public static int soulShrineLuckIncrease = 1; public static GameObject soulShrine = Addressables.LoadAssetAsync((object)"RoR2/DLC2/ShrineColossusAccess.prefab").WaitForCompletion(); public static GameObject goldShrine = Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineGoldshoresAccess/ShrineGoldshoresAccess.prefab").WaitForCompletion(); public static int goldShrineCost = 5; private static int teamMaxHealth; private static int bloodShrineBaseGoldReward = 25; private static int totalBloodGoldValue = 60; private const float totalHealthFraction = 2.18f; private static float chestsPerHealthBar = 2f; public static int halcyoniteShrineLowGoldCost = 35; public static int halcyoniteShrineMidGoldCost = 75; public static int halcyoniteShrineMaxGoldCost = 125; public static float halcyoniteShrineRadius = 30f; public static PurchaseInteraction smallChest = Addressables.LoadAssetAsync((object)"RoR2/Base/Chest1/Chest1.prefab").WaitForCompletion().GetComponent(); public static PurchaseInteraction smallCategoryChestDamage = Addressables.LoadAssetAsync((object)"RoR2/Base/CategoryChest/CategoryChestDamage.prefab").WaitForCompletion().GetComponent(); public static PurchaseInteraction smallCategoryChestHealing = Addressables.LoadAssetAsync((object)"RoR2/Base/CategoryChest/CategoryChestHealing.prefab").WaitForCompletion().GetComponent(); public static PurchaseInteraction smallCategoryChestUtility = Addressables.LoadAssetAsync((object)"RoR2/Base/CategoryChest/CategoryChestUtility.prefab").WaitForCompletion().GetComponent(); public static PurchaseInteraction bigChest = Addressables.LoadAssetAsync((object)"RoR2/Base/Chest2/Chest2.prefab").WaitForCompletion().GetComponent(); public static PurchaseInteraction bigCategoryChestDamage = Addressables.LoadAssetAsync((object)"RoR2/DLC1/CategoryChest2/CategoryChest2Damage Variant.prefab").WaitForCompletion().GetComponent(); public static PurchaseInteraction bigCategoryChestHealing = Addressables.LoadAssetAsync((object)"RoR2/DLC1/CategoryChest2/CategoryChest2Healing Variant.prefab").WaitForCompletion().GetComponent(); public static PurchaseInteraction bigCategoryChestUtility = Addressables.LoadAssetAsync((object)"RoR2/DLC1/CategoryChest2/CategoryChest2Utility Variant.prefab").WaitForCompletion().GetComponent(); public static PurchaseInteraction casinoChest = Addressables.LoadAssetAsync((object)"RoR2/Base/CasinoChest/CasinoChest.prefab").WaitForCompletion().GetComponent(); public static PurchaseInteraction chanceShrine = Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineChance/ShrineChance.prefab").WaitForCompletion().GetComponent(); public static PurchaseInteraction chanceShrineSnowy = Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineChance/ShrineChanceSnowy Variant.prefab").WaitForCompletion().GetComponent(); public static PurchaseInteraction chanceShrineSandy = Addressables.LoadAssetAsync((object)"RoR2/Base/ShrineChance/ShrineChanceSandy Variant.prefab").WaitForCompletion().GetComponent(); public static MultiShopController smallShop = Addressables.LoadAssetAsync((object)"RoR2/Base/TripleShop/TripleShop.prefab").WaitForCompletion().GetComponent(); public static MultiShopController bigShop = Addressables.LoadAssetAsync((object)"RoR2/Base/TripleShopLarge/TripleShopLarge.prefab").WaitForCompletion().GetComponent(); public static MultiShopController equipmentShop = Addressables.LoadAssetAsync((object)"RoR2/Base/TripleShopEquipment/TripleShopEquipment.prefab").WaitForCompletion().GetComponent(); public static string discountChestPrefix = "Bargain"; public static int smallChestTypeCost = 20; public static int smallShopTypeCost = 35; public static int smallCategoryChestTypeCost = 25; public static int bigChestTypeCost = 45; public static int bigShopTypeCost = 70; public static int bigCategoryChestTypeCost = 50; public static int casinoChestTypeCost = 30; public static int chanceShrineTypeCost = 15; public static int goldChestTypeCost = 200; public static int bigDroneTypeCost = 160; public static GameObject whitePrinter = LegacyResourcesAPI.Load("prefabs/networkedobjects/chest/Duplicator"); public static GameObject greenPrinter = LegacyResourcesAPI.Load("prefabs/networkedobjects/chest/DuplicatorLarge"); public static GameObject redPrinter = LegacyResourcesAPI.Load("prefabs/networkedobjects/chest/DuplicatorMilitary"); public static GameObject scrapper = LegacyResourcesAPI.Load("prefabs/networkedobjects/chest/Scrapper"); public static int printerGreenWeight = 20; public static int printerGreenLimit = 4; public static int printerRedWeight = 4; public static int printerRedLimit = 1; public static int printerRedWeightS5 = 1000; public static int printerRedLimitS5 = 2; public static int scrapperWeight = 1000; public static int scrapperLimit = 3; public static int doubleChestWeight = 15; public static int equipBarrelWeightS1 = 30; public static int equipBarrelLimitS1 = 3; public static int equipBarrelWeight = 10; public static int equipBarrelLimit = 2; public static int equipShopWeightS3 = 20; public static int equipShopLimitS3 = 3; public static int equipShopWeight = 8; public static int equipShopLimit = 2; public static int lunarPodWeightS1 = 20; public static int lunarPodLimitS1 = 6; public static int lunarPodWeight = 6; public static int lunarPodLimit = 2; public static float newtAltarChance = 0.3f; public static void Initialize() { DirectorAPI.InteractableActions += PrinterScrapperOccurrenceHook; DirectorAPI.InteractableActions += EquipBarrelOccurrenceHook; DirectorAPI.InteractableActions += LunarPodOccurrenceHook; GoldShrineRework(); BloodShrineRewardRework(); ChangeHalcyoniteShrineGoldRequirements(); ChestRebalance(); } public static void ReworkSoulShrine() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown ShrineColossusAccessBehavior.ReviveAlliedPlayers += new Manipulator(SoulShrineLuckBuff); LanguageAPI.Add("SHRINE_COLOSSUS_DESCRIPTION", "An offering of Soul reduces all living Survivors' health by 30%, but revives all dead Survivors and gives +1 extra Luck to all living Survivors."); } private static void SoulShrineLuckBuff(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (!val.TryGotoNext((MoveType)0, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "ExtraLifeBuff") })) { RiskierRainPlugin.DebugBreakpoint("SoulShrineLuckBuff"); return; } val.Remove(); val.Remove(); val.EmitDelegate>((Action)delegate(CharacterBody body) { body.AddBuff(Assets.soulShrineLuckBuff); }); } public static void GoldShrineRework() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)goldShrine == (Object)null) { Debug.Log((object)"goldshrine null!! uh oh!!!!"); return; } PurchaseInteraction component = goldShrine.GetComponent(); if ((Object)(object)component == (Object)null) { Debug.Log((object)"goldshrine purchase thing null bwuh"); return; } component.costType = (CostTypeIndex)3; component.cost = goldShrineCost; } private static void BloodShrineRewardRework() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown ShrineBloodBehavior.AddShrineStack += new Manipulator(ShrineBloodReward); } private static void ShrineBloodReward(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int rewardLoc = 1; val.GotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "goldToPaidHpRatio") }); val.GotoNext((MoveType)2, new Func[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref rewardLoc) }); val.EmitDelegate>((Func)(() => (uint)Run.instance.GetDifficultyScaledCost(bloodShrineBaseGoldReward, Stage.instance.entryDifficultyCoefficient))); val.Emit(OpCodes.Stloc, rewardLoc); } private static void ShrineBloodBehavior_Start(orig_Start orig, ShrineBloodBehavior self) { orig.Invoke(self); if (NetworkServer.active) { ((MonoBehaviour)self).StartCoroutine(WaitForPlayerBody(self)); } } private static IEnumerator WaitForPlayerBody(ShrineBloodBehavior instance) { yield return (object)new WaitForSeconds(2f); if (instance.goldToPaidHpRatio == 0f) { yield break; } foreach (PlayerCharacterMasterController playerCharacterMasterController in PlayerCharacterMasterController.instances) { CharacterBody body = playerCharacterMasterController.master.GetBody(); if (Object.op_Implicit((Object)(object)body)) { float maxHealth = body.healthComponent.fullCombinedHealth; if (maxHealth > (float)teamMaxHealth) { teamMaxHealth = (int)maxHealth; } } } float moneyTotal = Run.instance.GetDifficultyScaledCost(totalBloodGoldValue, Stage.instance.entryDifficultyCoefficient); float maxMulti = moneyTotal / (float)teamMaxHealth; if (maxMulti > 0f) { instance.goldToPaidHpRatio = maxMulti / 2.18f; } } private static void ChangeHackingCriteria() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown HackingMainState.PurchaseInteractionIsValidTarget += new hook_PurchaseInteractionIsValidTarget(BlacklistGoldChest); } private static bool BlacklistGoldChest(orig_PurchaseInteractionIsValidTarget orig, PurchaseInteraction purchaseInteraction) { if (purchaseInteraction.displayNameToken == "GOLDCHEST_NAME") { return false; } return orig.Invoke(purchaseInteraction); } public static void ChangeHalcyoniteShrineGoldRequirements() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/ShrineHalcyonite.prefab").WaitForCompletion(); if (Object.op_Implicit((Object)(object)val)) { HalcyoniteShrineInteractable component = val.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.lowGoldCost = halcyoniteShrineLowGoldCost; component.midGoldCost = halcyoniteShrineMidGoldCost; component.maxGoldCost = halcyoniteShrineMaxGoldCost; } } } public static void ShrineHalcyoniteShelterEnd(orig_OnEnter orig, ShrineHalcyoniteFinished self) { orig.Invoke(self); ShelterProviderBehavior component = ((EntityState)self).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = false; } } public static void ShrineHalcyoniteShelterStart(orig_OnEnter orig, ShrineHalcyoniteNoQuality self) { orig.Invoke(self); ShelterProviderBehavior component = ((EntityState)self).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = true; } } private static void ChestRebalance() { if ((Object)(object)smallChest != (Object)null) { LanguageAPI.Add("CHEST1_NAME", discountChestPrefix + " Chest"); LanguageAPI.Add("CHEST1_CONTEXT", "Open discounted chest"); smallChest.cost = smallChestTypeCost; } if ((Object)(object)smallShop != (Object)null) { smallShop.baseCost = smallShopTypeCost; } if ((Object)(object)smallCategoryChestDamage != (Object)null) { smallCategoryChestDamage.cost = smallCategoryChestTypeCost; } if ((Object)(object)smallCategoryChestHealing != (Object)null) { smallCategoryChestHealing.cost = smallCategoryChestTypeCost; } if ((Object)(object)smallCategoryChestUtility != (Object)null) { smallCategoryChestUtility.cost = smallCategoryChestTypeCost; } if ((Object)(object)bigChest != (Object)null) { LanguageAPI.Add("CHEST2_NAME", "Large " + discountChestPrefix + " Chest"); LanguageAPI.Add("CHEST2_CONTEXT", "Open discounted large chest"); bigChest.cost = bigChestTypeCost; } if ((Object)(object)bigShop != (Object)null) { bigShop.baseCost = bigShopTypeCost; } if ((Object)(object)bigCategoryChestDamage != (Object)null) { bigCategoryChestDamage.cost = bigCategoryChestTypeCost; } if ((Object)(object)bigCategoryChestHealing != (Object)null) { bigCategoryChestHealing.cost = bigCategoryChestTypeCost; } if ((Object)(object)bigCategoryChestUtility != (Object)null) { bigCategoryChestUtility.cost = bigCategoryChestTypeCost; } if ((Object)(object)chanceShrine != (Object)null) { chanceShrine.cost = chanceShrineTypeCost; chanceShrineSandy.cost = chanceShrineTypeCost; chanceShrineSnowy.cost = chanceShrineTypeCost; } } public static void ChangeInteractableWeightForPool(DccsPool pool, string interactableNameLowered, int newWeight, int maxPerStage = -1) { if (!Object.op_Implicit((Object)(object)pool)) { return; } Helpers.ForEachPoolEntryInDccsPool(pool, (Action)delegate(PoolEntry poolEntry) { //IL_0089: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < poolEntry.dccs.categories.Length; i++) { List list = poolEntry.dccs.categories[i].cards.ToList(); foreach (DirectorCard item in list) { SpawnCard spawnCard = item.spawnCard; if (((Object)spawnCard).name.ToLowerInvariant() == interactableNameLowered) { item.selectionWeight = newWeight; if (maxPerStage >= 0 && spawnCard is InteractableSpawnCard) { ((InteractableSpawnCard)spawnCard).maxSpawnsPerStage = maxPerStage; } } } poolEntry.dccs.categories[i].cards = list.ToArray(); } }); } private static void RemoveExistingInteractable(DccsPool pool, string interactableNameLowered) { if (!Object.op_Implicit((Object)(object)pool)) { return; } Helpers.ForEachPoolEntryInDccsPool(pool, (Action)delegate(PoolEntry poolEntry) { for (int i = 0; i < poolEntry.dccs.categories.Length; i++) { List list = poolEntry.dccs.categories[i].cards.ToList(); list.RemoveAll((DirectorCard card) => ((Object)card.spawnCard).name.ToLowerInvariant() == interactableNameLowered); poolEntry.dccs.categories[i].cards = list.ToArray(); } }); } private static bool OnPrinterStage(Stage stage) { //IL_0001: 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) return !OnScrapperStage(stage) || IsModdedPrinterStage(stage); } private static bool OnScrapperStage(Stage stage) { //IL_0001: 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) //IL_0011: Unknown result type (might be due to invalid IL or missing references) return IsStageOne(stage) || IsStageThree(stage) || IsModdedScrapperStage(stage); } private static bool IsStageOne(Stage stage) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Invalid comparison between Unknown and I8 //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Invalid comparison between Unknown and I8 //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I8 return (long)stage == 2 || (long)stage == 4 || (long)stage == 67108864; } private static bool IsStageThree(Stage stage) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Invalid comparison between Unknown and I8 //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I8 //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Invalid comparison between Unknown and I8 return (long)stage == 32 || (long)stage == 64 || (long)stage == 134217728; } private static bool IsStageFive(Stage stage) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I8 //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Invalid comparison between Unknown and I8 return (long)stage == 16384 || (long)stage == 1099511627776L; } private static bool IsModdedPrinterStage(Stage stage) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return stage == DirectorAPI.ParseInternalStageName("drybasin") || stage == DirectorAPI.ParseInternalStageName("slumberingsatellite"); } private static bool IsModdedScrapperStage(Stage stage) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return stage == DirectorAPI.ParseInternalStageName("FBLScene"); } public static void PrinterScrapperOccurrenceHook(DccsPool pool, StageInfo currentStage) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) string text = InteractableNames.Printer3D.ToLowerInvariant(); string interactableNameLowered = InteractableNames.Printer3DLarge.ToLowerInvariant(); string interactableNameLowered2 = InteractableNames.PrinterMiliTech.ToLowerInvariant(); string interactableNameLowered3 = InteractableNames.Scrapper.ToLowerInvariant(); bool flag = IsStageFive(currentStage.stage); ChangeInteractableWeightForPool(pool, interactableNameLowered, printerGreenWeight, printerGreenLimit); if (flag) { ChangeInteractableWeightForPool(pool, interactableNameLowered2, printerRedWeightS5, printerRedLimitS5); RemoveExistingInteractable(pool, interactableNameLowered3); } else { ChangeInteractableWeightForPool(pool, interactableNameLowered2, printerRedWeight, printerRedLimit); } } public static void PrinterOccurrenceHook(DccsPool pool, StageInfo currentStage) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) string interactableNameLowered = InteractableNames.Printer3D.ToLowerInvariant(); string interactableNameLowered2 = InteractableNames.Printer3DLarge.ToLowerInvariant(); string interactableNameLowered3 = InteractableNames.PrinterMiliTech.ToLowerInvariant(); string text = InteractableNames.Scrapper.ToLowerInvariant(); if (!OnPrinterStage(currentStage.stage) && (!((StageInfo)(ref currentStage)).CheckStage((Stage)1, new string[1] { "" }) || IsModdedScrapperStage(currentStage.stage))) { RemoveExistingInteractable(pool, interactableNameLowered); RemoveExistingInteractable(pool, interactableNameLowered2); RemoveExistingInteractable(pool, interactableNameLowered3); } } public static void ScrapperOccurrenceHook(DccsPool pool, StageInfo currentStage) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) string interactableNameLowered = InteractableNames.Scrapper.ToLowerInvariant(); string interactableNameLowered2 = InteractableNames.AdaptiveChest.ToLowerInvariant(); if (OnScrapperStage(currentStage.stage)) { ChangeInteractableWeightForPool(pool, interactableNameLowered, scrapperWeight, scrapperLimit); ChangeInteractableWeightForPool(pool, interactableNameLowered2, doubleChestWeight); } else if (!((StageInfo)(ref currentStage)).CheckStage((Stage)1, new string[1] { "" }) || IsModdedPrinterStage(currentStage.stage)) { RemoveExistingInteractable(pool, interactableNameLowered); } } public static void EquipBarrelOccurrenceHook(DccsPool pool, StageInfo currentStage) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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) string interactableNameLowered = InteractableNames.EquipmentBarrel.ToLower(); if (IsStageOne(currentStage.stage)) { ChangeInteractableWeightForPool(pool, interactableNameLowered, equipBarrelWeightS1, equipBarrelLimitS1); } else if (!((StageInfo)(ref currentStage)).CheckStage((Stage)1, new string[1] { "" })) { ChangeInteractableWeightForPool(pool, interactableNameLowered, equipBarrelWeight, equipBarrelLimit); } string interactableNameLowered2 = InteractableNames.TripleShopEquipment.ToLower(); if (IsStageThree(currentStage.stage)) { ChangeInteractableWeightForPool(pool, interactableNameLowered2, equipShopWeightS3, equipShopLimitS3); } else if (!((StageInfo)(ref currentStage)).CheckStage((Stage)1, new string[1] { "" })) { ChangeInteractableWeightForPool(pool, interactableNameLowered2, equipShopWeight, equipShopLimit); } } public static void LunarPodOccurrenceHook(DccsPool pool, StageInfo currentStage) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) string interactableNameLowered = InteractableNames.LunarPod.ToLower(); if (IsStageOne(currentStage.stage)) { ChangeInteractableWeightForPool(pool, interactableNameLowered, lunarPodWeightS1, lunarPodLimitS1); } else if (!((StageInfo)(ref currentStage)).CheckStage((Stage)1, new string[1] { "" })) { ChangeInteractableWeightForPool(pool, interactableNameLowered, lunarPodWeight, lunarPodLimit); } } public static void NerfBazaarStuff() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown SceneDirector.Start += new hook_Start(SceneDirector_Start); } public static void SceneDirector_Start(orig_Start orig, SceneDirector director) { orig.Invoke(director); if (!NetworkServer.active || !(SceneInfo.instance.sceneDef.baseSceneName != "bazaar")) { return; } List list = (from obj in Resources.FindObjectsOfTypeAll() where ((Object)obj).name == "NewtStatue" || ((Object)obj).name == "NewtStatue (1)" || ((Object)obj).name == "NewtStatue (2)" || ((Object)obj).name == "NewtStatue (3)" || ((Object)obj).name == "NewtStatue (4)" select obj).ToList(); List second = (from obj in Resources.FindObjectsOfTypeAll() where ((Object)obj).name == "NewtStatue, Guarantee" || ((Object)obj).name == "NewtStatue, Guaranteed" || ((Object)obj).name == "NewtStatue (Permanent)" select obj).ToList(); list.Concat(second); foreach (GameObject item in list) { if (newtAltarChance >= 1f || director.rng.nextNormalizedFloat <= newtAltarChance) { item.SetActive(true); break; } item.SetActive(false); } } } public static class ItemChanges { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__0_0; public static Manipulator <>9__6_0; public static hook_Begin <>9__6_1; public static Func <>9__7_0; public static Manipulator <>9__11_0; public static hook_Begin <>9__11_1; public static Func <>9__12_0; public static Func <>9__12_1; public static Action <>9__19_0; public static Func <>9__20_0; public static Func <>9__20_2; public static Func <>9__20_3; public static Func <>9__20_4; public static Func <>9__20_5; public static Action <>9__22_0; public static Action <>9__24_0; public static Action <>9__26_0; public static Action <>9__34_0; public static Func <>9__35_0; public static Func <>9__35_2; public static Func <>9__35_3; public static Func <>9__35_4; public static Func <>9__35_5; public static Func <>9__35_6; public static Func <>9__41_0; public static Func <>9__41_1; public static Func <>9__41_2; public static Func <>9__41_3; public static Func <>9__41_4; public static Func <>9__41_5; public static Func <>9__42_0; public static Func <>9__42_1; public static Func <>9__42_2; public static Func <>9__42_3; public static Func <>9__42_4; public static Func <>9__42_5; public static Func <>9__42_6; public static Func <>9__42_7; public static Func <>9__42_8; public static Manipulator <>9__49_0; public static Manipulator <>9__50_0; public static Func <>9__51_0; public static Func <>9__51_2; public static Func <>9__51_5; public static Func <>9__51_6; public static Func <>9__51_8; public static Func <>9__51_9; public static Func <>9__51_10; public static Func <>9__52_2; public static Func <>9__52_4; public static Func <>9__52_5; public static Func <>9__52_8; public static Func <>9__55_0; public static Func <>9__55_1; public static Func <>9__55_4; public static Action <>9__62_0; public static Func <>9__63_0; public static Func <>9__63_1; public static Action <>9__63_3; public static Func <>9__64_0; public static Func <>9__64_1; public static Func <>9__64_2; public static Func <>9__64_3; public static Func <>9__67_0; public static Func <>9__67_1; public static Func <>9__67_4; public static Func <>9__67_5; public static Func <>9__67_6; public static Func <>9__73_0; public static Func <>9__73_1; public static Func <>9__73_2; public static Func <>9__78_0; public static Func <>9__78_1; public static Func <>9__78_2; public static Func <>9__78_3; public static Func <>9__82_0; public static Func <>9__82_1; public static Func <>9__82_2; public static Func <>9__82_3; public static hook_OnEnter <>9__85_0; public static Func <>9__93_0; public static Func <>9__93_1; public static Func <>9__93_2; public static Func <>9__93_5; public static Func <>9__93_6; public static Func <>9__93_8; public static Func <>9__95_0; public static Func <>9__95_1; public static Func <>9__95_2; public static Func <>9__99_0; public static Func <>9__99_1; public static Func <>9__99_3; public static Func <>9__99_4; public static Func <>9__103_0; public static Func <>9__103_2; public static Func <>9__103_3; public static Func <>9__110_0; public static Func <>9__110_1; public static Func <>9__110_4; public static Func <>9__110_5; public static Func <>9__110_7; public static Func <>9__116_0; public static Func <>9__116_3; public static Func <>9__116_4; public static Func <>9__116_5; public static Func <>9__123_0; public static Action <>9__123_1; public static Func <>9__124_0; public static Func <>9__124_1; public static Func <>9__124_3; public static Func <>9__125_0; public static Func <>9__125_1; public static Func <>9__125_2; public static Func <>9__128_0; public static Func <>9__128_1; public static Action <>9__131_0; public static Func <>9__132_0; public static Func <>9__132_1; public static Func <>9__132_3; public static Func <>9__132_4; public static Func <>9__132_5; public static Func <>9__132_6; public static Func <>9__132_7; public static Func <>9__132_8; public static Func <>9__138_0; public static Func <>9__138_1; public static Func <>9__138_3; public static Func <>9__138_4; public static Func <>9__138_5; public static Func <>9__138_6; public static Action <>9__141_0; public static Func <>9__146_0; public static Func <>9__146_1; public static Func <>9__147_0; public static Func <>9__151_0; public static Func <>9__151_2; public static Func <>9__151_3; public static Func <>9__159_0; public static Func <>9__159_3; public static Func <>9__159_4; public static Func <>9__159_5; public static Func <>9__172_0; public static Func <>9__172_1; public static Func <>9__172_2; public static Func <>9__174_0; public static Func <>9__174_1; public static Func <>9__175_0; public static Func <>9__175_1; public static Func <>9__175_2; public static Func <>9__175_3; public static Func <>9__175_4; public static Func <>9__176_0; public static Func <>9__176_1; public static Func <>9__176_3; public static Func <>9__176_4; public static Func <>9__176_5; public static Func <>9__176_6; public static Func <>9__176_7; public static Func <>9__177_0; public static Func <>9__177_1; public static Func <>9__177_4; public static Func <>9__177_5; public static Func <>9__180_0; public static Func <>9__180_1; public static Func <>9__180_2; public static Func <>9__181_0; public static Func <>9__181_1; public static Func <>9__181_2; public static Func <>9__182_0; public static Func <>9__182_1; public static Func <>9__182_2; public static Func <>9__183_0; public static Func <>9__183_1; public static Action <>9__191_0; public static Func <>9__192_0; public static Func <>9__192_1; public static Func <>9__192_2; public static Func <>9__194_0; public static Func <>9__194_1; public static Func <>9__208_1; public static Action <>9__211_0; public static Func <>9__212_0; public static Func <>9__212_1; public static Func <>9__212_3; public static Func <>9__212_5; public static Func <>9__212_6; public static Func <>9__212_7; public static Func <>9__215_0; public static Func <>9__215_2; public static Func <>9__216_0; public static Func <>9__216_1; public static Func <>9__216_3; public static Func <>9__216_4; public static Func <>9__216_7; public static Func <>9__216_8; public static Func <>9__216_9; public static Func <>9__216_10; public static Func <>9__221_0; public static Func <>9__221_1; public static Func <>9__222_0; public static Func <>9__222_2; public static Action <>9__229_0; public static Func <>9__230_0; public static Func <>9__230_1; public static Func <>9__230_2; public static Func <>9__232_0; public static Func <>9__232_1; public static Func <>9__232_2; internal bool b__0_0(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "force"); } internal void b__6_0(ILContext il) { DevilOrbSlowAndForce(il, (EffectType)0, opinionSlowDuration, opinionForceMultiplier); } internal void b__6_1(orig_Begin orig, DevilOrb self) { DevilOrbProcCoefficient(orig, self, (EffectType)0, opinionProcCoeff); } internal bool b__7_0(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "damageValue"); } internal void b__11_0(ILContext il) { DevilOrbSlowAndForce(il, (EffectType)1, discipleSlowDuration, discipleForceMultiplier); } internal void b__11_1(orig_Begin orig, DevilOrb self) { DevilOrbProcCoefficient(orig, self, (EffectType)0, opinionProcCoeff); } internal bool b__12_0(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "damageValue"); } internal float b__12_1(float damageIn, SprintWispBodyBehavior behavior) { return damageIn / (float)((BaseItemBodyBehavior)behavior).stack; } internal void b__19_0(GameObject delayBlast) { DelayBlast val = default(DelayBlast); if (delayBlast.TryGetComponent(ref val)) { val.procCoefficient = willowispProcCoeff; } } internal bool b__20_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "ExplodeOnDeath"); } internal bool b__20_2(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "OnKillProcDamage"); } internal float b__20_3(float currentDamage, int itemCount) { return willowispDamageBase + willowispDamageStack * (float)(itemCount - 1); } internal bool b__20_4(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "radius"); } internal float b__20_5(float currentRadius, int itemCount) { return willowispBaseRange + willowispStackRange * (float)itemCount; } internal void b__22_0(GameObject delayBlast) { DelayBlast val = default(DelayBlast); if (delayBlast.TryGetComponent(ref val)) { val.procCoefficient = spleenProcCoeff; } } internal void b__24_0(GameObject projectile) { ProjectileController val = default(ProjectileController); if (projectile.TryGetComponent(ref val)) { val.procCoefficient = fireworkProcCoeff; } } internal void b__26_0(GameObject projectile) { ProjectileSimple val = default(ProjectileSimple); if (projectile.TryGetComponent(ref val)) { val.lifetime = ceremonialDaggerLifetime; } } internal void b__34_0(GameObject delayBlast) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) DelayBlast val = default(DelayBlast); if (delayBlast.TryGetComponent(ref val)) { val.procCoefficient = voidsentProcCoeff; val.damageType.damageType = (DamageType)32; } } internal bool b__35_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "ExplodeOnDeathVoid"); } internal int b__35_2(int itemCountIn) { if (itemCountIn > 0 && Util.CheckRoll(voidsentBaseChance + voidsentStackChance * (float)(itemCountIn - 1), 0f, (CharacterMaster)null)) { return itemCountIn; } return 0; } internal bool b__35_3(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "OnKillProcDamage"); } internal float b__35_4(float currentDamage, int itemCount) { return voidsentBaseRange + voidsentDamageStack * (float)(itemCount - 1); } internal bool b__35_5(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "radius"); } internal float b__35_6(float currentRadius, int itemCount) { return voidsentBaseRange + voidsentStackRange * (float)(itemCount - 1); } internal bool b__41_0(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "totalDamage"); } internal bool b__41_1(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "baseDamage"); } internal bool b__41_2(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "totalDamage"); } internal float b__41_3(float currentDamage, DamageReport damageReport, int itemCount) { return (gasBaseBurnDamage + gasStackBurnDamage * (float)(itemCount - 1)) * damageReport.attackerBody.damage; } internal bool b__41_4(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "baseDamage"); } internal float b__41_5(float currentDamage, DamageReport damageReport, int itemCount) { return (gasBaseDamage + gasStackDamage * (float)itemCount) * damageReport.attackerBody.damage; } internal bool b__42_0(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 1.5f); } internal bool b__42_1(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 1.5f); } internal bool b__42_2(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 1); } internal bool b__42_3(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal bool b__42_4(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool b__42_5(Instruction x) { return ILPatternMatchingExt.MatchAdd(x); } internal float b__42_6(float currentDuration, int itemCount) { return gasBaseBurnDamage + gasStackBurnDamage * (float)(itemCount - 1); } internal bool b__42_7(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "baseDamage"); } internal float b__42_8(float currentDamage, DamageReport damageReport, int itemCount) { return (gasBaseDamage + gasStackDamage * (float)itemCount) * damageReport.attackerBody.damage; } internal void b__49_0(ILContext il) { BandNerf(il, runaldTotalDamage, runaldBaseDamage, "IceRing"); } internal void b__50_0(ILContext il) { BandNerf(il, runaldTotalDamage, runaldBaseDamage, "FireRing"); } internal bool b__51_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "IceRing"); } internal bool b__51_2(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 1); } internal bool b__51_5(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal float b__51_6(float cooldown, CharacterBody self) { float num = 1f; if (Object.op_Implicit((Object)(object)self.skillLocator.special)) { float cooldownScale = self.skillLocator.special.cooldownScale; num *= cooldownScale; if (!(self.skillLocator.special.flatCooldownReduction < 9f)) { } } return cooldown * num; } internal bool b__51_8(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal bool b__51_9(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal float b__51_10(float seconds, CharacterBody self) { float num = 0f; if (Object.op_Implicit((Object)(object)self.skillLocator.special)) { } return Mathf.Max(seconds - num, 1f); } internal bool b__52_2(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__52_4(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal bool b__52_5(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool b__52_8(Instruction x) { MethodReference val = default(MethodReference); return ILPatternMatchingExt.MatchCallOrCallvirt(x, ref val); } internal bool b__55_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "CritGlasses"); } internal bool b__55_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCountEffective"); } internal bool b__55_4(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal void b__62_0(BuffDef bd) { bd.canStack = deathMarkedStacking; bd.isHidden = deathMarkedHidden; } internal bool b__63_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "DeathMark"); } internal bool b__63_1(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal void b__63_3(CharacterBody body, BuffDef buffDef, float duration, float itemCount) { int buffCount = body.GetBuffCount(Buffs.DeathMark); int num = 0; if (buffCount < (int)itemCount) { num = (int)itemCount - buffCount; } for (float num2 = 0f; num2 < (float)num; num2 += 1f) { body.AddTimedBuff(buffDef, duration); } } internal bool b__64_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "DeathMark"); } internal bool b__64_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "HasBuff"); } internal bool b__64_2(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal float b__64_3(float damageMultiplierIn, HealthComponent hc) { CharacterBody body = hc.body; float num = 1f; if ((Object)(object)body.inventory != (Object)null) { int itemCountEffective = body.inventory.GetItemCountEffective(Items.DeathMark); if (itemCountEffective > 0) { int num2 = g__GetUniqueBuffCount|64_4(body, deathMarkMaxDebuffs); if (num2 > 0) { num += (float)num2 * deathMarkDamagePerDebuffBase; } } } int buffCount = body.GetBuffCount(Buffs.DeathMark); if (buffCount > 0) { num += deathMarkedBonusDamageBase + deathMarkedBonusDamageStack * (float)(buffCount - 1); } return num; } internal bool b__67_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "ChainLightningVoid"); } internal bool b__67_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCountEffective"); } internal bool b__67_4(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 0); } internal bool b__67_5(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBle(x, ref val); } internal bool b__67_6(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__73_0(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_damage"); } internal bool b__73_1(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__73_2(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__78_0(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "damage"); } internal bool b__78_1(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "stack"); } internal bool b__78_2(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__78_3(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__82_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "IncreasePrimaryDamage"); } internal bool b__82_1(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__82_2(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__82_3(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal void b__85_0(orig_OnEnter orig, ChargeState self) { orig.Invoke(self); self.duration = 3f; } internal bool b__93_0(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterBody", "baseAttackSpeed"); } internal bool b__93_1(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__93_2(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterBody", "levelAttackSpeed"); } internal bool b__93_5(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "WarCryBuff"); } internal bool b__93_6(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "HasBuff"); } internal bool b__93_8(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 1f); } internal bool b__95_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "CritGlassesVoid"); } internal bool b__95_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCountEffective"); } internal int b__95_2(int lensCount, HealthComponent hc) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) CharacterBody body = hc.body; if (((Enum)body.bodyFlags).HasFlag((Enum)(object)(BodyFlags)2048)) { return 0; } return lensCount; } internal bool b__99_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "StickyBomb"); } internal bool b__99_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCountEffective"); } internal bool b__99_3(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "OnHitProcDamage"); } internal float b__99_4(float damageCoefficient, int itemCount) { return stickyDamageCoeffBase + stickyDamageCoeffStack * (float)(itemCount - 1); } internal bool b__103_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "BearVoid"); } internal bool b__103_2(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "AddTimedBuff"); } internal float b__103_3(float inDuration) { float num = 15f; float num2 = 5f; return num2 + inDuration * ((num - num2) / num); } internal bool b__110_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Infusion"); } internal bool b__110_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCountEffective"); } internal bool b__110_4(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdcI4(x, ref num); } internal bool b__110_5(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal int b__110_7(int currentInfusionCap, int infusionCount, CharacterBody body) { float num = 100 * infusionCount; if ((Object)(object)body != (Object)null) { float num2 = 1f + 0.3f * (body.level - 1f); num = newInfusionBaseHealth * num2 * (float)infusionCount; } return (int)num; } internal bool b__116_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "BarrierOnKill"); } internal bool b__116_3(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_healthComponent"); } internal bool b__116_4(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "AddBarrier"); } internal float b__116_5(float barrierIn, int stack, CharacterBody body) { if ((Object)(object)body == (Object)null) { return barrierIn; } float num = broochPercentBase + broochPercentStack * (float)(stack - 1); return barrierIn + body.healthComponent.fullCombinedHealth * num; } internal bool b__123_0(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "AddBarrierAuthority"); } internal void b__123_1(HealthComponent healthComponent, float value) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) ecliteThingy = healthComponent; healthComponent.Heal(value, default(ProcChainMask), true); } internal bool b__124_0(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_maxHealth"); } internal float b__124_1(float maxHealthWhichFunctionsAsAMultiplier) { return 1f; } internal bool b__124_3(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__125_0(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 2); } internal bool b__125_1(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal float b__125_2(float restocks, GenericSkill skill) { int rechargeStock = skill.skillDef.GetRechargeStock(skill); if (rechargeStock > 1) { restocks /= (float)rechargeStock; } return restocks; } internal bool b__128_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "DelayedDamage"); } internal bool b__128_1(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 0.9f); } internal void b__131_0(BuffDef buffDef) { buffDef.isDebuff = true; buffDef.isHidden = true; } internal bool b__132_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Medkit"); } internal bool b__132_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCountEffective"); } internal bool b__132_3(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 20f); } internal bool b__132_4(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchStloc(x, ref num); } internal float b__132_5(float currentHealAmt, int itemCount) { return medkitFlatHeal * (float)itemCount; } internal bool b__132_6(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_maxHealth"); } internal bool b__132_7(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 0.05f); } internal float b__132_8(float currentHealAmt) { return medkitPercentHeal; } internal bool b__138_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Tooth"); } internal bool b__138_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCountEffective"); } internal bool b__138_3(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "flatHealing"); } internal float b__138_4(float currentHealAmt, int itemCount) { return monsterToothFlatHeal * (float)itemCount; } internal bool b__138_5(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "fractionalHealing"); } internal float b__138_6(float currentHealAmt) { return monsterToothPercentHeal; } internal void b__141_0(BuffDef buffDef) { buffDef.isHidden = true; } internal bool b__146_0(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "interval"); } internal float b__146_1(float interval) { return fungusHealInterval; } internal bool b__147_0(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "notMovingStopwatch"); } internal bool b__151_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "HealOnCrit"); } internal bool b__151_2(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "Heal"); } internal float b__151_3(float currentHealAmt, int itemCount) { return scytheBaseHeal + scytheStackHeal * (float)itemCount; } internal bool b__159_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Hoof"); } internal bool b__159_3(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal bool b__159_4(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal float b__159_5(float itemCount, float speedBonus) { float result = 0f; if (itemCount > 0f) { result = hoofSpeedBonusBase + hoofSpeedBonusStack * (itemCount - 1f); } return result; } internal bool b__172_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC3Content/Buffs", "JumpDamageStrikeCharge"); } internal bool b__172_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetBuffCount"); } internal bool b__172_2(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdcI4(x, ref num); } internal bool b__174_0(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "damageType"); } internal DamageTypeCombo b__174_1(DamageTypeCombo doesntMatter) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: 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) return new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)0, (DamageSource)8); } internal bool b__175_0(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_damage"); } internal bool b__175_1(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__175_2(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__175_3(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__175_4(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "stack"); } internal bool b__176_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC3Content/Buffs", "JumpDamageStrikeCharge"); } internal bool b__176_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetBuffCount"); } internal bool b__176_3(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC3Content/Buffs", "JumpDamageStrikeCharge"); } internal bool b__176_4(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_buffIndex"); } internal bool b__176_5(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdcI4(x, ref num); } internal bool b__176_6(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "SetBuffCount"); } internal int b__176_7(int doesntMatter, int buffCount) { int num = buffCount - faradayMaxDischarge; if (num < 0) { return 0; } if (num == faradayRequiredCharge && faradayPreventDoubleDischarge) { return faradayRequiredCharge - 1; } return num; } internal bool b__177_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC3Content/Buffs", "JumpDamageStrikeCharge"); } internal bool b__177_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetBuffCount"); } internal bool b__177_4(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdcI4(x, ref num); } internal bool b__177_5(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBge(x, ref val); } internal bool b__180_0(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 1); } internal bool b__180_1(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdcI4(x, ref num); } internal bool b__180_2(Instruction x) { return ILPatternMatchingExt.MatchClt(x); } internal bool b__181_0(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 1); } internal bool b__181_1(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdcI4(x, ref num); } internal bool b__181_2(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBge(x, ref val); } internal bool b__182_0(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "isCharging"); } internal bool b__182_1(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "distanceTraveled"); } internal float b__182_2(float addedDistance, JumpDamageStrikeBodyBehavior behavior) { float num = Mathf.Pow((1f + faradayChargeIncreaseStack * (float)(((BaseItemBodyBehavior)behavior).stack - 1)) * faradayChargeIncreaseBase, 0.2f); return addedDistance * num; } internal bool b__183_0(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt