Decompiled source of 2R4R v1.1.2
ModularEclipse.dll.old
Decompiled 2 days agousing System; using System.Collections.ObjectModel; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using On.RoR2; using RoR2; using UnityEngine; [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.0", FrameworkDisplayName = "")] [assembly: AssemblyCompany("ModularEclipse")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ModularEclipse")] [assembly: AssemblyTitle("ModularEclipse")] [assembly: AssemblyVersion("1.0.0.0")] namespace ModularEclipse; [BepInPlugin("com.HouseOfFruits.ModularEclipse", "ModularEclipse", "1.0.0")] public class ModularEclipsePlugin : BaseUnityPlugin { public const string guid = "com.HouseOfFruits.ModularEclipse"; public const string teamName = "HouseOfFruits"; public const string modName = "ModularEclipse"; public const string version = "1.0.0"; public static PluginInfo PInfo { get; private set; } internal static ConfigFile ArtifactWhitelistConfig { get; set; } public static void SetArtifactDefaultWhitelist(ArtifactDef artifactDef, bool defaultValue) { string cachedName = artifactDef.cachedName; if (cachedName == "") { Debug.LogError((object)("Artifact " + artifactDef.nameToken + " has no cached name! The Eclipse rule choice selection will not work for it.")); } else { ArtifactWhitelistConfig.Bind<bool>("Eclipse: Whitelisted Artifacts", cachedName, defaultValue, "If true, this artifact will be *allowed* for use in the Eclipse gamemode. Recommended only difficulty artifacts should be enabled."); } } private void Awake() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown ArtifactWhitelistConfig = new ConfigFile(Paths.ConfigPath + "\\ModularEclipse.cfg", true); EclipseRun.OverrideRuleChoices += new hook_OverrideRuleChoices(EclipseRuleChoices); } private void EclipseRuleChoices(orig_OverrideRuleChoices orig, EclipseRun self, RuleChoiceMask mustInclude, RuleChoiceMask mustExclude, ulong runSeed) { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) int num = 0; ReadOnlyCollection<NetworkUser> readOnlyInstancesList = NetworkUser.readOnlyInstancesList; for (int i = 0; i < readOnlyInstancesList.Count; i++) { NetworkUser val = readOnlyInstancesList[i]; SurvivorDef survivorPreference = val.GetSurvivorPreference(); if (Object.op_Implicit((Object)(object)survivorPreference)) { int num2 = EclipseRun.GetNetworkUserSurvivorCompletedEclipseLevel(val, survivorPreference) + 1; num = ((num > 0) ? Math.Min(num, num2) : num2); } } num = Math.Min(num, EclipseRun.maxEclipseLevel); DifficultyIndex eclipseDifficultyIndex = EclipseRun.GetEclipseDifficultyIndex(num); RuleDef val2 = RuleCatalog.FindRuleDef("Difficulty"); foreach (RuleChoiceDef choice in val2.choices) { if (choice.excludeByDefault && choice.difficultyIndex <= eclipseDifficultyIndex) { if (choice.difficultyIndex == eclipseDifficultyIndex) { val2.defaultChoiceIndex = choice.localIndex; } ((SerializableBitArray)mustInclude)[choice.globalIndex] = true; ((SerializableBitArray)mustExclude)[choice.globalIndex] = false; } else { ((SerializableBitArray)mustInclude)[choice.globalIndex] = false; ((SerializableBitArray)mustExclude)[choice.globalIndex] = true; } } ((Run)self).ForceChoice(mustInclude, mustExclude, "Items." + ((Object)Items.LunarTrinket).name + ".Off"); for (int j = 0; j < ArtifactCatalog.artifactCount; j++) { ArtifactDef artifactDef = ArtifactCatalog.GetArtifactDef((ArtifactIndex)j); string cachedName = artifactDef.cachedName; if (cachedName == "") { Debug.LogError((object)("Artifact " + artifactDef.nameToken + " has no cached name! The Eclipse rule choice selection will not work for it.")); continue; } Debug.LogWarning((object)cachedName); if (!ArtifactWhitelistConfig.Bind<bool>("Eclipse: Whitelisted Artifacts", cachedName, false, "If true, this artifact will be *allowed* for use in the Eclipse gamemode. Recommended only difficulty artifacts should be enabled.").Value) { RuleDef val3 = RuleCatalog.FindRuleDef("Artifacts." + cachedName); ((Run)self).ForceChoice(mustInclude, mustExclude, val3.FindChoice("Off")); } } } }
RiskierRain.dll
Decompiled 2 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using EntityStates; using EntityStates.BeetleQueenMonster; using EntityStates.GoldGat; using EntityStates.ImpBossMonster; 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.Items; using IL.RoR2.Orbs; using IL.RoR2.Projectile; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using MoreStats; using On.EntityStates; using On.EntityStates.CaptainSupplyDrop; 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 R2API; using R2API.Utils; using RainrotSharedUtils; using RainrotSharedUtils.Components; using RainrotSharedUtils.Shelters; using RiskierRain.Components; using RiskierRain.CoreModules; using RoR2; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Items; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using SwanSongExtended; using ThreeEyedGames; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; [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.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.RiskOfBrainrot.RiskierRain", "RiskierRain", "1.0.18")] [R2APISubmoduleDependency(new string[] { "LanguageAPI", "PrefabAPI", "DirectorAPI", "ItemAPI", "RecalculateStatsAPI", "EliteAPI" })] internal class RiskierRainPlugin : BaseUnityPlugin { public delegate bool orig_getHasOneShotProtection(CharacterBody self); [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__24_0; public static Func<Instruction, bool> <>9__24_1; public static Func<Instruction, bool> <>9__24_2; public static Func<Instruction, bool> <>9__24_3; public static Func<Instruction, bool> <>9__24_4; public static Func<Instruction, bool> <>9__25_1; public static Func<Instruction, bool> <>9__25_2; public static Func<Instruction, bool> <>9__25_3; public static Func<Instruction, bool> <>9__25_4; public static Func<Instruction, bool> <>9__25_5; public static Func<Instruction, bool> <>9__25_6; public static Func<Instruction, bool> <>9__25_8; public static Func<Instruction, bool> <>9__25_9; public static Func<Instruction, bool> <>9__25_10; public static Func<Instruction, bool> <>9__25_11; public static Func<Instruction, bool> <>9__25_12; public static Func<Instruction, bool> <>9__25_13; public static Func<float, float> <>9__25_14; public static Func<Instruction, bool> <>9__53_0; public static Func<Instruction, bool> <>9__53_1; public static Func<Instruction, bool> <>9__54_0; public static Func<Instruction, bool> <>9__56_0; public static Func<Instruction, bool> <>9__56_1; public static Func<Instruction, bool> <>9__56_2; public static Func<uint, uint> <>9__126_0; public static Func<uint, uint> <>9__127_0; public static Func<Instruction, bool> <>9__194_0; public static Action<CharacterBody> <>9__194_1; public static Func<EliteRules, bool> <>9__202_0; public static hook_OnEnter <>9__207_0; public static hook_OnEnter <>9__207_1; public static Func<Instruction, bool> <>9__278_0; public static Func<Instruction, bool> <>9__288_0; public static Func<Instruction, bool> <>9__288_1; public static Func<Instruction, bool> <>9__288_2; public static Func<Instruction, bool> <>9__289_0; public static Func<Instruction, bool> <>9__289_1; public static Func<Instruction, bool> <>9__289_2; public static Func<Instruction, bool> <>9__289_3; public static Func<Instruction, bool> <>9__292_0; public static Func<Instruction, bool> <>9__292_1; public static Func<Instruction, bool> <>9__292_4; public static Func<Instruction, bool> <>9__297_0; public static Func<Instruction, bool> <>9__297_1; public static Func<Instruction, bool> <>9__297_2; public static Func<Instruction, bool> <>9__297_5; public static Func<Instruction, bool> <>9__297_6; public static Func<Instruction, bool> <>9__297_8; public static Func<Instruction, bool> <>9__300_0; public static Func<Instruction, bool> <>9__308_0; public static Func<Instruction, bool> <>9__308_1; public static Func<Instruction, bool> <>9__308_4; public static Func<Instruction, bool> <>9__308_5; public static Func<int, int, CharacterBody, int> <>9__308_7; public static Func<Instruction, bool> <>9__318_0; public static Func<Instruction, bool> <>9__318_1; public static Func<Instruction, bool> <>9__318_4; public static Func<Instruction, bool> <>9__318_5; public static Func<Instruction, bool> <>9__318_6; public static Func<Instruction, bool> <>9__328_0; public static Func<Instruction, bool> <>9__328_1; public static Func<int, HealthComponent, int> <>9__328_2; public static Func<Instruction, bool> <>9__333_0; public static Func<Instruction, bool> <>9__333_1; public static Func<Instruction, bool> <>9__334_0; public static Func<Instruction, bool> <>9__334_2; public static Func<Instruction, bool> <>9__342_0; public static Func<Instruction, bool> <>9__342_1; public static Func<Instruction, bool> <>9__342_3; public static Func<float, int, float> <>9__342_4; public static Func<Instruction, bool> <>9__379_0; public static Func<Instruction, bool> <>9__380_0; public static Func<float, SprintWispBodyBehavior, float> <>9__380_1; public static Func<Instruction, bool> <>9__382_0; public static Func<Vector3, DevilOrb, Vector3> <>9__382_1; public static Func<Instruction, bool> <>9__383_0; public static Func<float, DamageReport, int, float> <>9__383_1; public static Func<Instruction, bool> <>9__383_2; public static Func<float, DamageReport, int, float> <>9__383_3; public static Func<Instruction, bool> <>9__384_0; public static Func<Instruction, bool> <>9__384_1; public static Func<Instruction, bool> <>9__384_2; public static Func<Instruction, bool> <>9__384_3; public static Func<Instruction, bool> <>9__384_4; public static Func<Instruction, bool> <>9__384_5; public static Func<float, int, float> <>9__384_6; public static Func<Instruction, bool> <>9__384_7; public static Func<float, DamageReport, int, float> <>9__384_8; public static Func<Instruction, bool> <>9__385_0; public static Func<Instruction, bool> <>9__385_2; public static Func<float, int, float> <>9__385_3; public static Func<Instruction, bool> <>9__385_4; public static Func<float, int, float> <>9__385_5; public static Func<Instruction, bool> <>9__386_0; public static Func<int, int> <>9__386_2; public static Func<Instruction, bool> <>9__386_3; public static Func<float, int, float> <>9__386_4; public static Func<Instruction, bool> <>9__386_5; public static Func<float, int, float> <>9__386_6; public static Func<Instruction, bool> <>9__395_0; public static Func<Instruction, bool> <>9__395_2; public static Func<Instruction, bool> <>9__395_5; public static Func<float, CharacterBody, float> <>9__395_6; public static Func<Instruction, bool> <>9__395_8; public static Func<Instruction, bool> <>9__395_9; public static Func<float, CharacterBody, float> <>9__395_10; public static Func<Instruction, bool> <>9__396_0; public static Func<Instruction, bool> <>9__396_2; public static Func<Instruction, bool> <>9__396_4; public static Func<Instruction, bool> <>9__396_5; public static Func<Instruction, bool> <>9__396_8; public static Func<float, CharacterBody, float> <>9__396_9; public static Func<Instruction, bool> <>9__397_0; public static Func<Instruction, bool> <>9__397_2; public static Func<Instruction, bool> <>9__397_4; public static Func<Instruction, bool> <>9__397_5; public static Func<Instruction, bool> <>9__397_8; public static Func<float, CharacterBody, float> <>9__397_9; public static Func<GameObject, bool> <>9__400_0; public static Func<GameObject, bool> <>9__400_1; public static Func<Instruction, bool> <>9__420_0; public static Func<Instruction, bool> <>9__420_1; public static Action<CharacterBody, BuffDef, float, float> <>9__420_3; public static Func<Instruction, bool> <>9__421_0; public static Func<Instruction, bool> <>9__421_1; public static Func<Instruction, bool> <>9__421_2; public static Func<float, HealthComponent, float> <>9__421_3; public static Func<Instruction, bool> <>9__446_0; public static Func<Instruction, bool> <>9__446_1; public static Func<Instruction, bool> <>9__447_0; public static Func<Instruction, bool> <>9__447_1; public static Func<Instruction, bool> <>9__465_0; public static Func<Instruction, bool> <>9__465_2; public static Func<float, float> <>9__465_3; public static Func<Instruction, bool> <>9__467_0; public static Func<Instruction, bool> <>9__467_1; public static Func<Instruction, bool> <>9__471_0; public static Func<Instruction, bool> <>9__471_3; public static Func<Instruction, bool> <>9__471_4; public static Func<float, float, float> <>9__471_5; public static Func<Instruction, bool> <>9__475_0; public static Func<Instruction, bool> <>9__475_2; public static Func<Instruction, bool> <>9__475_4; public static Func<float, float, float> <>9__475_5; public static Func<Instruction, bool> <>9__487_0; public static Func<Instruction, bool> <>9__487_2; public static Func<float, int, float> <>9__487_3; public static Func<Instruction, bool> <>9__487_4; public static Func<float, float> <>9__487_5; public static Func<Instruction, bool> <>9__488_0; public static Func<Instruction, bool> <>9__488_2; public static Func<float, int, float> <>9__488_3; public static Func<Instruction, bool> <>9__488_4; public static Func<float, float> <>9__488_5; public static Func<Instruction, bool> <>9__489_0; public static Func<Instruction, bool> <>9__489_2; public static Func<float, int, float> <>9__489_3; public static Func<Instruction, bool> <>9__491_0; public static Func<float, float> <>9__491_1; public static Func<Instruction, bool> <>9__492_0; public static Func<Type, bool> <>9__542_0; internal bool <DirectorCreditGainChanges>b__24_0(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool <DirectorCreditGainChanges>b__24_1(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool <DirectorCreditGainChanges>b__24_2(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool <DirectorCreditGainChanges>b__24_3(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchStloc(x, ref num); } internal bool <DirectorCreditGainChanges>b__24_4(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool <AmbientLevelChanges>b__25_1(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool <AmbientLevelChanges>b__25_2(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool <AmbientLevelChanges>b__25_3(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<Mathf>(x, "Floor"); } internal bool <AmbientLevelChanges>b__25_4(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool <AmbientLevelChanges>b__25_5(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <AmbientLevelChanges>b__25_6(Instruction x) { return ILPatternMatchingExt.MatchLdfld<Run>(x, "stageClearCount"); } internal bool <AmbientLevelChanges>b__25_8(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool <AmbientLevelChanges>b__25_9(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool <AmbientLevelChanges>b__25_10(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool <AmbientLevelChanges>b__25_11(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <AmbientLevelChanges>b__25_12(Instruction x) { return ILPatternMatchingExt.MatchLdfld<Run>(x, "stageClearCount"); } internal bool <AmbientLevelChanges>b__25_13(Instruction x) { return ILPatternMatchingExt.MatchLdsfld<Run>(x, "ambientLevelCap"); } internal float <AmbientLevelChanges>b__25_14(float levelIn) { float ambientLevelBoost = GetAmbientLevelBoost(); return levelIn + ambientLevelBoost; } internal bool <RemoveEclipseStats>b__53_0(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty"); } internal bool <RemoveEclipseStats>b__53_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty"); } internal bool <RemoveEclipseEffect>b__54_0(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty"); } internal bool <EclipseHoldoutScale>b__56_0(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty"); } internal bool <EclipseHoldoutScale>b__56_1(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdcI4(x, ref num); } internal bool <EclipseHoldoutScale>b__56_2(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<HealthComponent>(x, "get_fullHealth"); } internal uint <FixGoldRewards>b__126_0(uint money) { float compensatedDifficultyFraction = GetCompensatedDifficultyFraction(); return (uint)((float)money * compensatedDifficultyFraction * goldRewardMultiplierGlobal); } internal uint <FixExpRewards>b__127_0(uint exp) { float compensatedDifficultyFraction = GetCompensatedDifficultyFraction(); return (uint)((float)exp * compensatedDifficultyFraction * expRewardMultiplierGlobal); } internal bool <SoulShrineLuckBuff>b__194_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "ExtraLifeBuff"); } internal void <SoulShrineLuckBuff>b__194_1(CharacterBody body) { body.AddBuff(Assets.soulShrineLuckBuff); } internal bool <ChangeEliteTierStats>b__202_0(EliteRules rules) { //IL_0011: 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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Invalid comparison between Unknown and I4 //IL_0053: 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_0040: Invalid comparison between Unknown and I4 //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Invalid comparison between Unknown and I4 //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Invalid comparison between Unknown and I4 return (Run.instance.stageClearCount >= Tier2EliteMinimumStageDrizzle && (int)rules == 0 && (int)Run.instance.selectedDifficulty <= 0) || (Run.instance.stageClearCount >= Tier2EliteMinimumStageRainstorm && (int)rules == 0 && (int)Run.instance.selectedDifficulty == 1) || (Run.instance.stageClearCount >= Tier2EliteMinimumStageMonsoon && (int)rules == 0 && (int)Run.instance.selectedDifficulty == 2) || (Run.instance.stageClearCount >= Tier2EliteMinimumStageEclipse && (int)rules == 0 && (int)Run.instance.selectedDifficulty > 2); } internal void <FixJellyNuke>b__207_0(orig_OnEnter orig, ChargeMegaNova self) { orig.Invoke(self); self.duration = ChargeMegaNova.baseDuration; if (((EntityState)self).characterBody.attackSpeed > 1.5f) { self.duration = 2f; } } internal void <FixJellyNuke>b__207_1(orig_OnEnter orig, ChargeState self) { orig.Invoke(self); self.duration = 3f; } internal bool <GummyInheritItems>b__278_0(Instruction x) { return ILPatternMatchingExt.MatchNewobj<DirectorSpawnRequest>(x); } internal bool <CapacitorNerf>b__288_0(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool <CapacitorNerf>b__288_1(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool <CapacitorNerf>b__288_2(Instruction x) { return ILPatternMatchingExt.MatchStfld<GenericDamageOrb>(x, "damageValue"); } internal bool <CapacitorBuff>b__289_0(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdcI4(x, ref num); } internal bool <CapacitorBuff>b__289_1(Instruction x) { return ILPatternMatchingExt.MatchStfld<BlastAttack>(x, "falloffModel"); } internal bool <CapacitorBuff>b__289_2(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool <CapacitorBuff>b__289_3(Instruction x) { return ILPatternMatchingExt.MatchStfld<BlastAttack>(x, "radius"); } internal bool <GlassesNerf>b__292_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "CritGlasses"); } internal bool <GlassesNerf>b__292_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount"); } internal bool <GlassesNerf>b__292_4(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal bool <RemovePauldronAttackSpeed>b__297_0(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterBody", "baseAttackSpeed"); } internal bool <RemovePauldronAttackSpeed>b__297_1(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool <RemovePauldronAttackSpeed>b__297_2(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterBody", "levelAttackSpeed"); } internal bool <RemovePauldronAttackSpeed>b__297_5(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "WarCryBuff"); } internal bool <RemovePauldronAttackSpeed>b__297_6(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "HasBuff"); } internal bool <RemovePauldronAttackSpeed>b__297_8(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 1f); } internal bool <MeteorFix>b__300_0(Instruction x) { return ILPatternMatchingExt.MatchStfld<BlastAttack>(x, "falloffModel"); } internal bool <InfusionBuff>b__308_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Infusion"); } internal bool <InfusionBuff>b__308_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount"); } internal bool <InfusionBuff>b__308_4(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdcI4(x, ref num); } internal bool <InfusionBuff>b__308_5(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal int <InfusionBuff>b__308_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 <PolyluteDamage>b__318_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "ChainLightningVoid"); } internal bool <PolyluteDamage>b__318_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount"); } internal bool <PolyluteDamage>b__318_4(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 0); } internal bool <PolyluteDamage>b__318_5(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBle(x, ref val); } internal bool <PolyluteDamage>b__318_6(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool <FixLostSeersDamageImmunity>b__328_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "CritGlassesVoid"); } internal bool <FixLostSeersDamageImmunity>b__328_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount"); } internal int <FixLostSeersDamageImmunity>b__328_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 <FuelCellStock>b__333_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "EquipmentMagazine"); } internal bool <FuelCellStock>b__333_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount"); } internal bool <FuelCellCdr>b__334_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "EquipmentMagazine"); } internal bool <FuelCellCdr>b__334_2(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool <StickyBombRework>b__342_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "StickyBomb"); } internal bool <StickyBombRework>b__342_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount"); } internal bool <StickyBombRework>b__342_3(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "OnHitProcDamage"); } internal float <StickyBombRework>b__342_4(float damageCoefficient, int itemCount) { return stickyDamageCoeffBase + stickyDamageCoeffStack * (float)(itemCount - 1); } internal bool <NkuhanasBuff>b__379_0(Instruction x) { return ILPatternMatchingExt.MatchStfld<DevilOrb>(x, "damageValue"); } internal bool <NerfDiscipleDamage>b__380_0(Instruction x) { return ILPatternMatchingExt.MatchStfld<DevilOrb>(x, "damageValue"); } internal float <NerfDiscipleDamage>b__380_1(float damageIn, SprintWispBodyBehavior behavior) { return damageIn / (float)((BaseItemBodyBehavior)behavior).stack; } internal bool <BuffDevilOrb>b__382_0(Instruction x) { return ILPatternMatchingExt.MatchStfld<DamageInfo>(x, "force"); } internal Vector3 <BuffDevilOrb>b__382_1(Vector3 forceIn, DevilOrb orb) { //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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) HealthComponent healthComponent = ((Orb)orb).target.healthComponent; float num = 1f; if ((Object)(object)healthComponent.body.characterMotor != (Object)null) { num = healthComponent.body.characterMotor.mass; } else if ((Object)(object)healthComponent.body.rigidbody != (Object)null) { num = healthComponent.body.rigidbody.mass; } EffectType effectType = orb.effectType; EffectType val = effectType; if ((int)val != 0) { if ((int)val == 1) { if (useDiscipleKnockbackSlow) { num *= 15f; healthComponent.body.AddTimedBuffAuthority(Buffs.Slow50.buffIndex, 3f); } else { num *= 0f; } } } else if (useNkuhanaKnockbackSlow) { num *= 25f; healthComponent.body.AddTimedBuffAuthority(Buffs.Slow50.buffIndex, 3f); } else { num *= 0f; } Vector3 val2 = ((Component)((Orb)orb).target).transform.position - orb.attacker.transform.position; return ((Vector3)(ref val2)).normalized * (100f + num); } internal bool <GasChanges>b__383_0(Instruction x) { return ILPatternMatchingExt.MatchStfld<InflictDotInfo>(x, "totalDamage"); } internal float <GasChanges>b__383_1(float currentDamage, DamageReport damageReport, int itemCount) { return (gasBaseBurnDamage + gasStackBurnDamage * (float)itemCount) * damageReport.attackerBody.damage; } internal bool <GasChanges>b__383_2(Instruction x) { return ILPatternMatchingExt.MatchStfld<BlastAttack>(x, "baseDamage"); } internal float <GasChanges>b__383_3(float currentDamage, DamageReport damageReport, int itemCount) { return (gasBaseDamage + gasStackDamage * (float)itemCount) * damageReport.attackerBody.damage; } internal bool <GasChangesOld>b__384_0(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 1.5f); } internal bool <GasChangesOld>b__384_1(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 1.5f); } internal bool <GasChangesOld>b__384_2(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 1); } internal bool <GasChangesOld>b__384_3(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal bool <GasChangesOld>b__384_4(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool <GasChangesOld>b__384_5(Instruction x) { return ILPatternMatchingExt.MatchAdd(x); } internal float <GasChangesOld>b__384_6(float currentDuration, int itemCount) { return gasBaseBurnDamage + gasStackBurnDamage * (float)itemCount; } internal bool <GasChangesOld>b__384_7(Instruction x) { return ILPatternMatchingExt.MatchStfld<BlastAttack>(x, "baseDamage"); } internal float <GasChangesOld>b__384_8(float currentDamage, DamageReport damageReport, int itemCount) { return (gasBaseDamage + gasStackDamage * (float)itemCount) * damageReport.attackerBody.damage; } internal bool <WillOWispChanges>b__385_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "ExplodeOnDeath"); } internal bool <WillOWispChanges>b__385_2(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "OnKillProcDamage"); } internal float <WillOWispChanges>b__385_3(float currentDamage, int itemCount) { return willowispBaseDamage * (1f + willowispScaleFraction * (float)(itemCount - 1)); } internal bool <WillOWispChanges>b__385_4(Instruction x) { return ILPatternMatchingExt.MatchStfld<DelayBlast>(x, "radius"); } internal float <WillOWispChanges>b__385_5(float currentRadius, int itemCount) { return willowispBaseRange + willowispStackRange * (float)itemCount; } internal bool <VoidsentFlameChanges>b__386_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "ExplodeOnDeathVoid"); } internal int <VoidsentFlameChanges>b__386_2(int itemCountIn) { if (itemCountIn > 0 && Util.CheckRoll(voidsentBaseChance + voidsentStackChance * (float)(itemCountIn - 1), 0f, (CharacterMaster)null)) { return itemCountIn; } return 0; } internal bool <VoidsentFlameChanges>b__386_3(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "OnKillProcDamage"); } internal float <VoidsentFlameChanges>b__386_4(float currentDamage, int itemCount) { return voidsentBaseDamage * (1f + voidsentScaleFraction * (float)(itemCount - 1)); } internal bool <VoidsentFlameChanges>b__386_5(Instruction x) { return ILPatternMatchingExt.MatchStfld<DelayBlast>(x, "radius"); } internal float <VoidsentFlameChanges>b__386_6(float currentRadius, int itemCount) { return voidsentBaseRange + voidsentStackRange * (float)itemCount; } internal bool <CooldownBuff>b__395_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "IceRing"); } internal bool <CooldownBuff>b__395_2(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 1); } internal bool <CooldownBuff>b__395_5(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal float <CooldownBuff>b__395_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 <CooldownBuff>b__395_8(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal bool <CooldownBuff>b__395_9(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal float <CooldownBuff>b__395_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 <RunaldNerf>b__396_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "IceRing"); } internal bool <RunaldNerf>b__396_2(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool <RunaldNerf>b__396_4(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal bool <RunaldNerf>b__396_5(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool <RunaldNerf>b__396_8(Instruction x) { MethodReference val = default(MethodReference); return ILPatternMatchingExt.MatchCallOrCallvirt(x, ref val); } internal float <RunaldNerf>b__396_9(float damage, CharacterBody attackerBody) { float num = attackerBody.baseDamage * runaldBaseDamage; return damage + num; } internal bool <KjaroNerf>b__397_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "FireRing"); } internal bool <KjaroNerf>b__397_2(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool <KjaroNerf>b__397_4(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal bool <KjaroNerf>b__397_5(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool <KjaroNerf>b__397_8(Instruction x) { MethodReference val = default(MethodReference); return ILPatternMatchingExt.MatchCallOrCallvirt(x, ref val); } internal float <KjaroNerf>b__397_9(float damage, CharacterBody attackerBody) { float num = attackerBody.baseDamage * kjaroBaseDamage; return damage + num; } internal bool <SceneDirector_Start>b__400_0(GameObject obj) { return ((Object)obj).name == "NewtStatue" || ((Object)obj).name == "NewtStatue (1)" || ((Object)obj).name == "NewtStatue (2)" || ((Object)obj).name == "NewtStatue (3)" || ((Object)obj).name == "NewtStatue (4)"; } internal bool <SceneDirector_Start>b__400_1(GameObject obj) { return ((Object)obj).name == "NewtStatue, Guarantee" || ((Object)obj).name == "NewtStatue, Guaranteed" || ((Object)obj).name == "NewtStatue (Permanent)"; } internal bool <DeathMarkFix_Stacking>b__420_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "DeathMark"); } internal bool <DeathMarkFix_Stacking>b__420_1(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal void <DeathMarkFix_Stacking>b__420_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 <DeathMarkFix_Damage>b__421_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "DeathMark"); } internal bool <DeathMarkFix_Damage>b__421_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "HasBuff"); } internal bool <DeathMarkFix_Damage>b__421_2(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal float <DeathMarkFix_Damage>b__421_3(float damage, HealthComponent hc) { CharacterBody body = hc.body; float num = 1f; int buffCount = body.GetBuffCount(Buffs.DeathMark); num += deathMarkBonusDamage * (float)buffCount; Debug.Log((object)(damage + " " + num)); return num; } internal bool <RevokeShatterspleenBleedRights>b__446_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "BleedOnHitAndExplode"); } internal bool <RevokeShatterspleenBleedRights>b__446_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount"); } internal bool <RevokeShatterspleenDeathRights>b__447_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "BleedOnHitAndExplode"); } internal bool <RevokeShatterspleenDeathRights>b__447_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount"); } internal bool <VoidBearChanges>b__465_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "BearVoid"); } internal bool <VoidBearChanges>b__465_2(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "AddTimedBuff"); } internal float <VoidBearChanges>b__465_3(float inDuration) { float num = 15f; float num2 = 5f; return num2 + inDuration * ((num - num2) / num); } internal bool <TeddyChanges>b__467_0(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "bear"); } internal bool <TeddyChanges>b__467_1(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "ConvertAmplificationPercentageIntoReductionPercentage"); } internal bool <HoofNerf>b__471_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Hoof"); } internal bool <HoofNerf>b__471_3(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal bool <HoofNerf>b__471_4(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal float <HoofNerf>b__471_5(float itemCount, float speedBonus) { float result = 0f; if (itemCount > 0f) { result = hoofSpeedBonusBase + hoofSpeedBonusStack * (itemCount - 1f); } return result; } internal bool <DrinkNerf>b__475_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "SprintBonus"); } internal bool <DrinkNerf>b__475_2(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool <DrinkNerf>b__475_4(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal float <DrinkNerf>b__475_5(float speedBonus, float itemCount) { float result = 0f; if (itemCount > 0f) { result = drinkSpeedBonusBase + drinkSpeedBonusStack * (itemCount - 1f); } return result; } internal bool <MonsterToothHealChange>b__487_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Tooth"); } internal bool <MonsterToothHealChange>b__487_2(Instruction x) { return ILPatternMatchingExt.MatchStfld<HealthPickup>(x, "flatHealing"); } internal float <MonsterToothHealChange>b__487_3(float currentHealAmt, int itemCount) { return monsterToothFlatHeal * (float)itemCount; } internal bool <MonsterToothHealChange>b__487_4(Instruction x) { return ILPatternMatchingExt.MatchStfld<HealthPickup>(x, "fractionalHealing"); } internal float <MonsterToothHealChange>b__487_5(float currentHealAmt) { return monsterToothPercentHeal; } internal bool <MedkitHealChange>b__488_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Medkit"); } internal bool <MedkitHealChange>b__488_2(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchStloc(x, ref num); } internal float <MedkitHealChange>b__488_3(float currentHealAmt, int itemCount) { return medkitFlatHeal * (float)itemCount; } internal bool <MedkitHealChange>b__488_4(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchStloc(x, ref num); } internal float <MedkitHealChange>b__488_5(float currentHealAmt) { return medkitPercentHeal; } internal bool <ScytheNerf>b__489_0(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "HealOnCrit"); } internal bool <ScytheNerf>b__489_2(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt<HealthComponent>(x, "Heal"); } internal float <ScytheNerf>b__489_3(float currentHealAmt, int itemCount) { return scytheBaseHeal + scytheStackHeal * (float)itemCount; } internal bool <ReduceBungusInterval>b__491_0(Instruction x) { return ILPatternMatchingExt.MatchStfld<HealingWard>(x, "interval"); } internal float <ReduceBungusInterval>b__491_1(float interval) { return fungusHealInterval; } internal bool <ReduceBungusWaitTime>b__492_0(Instruction x) { return ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "notMovingStopwatch"); } internal bool <InitializeCoreModules>b__542_0(Type type) { return !type.IsAbstract && type.IsSubclassOf(typeof(CoreModule)); } } public static float drizzleDifficultyBoost = 0f; public static float rainstormDifficultyBoost = 3f; public static float monsoonDifficultyBoost = 6f; public static float eclipseDifficultyBoost = 9f; public static float baseScalingMultiplier = 1.1f; 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 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 bool useAmbientLevel = false; public static DifficultyIndex eclipseLevelBossShield = (DifficultyIndex)3; public static float eclipseBossShieldFraction = 0.1f; public static string eclipseOneDesc = "\n<mspace=0.5em>(1)</mspace> Boss Shields: <style=cIsHealth>+" + Tools.ConvertDecimal(eclipseBossShieldFraction) + "</style>"; public static DifficultyIndex eclipseLevelHoldoutLoss = (DifficultyIndex)4; public static float eclipseHoldoutLossRate = 0.03f; public static string eclipseTwoDesc = "\n<mspace=0.5em>(2)</mspace> Holdout Zone Discharge: <style=cIsHealth>-" + Tools.ConvertDecimal(eclipseHoldoutLossRate) + " per second</style>"; public static DifficultyIndex eclipseLevelEnemyCdr = (DifficultyIndex)5; public static float eclipseEnemyCdr = 0.5f; public static string eclipseThreeDesc = "\n<mspace=0.5em>(3)</mspace> Enemy Cooldowns: <style=cIsHealth>-" + Tools.ConvertDecimal(eclipseEnemyCdr) + "</style>"; public static DifficultyIndex eclipseLevelSmallHoldout = (DifficultyIndex)6; public static float eclipseHoldoutScale = 0.7f; public static string eclipseFourDesc = "\n<mspace=0.5em>(4)</mspace> Holdout Zone Radius: <style=cIsHealth>-" + Tools.ConvertDecimal(1f - eclipseHoldoutScale) + "</style>"; public static DifficultyIndex eclipseLevelEnemyMspd = (DifficultyIndex)7; public static float eclipseEnemyMspd = 0.25f; public static string eclipseFiveDesc = "\n<mspace=0.5em>(5)</mspace> Enemy Speed: <style=cIsHealth>+" + Tools.ConvertDecimal(eclipseEnemyMspd) + "</style>"; public static DifficultyIndex eclipseLevelSpiteArtifact = (DifficultyIndex)8; public static string eclipseSixDesc = "\n<mspace=0.5em>(6)</mspace> On Kill: <style=cIsHealth>Enemies drop exploding bombs</style>"; public static DifficultyIndex eclipseLevelVeryHard = (DifficultyIndex)9; public static string eclipseSevenDesc = "\n<mspace=0.5em>(7)</mspace> Difficulty: <style=cIsHealth>Very Hard</style>"; public static DifficultyIndex eclipseLevelPlayerDegen = (DifficultyIndex)10; public static float eclipsePlayerDegen = 0.2f; public static string eclipseEightDesc = "\n<mspace=0.5em>(8)</mspace> Health Degeneration: <style=cIsHealth>-" + Tools.ConvertDecimal(eclipsePlayerDegen) + " per level</style>"; public static float voidFieldsTimeCost = 120f; public static float fastDirectorEliteBias = 0.75f; public static float fastDirectorCreditMultiplier = 0.75f; public static float slowDirectorEliteBias = 1f; public static float slowDirectorCreditMultiplier = 1.5f; public static float teleLesserEliteBias = 1f; public static float teleLesserCreditMultiplier = 1f; public static float teleBossEliteBias = 1f; public static float teleBossCreditMultiplier = 1f; private static bool wasTpCharged = false; private GameObject awu = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/SuperRoboBallBossBody"); private CharacterBody awuBody; private float awuArmor = 40f; private float awuAdditionalArmor = 0f; private int awuAdaptiveArmorCount = 1; private static float costExponent = 1f; private static float goldRewardMultiplierGlobal = 0.6f; private static float expRewardMultiplierGlobal = 1f; private static float compensationForStartingLevel = 0f; public float interactableCreditsMultiplier = 1.5f; public float monsterCreditsMultiplier = 1.5f; private PurchaseInteraction smallChest = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Chest1/Chest1.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>(); private PurchaseInteraction smallCategoryChestDamage = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/CategoryChest/CategoryChestDamage.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>(); private PurchaseInteraction smallCategoryChestHealing = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/CategoryChest/CategoryChestHealing.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>(); private PurchaseInteraction smallCategoryChestUtility = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/CategoryChest/CategoryChestUtility.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>(); private PurchaseInteraction bigChest = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Chest2/Chest2.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>(); private PurchaseInteraction bigCategoryChestDamage = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/CategoryChest2/CategoryChest2Damage Variant.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>(); private PurchaseInteraction bigCategoryChestHealing = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/CategoryChest2/CategoryChest2Healing Variant.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>(); private PurchaseInteraction bigCategoryChestUtility = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/CategoryChest2/CategoryChest2Utility Variant.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>(); private PurchaseInteraction casinoChest = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/CasinoChest/CasinoChest.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>(); private PurchaseInteraction chanceShrine = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineChance/ShrineChance.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>(); private PurchaseInteraction chanceShrineSnowy = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineChance/ShrineChanceSnowy Variant.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>(); private PurchaseInteraction chanceShrineSandy = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineChance/ShrineChanceSandy Variant.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>(); private MultiShopController smallShop = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/TripleShop/TripleShop.prefab").WaitForCompletion().GetComponent<MultiShopController>(); private MultiShopController bigShop = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/TripleShopLarge/TripleShopLarge.prefab").WaitForCompletion().GetComponent<MultiShopController>(); private MultiShopController equipmentShop = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/TripleShopEquipment/TripleShopEquipment.prefab").WaitForCompletion().GetComponent<MultiShopController>(); private string discountChestPrefix = "Bargain"; private int smallChestTypeCost = 20; private int smallShopTypeCost = 35; private int smallCategoryChestTypeCost = 25; private int bigChestTypeCost = 45; private int bigShopTypeCost = 70; private int bigCategoryChestTypeCost = 50; private int goldChestTypeCost = 200; private int bigDroneTypeCost = 160; private int casinoChestTypeCost = 30; private int chanceShrineTypeCost = 15; private GameObject goldShrine = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineGoldshoresAccess/ShrineGoldshoresAccess.prefab").WaitForCompletion(); private int goldShrineCost = 5; private static int teamMaxHealth; private static int totalBloodGoldValue = 60; private const float totalHealthFraction = 2.18f; private static float chestsPerHealthBar = 2f; public int equipBarrelWeightS1 = 20; public int equipBarrelLimitS1 = 5; public int equipBarrelWeight = 6; public int equipBarrelLimit = 2; public int equipShopWeightS3 = 20; public int equipShopLimitS3 = 4; public int equipShopWeight = 4; public int equipShopLimit = 2; public int scrapperWeight = 1000; public int scrapperLimit = 3; public int doubleChestWeight = 15; public static GameObject whitePrinter = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/chest/Duplicator"); public static GameObject greenPrinter = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/chest/DuplicatorLarge"); public static GameObject redPrinter = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/chest/DuplicatorMilitary"); public static GameObject scrapper = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/chest/Scrapper"); public int printerGreenWeight = 20; public int printerGreenLimit = 4; public int printerRedWeight = 4; public int printerRedLimit = 1; public int printerRedWeightS5 = 1000; public int printerRedLimitS5 = 2; public int lunarPodWeightS1 = 20; public int lunarPodLimitS1 = 6; public int lunarPodWeight = 6; public int lunarPodLimit = 2; private BasicPickupDropTable doubleChestDropTable = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/CasinoChest/dtCasinoChest.asset").WaitForCompletion(); private InteractableSpawnCard doubleChestSpawnCard = Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"RoR2/Base/CasinoChest/iscCasinoChest.asset").WaitForCompletion(); public DirectorCard doubleChestDirectorCard; public static int halcyoniteShrineLowGoldCost = 40; public static int halcyoniteShrineMidGoldCost = 100; public static int halcyoniteShrineMaxGoldCost = 150; public static float halcyoniteShrineRadius = 30f; public static int soulShrineLuckIncrease = 1; private GameObject soulShrine = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/ShrineColossusAccess.prefab").WaitForCompletion(); public static int Tier2EliteMinimumStageDefault = 5; public static int Tier2EliteMinimumStageDrizzle = 10; public static int Tier2EliteMinimumStageRainstorm = 5; public static int Tier2EliteMinimumStageMonsoon = 3; public static int Tier2EliteMinimumStageEclipse = 3; private static string Tier2EliteName = "Tier 2"; private float genesisLoopBlastDamageCoefficient = 30f; private float vagrantBaseHealth = 1600f; private GameObject vagrantPrefab; private GameObject pestPrefab; private GameObject pestSpit; private float pestBaseHealth = 50f; private float pestBaseDamage = 6f; private float pestBaseSpeed = 4f; private float pestSpitVelocity = 70f; private GameObject queenSpitPrefab; private GameObject queenAcidPrefab; private float spitDamageCoefficient = 0.4f; private float acidSize = 2f; private float acidDamageCoefficient = 2.5f; private float acidDamageFrequency = 4f; private CharacterSpawnCard gupSpawnCard; private int gupCreditCost = 200; private GameObject gupPrefab; private float gupBaseHealth = 800f; private float gupBaseArmor = 25f; private float gupBaseDamage = 12f; private float gupBaseSpeed = 14f; private float gupBaseRegen = 0f; private GameObject geepPrefab; private float geepBaseHealth = 400f; private float geepBaseArmor = 25f; private float geepBaseDamage = 8f; private float geepBaseSpeed = 10f; private float geepBaseRegen = 0f; private GameObject gipPrefab; private float gipBaseHealth = 200f; private float gipBaseArmor = 25f; private float gipBaseDamage = 5f; private float gipBaseSpeed = 6f; private float gipBaseRegen = 0f; private int nulliferBombCount = 10; private GameObject barnaclePrefab; private float fuckRegen = 0f; private GameObject lesserWispPrefab; private float wispBaseDamage = 1.5f; private GameObject xiMaster = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/MajorAndMinorConstruct/MegaConstructMaster.prefab").WaitForCompletion(); private AISkillDriver[] xiAI; public static EquipmentDef[] scavBlacklistedEquips = (EquipmentDef[])(object)new EquipmentDef[3] { Equipment.PassiveHealing, Equipment.Fruit, Equipment.LifestealOnHit }; public float crunderFunnyMoneyProcChance = 10f; public Func<ItemIndex, bool> gooboItemCopyFilter = Inventory.defaultItemCopyFilterDelegate.Invoke; private float gummyLifetime = 30f; private int gummyDamage = 0; private float gummyDamageMultiplier = 0.7f; private int gummyHealth = 20; private float gummyHealthMultiplier = 1f; public int blastShowerBuffCount = 3; public static float capacitorDamageCoefficient = 10f; public static float capacitorBlastRadius = 13f; public static float capacitorCooldown = 20f; private float glassesNewCritChance = 10f; private float pauldronDamageMultiplier = 1f; private float pauldronAspdMultiplier = 0.5f; private FalloffModel falloffModel = (FalloffModel)0; private float justiceMinDamageCoeff = 8f; public static float newInfusionBaseHealth = 40f; public float wungusRegenBase = 1.5f; public float wungusRegenStack = 1.5f; public float luteDamageCoefficient = 0.4f; private GameObject shurikenProjectilePrefab; public float shurikenBaseDamage = 0.8f; public float shurikenProcCoefficient = 2f; public float daisyRadiusMultiplier = 1.15f; public const float fuelCellCooldownMultiplier = 0.67f; public static string fuelCellEquipCdr = Tools.ConvertDecimal(0.32999998f); public static int fuelCellStock = 2; public const float chaosCooldownMultiplier = 0.67f; public static string chaosEquipCdr = Tools.ConvertDecimal(0.32999998f); public static float stickyDamageCoeffBase = 3.2f; public static float stickyDamageCoeffStack = 0.4f; private float resdiscSpinPerKill = 0.015f; private float resdiscDecayRate = 2f; private GameObject daggerPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/DaggerProjectile"); private GameObject willowispPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/WilloWispDelay"); private GameObject voidsentPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/ExplodeOnDeathVoid/ExplodeOnDeathVoidExplosion.prefab").WaitForCompletion(); private GameObject spleenPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/BleedOnHitAndExplodeDelay"); private GameObject fireworkProjectilePrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/projectiles/FireworkProjectile"); private GameObject resdiscProjectilePrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/projectiles/LaserTurbineBomb"); private GameObject meatballProjectilePrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/FireMeatBall"); private static float willowispProcCoeff = 0.75f; private static float willowispBaseDamage = 3.6f; private static float willowispScaleFraction = 0.75f; private static float willowispBaseRange = 16f; private static float willowispStackRange = 0f; private static float voidsentProcCoeff = 1f; private static float voidsentBaseDamage = 5.6f; private static float voidsentScaleFraction = 0.75f; private static float voidsentBaseRange = 24f; private static float voidsentStackRange = 0f; private static float voidsentBaseChance = 33f; private static float voidsentStackChance = 0f; private static float gasBaseBurnDamage = 0.5f; private static float gasStackBurnDamage = 2f; private static float gasBaseDamage = 0.5f; private static float gasStackDamage = 0f; private float discipleDevilorbProc = 0.4f; private float opinionDevilorbProc = 0.75f; public static bool useNkuhanaKnockbackSlow = false; public static bool useDiscipleKnockbackSlow = false; private float nkuhanaNewDamageMultiplier = 3.5f; private static float runaldBaseDamage = 6f; private static float runaldTotalDamage = 1f; private static float kjaroBaseDamage = 6f; private static float kjaroTotalDamage = 1f; private static string runaldTotal = Tools.ConvertDecimal(runaldTotalDamage); private static string kjaroTotal = Tools.ConvertDecimal(kjaroTotalDamage); public static float newtAltarChance = 0.3f; public static float deathMarkBonusDamage = 0.3f; private float elephantBuffDuration = 10f; private int elephantArmor = 200; private GameObject templarPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/ClayBruiserBody"); private GameObject chimeraWispPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LunarWispBody"); public static float tarSlowAspdReduction = 0.3f; public static float kitSlowAspdReduction = 0.3f; public static float chronoSlowAspdReduction = 0.5f; public static float chillSlowAspdReduction = 0.6f; private float critHudDamageMul = 1f; private GameObject healPack = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/HealPack"); private float toothDuration = 15f; private GameObject ammoPack = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/AmmoPack"); private GameObject moneyPack = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/BonusMoneyPack"); 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 static float shockForceExitFraction = 0.1f; public static int rapFreeArmor = 2; public static int knurlFreeArmor = 15; public static int bucklerFreeArmor = 10; public static float voidBearNewMaxCooldown = 15f; public static float voidBearNewMinCooldown = 5f; public static float teddyNewMaxValue = 0.5f; public static float hoofSpeedBonusBase = 0.1f; public static float hoofSpeedBonusStack = 0.1f; public static float drinkSpeedBonusBase = 0.2f; public static float drinkSpeedBonusStack = 0.15f; public static float scytheBaseHeal = 0f; public static float scytheStackHeal = 5f; public static float monsterToothFlatHeal = 10f; public static float monsterToothPercentHeal = 0f; public static float medkitFlatHeal = 40f; public static float medkitPercentHeal = 0f; public static float notMovingRequirement = 0.1f; public static float fungusHealInterval = 0.125f; public const string guid = "com.RiskOfBrainrot.RiskierRain"; public const string teamName = "RiskOfBrainrot"; public const string modName = "RiskierRain"; public const string version = "1.0.18"; 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.<style=cStack>\n\n>Player Health Regeneration: <style=cIsHealing>+50%</style> \n>Difficulty Scaling: <style=cIsHealing>-50%</style> \n>Player Damage Reduction: <style=cIsHealing>+38%</style>"; public static string rainstormDesc = "This is the way the game is meant to be played! Test your abilities and skills against formidable foes.<style=cStack>\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.<style=cStack>\n\n>Player Health Regeneration: <style=cIsHealth>-40%</style> \n>Difficulty Scaling: <style=cIsHealth>+50%</style>"; private 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<bool> EnableConfig { get; set; } private void DifficultyDependentTeleParticles() { //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Expected O, but got Unknown drizzleDesc = drizzleDesc + "\n>Teleporter Visuals: <style=cIsHealing>+" + Tools.ConvertDecimal(easyTeleParticleRadius / normalTeleParticleRadius - 1f) + "</style> "; rainstormDesc = rainstormDesc + "\n>Teleporter Visuals: +" + Tools.ConvertDecimal(normalTeleParticleRadius / normalTeleParticleRadius - 1f) + " "; monsoonDesc = monsoonDesc + "\n>Teleporter Visuals: <style=cIsHealth>" + Tools.ConvertDecimal(1f - hardTeleParticleRadius / normalTeleParticleRadius) + "</style> "; BaseTeleporterState.OnEnter += new hook_OnEnter(TeleporterParticleScale); } private void TeleporterParticleScale(orig_OnEnter orig, BaseTeleporterState self) { //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) //IL_001b: 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_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected I4, but got Unknown //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Invalid comparison between Unknown and I4 //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); float num = 1f; DifficultyIndex selectedDifficulty = Run.instance.selectedDifficulty; DifficultyIndex val = selectedDifficulty; switch (val - -1) { default: if ((int)val != 11) { num = eclipseTeleParticleRadius; } break; case 3: num = hardTeleParticleRadius; break; case 2: num = normalTeleParticleRadius; break; case 1: num = easyTeleParticleRadius; break; case 0: break; } TeleporterInteraction component = ((EntityState)self).GetComponent<TeleporterInteraction>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.modelChildLocator)) { Transform val2 = ((Component)component).transform.Find("TeleporterBaseMesh/BuiltInEffects/PassiveParticle, Sphere"); if (Object.op_Implicit((Object)(object)val2)) { val2.localScale = Vector3.one * defaultTeleParticleRadius * num; } } } internal static float GetAmbientLevelBoost() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: 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_0027: 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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected I4, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Invalid comparison between Unknown and I4 //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) float result = 0f; if (!useAmbientLevel) { return result; } DifficultyIndex selectedDifficulty = Run.instance.selectedDifficulty; DifficultyIndex val = selectedDifficulty; DifficultyIndex val2 = val; switch (val2 - -1) { default: if ((int)val2 != 11) { result = ((selectedDifficulty < eclipseLevelVeryHard) ? monsoonDifficultyBoost : eclipseDifficultyBoost); } break; case 3: result = monsoonDifficultyBoost; break; case 2: result = rainstormDifficultyBoost; break; case 1: result = drizzleDifficultyBoost; break; case 0: break; } return result; } private void AmbientLevelDifficulty() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown useAmbientLevel = true; Run.ambientLevelCap = ambientLevelCap; Run.RecalculateDifficultyCoefficentInternal += new hook_RecalculateDifficultyCoefficentInternal(DifficultyCoefficientChanges); DirectorMoneyWave.Update += new Manipulator(DirectorCreditGainChanges); } private 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<Instruction, bool>[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<Instruction, bool>[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<Instruction, bool>[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); } private 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<Instruction, bool>[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref timeLoc), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num5), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Mathf>(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<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num4), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<Run>(x, "stageClearCount") }); val.Remove(); val.Emit(OpCodes.Ldc_R4, difficultyIncreasePerStage); float num3 = default(float); val.GotoNext((MoveType)2, new Func<Instruction, bool>[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<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld<Run>(x, "stageClearCount") }); val.Remove(); val.Emit(OpCodes.Ldc_R4, difficultyIncreasePerStage); val.GotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld<Run>(x, "ambientLevelCap") }); val.EmitDelegate<Func<float, float>>((Func<float, float>)delegate(float levelIn) { float ambientLevelBoost = GetAmbientLevelBoost(); return levelIn + ambientLevelBoost; }); } private void DifficultyCoefficientChanges(orig_RecalculateDifficultyCoefficentInternal orig, Run self) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) DifficultyDef difficultyDef = DifficultyCatalog.GetDifficultyDef(self.selectedDifficulty); float num = difficultyDef.scalingValue; if (self.selectedDifficulty >= eclipseLevelVeryHard) { num += 1f; } float num2 = self.GetRunStopwatch() * (1f / 60f); float num3 = 0.0506f * baseScalingMultiplier; float num4 = GetTimeDifficultyFactor(num2, num); float num5 = GetStageDifficultyFactor(self.stageClearCount); float num6 = 1f + playerBaseDifficultyFactor * (float)(self.participatingPlayerCount - 1); float num7 = Mathf.Pow((float)self.participatingPlayerCount, playerScalingDifficultyFactor); float num8 = num3 * num * num7; float num9 = (num6 + num8 * num2) * num4 * num5; self.difficultyCoefficient = num9; self.compensatedDifficultyCoefficient = num9; self.oneOverCompensatedDifficultyCoefficientSquared = 1f / (self.compensatedDifficultyCoefficient * self.compensatedDifficultyCoefficient); self.ambientLevel = Mathf.Min(1f + GetAmbientLevelBoost() + 3f * (num9 - num6), (float)Run.ambientLevelCap); int ambientLevelFloor = self.ambientLevelFloor; self.ambientLevelFloor = Mathf.FloorToInt(self.ambientLevel); if (ambientLevelFloor != self.ambientLevelFloor && ambientLevelFloor != 0 && self.ambientLevelFloor > ambientLevelFloor) { self.OnAmbientLevelUp(); } float GetStageDifficultyFactor(int stageClearCount) { float num10 = Mathf.Pow(difficultyIncreasePerStage, (float)stageClearCount); int num11 = Mathf.FloorToInt((float)self.stageClearCount / 5f); if (self.stageClearCount % 5 <= 1 && Object.op_Implicit((Object)(object)Stage.instance) && SceneCatalog.GetSceneDefForCurrentScene().isFinalStage) { num11--; } float num12 = Mathf.Pow(difficultyIncreasePerLoop, (float)num11); return num10 * num12; } static float GetTimeDifficultyFactor(float timeInMinutes, float scalingValue) { return Mathf.Pow(difficultyIncreasePerMinuteBase + difficultyIncreasePerMinutePerDifficulty * scalingValue, timeInMinutes); } } private void MonsoonStatBoost() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown monsoonDesc += "\n>Enemies gain <style=cIsHealth>unique scaling</style></style>"; RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(MonsoonPlusStatBuffs2); } private 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; if (sender.baseNameToken != "JELLYFISH_BODY_NAME") { args.attackSpeedMultAdd += Mathf.Clamp01(num / 200f) * 9f; } if (sender.isChampion) { args.armorAdd += 3f * num; } else { args.moveSpeedMultAdd += Mathf.Clamp01(num / 200f) * 3f; } } } private void EclipseChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown CharacterMaster.OnBodyStart += new Manipulator(RemoveEclipseEffect); GlobalEventManager.OnCharacterHitGroundServer += new Manipulator(RemoveEclipseEffect); HealthComponent.Heal += new Manipulator(RemoveEclipseEffect); DeathRewards.OnKilledServer += new Manipulator(RemoveEclipseEffect); HealthComponent.TakeDamageProcess += new Manipulator(RemoveEclipseEffect); CharacterBody.RecalculateStats += new Manipulator(RemoveEclipseStats); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(EclipseStatBuffs); CharacterBody.RecalculateStats += new hook_RecalculateStats(EclipseCdr); RunArtifactManager.SetArtifactEnabled += new hook_SetArtifactEnabled(EclipseSpiteArtifact); HoldoutZoneController.DoUpdate += new Manipulator(EclipseHoldoutScale); HoldoutZoneController.Start += new hook_Start(EclipseHoldoutDischarge); string text = "\"You only celebrate in the light... because I allow it.\" \n\n"; string text2 = "Starts at baseline Monsoon difficulty.<style=cSub>\n"; string text3 = "</style>"; 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 void EclipseCdr(orig_RecalculateStats orig, CharacterBody self) { //IL_000e: 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_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Invalid comparison between Unknown and I4 //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); DifficultyIndex selectedDifficulty = Run.instance.selectedDifficulty; if ((int)self.teamComponent.teamIndex != 1 && selectedDifficulty >= eclipseLevelEnemyCdr) { float cooldownScale = 1f - eclipseEnemyCdr; SkillLocator skillLocator = self.skillLocator; if ((Object)(object)skillLocator != (Object)null) { StatHooks.ApplyCooldownScale(skillLocator.primary, cooldownScale); StatHooks.ApplyCooldownScale(skillLocator.secondary, cooldownScale); StatHooks.ApplyCooldownScale(skillLocator.utility, cooldownScale); StatHooks.ApplyCooldownScale(skillLocator.special, cooldownScale); } } } private 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_0039: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.GotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty") }); val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldc_I4, -1); val.GotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty") }); val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldc_I4, -1); } private void RemoveEclipseEffect(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0039: 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) ILCursor val = new ILCursor(il); val.GotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty") }); val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldc_I4, -1); } private 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) if (Run.instance.selectedDifficulty >= eclipseLevelHoldoutLoss) { self.dischargeRate = Mathf.Max(self.dischargeRate, eclipseHoldoutLossRate); } orig.Invoke(self); } private 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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected I4, but got Unknown ILCursor val = new ILCursor(il); int num = 3; int num2 = default(int); val.GotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num2) }); int index = val.Index; val.Index = index - 1; val.Remove(); val.Emit(OpCodes.Ldc_I4, (int)eclipseLevelSmallHoldout); } private void EclipseSpiteArtifact(orig_SetArtifactEnabled orig, RunArtifactManager self, ArtifactDef artifactDef, bool newEnabled) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) 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); } private void EclipseStatBuffs(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_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Invalid comparison between Unknown and I4 //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Invalid comparison between Unknown and I4 //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_0062: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) DifficultyIndex selectedDifficulty = Run.instance.selectedDifficulty; if ((int)sender.teamComponent.teamIndex != 1) { if (selectedDifficulty < eclipseLevelBossShield) { return; } if (sender.isBoss) { args.baseShieldAdd += sender.maxHealth * eclipseBossShieldFraction; } if (selectedDifficulty < eclipseLevelEnemyCdr || selectedDifficulty < eclipseLevelEnemyMspd) { return; } args.moveSpeedMultAdd += eclipseEnemyMspd; } if ((int)sender.teamComponent.teamIndex == 1 && selectedDifficulty >= eclipseLevelPlayerDegen) { args.baseRegenAdd -= (sender.baseRegen + sender.levelRegen * sender.level) * (eclipsePlayerDegen * sender.level); } } private 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<SceneDef>((object)"RoR2/Base/arena/arena.asset").WaitForCompletion(); val.sceneType = (SceneType)2; } private 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); } private void AddVoidFieldsTimeCost(orig_OnExit orig, WardOnAndReady self) { orig.Invoke(self); Run.instance.SetRunStopwatch(Run.instance.GetRunStopwatch() + voidFieldsTimeCost); } private 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_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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/Director.prefab").WaitForCompletion(); CombatDirector[] components = val.GetComponents<CombatDirector>(); 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; } } GameObject val4 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/Director.prefab").WaitForCompletion(); GameObject val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/Director.prefab").WaitForCompletion(); AdjustTeleporterDirectors(val4.GetComponents<CombatDirector>()); AdjustTeleporterDirectors(val5.GetComponents<CombatDirector>()); static void AdjustTeleporterDirectors(CombatDirector[] directors) { if (directors != null && directors.Length != 0) { foreach (CombatDirector val6 in directors) { if (val6.customName == "Boss") { val6.eliteBias = teleBossEliteBias; val6.creditMultiplier = teleBossCreditMultiplier; } if (val6.customName == "Monsters") { val6.eliteBias = teleLesserEliteBias; val6.creditMultiplier = teleLesserCreditMultiplier; } } } } } public void AddTpBossWeaken() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown ChargingState.FixedUpdate += new hook_FixedUpdate(WeakenBossPostTpCharge); } private void WeakenBossPostTpCharge(orig_FixedUpdate orig, ChargingState baseState) { //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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(baseState); if (!NetworkServer.active) { return; } if (((BaseTeleporterState)baseState).teleporterInteraction.holdoutZoneController.charge >= 1f) { if (wasTpCharged) { return; } wasTpCharged = true; if (((BaseTeleporterState)baseState).teleporterInteraction.monstersCleared) { 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); } } } else { wasTpCharged = false; } } private void FixMoneyScaling() { ChestRebalance(); ChestCostScaling(); EnemyRewards(); } private void ChestCostScaling() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) Run.GetDifficultyScaledCost_int_float += new hook_GetDifficultyScaledCost_int_float(ChangeScaledCost); awuBody = awu.GetComponent<CharacterBody>(); 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<GivePickupsOnStart>(); if (Object.op_Implicit((Object)(object)val)) { ItemInfo val2 = default(ItemInfo); val2.count = awuAdaptiveArmorCount; val2.itemString = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/AdaptiveArmor/AdaptiveArmor.asset").WaitForCompletion().nameToken; val.itemInfos = (ItemInfo[])(object)new ItemInfo[1] { val2 }; } } private void GoldShrineRework() { //IL_0046: 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<PurchaseInteraction>(); if ((Object)(object)component == (Object)null) { Debug.Log((object)"goldshrine purchase thing null bwuh"); return; } component.costType = (CostTypeIndex)3; component.cost = goldShrineCost; } private void BloodShrineRewardRework() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown ShrineBloodBehavior.Start += new hook_Start(ShrineBloodBehavior_Start); } private void ShrineBloodBehavior_Start(orig_Start orig, ShrineBloodBehavior self) { orig.Invoke(self); if (NetworkServer.active) { ((MonoBehaviour)this).StartCoroutine(WaitForPlayerBody(self)); } } private 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 void EnemyRewards() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown ILHook val = new ILHook((MethodBase)typeof(DeathRewards).GetMethod("set_goldReward", (BindingFlags)(-1)), new Manipulator(FixGoldRewards)); ILHook val2 = new ILHook((MethodBase)typeof(DeathRewards).GetMethod("set_expReward", (BindingFlags)(-1)), new Manipulator(FixExpRewards)); } private static float GetCompensatedDifficultyFraction() { float num = Stage.instance.entryDifficultyCoefficient; if (num <= 0f) { return 1f; } if (compensationForStartingLevel > 0f) { num = Mathf.Lerp(num, num - GetAmbientLevelBoost(), compensationForStartingLevel); } return num / Run.instance.compensatedDifficultyCoefficient; } private static void FixGoldRewards(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: 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) ILCursor val = new ILCursor(il); val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<uint, uint>>((Func<uint, uint>)delegate(uint money) { float compensatedDifficultyFraction = GetCompensatedDifficultyFraction(); return (uint)((float)money * compensatedDifficultyFraction * goldRewardMultiplierGlobal); }); val.Emit(OpCodes.Starg, 1); } private static void FixExpRewards(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: 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) ILCursor val = new ILCursor(il); val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Func<uint, uint>>((Func<uint, uint>)delegate(uint exp) { float compensatedDifficultyFraction = GetCompensatedDifficultyFraction(); return (uint)((float)exp * compensatedDifficultyFraction * expRewardMultiplierGlobal); }); val.Emit(OpCodes.Starg, 1); } private int ChangeScaledCost(orig_GetDifficultyScaledCost_int_float orig, Run self, int baseCost, float difficultyCoefficient) { switch (baseCost / 25) { case 16: baseCost = goldChestTypeCost; break; case 14: baseCost = bigDroneTypeCost; 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 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)casinoChest != (Object)null) { casinoChest.cost = casinoChestTypeCost; LanguageAPI.Add("CASINOCHEST_NAME", "Double Chest"); LanguageAPI.Add("CASINOCHEST_CONTEXT", "Open double chest"); LanguageAPI.Add("CASINOCHEST_DESCRIPTION", "Costs gold to activate and will display a Common item for a short time. Purchase again to buy two copies, or wait for it to turn to scrap."); } if ((Object)(object)chanceShrine != (Object)null) { chanceShrine.cost = chanceShrineTypeCost; chanceShrineSandy.cost = chanceShrineTypeCost; chanceShrineSnowy.cost = chanceShrineTypeCost; } } public void IncreaseStageInteractableCredits(StageSettings settings, StageInfo currentStage) { settings.SceneDirectorInteractableCredits = (int)((float)settings.SceneDirectorInteractableCredits * interactableCreditsMultiplier); } public void IncreaseStageMonsterCredits(StageSettings settings, StageInfo currentStage) { settings.SceneDirectorMonsterCredits = (int)((float)settings.SceneDirectorMonsterCredits * monsterCreditsMultiplier); } 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<PoolEntry>)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<DirectorCard> list = poolEntry.dccs.categories[i].cards.ToList(); foreach (DirectorCard item in list) { SpawnCard spawnCard = item.spawnCard; if (((Object)spawnCard).name.ToLower
SwanSongExtended.dll
Decompiled 2 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; 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 System.Text.RegularExpressions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using BetterSoulCost; using BossDropRework; using EntityStates; using EntityStates.AI.Walker; using EntityStates.Bandit2; using EntityStates.BrotherMonster.Weapon; using EntityStates.Captain.Weapon; using EntityStates.CaptainSupplyDrop; using EntityStates.Engi.EngiMissilePainter; using EntityStates.GrandParent; using EntityStates.Mage.Weapon; using EntityStates.Missions.BrotherEncounter; using EntityStates.MoonElevator; using EntityStates.NullifierMonster; using EntityStates.TeleporterHealNovaController; using HG; using HG.BlendableTypes; using HarmonyLib; using IL.RoR2; using IL.RoR2.Items; using IL.RoR2.Orbs; using KinematicCharacterController; using MissileRework; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using MonoMod.RuntimeDetour; using MoreStats; using On.EntityStates.Captain.Weapon; using On.EntityStates.Engi.EngiMissilePainter; using On.EntityStates.Mage.Weapon; using On.EntityStates.Missions.BrotherEncounter; using On.EntityStates.TeleporterHealNovaController; using On.RoR2; using On.RoR2.Items; using On.RoR2.Orbs; using R2API; using R2API.Utils; using RainrotSharedUtils; using RainrotSharedUtils.Components; using RainrotSharedUtils.Frost; using RainrotSharedUtils.Shelters; using RoR2; using RoR2.Achievements; using RoR2.Artifacts; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.EntitlementManagement; using RoR2.ExpansionManagement; using RoR2.Hologram; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using SwanSongExtended.Artifacts; using SwanSongExtended.Characters; using SwanSongExtended.Components; using SwanSongExtended.Elites; using SwanSongExtended.Equipment; using SwanSongExtended.Equipment.Zapinator; using SwanSongExtended.Interactables; using SwanSongExtended.Items; using SwanSongExtended.Modules; using SwanSongExtended.Scavengers; using SwanSongExtended.Skills; using SwanSongExtended.States; using SwanSongExtended.Storms; using ThreeEyedGames; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.SceneManagement; [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("SwanSongExtended")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("SwanSongExtended")] [assembly: AssemblyTitle("SwanSongExtended")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] namespace RiskierRainContent.Interactables { internal static class CombatEncounterHelper { public enum CustomDirectorType { GalleryDirector = 1, ConstructDirector } public static GameObject MethodOne(PurchaseInteraction purchaseInteraction, Interactor activator, int credits, CustomDirectorType directorType) { //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_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Expected O, but got Unknown Vector3 val = Vector3.zero; Quaternion rotation = Quaternion.identity; Transform transform = ((Component)purchaseInteraction).gameObject.transform; if (Object.op_Implicit((Object)(object)transform)) { val = transform.position; rotation = transform.rotation; } GameObject val2 = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Encounters/MonstersOnShrineUseEncounter"); if ((Object)(object)val2 == (Object)null) { return null; } GameObject val3 = Object.Instantiate<GameObject>(val2, val, Quaternion.identity); NetworkServer.Spawn(val3); CombatDirector component = val3.GetComponent<CombatDirector>(); ParseDirectorType(((Component)component).gameObject, directorType); if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)Stage.instance)) { return null; } float num = (float)credits * Stage.instance.entryDifficultyCoefficient; DirectorCard val4 = component.SelectMonsterCardForCombatShrine(num); if (val4 != null) { component.CombatShrineActivation(activator, num, val4); EffectData val5 = new EffectData { origin = val, rotation = rotation }; if (directorType == CustomDirectorType.ConstructDirector) { GameObject val6 = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/MonstersOnShrineUse"); EffectManager.SpawnEffect(val6, val5, true); } } return val3; } public static void ParseDirectorType(GameObject obj, CustomDirectorType value) { switch (value) { case CustomDirectorType.GalleryDirector: obj.AddComponent<GalleryDirector>(); break; case CustomDirectorType.ConstructDirector: obj.AddComponent<ConstructDirector>(); break; default: obj.AddComponent<GalleryDirector>(); break; } } } internal class GalleryDirector : MonoBehaviour { } internal class ConstructDirector : MonoBehaviour { } } namespace SwanSongExtended { [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.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [R2APISubmoduleDependency(new string[] { "LanguageAPI", "PrefabAPI", "RecalculateStatsAPI", "DotAPI" })] [BepInPlugin("com.RiskOfBrainrot.SwanSongExtended", "SwanSongExtended", "1.0.0")] public class SwanSongPlugin : BaseUnityPlugin { public static int ignitionTankBurnChance = 15; public float ignitionBurnDamage = 2f; public float ignitionBurnDuration = 2f; private bool shouldIgnitionDamageAndDurationCompound = false; public static int stacheBurnChance = 25; public static int brandBurnChance = 30; public static GameObject massPillar = Resources.Load<GameObject>("prefabs/networkedobjects/MoonBatteryMass"); public static GameObject designPillar = Resources.Load<GameObject>("prefabs/networkedobjects/MoonBatteryDesign"); public static GameObject bloodPillar = Resources.Load<GameObject>("prefabs/networkedobjects/MoonBatteryBlood"); public static GameObject soulPillar = Resources.Load<GameObject>("prefabs/networkedobjects/MoonBatterySoul"); public static float pillarDropOffset = 2.5f; public static float pillarDropForce = 20f; public static int baseRewardCount = 1; public static bool scaleRewardsByPlayerCount = true; public static int brittleCrownStealCountBase = 2; public static int brittleCrownStealCountStack = 1; public static float crownCommonStealSoulCost = 0.25f; public static float crownUncommonStealSoulCost = 0.5f; public static float crownRareStealSoulCost = 0.8f; private string common = Tools.ConvertDecimal(crownCommonStealSoulCost); private string uncommon = Tools.ConvertDecimal(crownUncommonStealSoulCost); private string rare = Tools.ConvertDecimal(crownRareStealSoulCost); public static float cooldown = 90f; public static float secondsPerCost = 0.5f; public static float foconMinRadius = 8f; public static float foconRadiusMultiplier = 0.5f; public static float foconChargeBonus = 1f; public static int foconMaxStack = 5; public static List<EquipmentIndex> gestureBreakBlacklist = new List<EquipmentIndex>(); public static float gestureEquipBreakChance = 40f; public static int gestureStockBase = 4; public static int gestureStockStack = 2; public static float gestureCdiBase = 1f; public static float gestureCdiStack = 0.5f; public static float hauntExecutionThreshold = 0.25f; private float ghostSpawnChanceOnExecute = 100f; private float ghostDurationPerStack = 6.66f; public static float harpoonBarrierBase = 5f; public static float harpoonBarrierStack = 5f; public static float harpoonTargetTime = 15f; public static Material harpoonTargetMaterial; public int scopeBaseCrit = 5; public int scopeStackCrit = 0; public int scopeBaseStationaryCrit = 40; public int scopeStackStationaryCrit = 0; public static ItemDef seedItemDef; public static float seedRegenDurationBase = 0.25f; public static float seedRegenDurationStack = 0.25f; public static float sunDurationBase = 10f; public static float sunDurationStack = 5f; private static float razorwireArmorBase = 8f; private static float razorwireArmorStack = 8f; private static float razorwireRangeBase = 40f; private static float razorwireRangeStack = 0f; private static float razorwireTargetsBase = 5f; private static float razorwireTargetsStack = 2f; private static float razorwireBleedDuration = 5f; private static float razorwireDamage = 3.6f; private static float razorwireProcCoeff = 0.2f; private static float razorwireCooldown = 1f; public static SpawnCard exploderCard = Resources.Load<SpawnCard>("spawncards/characterspawncards/cscLunarExploder"); private List<DirectorCard> exploderCards = new List<DirectorCard>(); public static ExploderDirector exploderDirector; internal static float phaseTwoRate = 0f; internal static float phaseThreeRate = 1f; public const string guid = "com.RiskOfBrainrot.SwanSongExtended"; public const string teamName = "RiskOfBrainrot"; public const string modName = "SwanSongExtended"; public const string version = "1.0.0"; public const string expansionName = "Swan Song"; public const string expansionName2 = "Secrets of the Scug"; public const string expansionToken = "EXPANSION2R4R"; public const string expansionToken2 = "EXPANSIONSOTS"; public const string DEVELOPER_PREFIX = "FRUIT"; public static SwanSongPlugin instance; public static ExpansionDef expansionDefSS2; public static ExpansionDef expansionDefSOTS; public const string iconsPath = ""; private BuffDef brittleCrownBuff => CommonAssets.brittleCrownCursePurchase; private GameObject meatballNapalmPool => CommonAssets.meatballNapalmPool; public static AssetBundle mainAssetBundle => CommonAssets.mainAssetBundle; public static AssetBundle orangeAssetBundle => CommonAssets.orangeAssetBundle; public static bool iabMissilesLoaded => ModLoaded("com.HouseOfFruits.IAmBecomeMissiles"); public static bool isAELoaded => ModLoaded("com.Borbo.ArtificerExtended"); public static bool is2R4RLoaded => ModLoaded("com.HouseOfFruits.RiskierRain"); public static bool isHBULoaded => ModLoaded("com.Borbo.HuntressBuffULTIMATE"); public static bool isScepterLoaded => ModLoaded("com.DestroyedClone.AncientScepter"); public static bool autosprintLoaded => ModLoaded("com.johnedwa.RTAutoSprintEx"); public static bool acridLungeLoaded => ModLoaded("Withor.AcridBiteLunge"); public static bool ucrLoaded => ModLoaded("HIFU.UltimateCustomRun"); private void BurnReworks() { IgnitionTankRework(); } private void IgnitionTankRework() { //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 StatHooks.GetMoreStatCoefficients += new MoreStatHookEventHandler(IgniTankBurnChance); StrengthenBurnUtils.CheckDotForUpgrade += new hook_CheckDotForUpgrade(OverrideIgnitionBurn); LanguageAPI.Add("ITEM_STRENGTHENBURN_PICKUP", "Your ignite effects deal triple damage."); LanguageAPI.Add("ITEM_STRENGTHENBURN_DESC", $"Gain <style=cIsDamage>{ignitionTankBurnChance}% ignite chance</style>. " + "All ignition effects deal <style=cIsDamage>+" + Tools.ConvertDecimal(ignitionBurnDamage) + "</style> <style=cStack>(+" + Tools.ConvertDecimal(ignitionBurnDamage) + " per stack)</style> more damage and last <style=cIsUtility>+" + Tools.ConvertDecimal(ignitionBurnDuration) + "</style> <style=cStack>(+" + Tools.ConvertDecimal(ignitionBurnDuration) + " per stack)</style> longer."); } private void IgniTankBurnChance(CharacterBody sender, MoreStatHookEventArgs args) { Inventory inventory = sender.inventory; if (Object.op_Implicit((Object)(object)inventory) && inventory.GetItemCount(Items.StrengthenBurn) > 0) { args.burnChanceOnHit += (float)ignitionTankBurnChance; } } private void OverrideIgnitionBurn(orig_CheckDotForUpgrade orig, Inventory inventory, ref InflictDotInfo dotInfo) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Invalid comparison between Unknown and I4 //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) if ((int)dotInfo.dotIndex != 1 && (int)dotInfo.dotIndex != 2) { return; } int itemCount = inventory.GetItemCount(Items.StrengthenBurn); if (itemCount > 0) { dotInfo.preUpgradeDotIndex = dotInfo.dotIndex; dotInfo.dotIndex = (DotIndex)7; float num = 1f + ignitionBurnDamage * (float)itemCount; float num2 = 1f + ignitionBurnDuration * (float)itemCount; if (shouldIgnitionDamageAndDurationCompound) { dotInfo.totalDamage *= num * num2; dotInfo.damageMultiplier *= num; } else { dotInfo.totalDamage *= num; dotInfo.damageMultiplier *= num / num2; } } } public static int GetBurnCount(CharacterBody victimBody) { return victimBody.GetBuffCount(Buffs.OnFire) + victimBody.GetBuffCount(Buffs.StrongerBurn); } private void MakePillarsFun() { //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 MoonBatteryMissionController.OnBatteryCharged += new hook_OnBatteryCharged(PillarsDropItems); MoonBatteryMissionController.Awake += new hook_Awake(ReduceRequiredPillars); } private void ReduceRequiredPillars(orig_Awake orig, MoonBatteryMissionController self) { orig.Invoke(self); self._numRequiredBatteries = 2; } private void PillarsDropItems(orig_OnBatteryCharged orig, MoonBatteryMissionController self, HoldoutZoneController holdoutZone) { //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) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Expected O, but got Unknown int participatingPlayerCount = Run.instance.participatingPlayerCount; Vector3 val = ((Component)holdoutZone).gameObject.transform.position + Vector3.up * pillarDropOffset; if (participatingPlayerCount != 0) { PickupIndex pickupIndexFromPillarType = GetPickupIndexFromPillarType(((Component)holdoutZone).gameObject); if (pickupIndexFromPillarType != PickupIndex.none) { int num = baseRewardCount; if (scaleRewardsByPlayerCount) { num *= participatingPlayerCount; } float num2 = 360f / (float)num; Vector3 val2 = Quaternion.AngleAxis((float)Random.Range(0, 360), Vector3.up) * (Vector3.up * pillarDropForce + Vector3.forward * 5f); Quaternion val3 = Quaternion.AngleAxis(num2, Vector3.up); int num3 = 0; while (num3 < num) { PickupDropletController.CreatePickupDroplet(pickupIndexFromPillarType, val, val2); num3++; val2 = val3 * val2; } } } self.Network_numChargedBatteries = self._numChargedBatteries + 1; if (self._numChargedBatteries < self._numRequiredBatteries || !NetworkServer.active) { return; } for (int i = 0; i < self.batteryHoldoutZones.Length; i++) { if (((Behaviour)self.batteryHoldoutZones[i]).enabled) { self.batteryHoldoutZones[i].FullyChargeHoldoutZone(); ((UnityEvent<HoldoutZoneController>)(object)self.batteryHoldoutZones[i].onCharged).RemoveListener((UnityAction<HoldoutZoneController>)self.OnBatteryCharged); } } for (int j = 0; j < self.elevatorStateMachines.Length; j++) { self.elevatorStateMachines[j].SetNextState((EntityState)new InactiveToReady()); } } public static PickupIndex GetPickupIndexFromPillarType(GameObject pillar) { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) ItemBase itemBase = null; string name = ((Object)pillar).name; switch (name.Substring(11, 4)) { case "Mass": itemBase = ItemBase<MassAnomaly>.instance; break; case "Desi": itemBase = ItemBase<DesignAnomaly>.instance; break; case "Bloo": itemBase = ItemBase<BloodAnomaly>.instance; break; case "Soul": itemBase = ItemBase<SoulAnomaly>.instance; break; } if (itemBase != null) { ItemIndex itemIndex = itemBase.ItemsDef.itemIndex; return PickupCatalog.FindPickupIndex(itemIndex); } Debug.Log((object)"No pickup index found!"); return PickupIndex.none; } public void BrittleCrownChanges() { //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Expected O, but got Unknown //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Expected O, but got Unknown //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Expected O, but got Unknown LanguageAPI.Add("ITEM_GOLDONHIT_NAME", "Sunken Crown"); LanguageAPI.Add("ITEM_GOLDONHIT_PICKUP", "Steal from chests... " + Language.Styling.HealthColor("at the cost of health.")); LanguageAPI.Add("ITEM_GOLDONHIT_DESC", "Allows interacting with chests without the ability to afford them, opening the chest " + Language.Styling.UtilityColor("without spending ANY money") + ". Stealing from chests costs " + Language.Styling.HealthColor("[ " + common + " / " + uncommon + " / " + rare + " ]") + " of your " + Language.Styling.HealthColor("maximum health") + ", depending on the size of the chest. " + $"Can steal up to {brittleCrownStealCountBase} {Language.Styling.StackText($"+{brittleCrownStealCountStack}")} times per stage."); HealthComponent.TakeDamageProcess += new Manipulator(RemoveCrownPenalty); GlobalEventManager.ProcessHitEnemy += new Manipulator(RemoveCrownReward); PurchaseInteraction.CanBeAffordedByInteractor += new hook_CanBeAffordedByInteractor(PurchaseInteraction_CanBeAffordedByInteractor); CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddBrittleCrownBehavior); } private void AddBrittleCrownBehavior(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); if (NetworkServer.active) { self.AddItemBehavior<BrittleCrownBehavior>(self.inventory.GetItemCount(Items.GoldOnHit)); } } private void RemoveCrownReward(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_0067: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.GotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "GoldOnHit"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount") }); val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldc_I4, 0); } private void RemoveCrownPenalty(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0039: 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) ILCursor val = new ILCursor(il); val.GotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "goldOnHit") }); val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldc_I4, 0); } private void CTCInit(orig_Init orig) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown orig.Invoke(); CostTypeDef costTypeDef = CostTypeCatalog.GetCostTypeDef((CostTypeIndex)1); MethodInfo method = ((Delegate)(object)costTypeDef.payCost).Method; ILHook val = new ILHook((MethodBase)method, new Manipulator(PatchMoneyCostForBrittleCrown)); } private void PatchMoneyCostForBrittleCrown(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0009: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.Emit(OpCodes.Ldarg_1); val.EmitDelegate<Action<PayCostContext>>((Action<PayCostContext>)delegate(PayCostContext ctx) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0010: 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_0029: Unknown result type (might be due to invalid IL or missing references) CharacterBody activatorBody = ctx.activatorBody; if (Object.op_Implicit((Object)(object)activatorBody) && Object.op_Implicit((Object)(object)ctx.activatorMaster) && ctx.activatorMaster.money < ctx.cost) { ctx.cost = 0; } }); } private bool PurchaseInteraction_CanBeAffordedByInteractor(orig_CanBeAffordedByInteractor orig, PurchaseInteraction self, Interactor activator) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Invalid comparison between Unknown and I4 bool flag = orig.Invoke(self, activator); if (flag) { return flag; } CharacterBody val = null; if (((Component)activator).gameObject.TryGetComponent<CharacterBody>(ref val) && val.HasBuff(brittleCrownBuff) && (int)self.costType == 1 && self.saleStarCompatible && val.master.money < self.cost) { int num = 1; int difficultyScaledCost = Run.instance.GetDifficultyScaledCost(45, Stage.instance.entryDifficultyCoefficient); int difficultyScaledCost2 = Run.instance.GetDifficultyScaledCost(245, Stage.instance.entryDifficultyCoefficient); if (self.cost >= num && self.cost < difficultyScaledCost) { CounterfeitCalculations(val, crownCommonStealSoulCost); } else if (self.cost >= difficultyScaledCost && self.cost < difficultyScaledCost2) { CounterfeitCalculations(val, crownUncommonStealSoulCost); } else { CounterfeitCalculations(val, crownRareStealSoulCost); } flag = true; } return flag; } public void CounterfeitCalculations(CharacterBody activator, float soulCost) { SoulCostPlugin.AddSoulCostToBody(activator, soulCost); activator.AddBuff(Buffs.FreeUnlocks); Util.PlaySound("sfx_lunarmoney_start", ((Component)activator).gameObject); if (NetworkServer.active) { activator.RemoveBuff(brittleCrownBuff); } } public void ExecutiveCardChanges() { //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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown EquipmentDef val = Addressables.LoadAssetAsync<EquipmentDef>((object)"RoR2/DLC1/MultiShopCard/MultiShopCard.asset").WaitForCompletion(); val.cooldown = cooldown; LanguageAPI.Add("EQUIPMENT_MULTISHOPCARD_PICKUP", "Hack a targeted interactable. Hacked Multishops remain open."); LanguageAPI.Add("EQUIPMENT_MULTISHOPCARD_DESC", "Target an interactable to <style=cIsUtility>hack</style> it, unlocking its contents for <style=cIsUtility>free</style>. If the target is a <style=cIsUtility>multishop</style> terminal, the other terminals will <style=cIsUtility>remain open</style>."); MultiShopCardUtils.OnPurchase += new Manipulator(FreezeCard); EquipmentSlot.UpdateTargets += new hook_UpdateTargets(CardTargetInteractables); EquipmentSlot.PerformEquipmentAction += new hook_PerformEquipmentAction(PerformEquipmentAction); } private void FreezeCard(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); val.GotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "get_currentEquipmentIndex") }); val.Remove(); val.EmitDelegate<Func<Inventory, int>>((Func<Inventory, int>)((Inventory inv) => -1)); } private bool PerformEquipmentAction(orig_PerformEquipmentAction orig, EquipmentSlot self, EquipmentDef equipmentDef) { if ((Object)(object)equipmentDef == (Object)(object)Equipment.MultiShopCard) { return ActivateEquipment(self); } return orig.Invoke(self, equipmentDef); static bool ActivateEquipment(EquipmentSlot slot) { bool result = false; GameObject rootObject = slot.currentTarget.rootObject; if ((Object)(object)rootObject != (Object)null) { PurchaseInteraction component = rootObject.GetComponent<PurchaseInteraction>(); if ((Object)(object)component != (Object)null && HackingMainState.PurchaseInteractionIsValidTarget(component)) { component.Networkcost = 0; ShopTerminalBehavior component2 = rootObject.GetComponent<ShopTerminalBehavior>(); if (Object.op_Implicit((Object)(object)component2)) { component2.serverMultiShopController.SetCloseOnTerminalPurchase(((Component)component).GetComponent<PurchaseInteraction>(), false); } CharacterBody characterBody = slot.characterBody; Interactor val = ((characterBody != null) ? ((Component)characterBody).GetComponent<Interactor>() : null); if (Object.op_Implicit((Object)(object)val)) { val.AttemptInteraction(rootObject); } slot.InvalidateCurrentTarget(); result = true; } } return result; } } private void CardTargetInteractables(orig_UpdateTargets orig, EquipmentSlot self, EquipmentIndex targetingEquipmentIndex, bool userShouldAnticipateTarget) { //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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) if (targetingEquipmentIndex != Equipment.MultiShopCard.equipmentIndex || !userShouldAnticipateTarget) { orig.Invoke(self, targetingEquipmentIndex, userShouldAnticipateTarget); return; } float num = 150f; float num2 = 10f; float num3 = Mathf.Cos(Mathf.Clamp(num2, 0f, 180f) * MathF.PI / 180f); float num4 = default(float); Ray val = CameraRigController.ModifyAimRayIfApplicable(self.GetAimRay(), ((Component)self.characterBody).gameObject, ref num4); Collider[] array = Physics.OverlapSphere(((Ray)(ref val)).origin, num + num4, -1, (QueryTriggerInteraction)2); bool flag = false; GameObject rootObject = self.currentTarget.rootObject; Vector3 val3; if ((Object)(object)rootObject != (Object)null) { PurchaseInteraction val2 = ((rootObject != null) ? rootObject.GetComponent<PurchaseInteraction>() : null); if ((Object)(object)val2 != (Object)null) { flag = HackingMainState.PurchaseInteractionIsValidTarget(val2) && val2.available; } Vector3 origin = ((Ray)(ref val)).origin; Vector3 position = rootObject.transform.position; if (flag) { val3 = position - origin; if (!(((Vector3)(ref val3)).sqrMagnitude > num * num)) { Vector3 direction = ((Ray)(ref val)).direction; val3 = position - origin; if (!(Vector3.Dot(direction, ((Vector3)(ref val3)).normalized) < num3)) { goto IL_0146; } } } self.InvalidateCurrentTarget(); } goto IL_0146; IL_0146: bool flag2 = false; PurchaseInteraction val4 = null; Collider[] array2 = array; foreach (Collider val5 in array2) { Vector3 direction2 = ((Ray)(ref val)).direction; val3 = ((Component)val5).transform.position - ((Ray)(ref val)).origin; float num5 = Vector3.Dot(direction2, ((Vector3)(ref val3)).normalized); if (num5 < num3) { continue; } Vector3 origin2 = ((Ray)(ref val)).origin; Vector3 position2 = ((Component)val5).transform.position; if (!HasLos(origin2, position2)) { continue; } EntityLocator component = ((Component)val5).GetComponent<EntityLocator>(); if (!Object.op_Implicit((Object)(object)component)) { continue; } PurchaseInteraction component2 = component.entity.GetComponent<PurchaseInteraction>(); if (Object.op_Implicit((Object)(object)component2)) { flag2 = HackingMainState.PurchaseInteractionIsValidTarget(component2); if (flag2) { flag2 = true; val4 = component2; break; } if ((Object)(object)val4 == (Object)null && component2.available) { val4 = component2; } } } if ((Object)(object)val4 != (Object)null) { if (flag2 && userShouldAnticipateTarget) { self.targetIndicator.visualizerPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/RecyclerIndicator"); } else { self.targetIndicator.visualizerPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/RecyclerBadIndicator"); } self.currentTarget = new UserTargetInfo { transformToIndicateAt = ((Component)val4).gameObject.transform, pickupController = null, hurtBox = null, rootObject = ((Component)val4).gameObject }; self.targetIndicator.active = true; self.targetIndicator.targetTransform = self.currentTarget.transformToIndicateAt; } else { self.InvalidateCurrentTarget(); self.targetIndicator.active = false; } } public bool HasLos(Vector3 origin, Vector3 targetPosition) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: 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) Vector3 val = targetPosition - origin; RaycastHit val2 = default(RaycastHit); return !Physics.Raycast(origin, val, ref val2, ((Vector3)(ref val)).magnitude - 1f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1); } private void FreezeCardf(orig_OnPurchase orig, PayCostContext context, int moneyCost) { } public void FocusedConvergenceChanges() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown FocusConvergenceController.ApplyRadius += new hook_ApplyRadius(FoconNewRadius); FocusConvergenceController.ApplyRate += new Manipulator(FoconApplyRate); FocusConvergenceController.DoUpdate += new Manipulator(FoconUpdate); LanguageAPI.Add("ITEM_FOCUSEDCONVERGENCE_PICKUP", $"Increase the speed Holdout Zones charge... <color=#FF7F7F>BUT reduce the size of the zone</color>. Max of {foconMaxStack}."); LanguageAPI.Add("ITEM_FOCUSEDCONVERGENCE_DESC", "Holdout Zones charge <style=cIsUtility>" + Tools.ConvertDecimal(foconChargeBonus) + " <style=cStack>(+" + Tools.ConvertDecimal(foconChargeBonus) + " per stack)</style> faster</style>, but are <style=cIsHealth>" + Tools.ConvertDecimal(1f - foconRadiusMultiplier) + " smaller</style> <style=cStack>(-" + Tools.ConvertDecimal(1f - foconRadiusMultiplier) + " per stack)</style>. " + $"Max of {foconMaxStack}."); } private void FoconUpdate(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); val.GotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "cap") }); val.EmitDelegate<Func<int, int>>((Func<int, int>)((int cap) => foconMaxStack)); } private void FoconNewRadius(orig_ApplyRadius orig, MonoBehaviour self, ref float radius) { FocusConvergenceController val = (FocusConvergenceController)(object)((self is FocusConvergenceController) ? self : null); if (val.currentFocusConvergenceCount > 0) { radius -= foconMinRadius; radius *= Mathf.Pow(foconRadiusMultiplier, (float)val.currentFocusConvergenceCount); radius += foconMinRadius; } } private void FoconApplyRadius(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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_00ca: 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) ILCursor val = new ILCursor(il); val.GotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "convergenceRadiusDivisor") }); val.Emit(OpCodes.Ldc_R4, foconMinRadius); val.Emit(OpCodes.Sub); val.GotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "convergenceRadiusDivisor") }); val.Remove(); val.Emit(OpCodes.Ldc_R4, 2); val.GotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStindR4(x) }); val.Emit(OpCodes.Ldc_R4, foconMinRadius); val.Emit(OpCodes.Add); } private void FoconApplyRate(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); val.GotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "convergenceChargeRateBonus") }); val.EmitDelegate<Func<float, float>>((Func<float, float>)((float chargeBonus) => foconChargeBonus)); } public void GestureChanges() { //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Expected O, but got Unknown //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Expected O, but got Unknown //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Expected O, but got Unknown //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Expected O, but got Unknown //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Expected O, but got Unknown //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Expected O, but got Unknown //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Expected O, but got Unknown //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Expected O, but got Unknown //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Expected O, but got Unknown LanguageAPI.Add("ITEM_AUTOCASTEQUIPMENT_PICKUP", "Greatly increase equipment stock... " + Language.Styling.HealthColor("BUT greatly increase equipment cooldown.") + " Equipments can be activated during their cooldown, " + Language.Styling.HealthColor("with a chance to break.")); LanguageAPI.Add("ITEM_AUTOCASTEQUIPMENT_DESC", "Hold " + Language.Styling.UtilityColor($"{gestureStockBase} additional equipment charges") + " " + Language.Styling.StackText($"+{gestureStockStack}") + "... " + Language.Styling.HealthColor("BUT increase equipment cooldown by +" + Tools.ConvertDecimal(gestureCdiBase)) + " " + Language.Styling.StackText("+" + Tools.ConvertDecimal(gestureCdiStack)) + ". Using your equipment without charges " + Language.Styling.UtilityColor("under-casts") + " it, allowing it to be used " + Language.Styling.HealthColor($"with a {gestureEquipBreakChance}% chance to break") + ". " + Language.Styling.UtilityColor("Unaffected by luck.")); EquipmentCatalog.Init += new hook_Init(CreateGestureBlacklist); EquipmentSlot.ExecuteIfReady += new hook_ExecuteIfReady(AddGestureUndercast); EquipmentSlot.OnEquipmentExecuted += new hook_OnEquipmentExecuted(AddGestureBreak); EquipmentSlot.MyFixedUpdate += new Manipulator(RemoveGestureAutocast); EquipmentSlot.MyFixedUpdate += new Manipulator(AddPreonAccumulatorBreak); Inventory.CalculateEquipmentCooldownScale += new Manipulator(RemoveGestureCdr); Inventory.CalculateEquipmentCooldownScale += new hook_CalculateEquipmentCooldownScale(AddGestureCdi); Inventory.GetEquipmentSlotMaxCharges += new hook_GetEquipmentSlotMaxCharges(AddGestureStock); Inventory.UpdateEquipment += new Manipulator(FixMaxStock); } private void FixMaxStock(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.GotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "EquipmentMagazine"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount") }); int num = default(int); val.GotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num) }); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<int, Inventory, int>>((Func<int, Inventory, int>)delegate(int stock, Inventory inv) { stock += GetGestureStockFromInventory(inv); return stock; }); } private int AddGestureStock(orig_GetEquipmentSlotMaxCharges orig, Inventory self, byte slot) { int num = orig.Invoke(self, slot); return num + GetGestureStockFromInventory(self); } public static int GetGestureStockFromInventory(Inventory inv) { int itemCount = inv.GetItemCount(Items.AutoCastEquipment); if (itemCount > 0) { return 4 + 2 * (itemCount - 1); } return 0; } private float AddGestureCdi(orig_CalculateEquipmentCooldownScale orig, Inventory self) { float num = orig.Invoke(self); int itemCount = self.GetItemCount(Items.AutoCastEquipment); if (itemCount > 0) { num *= 1f + gestureCdiBase + gestureCdiStack * (float)(itemCount - 1); } return num; } private void RemoveGestureCdr(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_0067: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.GotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "AutoCastEquipment"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount") }); val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldc_I4, 0); } private void AddGestureBreak(orig_OnEquipmentExecuted orig, EquipmentSlot self) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!gestureBreakBlacklist.Contains(self.equipmentIndex)) { TryGestureEquipmentBreak(self); } } private void AddPreonAccumulatorBreak(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) ILCursor val = new ILCursor(il); val.GotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0f), (Instruction x) => ILPatternMatchingExt.MatchStfld<EquipmentSlot>(x, "bfgChargeTimer") }); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Action<EquipmentSlot>>((Action<EquipmentSlot>)delegate(EquipmentSlot self) { TryGestureEquipmentBreak(self); }); } private void CreateGestureBlacklist(orig_Init orig) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(); gestureBreakBlacklist.Add((EquipmentIndex)(-1)); gestureBreakBlacklist.Add(Equipment.BFG.equipmentIndex); } private bool AddGestureUndercast(orig_ExecuteIfReady orig, EquipmentSlot self) { if (NetworkServer.active) { Inventory inventory = self.inventory; if (inventory != null && inventory.GetItemCount(Items.AutoCastEquipment) > 0 && ((ButtonState)(ref self.inputBank.activateEquipment)).justPressed && self.stock <= 0) { self.stock += 1; self.characterBody.AddBuff(CommonAssets.gestureQueueEquipBreak); } } return orig.Invoke(self); } public static void TryGestureEquipmentBreak(EquipmentSlot self) { if (self.characterBody.HasBuff(CommonAssets.gestureQueueEquipBreak)) { if (Util.CheckRoll(gestureEquipBreakChance, 0f, (CharacterMaster)null)) { self.inventory.SetEquipmentIndex((EquipmentIndex)(-1)); } self.characterBody.RemoveBuff(CommonAssets.gestureQueueEquipBreak); } } private void RemoveGestureAutocast(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_0067: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.GotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "AutoCastEquipment"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount") }); val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldc_I4, 0); } public void HappiestMaskRework() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown StatHooks.GetMoreStatCoefficients += new MoreStatHookEventHandler(MaskExecution); GlobalEventManager.onServerCharacterExecuted += HappiestMaskGhostSpawn; GlobalEventManager.OnCharacterDeath += new Manipulator(RevokeHappiestMaskRights); CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddMaskBehavior); LanguageAPI.Add("ITEM_GHOSTONKILL_PICKUP", "Haunt nearby enemies, marking them for execution. Executing enemies summons a ghost."); LanguageAPI.Add("ITEM_GHOSTONKILL_DESC", $"Once every <style=cIsDamage>{HappiestMaskBehavior.baseHauntInterval}</style> seconds, " + "<style=cIsDamage>Haunt</style> a nearby non-boss enemy, marking them for Execution below <style=cIsHealth>" + Tools.ConvertDecimal(hauntExecutionThreshold) + "</style> health. Execution <style=cIsDamage>spawns a ghost</style> of the killed enemy with <style=cIsDamage>1500%</style> damage, " + $"lasting for <style=cIsDamage>{ghostDurationPerStack}s</style> <style=cStack>(+{ghostDurationPerStack}s per stack)</style> " + Language.Styling.UtilityColor("(double for Haunted enemies)") + "."); LanguageAPI.Add("ITEM_GHOSTONKILL_LORE", "<style=cMono>\r\n//--AUTO-TRANSCRIPTION FROM RALLYPOINT DELTA --//</style>\r\n\r\n“Sir, the ghosts are back.”\r\n\r\nThe man sighed. After a routine expedition, one of the crew members – a simple soldier - had recovered an artifact thought to have been aboard the Contact Light – a simple mask, adorned with a painfully happy grin. \r\n\r\n“I’ll take care of it.” The man trudged down the hall towards the barracks. The Lemurians he had killed earlier that day walked down the hall by him, barely earning a second glance from the man. This had become so commonplace that most of the crew members in this block had grown accustomed to having a ghostly room-mate.\r\n\r\nBut enough was enough. Stepping through the ghost of an Imp, the man slammed the door open. The lights were off, and in the corner sat the soldier.\r\n\r\n“Alright, we’ve had enough fun playing with the dead. Fork it over.”\r\n\r\nNo response. The man grunted and hoisted the soldier to his feet, giving him a few rough shakes. “Hey, can you hear me!? I said hand over the mask! I’m tired of waking up next to Beetles, so give it a rest already--”\r\n\r\nThe soldier’s limp body moved. Slowly, the soldier raised his finger – pointing directly at the man.\r\n\r\n“What are you...?” With a sense of dread, the man turned and saw the Lemurians he had killed earlier step into the room. Their mouths began to glow with an otherworldly light.\r\n\r\nThe man cursed under his breath as he loaded his shotgun. “This planet, I tell you...”"); } private void MaskExecution(CharacterBody sender, MoreStatHookEventArgs args) { bool flag = sender.HasBuff(CommonAssets.hauntDebuff); args.ModifyBaseExecutionThreshold(hauntExecutionThreshold, flag); } private void AddMaskBehavior(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); int itemCount = self.inventory.GetItemCount(Items.GhostOnKill); self.AddItemBehavior<HappiestMaskBehavior>(itemCount); } private void HappiestMaskGhostSpawn(DamageReport damageReport, float executionHealthLost) { CharacterBody victimBody = damageReport.victimBody; CharacterBody attackerBody = damageReport.attackerBody; if (!Object.op_Implicit((Object)(object)victimBody) || !Object.op_Implicit((Object)(object)attackerBody)) { return; } Inventory inventory = attackerBody.inventory; if (!Object.op_Implicit((Object)(object)inventory)) { return; } int num = inventory.GetItemCount(Items.GhostOnKill); if (num > 0 && Object.op_Implicit((Object)(object)victimBody) && Util.CheckRoll(ghostSpawnChanceOnExecute, attackerBody.master)) { if (victimBody.HasBuff(CommonAssets.hauntDebuff)) { num *= 2; } Util.TryToCreateGhost(victimBody, attackerBody, Mathf.CeilToInt((float)num * ghostDurationPerStack)); } } private void RevokeHappiestMaskRights(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<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "GhostOnKill"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount") }); val.Emit(OpCodes.Ldc_I4, 0); val.Emit(OpCodes.Mul); } public void HuntersHarpoonRework() { //IL_000f: 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_002f: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown harpoonTargetMaterial = CreateMatRecolor(new Color32((byte)210, (byte)140, (byte)32, (byte)100)); GlobalEventManager.OnCharacterDeath += new Manipulator(RevokeHarpoonRights); CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddHarpoonBehavior); OnHit.GetHitBehavior += new HitHookEventHandler(HarpoonOnHit); LanguageAPI.Add("ITEM_MOVESPEEDONKILL_PICKUP", "Target a nearby enemy, gaining barrier on hit."); LanguageAPI.Add("ITEM_MOVESPEEDONKILL_DESC", $"Once every <style=cIsDamage>{harpoonTargetTime}</style> seconds, <style=cIsDamage>target</style> a random enemy. " + "Attacking the targeted enemy grants a <style=cIsHealing>temporary barrier</style> " + $"for <style=cIsHealing>{harpoonBarrierBase} health</style> <style=cStack>(+{harpoonBarrierStack} per stack)</style>."); } public static Material CreateMatRecolor(Color32 blueEquivalent) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) Material val = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Huntress/matHuntressFlashExpanded.mat").WaitForCompletion()); val.SetColor("_TintColor", Color32.op_Implicit(blueEquivalent)); val.SetInt("_Cull", 1); return val; } private void HarpoonOnHit(CharacterBody attackerBody, DamageInfo damageInfo, CharacterBody victimBody) { Inventory inventory = attackerBody.inventory; HealthComponent healthComponent = attackerBody.healthComponent; if ((Object)(object)inventory != (Object)null && (Object)(object)healthComponent != (Object)null && (Object)(object)victimBody != (Object)null && victimBody.HasBuff(CommonAssets.harpoonDebuff)) { int itemCount = inventory.GetItemCount(Items.MoveSpeedOnKill); if (itemCount > 0) { float num = harpoonBarrierBase + harpoonBarrierStack * (float)(itemCount - 1); healthComponent.AddBarrierAuthority(num * damageInfo.procCoefficient); } } } private void AddHarpoonBehavior(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); int itemCount = self.inventory.GetItemCount(Items.MoveSpeedOnKill); self.AddItemBehavior<HuntersHarpoonBehavior>(itemCount); } private void RevokeHarpoonRights(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_0067: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.GotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "MoveSpeedOnKill"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount") }); val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldc_I4, 0); } public void ReworkLaserScope() { //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_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown RetierItem(Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC1/CritDamage/CritDamage.asset").WaitForCompletion(), (ItemTier)1); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(ScopeCritChance); CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddScopeItemBehavior); LanguageAPI.Add("ITEM_CRITDAMAGE_NAME", "Combat Telescope"); LanguageAPI.Add("ITEM_CRITDAMAGE_PICKUP", "Increases 'Critical Strike' chance and damage while stationary."); LanguageAPI.Add("ITEM_CRITDAMAGE_DESC", "<style=cIsDamage>Critical Strikes</style> deal an additional <style=cIsDamage>100% damage</style> <style=cStack>(+100% per stack)</style>. " + $"Gain <style=cIsDamage>{scopeBaseCrit}% critical chance</style>, " + $"or <style=cIsDamage>{scopeBaseStationaryCrit}%</style> after standing still " + $"for <style=cIsUtility>{CombatTelescopeBehavior.combatTelescopeWaitTime}</style> seconds."); } private void AddScopeItemBehavior(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); self.AddItemBehavior<CombatTelescopeBehavior>(self.inventory.GetItemCount(Items.CritDamage)); } private void ScopeCritChance(CharacterBody sender, StatHookEventArgs args) { if (!Object.op_Implicit((Object)(object)sender.inventory)) { return; } int itemCount = sender.inventory.GetItemCount(Items.CritDamage); if (itemCount > 0) { int num = scopeBaseCrit; int buffCount = sender.GetBuffCount(CommonAssets.combatTelescopeCritChance); if (buffCount > 0) { num = scopeBaseStationaryCrit; } args.critAdd += (float)num; } } private void RevokeScopeRights(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<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "CritDamage"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount") }); val.Emit(OpCodes.Ldc_I4, 0); val.Emit(OpCodes.Mul); } public void ReworkLeechingSeed() { //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_002f: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown seedItemDef = RetierItem(Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/Seed/Seed.asset").WaitForCompletion(), (ItemTier)0); GlobalEventManager.ProcessHitEnemy += new Manipulator(FuckLeechingSeed); OnHit.GetHitBehavior += new HitHookEventHandler(NewSeedBehavior); LanguageAPI.Add("ITEM_SEED_PICKUP", "Dealing damage heals you."); LanguageAPI.Add("ITEM_SEED_DESC", "Dealing damage increases <style=cIsHealing>base health regeneration</style> by <style=cIsHealing>+2 hp/s</style> " + $"for <style=cIsUtility>{seedRegenDurationBase}s</style> <style=cStack>(+{seedRegenDurationStack}s per stack)</style>."); } private void NewSeedBehavior(CharacterBody body, DamageInfo damageInfo, CharacterBody victimBody) { //IL_0040: 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) if (((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)6)) { return; } Inventory inventory = body.inventory; if ((Object)(object)inventory != (Object)null) { int itemCount = inventory.GetItemCount(seedItemDef); if (itemCount > 0) { ProcChainMask procChainMask = damageInfo.procChainMask; ((ProcChainMask)(ref procChainMask)).AddProc((ProcType)6); body.AddTimedBuff(Buffs.MeatRegenBoost, (seedRegenDurationBase + seedRegenDurationStack * (float)(itemCount - 1)) * damageInfo.procCoefficient); } } } private void FuckLeechingSeed(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) //IL_0095: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int seedLoc = 14; val.GotoNext((MoveType)2, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Seed"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref seedLoc) }); int index = val.Index; val.Index = index - 1; val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldc_I4, 0); } public void ReworkFreshMeat() { //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 ChangeBuffStacking("MeatRegenBoost", canStack: true); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(LetMeatActuallyStack); GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(MeatRegen); LanguageAPI.Add("ITEM_FLATHEALTH_PICKUP", "Regenerate health after killing an enemy."); LanguageAPI.Add("ITEM_FLATHEALTH_DESC", "Increases <style=cIsHealing>base health regeneration</style> by <style=cIsHealing>+2 hp/s</style> for <style=cIsUtility>3s</style> <style=cStack>(+3s per stack)</style> after killing an enemy."); } private void MeatRegen(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) CharacterBody attackerBody = damageReport.attackerBody; if ((Object)(object)attackerBody != (Object)null && (Object)(object)attackerBody.inventory != (Object)null) { Inventory inventory = attackerBody.inventory; int itemCount = inventory.GetItemCount(Items.FlatHealth); if (itemCount > 0) { attackerBody.AddTimedBuffAuthority(Buffs.MeatRegenBoost.buffIndex, (float)(3 * itemCount)); } } orig.Invoke(self, damageReport); } private void LetMeatActuallyStack(CharacterBody sender, StatHookEventArgs args) { int buffCount = sender.GetBuffCount(Buffs.MeatRegenBoost); if (buffCount > 1) { args.baseRegenAdd += 2f * (1f + 0.2f * (sender.level - 1f)) * (float)(buffCount - 1); } Inventory inventory = sender.inventory; if ((Object)(object)inventory != (Object)null) { args.baseHealthAdd -= (float)(inventory.GetItemCount(Items.FlatHealth) * 25); } } private void PlanulaChanges() { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown LanguageAPI.Add("ITEM_PARENTEGG_DESC", "After beginning the teleporter event, " + Language.Styling.DamageColor("summon a sun overhead") + " that lasts for " + Language.Styling.DamageColor(sunDurationBase.ToString()) + " seconds " + Language.Styling.StackText($"+{sunDurationStack}") + ". " + Language.Styling.HealthColor("All enemies and allies burn near the sun") + "."); HealthComponent.TakeDamageProcess += new Manipulator(FuckPlanula); IdleToChargingState.OnEnter += new hook_OnEnter(OnTeleporterEventPreStart); ChargingState.OnEnter += new hook_OnEnter(OnTeleporterEventStart); ChargingState.FixedUpdate += new hook_FixedUpdate(OnTeleporterEventUpdate); } private void FuckPlanula(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0039: 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) ILCursor val = new ILCursor(il); val.GotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "parentEgg") }); val.Emit(OpCodes.Pop); val.Emit(OpCodes.Ldc_I4_0); } private void OnTeleporterEventPreStart(orig_OnEnter orig, IdleToChargingState self) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); int itemCountForTeam = Util.GetItemCountForTeam((TeamIndex)1, Items.ParentEgg.itemIndex, false, false); if (itemCountForTeam <= 0) { return; } TeleporterInteraction teleporterInteraction = ((BaseTeleporterState)self).teleporterInteraction; GameObject chargeActivatorServer = teleporterInteraction.chargeActivatorServer; PlanulaSunController planulaSunController = ((Component)teleporterInteraction).gameObject.AddComponent<PlanulaSunController>(); Debug.Log((object)((Object)(object)planulaSunController != (Object)null)); if ((Object)(object)planulaSunController != (Object)null) { planulaSunController.holdoutZoneController = teleporterInteraction.holdoutZoneController; Transform val = ((EntityState)self).transform.Find("FireworkOrigin"); if ((Object)(object)val == (Object)null) { val = ((Component)teleporterInteraction).transform; } planulaSunController.activator = chargeActivatorServer; planulaSunController.CreateBeamEffect(val); planulaSunController.SetSunDuration(itemCountForTeam); } } private void OnTeleporterEventStart(orig_OnEnter orig, ChargingState self) { orig.Invoke(self); PlanulaSunController component = ((EntityState)self).gameObject.GetComponent<PlanulaSunController>(); if ((Object)(object)component != (Object)null) { component.EndBeamEffect(); component.CreateSun(); } } private void OnTeleporterEventUpdate(orig_FixedUpdate orig, ChargingState self) { orig.Invoke(self); } public void RazorwireRework() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RazorwireArmor); CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddRazorBehavior); HealthComponent.TakeDamageProcess += new Manipulator(RazorwireBegin); LightningOrb.OnArrival += new Manipulator(RazorwireArrival); LanguageAPI.Add("ITEM_THORNS_PICKUP", "Retaliate in a burst of bleeding razors on taking damage. Recharges over time."); LanguageAPI.Add("ITEM_THORNS_DESC", $"Increase <style=cIsHealing>armor</style> by <style=cIsHealing>{razorwireArmorBase}</style> <style=cStack>(+{razorwireArmorStack} per stack)</stack>" + "Getting hit causes you to explode in a burst of razors, " + $"<style=cIsDamage>bleeding</style> up to <style=cIsDamage>{razorwireTargetsBase}</style> " + $"<style=cStack>(+{razorwireTargetsStack} per stack)</style> nearby enemies " + "for <style=cIsDamage>" + Tools.ConvertDecimal(razorwireBleedDuration * 0.8f) + "</style> base damage per <style=cIsDamage>razor charge</style> expelled. " + $"You can hold up to {RazorwireBehavior.baseRazors} <style=cStack>(+{RazorwireBehavior.stackRazors} per stack)</style> " + $"razor charges, all reloading over <style=cIsUtility>{RazorwireBehavior.rechargeTime}</style> seconds."); } private void RazorwireArmor(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender.inventory)) { int itemCount = sender.inventory.GetItemCount(Items.Thorns); if (itemCount > 0) { args.armorAdd += razorwireArmorBase + razorwireArmorStack * (float)(itemCount - 1); } } } private void AddRazorBehavior(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); int itemCount = self.inventory.GetItemCount(Items.Thorns); self.AddItemBehavior<RazorwireBehavior>(itemCount); } private void RazorwireArrival(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int healthComponentLoc = 0; val.GotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<HurtBox>(x, "healthComponent"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref healthComponentLoc) }); val.GotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, healthComponentLoc) }); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<HealthComponent, LightningOrb, HealthComponent>>((Func<HealthComponent, LightningOrb, HealthComponent>)delegate(HealthComponent hc, LightningOrb orb) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 if ((int)orb.lightningType == 6 && (Object)(object)hc != (Object)null) { for (int i = 0; (float)i < orb.procCoefficient; i++) { DotController.InflictDot(((Component)hc).gameObject, orb.attacker, (DotIndex)0, razorwireBleedDuration, orb.damageValue, (uint?)null); } return null; } return hc; }); } private void RazorwireBegin(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int buffCount = 0; val.GotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdflda<HealthComponent>(x, "itemCounts"), (Instruction x) => ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "thorns") }); int num4 = default(int); int num3 = default(int); val.GotoPrev((MoveType)0, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num4), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num3) }); val.Next.Operand = razorwireTargetsBase; int index = val.Index; val.Index = index + 1; val.Next.Operand = razorwireTargetsStack; val.GotoNext((MoveType)2, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdflda<HealthComponent>(x, "itemCounts"), (Instruction x) => ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "thorns"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0) }); index = val.Index; val.Index = index - 1; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<int, HealthComponent, int>>((Func<int, HealthComponent, int>)delegate(int itemCount, HealthComponent hc) { CharacterBody body2 = hc.body; buffCount = 0; while (body2.HasBuff(CommonAssets.razorChargeBuff)) { body2.RemoveBuff(CommonAssets.razorChargeBuff); buffCount++; } return (buffCount > 0) ? itemCount : 0; }); val.GotoNext((MoveType)2, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdflda<HealthComponent>(x, "itemCounts"), (Instruction x) => ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "thorns") }); int num2 = default(int); int num = default(int); val.GotoPrev((MoveType)0, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num) }); val.Next.Operand = razorwireRangeBase; index = val.Index; val.Index = index + 1; val.Next.Operand = razorwireRangeStack; val.GotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<OrbManager>(x, "AddOrb") }); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<LightningOrb, HealthComponent, LightningOrb>>((Func<LightningOrb, HealthComponent, LightningOrb>)delegate(LightningOrb razorwireOrb, HealthComponent hc) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Invalid comparison between Unknown and I4 CharacterBody body = hc.body; razorwireOrb.procCoefficient = buffCount; razorwireOrb.damageValue = (((int)body.teamComponent.teamIndex == 1) ? 1f : 0.2f); return razorwireOrb; }); } private void NerfRazorwireOrb(orig_Begin orig, LightningOrb self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_0025: Unknown result type (might be due to invalid IL or missing references) if ((int)self.lightningType == 6) { self.procCoefficient = razorwireProcCoeff; self.damageType.damageType = (DamageType)1024; } orig.Invoke(self); } public void SquolypRework() { SquolypChangeAttack(); SquolypChangeStats(); } private void SquolypChangeAttack() { //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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) SkillDef val = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Squid/SquidTurretBodyTurret.asset").WaitForCompletion(); Content.AddEntityState(typeof(SquidBlaster)); SerializableEntityStateType activationState = default(SerializableEntityStateType); ((SerializableEntityStateType)(ref activationState))..ctor(typeof(SquidBlaster)); val.activationState = activationState; } private void SquolypChangeStats() { //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<GameObject>((object)"RoR2/Base/Squid/SquidTurretBody.prefab").WaitForCompletion(); CharacterBody component = val.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component)) { component.baseDamage = 12f; component.levelDamage = 2.4f; } } public void LunarExplodersDuringBrother() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown Phase1.OnEnter += new hook_OnEnter(InitializeExploderDirector); Phase2.OnEnter += new hook_OnEnter(DisableExploderDirector); Phase3.OnEnter += new hook_OnEnter(RestoreExploderDirector); Phase4.OnEnter += new hook_OnEnter(KillExploderDirector); } private void GetExploderCard(List<DirectorCardHolder> cardList, 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_0017: Invalid comparison between Unknown and I4 //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Invalid comparison between Unknown and I4 Debug.Log((object)"jsd fjsn"); if ((int)currentStage.stage != 65536) { return; } List<DirectorCardHolder> list = new List<DirectorCardHolder>(); foreach (DirectorCardHolder card2 in cardList) { if ((int)card2.MonsterCategory == 2) { DirectorCard card = card2.Card; SpawnCard spawnCard = card.spawnCard; GameObject prefab = spawnCard.prefab; if (((Object)spawnCard).name == "cscLunarExploder") { exploderCards.Add(card); } } } foreach (DirectorCardHolder item in list) { cardList.Remove(item); } } private void InitializeExploderDirector(orig_OnEnter orig, Phase1 self) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if ((Object)(object)exploderDirector == (Object)null) { GameObject val = new GameObject("CommencementPerfected_ChimeraExploderDirector_OrTheCPCEDForShort"); val.transform.position = new Vector3(-88f, 491.1f, 0f); exploderDirector = val.AddComponent<ExploderDirector>(); exploderDirector.baseState = (BrotherEncounterBaseState)(object)self; } } private void DisableExploderDirector(orig_OnEnter orig, Phase2 self) { orig.Invoke(self); exploderDirector.SetDirectorRate(phaseTwoRate); } private void RestoreExploderDirector(orig_OnEnter orig, Phase3 self) { orig.Invoke(self); exploderDirector.SetDirectorRate(phaseThreeRate); } private void KillExploderDirector(orig_OnEnter orig, Phase4 self) { orig.Invoke(self); Object.Destroy((Object)(object)((Component)exploderDirector).gameObject); } public static bool ModLoaded(string modGuid) { return modGuid != "" && Chainloader.PluginInfos.ContainsKey(modGuid); } public static bool IsMissileArtifactEnabled() { if (ModLoaded("com.RiskOfBrainrot.IAmBecomeMissiles")) { return GetMissileArtifactEnabled(); } return false; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static bool GetMissileArtifactEnabled() { return RunArtifactManager.instance.IsArtifactEnabled(MissileReworkPlugin.MissileArtifact); } private void Awake() { instance = this; Config.Init(); Log.Init(((BaseUnityPlugin)this).Logger); CreateExpansionDef(); Language.Init(); Hooks.Init(); CommonAssets.Init(); EliteModule.Init(); AllyCaps.Init(); Spawnlists.Init(); StormsCore.Init(); ConfigManager.HandleConfigAttributes(((object)this).GetType(), "SwanSong", Config.MyConfig); InitializeContent(); InitializeChanges(); Materials.SwapShadersFromMaterialsInBundle(mainAssetBundle); Materials.SwapShadersFromMaterialsInBundle(orangeAssetBundle); new ContentPacks().Initialize(); } private void CreateExpansionDef() { expansionDefSS2 = ScriptableObject.CreateInstance<ExpansionDef>(); expansionDefSS2.nameToken = "EXPANSION2R4R_NAME"; expansionDefSS2.descriptionToken = "EXPANSION2R4R_DESCRIPTION"; expansionDefSS2.iconSprite = null; expansionDefSS2.disabledIconSprite = null; LanguageAPI.Add("EXPANSION2R4R_NAME", "Swan Song"); LanguageAPI.Add("EXPANSION2R4R_DESCRIPTION", "Adds content from the 'Swan Song' expansion to the game."); Content.AddExpansionDef(expansionDefSS2); expansionDefSOTS = ScriptableObject.CreateInstance<ExpansionDef>(); expansionDefSOTS.nameToken = "EXPANSIONSOTS_NAME"; expansionDefSOTS.descriptionToken = "EXPANSIONSOTS_DESCRIPTION"; expansionDefSOTS.iconSprite = null; expansionDefSOTS.disabledIconSprite = null; LanguageAPI.Add("EXPANSIONSOTS_NAME", "Secrets of the Scug"); LanguageAPI.Add("EXPANSIONSOTS_DESCRIPTION", "Adds content from the 'Secrets of the Scug' expansion to the game."); Content.AddExpansionDef(expansionDefSOTS); } private void InitializeContent() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); BeginInitializing<ItemBase>(types, "SwanSongItems.txt"); BeginInitializing<EquipmentBase>(types, "SwanSongEquipment.txt"); BeginInitializing<EliteEquipmentBase>(types, "SwanSongElites.txt"); BeginInitializing<InteractableBase>(types, "SwanSongInteractables.txt"); BeginInitializing<ArtifactBase>(types, "SwanSongArtifacts.txt"); BeginInitializing<SkillBase>(types, "SwanSongSkills.txt"); BeginInitializing<TwistedScavengerBase>(types, "SwanSongScavengers.txt"); } private void InitializeChanges() { BurnReworks(); if (GetConfigBool(defaultValue: true, "Reworks : Razorwire")) { RazorwireRework(); } if (GetConfigBool(defaultValue: true, "Reworks : Laser Scope")) { ReworkLaserScope(); } if (GetConfigBool(defaultValue: true, "Reworks : Happiest Mask")) { HappiestMaskRework(); } if (GetConfigBool(defaultValue: true, "Reworks : Hunters Harpoon")) { HuntersHarpoonRework(); } if (GetConfigBool(defaultValue: true, "Reworks : Focused Convergence")) { FocusedConvergenceChanges(); } if (GetConfigBool(defaultValue: true, "Reworks : Squid Polyp")) { SquolypRework(); } if (GetConfigBool(defaultValue: true, "Reworks : Executive Card")) { ExecutiveCardChanges(); } if (GetConfigBool(defaultValue: true, "Reworks : Leeching Seed")) { ReworkLeechingSeed(); } if (GetConfigBool(defaultValue: true, "Reworks : Bison Steak")) { ReworkFreshMeat(); } if (GetConfigBool(defaultValue: true, "Reworks : Gesture of the Drowned")) { GestureChanges(); } if (GetConfigBool(defaultValue: true, "Reworks : Brittle Crown")) { BrittleCrownChanges(); } if (GetConfigBool(defaultValue: true, "Reworks : Planula")) { PlanulaChanges(); } if (GetConfigBool(defaultValue: true, "Reworks : Commencement")) { MakePillarsFun(); LunarExplodersDuringBrother(); } Secrets.AddSecrets(); } private void BeginInitializing<T>(Type[] allTypes, string fileName = "") where T : SharedBase { Type baseType = typeof(T); if (!baseType.IsAbstract) { Log.Error(Log.Combine() + "Incorrect BaseType: " + baseType.Name); return; } IEnumerable<Type> enumerable = allTypes.Where((Type type) => !type.IsAbstract && type.IsSubclassOf(baseType)); if (enumerable.Count() <= 0) { return; } Log.Debug(Log.Combine(baseType.Name) + "Initializing"); foreach (Type item in enumerable) { string text = Log.Combine(baseType.Name, item.Name); Log.Debug(text); T obj = (T)Activator.CreateInstance(item); if (ValidateBaseType(obj)) { Log.Debug(text + "Validated"); InitializeBaseType(obj); Log.Debug(text + "Initialized"); } } if (!string.IsNullOrEmpty(fileName)) { Language.TryPrintOutput(fileName); } } private bool ValidateBaseType(SharedBase obj) { bool isEnabled = obj.isEnabled; if (obj.lockEnabled) { return isEnabled; } return obj.Bind(isEnabled, "Should This Content Be Enabled"); } private void InitializeBaseType(SharedBase obj) { obj.Init(); } private bool GetConfigBool(bool defaultValue, string packetTitle, string desc = "") { return ConfigManager.DualBindToConfig(packetTitle, Config.MyConfig, "Should This Content Be Enabled", defaultValue, desc); } public static ItemDef RetierItem(string itemName, ItemTier tier = 5) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ItemDef def = LoadItemDef(itemName); return RetierItem(def, tier); } public static ItemDef RetierItem(ItemDef def, ItemTier tier = 5) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)def != (Object)null) { def.tier = tier; def.deprecatedTier = tier; } return def; } internal static void BlacklistSingleItem(string name, ItemTag itemTag = 4) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) ItemDef val = LoadItemDef(name); if ((Object)(object)val != (Object)null) { List<ItemTag> list = new List<ItemTag>(val.tags); list.Add(itemTag); val.tags = list.ToArray(); } else { Log.Error("ItemDef " + name + " failed to load - unable to blacklist"); } } public static void RemoveEquipment(string equipName) { EquipmentDef val = LoadEquipDef(equipName); val.canDrop = false; val.canBeRandomlyTriggered = false; val.enigmaCompatible = false; val.dropOnDeathChance = 0f; } 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; } } private static ItemDef LoadItemDef(string name) { return LegacyResourcesAPI.Load<ItemDef>("ItemDefs/" + name); } private static EquipmentDef LoadEquipDef(string name) { return LegacyResourcesAPI.Load<EquipmentDef>("EquipmentDefs/" + name); } private static BuffDef LoadBuffDef(string name) { return LegacyResourcesAPI.Load<BuffDef>("BuffDefs/" + name); } } public class BrittleCrownBehavior : ItemBehavior { public void Start() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { base.body.SetBuffCount(CommonAssets.brittleCrownCursePurchase.buffIndex, SwanSongPlugin.brittleCrownStealCountBase + SwanSongPlugin.brittleCrownStealCountStack * (base.stack - 1)); } } public void OnDisable() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { base.body.SetBuffCount(CommonAssets.brittleCrownCursePurchase.buffIndex, 0); } } } public class HappiestMaskBehavior : ItemBehavior { public static float baseHauntRadius = 35f; public static float baseHauntInterval = 10f; private float hauntStopwatch = 0f; private void FixedUpdate() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: 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_0135: Unknown result type (might be due to invalid IL or missing references) hauntStopwatch += Time.fixedDeltaTime; if (!(hauntStopwatch >= baseHauntInterval)) { return; } hauntStopwatch -= baseHauntInterval; if (!NetworkServer.active) { return; } SphereSearch val = new SphereSearch { mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, origin = base.body.transform.position, queryTriggerInteraction = (QueryTriggerInteraction)2, radius = baseHauntRadius }; TeamMask val2 = TeamMask.AllExcept(base.body.teamComponent.teamIndex); List<HurtBox> list = new List<HurtBox>(); val.RefreshCandidates().FilterCandidatesByHurtBoxTeam(val2).FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(list); int num = list.Count; while (num > 0) { int index = Random.Range(0, num - 1); HealthComponent healthComponent = list[index].healthComponent; CharacterBody body = healthComponent.body; if (body.isBoss || !Object.op_Implicit((Object)(object)body)) { list.Remove(list[index]); num--; continue; } for (int i = 0; i < base.stack; i++) { body.AddBuff(CommonAssets.hauntDebuff.buffIndex); } break; } } private void OnDisable() { hauntStopwatch = 0f; } } public class HuntersHarpoonBehavior : ItemBehavior { public static float baseHauntRadius = 35f; public static float hauntRetryTime = 1f; private float hauntStopwatch = 0f; private void Start() { hauntStopwatch = SwanSongPlugin.harpoonTargetTime; } private void FixedUpdate() { //IL_0038: 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_0043: 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_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) hauntStopwatch += Time.fixedDeltaTime; if (!(hauntStopwatch >= SwanSongPlugin.harpoonTargetTime) || !NetworkServer.active) { return; } SphereSearch val = new SphereSearch { mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, origin = base.body.transform.position, queryTriggerInteraction = (QueryTriggerInteraction)2, radius = baseHauntRadius }; TeamMask val2 = TeamMask.AllExcept(base.body.teamComponent.teamIndex); List<HurtBox> list = new List<HurtBox>(); val.RefreshCandidates().FilterCandidatesByHurtBoxTeam(val2).FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(list); int num = list.Count; while (num > 0) { int index = Random.Range(0, num - 1); HealthComponent healthComponent = list[index].healthComponent; CharacterBody body = healthComponent.body; if (!Object.op_Implicit((Object)(object)body)) { list.Remove(list[index]); num--; continue; } DebuffEnemy(body); hauntStopwatch -= SwanSongPlugin.harpoonTargetTime; return; } hauntStopwatch -= hauntRetryTime; } private void DebuffEnemy(CharacterBody enemyBody) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < base.stack; i++) { enemyBody.AddTimedBuffAuthority(CommonAssets.harpoonDebuff.buffIndex, SwanSongPlugin.harpoonTargetTime); } ModelLocator modelLocator = enemyBody.modelLocator; Transform val = ((modelLocator != null) ? modelLocator.modelTransform : null); if ((Object)(object)val != (Object)null) { TemporaryOverlayInstance val2 = TemporaryOverlayManager.AddOverlay(((Component)val).gameObject); val2.duration = SwanSongPlugin.harpoonTargetTime; val2.animateShaderAlpha = true; val2.alphaCurve = AnimationCurve.Linear(0f, 1f, 1f, 0f); val2.destroyComponentOnEnd = true; val2.originalMaterial = SwanSongPlugin.harpoonTargetMaterial; val2.AddToCharacterModel(((Component)val).GetComponent<CharacterModel>()); } } private void OnDisable() { hauntStopwatch = 0f; } } public class CombatTelescopeBehavior : ItemBehavior { public static float combatTelescopeWaitTime = 0.2f; private void FixedUpdate() { if (!NetworkServer.active) { return; } float notMovingStopwatch = base.body.notMovingStopwatch; if (base.stack > 0 && notMovingStopwatch >= combatTelescopeWaitTime) { if (!base.body.HasBuff(CommonAssets.combatTelescopeCritChance)) { base.body.AddBuff(CommonAssets.combatTelescopeCritChance); } } else if (base.body.HasBuff(CommonAssets.combatTelescopeCritChance)) { base.body.RemoveBuff(CommonAssets.combatTelescopeCritChance); } } private void OnDisable() { base.body.RemoveBuff(CommonAssets.combatTelescopeCritChance); } } public class PlanulaSunController : MonoBehaviour { public GameObject activator; public HoldoutZoneController holdoutZoneController; private Vector3 sunSpawnPosition; private ParticleSystem beamEffectInstance; private GameObject sunInstance; private float sunDuration; private float sunAge = 0f; public void SetSunDuration(int stack) { sunDuration = ItemBase.GetStackValue(SwanSongPlugin.sunDurationBase, SwanSongPlugin.sunDurationStack, stack); } public void CreateBeamEffect(Transform parent) { //IL_000e: 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_0018: 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_003f: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)parent)) { sunSpawnPosition = FindSunSpawnPosition(parent.position); ChildLocator component = Object.Instantiate<GameObject>(ChannelSunStart.beamVfxPrefab, parent).GetComponent<ChildLocator>(); component.FindChild("EndPoint").SetPositionAndRotation(sunSpawnPosition, Quaternion.identity); Transform val = component.FindChild("BeamParticles"); beamEffectInstance = ((Component)val).GetComponent<ParticleSystem>(); } else { beamEffectInstance = null; } } public void EndBeamEffect() { //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) if ((Object)(object)beamEffectInstance != (Object)null) { MainModule main = beamEffectInstance.main; ((MainModule)(ref main)).loop = false; beamEffectInstance.Stop(); } } public static Vector3 FindSunSpawnPosition(Vector3 searchOrig