using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using IL.EntityStates.Seeker; using IL.RoR2; using ItemsReworked.CommonItems; using ItemsReworked.LegendaryItems; using ItemsReworked.UncommonItems; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using On.RoR2; using R2API; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Orbs; using UnityEngine; using UnityEngine.AddressableAssets; 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 = ".NET Standard 2.1")] [assembly: AssemblyCompany("ItemsReworked")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ItemsReworked")] [assembly: AssemblyTitle("ItemsReworked")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace ItemsReworked { internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } public class LuminousOrb : GenericDamageOrb, IOrbFixedUpdateBehavior { private Vector3 lastKnownTargetPosition; public override void Begin() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) ((GenericDamageOrb)this).Begin(); ((Orb)this).duration = 0f; if (Object.op_Implicit((Object)(object)((Orb)this).target)) { lastKnownTargetPosition = ((Component)((Orb)this).target).transform.position; } } public override GameObject GetOrbEffect() { return null; } public override void OnArrival() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)base.attacker) && Object.op_Implicit((Object)(object)((Orb)this).target)) { new BlastAttack { attacker = base.attacker, baseDamage = base.damageValue, baseForce = 0f, bonusForce = Vector3.down * 10f, crit = base.isCrit, damageColorIndex = (DamageColorIndex)3, falloffModel = (FalloffModel)0, inflictor = null, position = ((Component)((Orb)this).target).transform.position, procChainMask = base.procChainMask, procCoefficient = base.procCoefficient, radius = 1f, teamIndex = TeamComponent.GetObjectTeam(base.attacker) }.Fire(); } } public void FixedUpdate() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((Orb)this).target)) { lastKnownTargetPosition = ((Component)((Orb)this).target).transform.position; } } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency("com.rune580.riskofoptions", "2.8.2")] [BepInPlugin("0p41.Sots_Items_Reworked", "Sots_Items_Reworked", "0.7.8")] public class MainPlugin : BaseUnityPlugin { public const string PluginGUID = "0p41.Sots_Items_Reworked"; public const string PluginAuthor = "0p41"; public const string PluginName = "Sots_Items_Reworked"; public const string PluginVersion = "0.7.8"; public void Awake() { Log.Init(((BaseUnityPlugin)this).Logger); ModConfig.Init(((BaseUnityPlugin)this).Config); if (ModConfig.ResetValues != null) { ModConfig.ResetAllValues(ModConfig.ResetValues.Value, "0.7.8"); } if (ModConfig.warpedEchoChanges.Value) { WarpedEchoChanges warpedEchoChanges = new WarpedEchoChanges(); warpedEchoChanges.Init(); } if (ModConfig.chronicExpansionChanges.Value) { ChronicExpansionChanges chronicExpansionChanges = new ChronicExpansionChanges(); chronicExpansionChanges.Init(); } if (ModConfig.knockBackFinChanges.Value) { KnockbackFinChanges knockbackFinChanges = new KnockbackFinChanges(); knockbackFinChanges.Init(); } if (ModConfig.bolsteringLanternChanges.Value) { LanternChanges lanternChanges = new LanternChanges(); lanternChanges.Init(); } if (ModConfig.antlerShieldChanges.Value) { AntlersChanges antlersChanges = new AntlersChanges(); antlersChanges.Init(); } if (ModConfig.chanceDollChanges.Value) { ChanceDollChanges chanceDollChanges = new ChanceDollChanges(); chanceDollChanges.Init(); } if (ModConfig.prayerBeadsChanges.Value) { PrayerBeadsChanges prayerBeadsChanges = new PrayerBeadsChanges(); prayerBeadsChanges.Init(); } if (ModConfig.luminousShotChanges.Value) { LuminousShotChanges luminousShotChanges = new LuminousShotChanges(); luminousShotChanges.Init(); } if (ModConfig.saleStarChanges.Value) { SaleStarChanges saleStarChanges = new SaleStarChanges(); saleStarChanges.Init(); } if (ModConfig.unstableTransmitterChanges.Value) { UnstableTransmiterChanges unstableTransmiterChanges = new UnstableTransmiterChanges(); unstableTransmiterChanges.Init(); } if (ModConfig.noxiousThornChanges.Value) { NoxiousThornChanges noxiousThornChanges = new NoxiousThornChanges(); noxiousThornChanges.Init(); } if (ModConfig.warBondsChanges.Value) { WarBondsChanges warBondsChanges = new WarBondsChanges(); warBondsChanges.Init(); } } } public static class ModConfig { public static ConfigEntry ResetValues; public static ConfigEntry lastVersion; public static ConfigEntry warpedEchoChanges; public static ConfigEntry warpedEchoThreshold; private const int defaultEchoThreshold = 25; public static ConfigEntry warpedEchoSplit; private const int defaultEchoSplit = 60; public static ConfigEntry warpedEchoBaseDuration; private const float defaultEchoDuration = 4f; public static ConfigEntry warpedEchoExtraDuration; private const float defaultEchoExtraDuration = 0.5f; public static ConfigEntry warpedEchoCooldown; private const float defaultEchoCooldown = 10f; public static ConfigEntry chronicExpansionChanges; public static ConfigEntry chronicExpansionKillPerStack; private const int defaultChronicKillPerStack = 5; public static ConfigEntry chronicExpansionMaxStacks; private const int defaultChronicMaxStacks = 20; public static ConfigEntry chronicExpansionBaseStackDamage; private const float defaultChronicBaseStackDamage = 1.25f; public static ConfigEntry chronicExpansionExtraStackDamage; private const float defaultChronicExtraStackDamage = 1.25f; public static ConfigEntry chronicExpansionEliteValue; private const int defaultChronicEliteValue = 5; public static ConfigEntry chronicExpansionChampionValue; private const int defaultChronicChampionValue = 25; public static ConfigEntry knockBackFinChanges; public static ConfigEntry knockBackFinChance; private const float defaultFinChance = 10f; public static ConfigEntry knockBackFinBaseDamage; private const float defaultFinBaseDamage = 15f; public static ConfigEntry knockBackFinExtraDamage; private const float defaultFinExtraDamage = 15f; public static ConfigEntry bolsteringLanternChanges; public static ConfigEntry bolsteringLanternBaseArmor; private const float defaultLanternBaseArmor = 10f; public static ConfigEntry bolsteringLanternExtraArmor; private const float defaultLanternExtraArmor = 5f; public static ConfigEntry bolsteringLanternThreshold; private const int defaultLanternThreshold = 50; public static ConfigEntry antlerShieldChanges; public static ConfigEntry antlerShieldSpeed; private const float defaultAntlerSpeed = 8f; public static ConfigEntry antlerShieldShield; private const float defaultAntlerShield = 4f; public static ConfigEntry antlerShieldJump; private const float defaultAntlerJump = 25f; public static ConfigEntry chanceDollChanges; public static ConfigEntry chanceDollBaseChance; private const float defaultChanceDollChance = 30f; public static ConfigEntry chanceDollExtraChance; private const float defaultChanceDollExtraChance = 10f; public static ConfigEntry chanceDollCostReduction; private const float defaultChanceDollCostReduction = 25f; public static ConfigEntry chanceDollTier1; private const int defaultChanceDollTier1 = 20; public static ConfigEntry chanceDollTier2; private const int defaultChanceDollTier2 = 79; public static ConfigEntry chanceDollTier3; private const int defaultChanceDollTier3 = 1; public static ConfigEntry chanceDollBaseBossChance; private const float defaultChanceDollBossChance = 1f; public static ConfigEntry chanceDollExtraBossChance; private const float defaultChanceDollBossExtraChance = 0.5f; public static ConfigEntry prayerBeadsChanges; public static ConfigEntry prayerBeadsChance; private const float defaultPrayerChance = 10f; public static ConfigEntry prayerBeadsTier2; private const int defaultPrayerTier2 = 40; public static ConfigEntry prayerBeadsTier3; private const int defaultPrayerTier3 = 15; public static ConfigEntry prayerBeadsBoss; private const int defaultPrayerBoss = 5; public static ConfigEntry prayerBeadsVoid1; private const int defaultPrayerVoid1 = 10; public static ConfigEntry prayerBeadsVoid2; private const int defaultPrayerVoid2 = 25; public static ConfigEntry prayerBeadsVoid3; private const int defaultPrayerVoid3 = 5; public static ConfigEntry saleStarChanges; public static ConfigEntry saleStarDistance; private const float defaultSaleStarDistance = 4f; public static ConfigEntry luminousShotChanges; public static ConfigEntry luminousShotCooldown; private const int defaultLuminousShotCooldown = 15; public static ConfigEntry luminousShotBaseDamage; private const int defaultLuminousBaseDamage = 200; public static ConfigEntry luminousShotBaseThunder; private const int defaultLuminousBaseStacks = 3; public static ConfigEntry luminousShotExtraThunder; private const int defaultLuminousExtraStacks = 1; public static ConfigEntry unstableTransmitterChanges; public static ConfigEntry unstableTransmitterBaseDamage; private const int defaultUnstableTransmitterBaseDamage = 350; public static ConfigEntry unstableTransmitterExtraDamage; private const int defaultUnstableTransmitterExtraDamage = 350; public static ConfigEntry unstableTransmitterBaseCooldown; private const int defaultUnstableTransmitterBaseCooldown = 180; public static ConfigEntry unstableTransmitterCooldownReduction; private const float defaultUnstableTransmitterCooldownReduction = 10f; public static ConfigEntry unstableTransmitterMinimumCooldown; private const int defaultUnstableTransmitterMinimumCooldown = 30; public static ConfigEntry noxiousThornChanges; public static ConfigEntry noxiousThornProcChance; private const float defaultThornProcChance = 20f; public static ConfigEntry noxiousThornDamageMult; private const int defaultThornDmgMult = 60; public static ConfigEntry noxiousThornThornPerProc; private const int defaultThornProjectileAmount = 1; public static ConfigEntry noxiousThornExtraThornPerProc; private const int defaultThornExtraProjectileAmount = 1; public static ConfigEntry noxiousThornBaseTargets; private const int defaultThornBaseTargets = 3; public static ConfigEntry noxiousThornExtraTargets; private const int defaultThornExtraTargets = 2; public static ConfigEntry noxiousThornRange; private const int defaultThornRange = 15; public static ConfigEntry noxiousThornBleed; private const int defaultThornBleed = 3; public static ConfigEntry warBondsChanges; public static ConfigEntry warBondsBaseChests; private const int defaultWarBondsBaseChests = 3; public static ConfigEntry warBondsExtraChests; private const int defaultWarBondsExtraChests = 1; public static ConfigEntry warBondsTier1Weight; private const int defaultWarBondsTier1Weight = 79; public static ConfigEntry warBondsTier2Weight; private const int defaultWarBondsTier2Weight = 20; public static ConfigEntry warBondsTier3Weight; private const int defaultWarBondsTier3Weight = 1; public static void Init(ConfigFile config) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Expected O, but got Unknown //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Expected O, but got Unknown //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Expected O, but got Unknown //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Expected O, but got Unknown //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Expected O, but got Unknown //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Expected O, but got Unknown //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Expected O, but got Unknown //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Expected O, but got Unknown //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Expected O, but got Unknown //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Expected O, but got Unknown //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Expected O, but got Unknown //IL_0370: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Expected O, but got Unknown //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Expected O, but got Unknown //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Expected O, but got Unknown //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Expected O, but got Unknown //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) //IL_044a: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Expected O, but got Unknown //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Expected O, but got Unknown //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_0499: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Expected O, but got Unknown //IL_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Expected O, but got Unknown //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Expected O, but got Unknown //IL_051c: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Unknown result type (might be due to invalid IL or missing references) //IL_052c: Unknown result type (might be due to invalid IL or missing references) //IL_0537: Unknown result type (might be due to invalid IL or missing references) //IL_0542: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Expected O, but got Unknown //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Expected O, but got Unknown //IL_0587: Unknown result type (might be due to invalid IL or missing references) //IL_058c: Unknown result type (might be due to invalid IL or missing references) //IL_0597: Unknown result type (might be due to invalid IL or missing references) //IL_05a2: Unknown result type (might be due to invalid IL or missing references) //IL_05ad: Unknown result type (might be due to invalid IL or missing references) //IL_05b9: Expected O, but got Unknown //IL_05b4: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Expected O, but got Unknown //IL_05f2: Unknown result type (might be due to invalid IL or missing references) //IL_05f7: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_060d: Unknown result type (might be due to invalid IL or missing references) //IL_0618: Unknown result type (might be due to invalid IL or missing references) //IL_0624: Expected O, but got Unknown //IL_061f: Unknown result type (might be due to invalid IL or missing references) //IL_0629: Expected O, but got Unknown //IL_064b: Unknown result type (might be due to invalid IL or missing references) //IL_0655: Expected O, but got Unknown //IL_0689: Unknown result type (might be due to invalid IL or missing references) //IL_068e: Unknown result type (might be due to invalid IL or missing references) //IL_0699: Unknown result type (might be due to invalid IL or missing references) //IL_06a4: Unknown result type (might be due to invalid IL or missing references) //IL_06af: Unknown result type (might be due to invalid IL or missing references) //IL_06bb: Expected O, but got Unknown //IL_06b6: Unknown result type (might be due to invalid IL or missing references) //IL_06c0: Expected O, but got Unknown //IL_06f4: Unknown result type (might be due to invalid IL or missing references) //IL_06f9: Unknown result type (might be due to invalid IL or missing references) //IL_0704: Unknown result type (might be due to invalid IL or missing references) //IL_070f: Unknown result type (might be due to invalid IL or missing references) //IL_071a: Unknown result type (might be due to invalid IL or missing references) //IL_0726: Expected O, but got Unknown //IL_0721: Unknown result type (might be due to invalid IL or missing references) //IL_072b: Expected O, but got Unknown //IL_0759: Unknown result type (might be due to invalid IL or missing references) //IL_075e: Unknown result type (might be due to invalid IL or missing references) //IL_0765: Unknown result type (might be due to invalid IL or missing references) //IL_076d: Unknown result type (might be due to invalid IL or missing references) //IL_0779: Expected O, but got Unknown //IL_0774: Unknown result type (might be due to invalid IL or missing references) //IL_077e: Expected O, but got Unknown //IL_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07aa: Expected O, but got Unknown //IL_07de: Unknown result type (might be due to invalid IL or missing references) //IL_07e3: Unknown result type (might be due to invalid IL or missing references) //IL_07ee: Unknown result type (might be due to invalid IL or missing references) //IL_07f9: Unknown result type (might be due to invalid IL or missing references) //IL_0804: Unknown result type (might be due to invalid IL or missing references) //IL_0810: Expected O, but got Unknown //IL_080b: Unknown result type (might be due to invalid IL or missing references) //IL_0815: Expected O, but got Unknown //IL_0849: Unknown result type (might be due to invalid IL or missing references) //IL_084e: Unknown result type (might be due to invalid IL or missing references) //IL_0859: Unknown result type (might be due to invalid IL or missing references) //IL_0864: Unknown result type (might be due to invalid IL or missing references) //IL_086f: Unknown result type (might be due to invalid IL or missing references) //IL_087b: Expected O, but got Unknown //IL_0876: Unknown result type (might be due to invalid IL or missing references) //IL_0880: Expected O, but got Unknown //IL_08b4: Unknown result type (might be due to invalid IL or missing references) //IL_08b9: Unknown result type (might be due to invalid IL or missing references) //IL_08c4: Unknown result type (might be due to invalid IL or missing references) //IL_08cf: Unknown result type (might be due to invalid IL or missing references) //IL_08da: Unknown result type (might be due to invalid IL or missing references) //IL_08e6: Expected O, but got Unknown //IL_08e1: Unknown result type (might be due to invalid IL or missing references) //IL_08eb: Expected O, but got Unknown //IL_090d: Unknown result type (might be due to invalid IL or missing references) //IL_0917: Expected O, but got Unknown //IL_094b: Unknown result type (might be due to invalid IL or missing references) //IL_0950: Unknown result type (might be due to invalid IL or missing references) //IL_095b: Unknown result type (might be due to invalid IL or missing references) //IL_0966: Unknown result type (might be due to invalid IL or missing references) //IL_0971: Unknown result type (might be due to invalid IL or missing references) //IL_097d: Expected O, but got Unknown //IL_0978: Unknown result type (might be due to invalid IL or missing references) //IL_0982: Expected O, but got Unknown //IL_09b6: Unknown result type (might be due to invalid IL or missing references) //IL_09bb: Unknown result type (might be due to invalid IL or missing references) //IL_09c6: Unknown result type (might be due to invalid IL or missing references) //IL_09d1: Unknown result type (might be due to invalid IL or missing references) //IL_09dc: Unknown result type (might be due to invalid IL or missing references) //IL_09e8: Expected O, but got Unknown //IL_09e3: Unknown result type (might be due to invalid IL or missing references) //IL_09ed: Expected O, but got Unknown //IL_0a21: Unknown result type (might be due to invalid IL or missing references) //IL_0a26: Unknown result type (might be due to invalid IL or missing references) //IL_0a31: Unknown result type (might be due to invalid IL or missing references) //IL_0a3c: Unknown result type (might be due to invalid IL or missing references) //IL_0a47: Unknown result type (might be due to invalid IL or missing references) //IL_0a53: Expected O, but got Unknown //IL_0a4e: Unknown result type (might be due to invalid IL or missing references) //IL_0a58: Expected O, but got Unknown //IL_0a86: Unknown result type (might be due to invalid IL or missing references) //IL_0a8b: Unknown result type (might be due to invalid IL or missing references) //IL_0a92: Unknown result type (might be due to invalid IL or missing references) //IL_0a9d: Unknown result type (might be due to invalid IL or missing references) //IL_0aa9: Expected O, but got Unknown //IL_0aa4: Unknown result type (might be due to invalid IL or missing references) //IL_0aae: Expected O, but got Unknown //IL_0adc: Unknown result type (might be due to invalid IL or missing references) //IL_0ae1: Unknown result type (might be due to invalid IL or missing references) //IL_0ae8: Unknown result type (might be due to invalid IL or missing references) //IL_0af3: Unknown result type (might be due to invalid IL or missing references) //IL_0aff: Expected O, but got Unknown //IL_0afa: Unknown result type (might be due to invalid IL or missing references) //IL_0b04: Expected O, but got Unknown //IL_0b30: Unknown result type (might be due to invalid IL or missing references) //IL_0b35: Unknown result type (might be due to invalid IL or missing references) //IL_0b3c: Unknown result type (might be due to invalid IL or missing references) //IL_0b47: Unknown result type (might be due to invalid IL or missing references) //IL_0b53: Expected O, but got Unknown //IL_0b4e: Unknown result type (might be due to invalid IL or missing references) //IL_0b58: Expected O, but got Unknown //IL_0b8c: Unknown result type (might be due to invalid IL or missing references) //IL_0b91: Unknown result type (might be due to invalid IL or missing references) //IL_0b9c: Unknown result type (might be due to invalid IL or missing references) //IL_0ba7: Unknown result type (might be due to invalid IL or missing references) //IL_0bb2: Unknown result type (might be due to invalid IL or missing references) //IL_0bbe: Expected O, but got Unknown //IL_0bb9: Unknown result type (might be due to invalid IL or missing references) //IL_0bc3: Expected O, but got Unknown //IL_0bf7: Unknown result type (might be due to invalid IL or missing references) //IL_0bfc: Unknown result type (might be due to invalid IL or missing references) //IL_0c07: Unknown result type (might be due to invalid IL or missing references) //IL_0c12: Unknown result type (might be due to invalid IL or missing references) //IL_0c1d: Unknown result type (might be due to invalid IL or missing references) //IL_0c29: Expected O, but got Unknown //IL_0c24: Unknown result type (might be due to invalid IL or missing references) //IL_0c2e: Expected O, but got Unknown //IL_0c50: Unknown result type (might be due to invalid IL or missing references) //IL_0c5a: Expected O, but got Unknown //IL_0c8e: Unknown result type (might be due to invalid IL or missing references) //IL_0c93: Unknown result type (might be due to invalid IL or missing references) //IL_0c9e: Unknown result type (might be due to invalid IL or missing references) //IL_0ca9: Unknown result type (might be due to invalid IL or missing references) //IL_0cb4: Unknown result type (might be due to invalid IL or missing references) //IL_0cc0: Expected O, but got Unknown //IL_0cbb: Unknown result type (might be due to invalid IL or missing references) //IL_0cc5: Expected O, but got Unknown //IL_0cf3: Unknown result type (might be due to invalid IL or missing references) //IL_0cf8: Unknown result type (might be due to invalid IL or missing references) //IL_0cff: Unknown result type (might be due to invalid IL or missing references) //IL_0d0a: Unknown result type (might be due to invalid IL or missing references) //IL_0d16: Expected O, but got Unknown //IL_0d11: Unknown result type (might be due to invalid IL or missing references) //IL_0d1b: Expected O, but got Unknown //IL_0d49: Unknown result type (might be due to invalid IL or missing references) //IL_0d4e: Unknown result type (might be due to invalid IL or missing references) //IL_0d55: Unknown result type (might be due to invalid IL or missing references) //IL_0d60: Unknown result type (might be due to invalid IL or missing references) //IL_0d6c: Expected O, but got Unknown //IL_0d67: Unknown result type (might be due to invalid IL or missing references) //IL_0d71: Expected O, but got Unknown //IL_0d9d: Unknown result type (might be due to invalid IL or missing references) //IL_0da2: Unknown result type (might be due to invalid IL or missing references) //IL_0da9: Unknown result type (might be due to invalid IL or missing references) //IL_0db4: Unknown result type (might be due to invalid IL or missing references) //IL_0dc0: Expected O, but got Unknown //IL_0dbb: Unknown result type (might be due to invalid IL or missing references) //IL_0dc5: Expected O, but got Unknown //IL_0df3: Unknown result type (might be due to invalid IL or missing references) //IL_0df8: Unknown result type (might be due to invalid IL or missing references) //IL_0dff: Unknown result type (might be due to invalid IL or missing references) //IL_0e0a: Unknown result type (might be due to invalid IL or missing references) //IL_0e16: Expected O, but got Unknown //IL_0e11: Unknown result type (might be due to invalid IL or missing references) //IL_0e1b: Expected O, but got Unknown //IL_0e49: Unknown result type (might be due to invalid IL or missing references) //IL_0e4e: Unknown result type (might be due to invalid IL or missing references) //IL_0e55: Unknown result type (might be due to invalid IL or missing references) //IL_0e60: Unknown result type (might be due to invalid IL or missing references) //IL_0e6c: Expected O, but got Unknown //IL_0e67: Unknown result type (might be due to invalid IL or missing references) //IL_0e71: Expected O, but got Unknown //IL_0e9d: Unknown result type (might be due to invalid IL or missing references) //IL_0ea2: Unknown result type (might be due to invalid IL or missing references) //IL_0ea9: Unknown result type (might be due to invalid IL or missing references) //IL_0eb4: Unknown result type (might be due to invalid IL or missing references) //IL_0ec0: Expected O, but got Unknown //IL_0ebb: Unknown result type (might be due to invalid IL or missing references) //IL_0ec5: Expected O, but got Unknown //IL_0ee7: Unknown result type (might be due to invalid IL or missing references) //IL_0ef1: Expected O, but got Unknown //IL_0f1f: Unknown result type (might be due to invalid IL or missing references) //IL_0f24: Unknown result type (might be due to invalid IL or missing references) //IL_0f2b: Unknown result type (might be due to invalid IL or missing references) //IL_0f33: Unknown result type (might be due to invalid IL or missing references) //IL_0f3f: Expected O, but got Unknown //IL_0f3a: Unknown result type (might be due to invalid IL or missing references) //IL_0f44: Expected O, but got Unknown //IL_0f78: Unknown result type (might be due to invalid IL or missing references) //IL_0f7d: Unknown result type (might be due to invalid IL or missing references) //IL_0f88: Unknown result type (might be due to invalid IL or missing references) //IL_0f93: Unknown result type (might be due to invalid IL or missing references) //IL_0f9e: Unknown result type (might be due to invalid IL or missing references) //IL_0faa: Expected O, but got Unknown //IL_0fa5: Unknown result type (might be due to invalid IL or missing references) //IL_0faf: Expected O, but got Unknown //IL_0fdb: Unknown result type (might be due to invalid IL or missing references) //IL_0fe0: Unknown result type (might be due to invalid IL or missing references) //IL_0fe7: Unknown result type (might be due to invalid IL or missing references) //IL_0fef: Unknown result type (might be due to invalid IL or missing references) //IL_0ffb: Expected O, but got Unknown //IL_0ff6: Unknown result type (might be due to invalid IL or missing references) //IL_1000: Expected O, but got Unknown //IL_102c: Unknown result type (might be due to invalid IL or missing references) //IL_1031: Unknown result type (might be due to invalid IL or missing references) //IL_1038: Unknown result type (might be due to invalid IL or missing references) //IL_1040: Unknown result type (might be due to invalid IL or missing references) //IL_104c: Expected O, but got Unknown //IL_1047: Unknown result type (might be due to invalid IL or missing references) //IL_1051: Expected O, but got Unknown //IL_1073: Unknown result type (might be due to invalid IL or missing references) //IL_107d: Expected O, but got Unknown //IL_10b1: Unknown result type (might be due to invalid IL or missing references) //IL_10b6: Unknown result type (might be due to invalid IL or missing references) //IL_10c1: Unknown result type (might be due to invalid IL or missing references) //IL_10cc: Unknown result type (might be due to invalid IL or missing references) //IL_10d7: Unknown result type (might be due to invalid IL or missing references) //IL_10e3: Expected O, but got Unknown //IL_10de: Unknown result type (might be due to invalid IL or missing references) //IL_10e8: Expected O, but got Unknown //IL_110a: Unknown result type (might be due to invalid IL or missing references) //IL_1114: Expected O, but got Unknown //IL_1148: Unknown result type (might be due to invalid IL or missing references) //IL_114d: Unknown result type (might be due to invalid IL or missing references) //IL_1154: Unknown result type (might be due to invalid IL or missing references) //IL_115f: Unknown result type (might be due to invalid IL or missing references) //IL_116b: Expected O, but got Unknown //IL_1166: Unknown result type (might be due to invalid IL or missing references) //IL_1170: Expected O, but got Unknown //IL_11a4: Unknown result type (might be due to invalid IL or missing references) //IL_11a9: Unknown result type (might be due to invalid IL or missing references) //IL_11b0: Unknown result type (might be due to invalid IL or missing references) //IL_11bb: Unknown result type (might be due to invalid IL or missing references) //IL_11c7: Expected O, but got Unknown //IL_11c2: Unknown result type (might be due to invalid IL or missing references) //IL_11cc: Expected O, but got Unknown //IL_1200: Unknown result type (might be due to invalid IL or missing references) //IL_1205: Unknown result type (might be due to invalid IL or missing references) //IL_120c: Unknown result type (might be due to invalid IL or missing references) //IL_1217: Unknown result type (might be due to invalid IL or missing references) //IL_1223: Expected O, but got Unknown //IL_121e: Unknown result type (might be due to invalid IL or missing references) //IL_1228: Expected O, but got Unknown //IL_125c: Unknown result type (might be due to invalid IL or missing references) //IL_1261: Unknown result type (might be due to invalid IL or missing references) //IL_126c: Unknown result type (might be due to invalid IL or missing references) //IL_1277: Unknown result type (might be due to invalid IL or missing references) //IL_1282: Unknown result type (might be due to invalid IL or missing references) //IL_128e: Expected O, but got Unknown //IL_1289: Unknown result type (might be due to invalid IL or missing references) //IL_1293: Expected O, but got Unknown //IL_12c1: Unknown result type (might be due to invalid IL or missing references) //IL_12c6: Unknown result type (might be due to invalid IL or missing references) //IL_12cd: Unknown result type (might be due to invalid IL or missing references) //IL_12d8: Unknown result type (might be due to invalid IL or missing references) //IL_12e4: Expected O, but got Unknown //IL_12df: Unknown result type (might be due to invalid IL or missing references) //IL_12e9: Expected O, but got Unknown //IL_130b: Unknown result type (might be due to invalid IL or missing references) //IL_1315: Expected O, but got Unknown //IL_1349: Unknown result type (might be due to invalid IL or missing references) //IL_134e: Unknown result type (might be due to invalid IL or missing references) //IL_1359: Unknown result type (might be due to invalid IL or missing references) //IL_1364: Unknown result type (might be due to invalid IL or missing references) //IL_136f: Unknown result type (might be due to invalid IL or missing references) //IL_137b: Expected O, but got Unknown //IL_1376: Unknown result type (might be due to invalid IL or missing references) //IL_1380: Expected O, but got Unknown //IL_13b1: Unknown result type (might be due to invalid IL or missing references) //IL_13b6: Unknown result type (might be due to invalid IL or missing references) //IL_13c1: Unknown result type (might be due to invalid IL or missing references) //IL_13cc: Unknown result type (might be due to invalid IL or missing references) //IL_13d7: Unknown result type (might be due to invalid IL or missing references) //IL_13e3: Expected O, but got Unknown //IL_13de: Unknown result type (might be due to invalid IL or missing references) //IL_13e8: Expected O, but got Unknown //IL_1414: Unknown result type (might be due to invalid IL or missing references) //IL_1419: Unknown result type (might be due to invalid IL or missing references) //IL_1420: Unknown result type (might be due to invalid IL or missing references) //IL_1428: Unknown result type (might be due to invalid IL or missing references) //IL_1434: Expected O, but got Unknown //IL_142f: Unknown result type (might be due to invalid IL or missing references) //IL_1439: Expected O, but got Unknown //IL_1465: Unknown result type (might be due to invalid IL or missing references) //IL_146a: Unknown result type (might be due to invalid IL or missing references) //IL_1471: Unknown result type (might be due to invalid IL or missing references) //IL_1479: Unknown result type (might be due to invalid IL or missing references) //IL_1485: Expected O, but got Unknown //IL_1480: Unknown result type (might be due to invalid IL or missing references) //IL_148a: Expected O, but got Unknown //IL_14b6: Unknown result type (might be due to invalid IL or missing references) //IL_14bb: Unknown result type (might be due to invalid IL or missing references) //IL_14c2: Unknown result type (might be due to invalid IL or missing references) //IL_14ca: Unknown result type (might be due to invalid IL or missing references) //IL_14d6: Expected O, but got Unknown //IL_14d1: Unknown result type (might be due to invalid IL or missing references) //IL_14db: Expected O, but got Unknown //IL_1507: Unknown result type (might be due to invalid IL or missing references) //IL_150c: Unknown result type (might be due to invalid IL or missing references) //IL_1513: Unknown result type (might be due to invalid IL or missing references) //IL_151b: Unknown result type (might be due to invalid IL or missing references) //IL_1527: Expected O, but got Unknown //IL_1522: Unknown result type (might be due to invalid IL or missing references) //IL_152c: Expected O, but got Unknown //IL_155a: Unknown result type (might be due to invalid IL or missing references) //IL_155f: Unknown result type (might be due to invalid IL or missing references) //IL_1566: Unknown result type (might be due to invalid IL or missing references) //IL_156e: Unknown result type (might be due to invalid IL or missing references) //IL_157a: Expected O, but got Unknown //IL_1575: Unknown result type (might be due to invalid IL or missing references) //IL_157f: Expected O, but got Unknown //IL_15ab: Unknown result type (might be due to invalid IL or missing references) //IL_15b0: Unknown result type (might be due to invalid IL or missing references) //IL_15b7: Unknown result type (might be due to invalid IL or missing references) //IL_15bf: Unknown result type (might be due to invalid IL or missing references) //IL_15cb: Expected O, but got Unknown //IL_15c6: Unknown result type (might be due to invalid IL or missing references) //IL_15d0: Expected O, but got Unknown //IL_15f2: Unknown result type (might be due to invalid IL or missing references) //IL_15fc: Expected O, but got Unknown //IL_1628: Unknown result type (might be due to invalid IL or missing references) //IL_162d: Unknown result type (might be due to invalid IL or missing references) //IL_1634: Unknown result type (might be due to invalid IL or missing references) //IL_163c: Unknown result type (might be due to invalid IL or missing references) //IL_1648: Expected O, but got Unknown //IL_1643: Unknown result type (might be due to invalid IL or missing references) //IL_164d: Expected O, but got Unknown //IL_1679: Unknown result type (might be due to invalid IL or missing references) //IL_167e: Unknown result type (might be due to invalid IL or missing references) //IL_1685: Unknown result type (might be due to invalid IL or missing references) //IL_168d: Unknown result type (might be due to invalid IL or missing references) //IL_1699: Expected O, but got Unknown //IL_1694: Unknown result type (might be due to invalid IL or missing references) //IL_169e: Expected O, but got Unknown //IL_16cc: Unknown result type (might be due to invalid IL or missing references) //IL_16d1: Unknown result type (might be due to invalid IL or missing references) //IL_16d8: Unknown result type (might be due to invalid IL or missing references) //IL_16e3: Unknown result type (might be due to invalid IL or missing references) //IL_16ef: Expected O, but got Unknown //IL_16ea: Unknown result type (might be due to invalid IL or missing references) //IL_16f4: Expected O, but got Unknown //IL_1722: Unknown result type (might be due to invalid IL or missing references) //IL_1727: Unknown result type (might be due to invalid IL or missing references) //IL_172e: Unknown result type (might be due to invalid IL or missing references) //IL_1739: Unknown result type (might be due to invalid IL or missing references) //IL_1745: Expected O, but got Unknown //IL_1740: Unknown result type (might be due to invalid IL or missing references) //IL_174a: Expected O, but got Unknown //IL_1776: Unknown result type (might be due to invalid IL or missing references) //IL_177b: Unknown result type (might be due to invalid IL or missing references) //IL_1782: Unknown result type (might be due to invalid IL or missing references) //IL_178d: Unknown result type (might be due to invalid IL or missing references) //IL_1799: Expected O, but got Unknown //IL_1794: Unknown result type (might be due to invalid IL or missing references) //IL_179e: Expected O, but got Unknown if (lastVersion == null) { lastVersion = config.Bind("Last Version", "Last Version", "0.0.0", "Last version played."); } ResetValues = config.Bind("General", "Restore values to default on update", true, "If you don't delete your config file the new values may not be applied properly, with this enabled when the version changes all values will be restored to their default, disabled items stay disabled."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ResetValues, true)); warpedEchoChanges = config.Bind("Warped Echo Changes", "Enable Warped Echo Changes?", true, "Toggle Warped Echo changes."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(warpedEchoChanges, true)); warpedEchoThreshold = config.Bind("Warped Echo Changes", "Warped Echo Damage Threshold", 25, $"Minimum damage treshold for effect to trigger, in health %.\nDefault value: {25}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(warpedEchoThreshold, new IntSliderConfig { min = 0, max = 100, restartRequired = true })); warpedEchoSplit = config.Bind("Warped Echo Changes", "Warped Echo Damage Split", 60, $"How the damage taken is split in upfront damage and gradual damage, this value determines the gradual damage which means higher value = less damage upfront, in %.\nDefault value: {60}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(warpedEchoSplit, new IntSliderConfig { min = 0, max = 100, restartRequired = true })); warpedEchoBaseDuration = config.Bind("Warped Echo Changes", "Warped Echo Base Duration", 4f, $"Base duration for the damage to apply, in seconds.\nCan't be lower than 0.25 seconds, aka 1 tic of damage.\nDefault value: {4f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(warpedEchoBaseDuration, new StepSliderConfig { min = 0.25f, max = 100f, increment = 0.25f, restartRequired = true })); warpedEchoExtraDuration = config.Bind("Warped Echo Changes", "Warped Echo Extra Duration", 0.5f, $"Extends the duration for the damage to apply per item stack, in seconds.\nKeep it at increments of 0.25 seconds, every 0.25 seconds is equal to 1 extra tick of damage.\nDefault value: {0.5f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(warpedEchoExtraDuration, new StepSliderConfig { min = 0f, max = 100f, increment = 0.25f, restartRequired = true })); warpedEchoCooldown = config.Bind("Warped Echo Changes", "Warped Echo Cooldown", 10f, $"Cooldown between effect activations, cooldown starts after all damage is dealt, in seconds.\nDefault value: {10f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(warpedEchoCooldown, new StepSliderConfig { min = 0f, max = 100f, increment = 0.1f, restartRequired = true })); chronicExpansionChanges = config.Bind("Chronic Expansion Changes", "Enable Chronic Expansion Changes?", true, "Toggle Chronic Expansion changes"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(chronicExpansionChanges, true)); chronicExpansionKillPerStack = config.Bind("Chronic Expansion Changes", "Chronic Expansion Kills Per Stack", 5, $"How many kills do you need to get 1 damage stack.\nDefault value: {5}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(chronicExpansionKillPerStack, new IntSliderConfig { min = 1, max = 100, restartRequired = true })); chronicExpansionMaxStacks = config.Bind("Chronic Expansion Changes", "Chronic Expansion Max Stacks", 20, $"Maximum amount of damagae stacks you can have.\nDefault value: {20}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(chronicExpansionMaxStacks, new IntSliderConfig { min = 1, max = 100, restartRequired = true })); chronicExpansionBaseStackDamage = config.Bind("Chronic Expansion Changes", "Chronic Expansion Base Damage Per Stack", 1.25f, $"How much damage each damage stack gives you, in %.\nDefault value: {1.25f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(chronicExpansionBaseStackDamage, new StepSliderConfig { min = 0.1f, max = 100f, increment = 0.05f, restartRequired = true })); chronicExpansionExtraStackDamage = config.Bind("Chronic Expansion Changes", "Chronic Expansion Extra Damage Per Stack", 1.25f, $"How much damage each damage stack gives you per item stack, this is added to base value, in %.\nDefault value: {1.25f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(chronicExpansionExtraStackDamage, new StepSliderConfig { min = 0.1f, max = 100f, increment = 0.05f, restartRequired = true })); chronicExpansionEliteValue = config.Bind("Chronic Expansion Changes", "Chronic Expansion Elite Kill Value", 5, $"How many kills does an Elite count as.\nDefault value {5}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(chronicExpansionEliteValue, new IntSliderConfig { min = 1, max = 1000, restartRequired = true })); chronicExpansionChampionValue = config.Bind("Chronic Expansion Changes", "Chronic Expansion Champion Kill Value", 25, $"How many kills does a Champion count as.\nDefault value {25}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(chronicExpansionChampionValue, new IntSliderConfig { min = 1, max = 1000, restartRequired = true })); knockBackFinChanges = config.Bind("Knockback Fin Changes", "Enable Knockback Fin Changes?", true, "Toggle Knockback Fin changes"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(knockBackFinChanges, true)); knockBackFinChance = config.Bind("Knockback Fin Changes", "Knockback Fin Proc Chance", 10f, $"Chance for the knockback(up) to trigger, in %.\nUses the game formula of: (1f - 100f / (100f + X)) * 100f, where X is the chance * item count.\nDefault value: {10f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(knockBackFinChance, new StepSliderConfig { min = 0f, max = 100f, increment = 0.25f, restartRequired = true })); knockBackFinBaseDamage = config.Bind("Knockback Fin Changes", "Knockback Fin Base Damage", 15f, $"How much damage you deal to airborne enemies, in %.\nDefault value: {15f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(knockBackFinBaseDamage, new StepSliderConfig { min = 0f, max = 100f, increment = 0.25f, restartRequired = true })); knockBackFinExtraDamage = config.Bind("Knockback Fin Changes", "Knockback Fin Extra Damage", 15f, $"How much extra damage you deal to airborne enemies per item stack, added to base damage, in %.\nDefault value: {15f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(knockBackFinExtraDamage, new StepSliderConfig { min = 0f, max = 100f, increment = 0.25f, restartRequired = true })); bolsteringLanternChanges = config.Bind("Bolstering Lantern Changes", "Enable Bolstering Lantern Changes?", true, "Toggle Bolstering Lantern changes"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(bolsteringLanternChanges, true)); bolsteringLanternBaseArmor = config.Bind("Bolstering Lantern Changes", "Bolstering Lantern Base Damage", 10f, $"How much armor you get.\nDefault value: {10f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(bolsteringLanternBaseArmor, new StepSliderConfig { min = 0f, max = 1000f, increment = 0.25f, restartRequired = true })); bolsteringLanternExtraArmor = config.Bind("Bolstering Lantern Changes", "Bolstering Lantern Extra Armor", 5f, $"How much armor you get per item stack.\nDefault value: {5f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(bolsteringLanternExtraArmor, new StepSliderConfig { min = 0f, max = 1000f, increment = 0.25f, restartRequired = true })); bolsteringLanternThreshold = config.Bind("Bolstering Lantern Changes", "Bolstering Lantern Health Threshold", 50, $"Treshold for effect to trigger, in health %.\nDefault value: {50}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(bolsteringLanternThreshold, new IntSliderConfig { min = 0, max = 100, restartRequired = true })); antlerShieldChanges = config.Bind("Antler Shield Changes", "Enable Antler Shield Changes?", true, "Toggle Antler Shield changes"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(antlerShieldChanges, true)); antlerShieldSpeed = config.Bind("Antler Shield Changes", "Antler Shield Movement Speed", 8f, $"How much movement speed you get per item, in %.\nDefault value: {8f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(antlerShieldSpeed, new StepSliderConfig { min = 0f, max = 100f, increment = 0.25f, restartRequired = true })); antlerShieldShield = config.Bind("Antler Shield Changes", "Antler Shield Movement Shield", 4f, $"How much shield you get per item stack, in %.\nDefault value: {4f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(antlerShieldShield, new StepSliderConfig { min = 0f, max = 100f, increment = 0.5f, restartRequired = true })); antlerShieldJump = config.Bind("Antler Shield Changes", "Antler Shield Movement Jump Height", 25f, $"How much does your jump height increases by having this item, in %.\nDefault value: {25f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(antlerShieldJump, new StepSliderConfig { min = 0f, max = 100f, increment = 0.5f, restartRequired = true })); chanceDollChanges = config.Bind("Chance Doll Changes", "Enable Chance Doll Changes?", true, "Toggle Chance Doll changes"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(chanceDollChanges, true)); chanceDollBaseChance = config.Bind("Chance Doll Changes", "Chance Doll Base Chance", 30f, $"Base Chance to get an extra item, in %.\nDefault value: {30f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(chanceDollBaseChance, new StepSliderConfig { min = 0f, max = 100f, increment = 0.25f, restartRequired = true })); chanceDollExtraChance = config.Bind("Chance Doll Changes", "Chance Doll Extra Chance", 10f, $"Extra Chance to get an extra item per item stack, this is added to the base chance, in %.\nDefault value: {10f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(chanceDollExtraChance, new StepSliderConfig { min = 0f, max = 100f, increment = 0.25f, restartRequired = true })); chanceDollCostReduction = config.Bind("Chance Doll Changes", "Chance Doll Cost Ramp Up Reduction", 25f, $"Reduce cost ramp up after use, the normal value is 40% increased cost per use, the cost reduction is X% of this value, in %.\nDefault value: {25f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(chanceDollCostReduction, new StepSliderConfig { min = 0f, max = 100f, increment = 0.25f, restartRequired = true })); chanceDollTier1 = config.Bind("Chance Doll Changes", "Chance Doll Tier 1 (White) Drop Weight", 20, $"Weight for Tier 1 items to drop from the xtra item effect.\nThis value is relative to the other drop weights, to calculate drop chance use X/(Tier1 + Tier2 + Tier3) where X is the tier you want to check the drop rate, boss item drop chance is not included in this formula.\nDefault value: {20}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(chanceDollTier1, new IntSliderConfig { min = 0, max = 1000, restartRequired = true })); chanceDollTier2 = config.Bind("Chance Doll Changes", "Chance Doll Tier 2 (Green) Drop Weight", 79, $"Weight for Tier 2 items to drop from the extra item effect.\nThis value is relative to the other drop weights, to calculate drop chance use X/(Tier1 + Tier2 + Tier3) where X is the tier you want to check the drop rate, boss item drop chance is not included in this formula.\nDefault value: {79}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(chanceDollTier2, new IntSliderConfig { min = 0, max = 1000, restartRequired = true })); chanceDollTier3 = config.Bind("Chance Doll Changes", "Chance Doll Tier 3 (Red) Drop Weight", 1, $"Weight for Tier 3 items to drop from the extra item effect.\nThis value is relative to the other drop weights, to calculate drop chance use X/(Tier1 + Tier2 + Tier3) where X is the tier you want to check the drop rate, boss item drop chance is not included in this formula.\nDefault value: {1}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(chanceDollTier3, new IntSliderConfig { min = 0, max = 1000, restartRequired = true })); chanceDollBaseBossChance = config.Bind("Chance Doll Changes", "Chance Doll Boss Item Chance", 1f, $"Base drop chance for boss items, in %.\nDefault value: {1f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(chanceDollBaseBossChance, new StepSliderConfig { min = 0f, max = 100f, increment = 0.25f, restartRequired = true })); chanceDollExtraBossChance = config.Bind("Chance Doll Changes", "Chance Doll Extra Boss Item Chance", 0.5f, $"Extra drop chance for boss items per item stack, in %.\nDefault value: {0.5f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(chanceDollExtraBossChance, new StepSliderConfig { min = 0f, max = 100f, increment = 0.25f, restartRequired = true })); prayerBeadsChanges = config.Bind("Prayer Beads Changes", "Enable Prayer Beads Changes?", true, "Toggle Prayer Beads changes"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(prayerBeadsChanges, true)); prayerBeadsChance = config.Bind("Prayer Beads Changes", "Prayer Beads Extra Item Chance", 10f, $"Base drop chance for it to transform into 2 copies of the same item, in %.\nDefault value: {10f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(prayerBeadsChance, new StepSliderConfig { min = 0f, max = 100f, increment = 0.25f, restartRequired = true })); prayerBeadsTier2 = config.Bind("Prayer Beads Changes", "Prayer Beads Tier 2(Green) Weight", 40, $"Weight for transforming into a Tier 2 item.\nThis value is relative to the other drop weights, to calculate drop chance use X/(TierA + TierB + TierC ...) where X is this tier and the parentesis is the sum of the tiers of items that you currently have.\nDefault value: {40}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(prayerBeadsTier2, new IntSliderConfig { min = 0, max = 1000, restartRequired = true })); prayerBeadsTier3 = config.Bind("Prayer Beads Changes", "Prayer Beads Tier 3(Red) Weight", 15, $"Weight for transforming into a Tier 3 item.\nThis value is relative to the other drop weights, to calculate drop chance use X/(TierA + TierB + TierC ...) where X is this tier and the parentesis is the sum of the tiers of items that you currently have.\nDefault value: {15}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(prayerBeadsTier3, new IntSliderConfig { min = 0, max = 1000, restartRequired = true })); prayerBeadsBoss = config.Bind("Prayer Beads Changes", "Prayer Beads Boss Item Weight", 5, $"Weight for transforming into a Boss item.\nThis value is relative to the other drop weights, to calculate drop chance use X/(TierA + TierB + TierC ...) where X is this tier and the parentesis is the sum of the tiers of items that you currently have.\nDefault value: {5}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(prayerBeadsBoss, new IntSliderConfig { min = 0, max = 1000, restartRequired = true })); prayerBeadsVoid1 = config.Bind("Prayer Beads Changes", "Prayer Beads Void Tier 1 Weight", 10, $"Weight for transforming into a Void item of Tier 1 (Whites).\nThis value is relative to the other drop weights, to calculate drop chance use X/(TierA + TierB + TierC ...) where X is this tier and the parentesis is the sum of the tiers of items that you currently have.\nDefault value: {10}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(prayerBeadsVoid1, new IntSliderConfig { min = 0, max = 1000, restartRequired = true })); prayerBeadsVoid2 = config.Bind("Prayer Beads Changes", "Prayer Beads Void Tier 2 Weight", 25, $"Weight for transforming into a Void item of Tier 2 (Greens).\nThis value is relative to the other drop weights, to calculate drop chance use X/(TierA + TierB + TierC ...) where X is this tier and the parentesis is the sum of the tiers of items that you currently have.\nDefault value: {25}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(prayerBeadsVoid2, new IntSliderConfig { min = 0, max = 1000, restartRequired = true })); prayerBeadsVoid3 = config.Bind("Prayer Beads Changes", "Prayer Beads Void Tier 3 Weight", 5, $"Weight for transforming into a Void item of Tier 3 (Reds).\nThis value is relative to the other drop weights, to calculate drop chance use X/(TierA + TierB + TierC ...) where X is this tier and the parentesis is the sum of the tiers of items that you currently have.\nDefault value: {5}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(prayerBeadsVoid3, new IntSliderConfig { min = 0, max = 1000, restartRequired = true })); luminousShotChanges = config.Bind("Luminous Shot Changes", "Enable Luminous Shot Changes Changes?", true, "Toggle Luminous Shot changes"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(luminousShotChanges, true)); luminousShotCooldown = config.Bind("Luminous Shot Changes", "Luminous Shot Utility Cooldown Reduction", 15, $"Utility skill cooldown reduction, in %.\nDefault value: {15}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(luminousShotCooldown, new IntSliderConfig { min = 0, max = 100, restartRequired = true })); luminousShotBaseDamage = config.Bind("Luminous Shot Changes", "Luminous Shot Thunder Base Damage", 200f, $"How much damage the thunders strike will deal, relative to base damage, in %.\nDefault value: {200}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(luminousShotBaseDamage, new StepSliderConfig { min = 0f, max = 1000f, increment = 0.5f, restartRequired = true })); luminousShotBaseThunder = config.Bind("Luminous Shot Changes", "Luminous Shot Base Thunder Strikes", 3, $"How many thunder strikes will be called down.\nDefault value: {3}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(luminousShotBaseThunder, new IntSliderConfig { min = 1, max = 100, restartRequired = true })); luminousShotExtraThunder = config.Bind("Luminous Shot Changes", "Luminous Shot Extra Thunder Strikes", 1, $"How many extra thunder strikes will be called per item stack.\nDefault value: {1}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(luminousShotExtraThunder, new IntSliderConfig { min = 1, max = 100, restartRequired = true })); saleStarChanges = config.Bind("Sale Star Changes", "Enable Sale Star Changes?", true, "Toggle Sale Star changes.\nBy default Sale Star blue circle only appear around a chest if you are close enough to interact with it and have enough money to buy it, with this enabled it will show regardless of your money and the circle will appear from farther away."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(saleStarChanges, true)); saleStarDistance = config.Bind("Sale Star Changes", "Sale Star Trigger Distance", 4f, $"Distance at which the blue circle appears around chests.\nThis multiplies the vanilla distance, if set at 1 no changes will be made.\nDefault value: {4f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(saleStarDistance, new StepSliderConfig { min = 1f, max = 10f, increment = 0.25f, restartRequired = true })); unstableTransmitterChanges = config.Bind("Unstable Transmitter Changes", "Enable Unstable Transmitter Changes?", true, "Toggle Unstable Transmitter changes."); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(unstableTransmitterChanges, true)); unstableTransmitterBaseDamage = config.Bind("Unstable Transmitter Changes", "Unstable Transmitter Base Damage", 350, $"Damage multiplier of base damage, in %.\nDefault value: {350}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(unstableTransmitterBaseDamage, new IntSliderConfig { min = 0, max = 1000, restartRequired = true })); unstableTransmitterExtraDamage = config.Bind("Unstable Transmitter Changes", "Unstable Transmitter Extra Damage", 350, $"Extra Damage multiplier of base damage, in %.\nDefault value: {350}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(unstableTransmitterExtraDamage, new IntSliderConfig { min = 0, max = 1000, restartRequired = true })); unstableTransmitterBaseCooldown = config.Bind("Unstable Transmitter Changes", "Unstable Transmitter Base Cooldown", 180, $"Base cooldown after teleporting, in seconds.\nDefault value: {180}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(unstableTransmitterBaseCooldown, new IntSliderConfig { min = 1, max = 1000, restartRequired = true })); unstableTransmitterCooldownReduction = config.Bind("Unstable Transmitter Changes", "Unstable Transmitter Cooldown Reduction", 10f, $"Cooldown reduction per stack, in %.\nDefault value: {10f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(unstableTransmitterCooldownReduction, new StepSliderConfig { min = 0f, max = 100f, increment = 0.5f, restartRequired = true })); unstableTransmitterMinimumCooldown = config.Bind("Unstable Transmitter Changes", "Unstable Transmitter Minimum Cooldown", 30, $"Minimum Cooldown for teleport effect, in seconds.\nDefault value: {30}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(unstableTransmitterMinimumCooldown, new IntSliderConfig { min = 1, max = 1000, restartRequired = true })); noxiousThornChanges = config.Bind("Noxious Thorn Changes", "Enable Noxious Thorn Changes Changes?", true, "Toggle Noxious Thorn changes"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(noxiousThornChanges, true)); noxiousThornProcChance = config.Bind("Noxious Thorn Changes", "Noxious Thorn Passive Proc Chance", 20f, $"Chance to proc the effect, in %.\nDefault value: {20f}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(noxiousThornProcChance, new StepSliderConfig { min = 0f, max = 100f, increment = 0.5f, restartRequired = true })); noxiousThornDamageMult = config.Bind("Noxious Thorn Changes", "Noxious Thorn TOTAL Damage", 60f, $"How much each TOTAL damage each thorn will deal, in %.\nDefault value: {60}."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(noxiousThornDamageMult, new StepSliderConfig { min = 0f, max = 1000f, increment = 0.5f, restartRequired = true })); noxiousThornThornPerProc = config.Bind("Noxious Thorn Changes", "Noxious Thorn Thorns Per Proc", 1, $"How many thorns you shoot at each enemy per proc.\nDefault value: {1}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(noxiousThornThornPerProc, new IntSliderConfig { min = 1, max = 100, restartRequired = true })); noxiousThornExtraThornPerProc = config.Bind("Noxious Thorn Changes", "Noxious Thorn Extra Thorns Per Proc", 1, $"How many extra thorns you shoot at each enemy per each item stack.\nDefault value: {1}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(noxiousThornExtraThornPerProc, new IntSliderConfig { min = 0, max = 100, restartRequired = true })); noxiousThornBaseTargets = config.Bind("Noxious Thorn Changes", "Noxious Thorn Base Target Count", 3, $"How many enemies it will target.\nDefault value: {3}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(noxiousThornBaseTargets, new IntSliderConfig { min = 1, max = 100, restartRequired = true })); noxiousThornExtraTargets = config.Bind("Noxious Thorn Changes", "Noxious Thorn Extra Target Count", 2, $"How many extra enemies it will target per item stack.\nDefault value: {2}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(noxiousThornExtraTargets, new IntSliderConfig { min = 1, max = 100, restartRequired = true })); noxiousThornRange = config.Bind("Noxious Thorn Changes", "Noxious Thorn Range", 15, $"Range for effect to proc, in meters.\nDefault value: {15}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(noxiousThornRange, new IntSliderConfig { min = 1, max = 100, restartRequired = true })); noxiousThornBleed = config.Bind("Noxious Thorn Changes", "Noxious Thorn, Thorns to Bleed Ratio", 3, $"How many thorns you need to fire to apply 1 bleed.\nDefault value: {3}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(noxiousThornBleed, new IntSliderConfig { min = 1, max = 100, restartRequired = true })); warBondsChanges = config.Bind("War Bonds Changes", "Enable War Bonds Changes Changes?", true, "Toggle War Bonds changes"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(warBondsChanges, true)); warBondsBaseChests = config.Bind("War Bonds Changes", "War Bonds Base Chests", 3, $"How many extra chest will spawn at the start of the next stage.\nDefault value: {3}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(warBondsBaseChests, new IntSliderConfig { min = 1, max = 100, restartRequired = true })); warBondsExtraChests = config.Bind("War Bonds Changes", "War Bonds Extra Chests", 1, $"How many extra chest per stack will spawn at the start of the next stage.\nDefault value: {1}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(warBondsExtraChests, new IntSliderConfig { min = 1, max = 100, restartRequired = true })); warBondsTier1Weight = config.Bind("War Bonds Changes", "War Bonds Small Chest Weight", 79, $"Chance for a small chest to spawn, relative to other chests weights, to calculate chance use X/(small + large + legendary) where X is the weight that you want to check, small, large and legendary is their respective chests weights.\nDefault value: {79}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(warBondsTier1Weight, new IntSliderConfig { min = 0, max = 1000, restartRequired = true })); warBondsTier2Weight = config.Bind("War Bonds Changes", "War Bonds Large Chest Weight", 20, $"Chance for a large chest to spawn, relative to other chests weights, to calculate chance use X/(small + large + legendary) where X is the weight that you want to check, small, large and legendary is their respective chests weights.\nDefault value: {20}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(warBondsTier2Weight, new IntSliderConfig { min = 0, max = 1000, restartRequired = true })); warBondsTier3Weight = config.Bind("War Bonds Changes", "War Bonds Legendary Chest Weight", 1, $"Chance for a legendary chest to spawn, relative to other chests weights, to calculate chance use X/(small + large + legendary) where X is the weight that you want to check, small, large and legendary is their respective chests weights.\nDefault value: {1}."); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(warBondsTier3Weight, new IntSliderConfig { min = 0, max = 1000, restartRequired = true })); } public static void ResetAllValues(bool reset, string currentVersion) { Log.Warning("Last version: " + lastVersion.Value); Log.Warning("Current version: " + currentVersion); if (reset && lastVersion.Value != currentVersion) { Log.Warning("Config Reset."); lastVersion.Value = currentVersion; warpedEchoThreshold.Value = 25; warpedEchoSplit.Value = 60; warpedEchoBaseDuration.Value = 4f; warpedEchoExtraDuration.Value = 0.5f; warpedEchoCooldown.Value = 10f; chronicExpansionKillPerStack.Value = 5; chronicExpansionBaseStackDamage.Value = 1.25f; chronicExpansionExtraStackDamage.Value = 1.25f; chronicExpansionMaxStacks.Value = 20; chronicExpansionEliteValue.Value = 5; chronicExpansionChampionValue.Value = 25; knockBackFinChance.Value = 10f; knockBackFinBaseDamage.Value = 15f; knockBackFinExtraDamage.Value = 15f; bolsteringLanternBaseArmor.Value = 10f; bolsteringLanternExtraArmor.Value = 5f; bolsteringLanternThreshold.Value = 50; antlerShieldSpeed.Value = 8f; antlerShieldShield.Value = 4f; antlerShieldJump.Value = 25f; chanceDollBaseChance.Value = 30f; chanceDollExtraChance.Value = 10f; chanceDollCostReduction.Value = 25f; chanceDollTier1.Value = 20; chanceDollTier2.Value = 79; chanceDollTier3.Value = 1; chanceDollBaseBossChance.Value = 1f; chanceDollExtraBossChance.Value = 0.5f; prayerBeadsChance.Value = 10f; prayerBeadsTier2.Value = 40; prayerBeadsTier3.Value = 15; prayerBeadsBoss.Value = 5; prayerBeadsVoid1.Value = 10; prayerBeadsVoid2.Value = 25; prayerBeadsTier3.Value = 15; luminousShotCooldown.Value = 15; luminousShotBaseDamage.Value = 200f; luminousShotBaseThunder.Value = 3; luminousShotExtraThunder.Value = 1; saleStarDistance.Value = 4f; unstableTransmitterBaseDamage.Value = 350; unstableTransmitterExtraDamage.Value = 350; unstableTransmitterBaseCooldown.Value = 180; unstableTransmitterCooldownReduction.Value = 10f; unstableTransmitterMinimumCooldown.Value = 30; noxiousThornProcChance.Value = 20f; noxiousThornThornPerProc.Value = 1; noxiousThornExtraThornPerProc.Value = 1; noxiousThornBaseTargets.Value = 3; noxiousThornExtraTargets.Value = 2; noxiousThornRange.Value = 15; noxiousThornBleed.Value = 3; warBondsBaseChests.Value = 3; warBondsExtraChests.Value = 1; warBondsTier1Weight.Value = 79; warBondsTier2Weight.Value = 20; warBondsTier3Weight.Value = 1; } } } } namespace ItemsReworked.UncommonItems { internal class ChanceDollChanges { public static float normalShrineCostMult; private float baseChance = 30f; private float chancePerItem = 10f; private float costDecrease = 0.25f; private float tier1Weight = 0.2f; private float tier2Weight = 0.79f; private float tier3Weight = 0.01f; private float baseBossChance = 1f; private float extraBossChance = 0.5f; private void LoadConfig() { baseChance = ModConfig.chanceDollBaseChance.Value; chancePerItem = ModConfig.chanceDollExtraChance.Value; costDecrease = ModConfig.chanceDollCostReduction.Value / 100f; tier1Weight = ModConfig.chanceDollTier1.Value; tier2Weight = ModConfig.chanceDollTier2.Value; tier3Weight = ModConfig.chanceDollTier3.Value; baseBossChance = ModConfig.chanceDollBaseBossChance.Value; extraBossChance = ModConfig.chanceDollExtraBossChance.Value; } public void Init() { //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 LoadConfig(); Log.Info("Chance Doll Changes and Config Loaded."); ShrineChanceBehavior.Start += new hook_Start(ShrineChanceBehavior_Start); ShrineChanceBehavior.AddShrineStack += (Manipulator)delegate(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Expected O, but got Unknown //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int invIndex = -1; val.GotoNext((MoveType)2, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 1), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref invIndex) }); val.Emit(OpCodes.Ldloc, invIndex); val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Action)delegate(Inventory inventory, ShrineChanceBehavior shrineChance) { if (Object.op_Implicit((Object)(object)inventory)) { int itemCount2 = inventory.GetItemCount(Items.ExtraShrineItem); if (itemCount2 > 0 && shrineChance.costMultiplierPerPurchase > 1f && shrineChance.costMultiplierPerPurchase == normalShrineCostMult) { float costMultiplierPerPurchase = shrineChance.costMultiplierPerPurchase; costMultiplierPerPurchase -= 1f; costMultiplierPerPurchase *= 1f - costDecrease; costMultiplierPerPurchase += 1f; shrineChance.costMultiplierPerPurchase = costMultiplierPerPurchase; } } }); ILCursor val2 = new ILCursor(il); ILLabel val8 = default(ILLabel); val2.GotoNext((MoveType)2, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "dropTable"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val8) }); val2.Index -= 1; val2.Emit(OpCodes.Ldarg_0); val2.EmitDelegate>((Func)delegate(bool boolean, ShrineChanceBehavior shrine) { shrine.chanceDollWin = false; return false; }); ILCursor val3 = new ILCursor(il); val3.GotoNext((MoveType)2, new Func[5] { (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "dropletOrigin"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Transform", "get_forward"), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 20f), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Vector3", "op_Multiply"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.PickupDropletController", "CreatePickupDroplet") }); val3.Emit(OpCodes.Ldloc, invIndex); val3.Emit(OpCodes.Ldarg_0); val3.Emit(OpCodes.Ldarg_1); val3.EmitDelegate>((Action)delegate(Inventory inventory, ShrineChanceBehavior shrine, Interactor interactor) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0128: 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_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_015b: 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_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) CharacterBody component = ((Component)interactor).GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)inventory)) { int itemCount = inventory.GetItemCount(Items.ExtraShrineItem); if (itemCount > 0 && shrine.successfulPurchaseCount == shrine.maxPurchaseCount) { if (Util.CheckRoll(baseChance + (float)(itemCount - 1) * chancePerItem, 0f, component.master)) { PickupIndex none = PickupIndex.none; if (Util.CheckRoll(baseBossChance + extraBossChance * (float)(itemCount - 1), 0f, component.master)) { none = shrine.rng.NextElementUniform(Run.instance.availableBossDropList); } else { PickupIndex val4 = shrine.rng.NextElementUniform(Run.instance.availableTier1DropList); PickupIndex val5 = shrine.rng.NextElementUniform(Run.instance.availableTier2DropList); PickupIndex val6 = shrine.rng.NextElementUniform(Run.instance.availableTier3DropList); WeightedSelection val7 = new WeightedSelection(8); val7.AddChoice(val4, tier1Weight); val7.AddChoice(val5, tier2Weight); val7.AddChoice(val6, tier3Weight); none = val7.Evaluate(shrine.rng.nextNormalizedFloat); } PickupDropletController.CreatePickupDroplet(none, shrine.dropletOrigin.position, shrine.dropletOrigin.forward * 15f); shrine.chanceDollWin = true; } else { shrine.chanceDollWin = false; } } else { shrine.chanceDollWin = false; } } }); }; string text = "Chance to get an extra item at Shrines of Chance."; string text2 = $"{baseChance}% (+{chancePerItem}% per stack) chance to gain an extra item on Shrine of Chance last payout, {baseBossChance}% (+{extraBossChance}% per stack) chance for a Boss item. Reduce cost ramp up of Shrines of Chance by {costDecrease * 100f}%."; LanguageAPI.Add("ITEM_EXTRASHRINEITEM_PICKUP", text); LanguageAPI.Add("ITEM_EXTRASHRINEITEM_DESC", text2); } private void ShrineChanceBehavior_Start(orig_Start orig, ShrineChanceBehavior self) { orig.Invoke(self); normalShrineCostMult = self.costMultiplierPerPurchase; } } internal class LuminousShotChanges { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__5_5; public static Func <>9__5_6; public static Func <>9__5_7; public static Func <>9__5_8; public static Func <>9__5_9; public static Manipulator <>9__5_0; public static Func <>9__5_10; public static Func <>9__5_11; public static Func <>9__5_12; public static Func <>9__5_13; public static Func <>9__5_14; public static Func <>9__5_15; public static Func <>9__5_16; public static Manipulator <>9__5_1; public static Func <>9__5_17; public static Func <>9__5_18; public static Func <>9__5_19; public static Func <>9__5_20; public static Func <>9__5_21; public static Func <>9__5_23; public static Manipulator <>9__5_2; public static Func <>9__5_24; public static Func <>9__5_25; public static Func <>9__5_26; public static Func <>9__5_28; public static Func <>9__5_29; public static Func <>9__5_30; internal void b__5_0(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); int num2 = default(int); int num = default(int); val.GotoNext(new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 4), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchAdd(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num) }); val.Remove(); val.Index += 1; val.Remove(); val.EmitDelegate>((Func)((int itemCount) => 1)); } internal bool b__5_5(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 4); } internal bool b__5_6(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdloc(x, ref num); } internal bool b__5_7(Instruction x) { return ILPatternMatchingExt.MatchAdd(x); } internal bool b__5_8(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchStloc(x, ref num); } internal int b__5_9(int itemCount) { return 1; } internal void b__5_1(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); ILLabel val2 = default(ILLabel); val.GotoNext((MoveType)2, new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "IncreasePrimaryDamage"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCount"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCgt(x), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val2) }); val.Index -= 1; val.EmitDelegate>((Func)((bool boolean) => false)); } internal bool b__5_10(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"); } internal bool b__5_11(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "IncreasePrimaryDamage"); } internal bool b__5_12(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCount"); } internal bool b__5_13(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 0); } internal bool b__5_14(Instruction x) { return ILPatternMatchingExt.MatchCgt(x); } internal bool b__5_15(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } internal bool b__5_16(bool boolean) { return false; } internal void b__5_2(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_00dd: 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_011b: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass5_1 CS$<>8__locals0 = new <>c__DisplayClass5_1(); ILCursor val = new ILCursor(il); CS$<>8__locals0.label = null; val.GotoNext((MoveType)2, new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "IncreasePrimaryDamage"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCount"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref CS$<>8__locals0.label) }); val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldarg_1); val.EmitDelegate>((Func)delegate(CharacterBody body, GenericSkill skill) { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return false; } int itemCount = body.inventory.GetItemCount(Items.IncreasePrimaryDamage); if (itemCount > 0 && (Object)(object)body.skillLocator.utility == (Object)(object)skill && !body.HasBuff(Buffs.IncreasePrimaryDamageBuff)) { body.AddIncreasePrimaryDamageStack(); } return false; }); val.Emit(OpCodes.Brfalse, (object)CS$<>8__locals0.label); } internal bool b__5_17(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__5_18(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"); } internal bool b__5_19(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "IncreasePrimaryDamage"); } internal bool b__5_20(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCount"); } internal bool b__5_21(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 0); } internal bool b__5_23(CharacterBody body, GenericSkill skill) { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return false; } int itemCount = body.inventory.GetItemCount(Items.IncreasePrimaryDamage); if (itemCount > 0 && (Object)(object)body.skillLocator.utility == (Object)(object)skill && !body.HasBuff(Buffs.IncreasePrimaryDamageBuff)) { body.AddIncreasePrimaryDamageStack(); } return false; } internal bool b__5_24(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 1); } internal bool b__5_25(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "attacker"); } internal bool b__5_26(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.GameObject", "GetComponent"); } internal bool b__5_28(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdloc(x, ref num); } internal bool b__5_29(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_luminousShotReady"); } internal bool b__5_30(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } } [CompilerGenerated] private sealed class <>c__DisplayClass5_1 { public ILLabel label; internal bool b__22(Instruction x) { return ILPatternMatchingExt.MatchBle(x, ref label); } } private float baseDmgCoef = 2f; private int baseThunder = 3; private int extraThunder = 1; private float cooldownReduction = 0.15f; private void LoadConfig() { cooldownReduction = (float)ModConfig.luminousShotCooldown.Value / 100f; baseDmgCoef = ModConfig.luminousShotBaseDamage.Value / 100f; baseThunder = ModConfig.luminousShotBaseThunder.Value; extraThunder = ModConfig.luminousShotExtraThunder.Value; } public void Init() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0074: 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_007f: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Expected O, but got Unknown //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown LoadConfig(); Log.Info("Luminous Shot Changes and Config Loaded."); BuffDef val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/IncreasePrimaryDamage/bdIncreasePrimaryDamageBuff.asset").WaitForCompletion(); val.canStack = false; object obj = <>c.<>9__5_0; if (obj == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val11 = new ILCursor(il); int num6 = default(int); int num5 = default(int); val11.GotoNext(new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 4), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num6), (Instruction x) => ILPatternMatchingExt.MatchAdd(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num5) }); val11.Remove(); val11.Index += 1; val11.Remove(); val11.EmitDelegate>((Func)((int itemCount) => 1)); }; <>c.<>9__5_0 = val2; obj = (object)val2; } CharacterBody.AddIncreasePrimaryDamageStack += (Manipulator)obj; object obj2 = <>c.<>9__5_1; if (obj2 == null) { Manipulator val3 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val9 = new ILCursor(il); ILLabel val10 = default(ILLabel); val9.GotoNext((MoveType)2, new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "IncreasePrimaryDamage"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCount"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCgt(x), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val10) }); val9.Index -= 1; val9.EmitDelegate>((Func)((bool boolean) => false)); }; <>c.<>9__5_1 = val3; obj2 = (object)val3; } UnseenHand.OnExit += (Manipulator)obj2; object obj3 = <>c.<>9__5_2; if (obj3 == null) { Manipulator val4 = delegate(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_00dd: 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_011b: Unknown result type (might be due to invalid IL or missing references) ILCursor val8 = new ILCursor(il); ILLabel label = null; val8.GotoNext((MoveType)2, new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "IncreasePrimaryDamage"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCount"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref label) }); val8.Emit(OpCodes.Ldarg_0); val8.Emit(OpCodes.Ldarg_1); val8.EmitDelegate>((Func)delegate(CharacterBody body, GenericSkill skill) { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return false; } int itemCount3 = body.inventory.GetItemCount(Items.IncreasePrimaryDamage); if (itemCount3 > 0 && (Object)(object)body.skillLocator.utility == (Object)(object)skill && !body.HasBuff(Buffs.IncreasePrimaryDamageBuff)) { body.AddIncreasePrimaryDamageStack(); } return false; }); val8.Emit(OpCodes.Brfalse, (object)label); }; <>c.<>9__5_2 = val4; obj3 = (object)val4; } CharacterBody.OnSkillActivated += (Manipulator)obj3; int bodyComponentIndex = 0; GlobalEventManager.ProcessHitEnemy += (Manipulator)delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val7 = new ILCursor(il); val7.GotoNext(new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "attacker"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.GameObject", "GetComponent"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref bodyComponentIndex) }); }; GlobalEventManager.ProcessHitEnemy += (Manipulator)delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) ILCursor val5 = new ILCursor(il); int num4 = default(int); ILLabel val6 = default(ILLabel); val5.GotoNext((MoveType)2, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num4), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_luminousShotReady"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val6) }); val5.Index -= 1; val5.Emit(OpCodes.Ldloc, bodyComponentIndex); val5.Emit(OpCodes.Ldarg_1); val5.Emit(OpCodes.Ldarg_2); val5.EmitDelegate>((Func)delegate(bool boolean, CharacterBody body, DamageInfo damageInfo, GameObject victim) { //IL_0045: 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_0054: 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_0063: Invalid comparison between Unknown and I4 //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return false; } int itemCount2 = body.inventory.GetItemCount(Items.IncreasePrimaryDamage); if (body.HasBuff(Buffs.IncreasePrimaryDamageBuff) && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 67108864) { float damageValue = body.damage * baseDmgCoef; int num = baseThunder + extraThunder * (itemCount2 - 1); for (int i = 0; i < num; i++) { float num2 = Random.Range(-1.5f, 1.5f); float num3 = Random.Range(-1.5f, 1.5f); CharacterBody component = victim.GetComponent(); HurtBox target = component.mainHurtBox; if (Object.op_Implicit((Object)(object)component.hurtBoxGroup)) { target = component.hurtBoxGroup.hurtBoxes[Random.Range(0, component.hurtBoxGroup.hurtBoxes.Length)]; } OrbManager.instance.AddOrb((Orb)(object)new LuminousOrb { attacker = ((Component)body).gameObject, damageColorIndex = (DamageColorIndex)3, damageValue = damageValue, isCrit = body.RollCrit(), procChainMask = damageInfo.procChainMask, procCoefficient = 1f, target = target }); if (i < 10) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load("Prefabs/Effects/IncreasePrimaryDamageImpact"), new EffectData { origin = victim.transform.position + new Vector3(num2, 0f, num3) }, true); Util.PlaySound("Play_item_proc_increasePrimaryDamage", victim.gameObject); } } } body.IncreasePrimaryDamageReset(); return false; }); }; RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); string text = "Using your utility skill charges your next attack calling down thunder. Reduce Utility skill cooldown."; string text2 = $"Using your utility skill charges up your next attack calling down {baseThunder} (+{extraThunder} per stack) thunder strikes each dealing {baseDmgCoef * 100f}% base damage.\nReduces Utility skill cooldown by {cooldownReduction * 100f}%."; LanguageAPI.Add("ITEM_INCREASEPRIMARYDAMAGE_PICKUP", text); LanguageAPI.Add("ITEM_INCREASEPRIMARYDAMAGE_DESC", text2); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender) && Object.op_Implicit((Object)(object)sender.inventory) && sender.inventory.GetItemCount(Items.IncreasePrimaryDamage) > 0) { args.utilityCooldownMultAdd -= cooldownReduction; } } } internal class NoxiousThornChanges { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__9_1; public static Func <>9__9_2; public static Func <>9__9_4; public static Func <>9__9_5; public static Func <>9__9_6; public static Func <>9__9_7; public static Func <>9__9_8; public static Func <>9__9_9; public static Func <>9__9_10; public static Func <>9__9_11; public static Func <>9__9_12; public static Func <>9__9_13; public static Func <>9__9_14; public static Func <>9__9_15; public static Func <>9__9_16; public static Manipulator <>9__9_0; internal void b__9_0(ILContext il) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown <>c__DisplayClass9_0 CS$<>8__locals0 = new <>c__DisplayClass9_0 { num3Index = 0 }; ILCursor val = new ILCursor(il); val.GotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "damage"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref CS$<>8__locals0.num3Index) }); ILCursor val2 = new ILCursor(il); int num3 = default(int); ILLabel val5 = default(ILLabel); ILLabel val4 = default(ILLabel); float num2 = default(float); float num = default(float); ILLabel val3 = default(ILLabel); val2.GotoNext(new Func[12] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num3), (Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val5), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdflda(x, "RoR2.HealthComponent", "itemCounts"), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "noxiousThorn"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val4), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchLdnull(x), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "CheckRoll"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val3) }); val2.Index += 1; val2.EmitDelegate>((Func)((bool boolean) => true)); } internal bool b__9_1(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 1); } internal bool b__9_2(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "damage"); } internal bool b__9_4(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdloc(x, ref num); } internal bool b__9_5(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrtrue(x, ref val); } internal bool b__9_6(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__9_7(Instruction x) { return ILPatternMatchingExt.MatchLdflda(x, "RoR2.HealthComponent", "itemCounts"); } internal bool b__9_8(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "noxiousThorn"); } internal bool b__9_9(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 0); } internal bool b__9_10(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBle(x, ref val); } internal bool b__9_11(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__9_12(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__9_13(Instruction x) { return ILPatternMatchingExt.MatchLdnull(x); } internal bool b__9_14(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "CheckRoll"); } internal bool b__9_15(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } internal bool b__9_16(bool boolean) { return true; } } [CompilerGenerated] private sealed class <>c__DisplayClass9_0 { public int num3Index; internal bool b__3(Instruction x) { return ILPatternMatchingExt.MatchStloc(x, ref num3Index); } } private float procChance = 20f; private float damageMult = 0.6f; private int thornsPerProc = 1; private int thornsPerStack = 1; private int targetsBase = 3; private int targetPerStack = 2; private int baseRange = 15; private int bleedPerThorn = 3; private void LoadConfig() { procChance = ModConfig.noxiousThornProcChance.Value; damageMult = ModConfig.noxiousThornDamageMult.Value / 100f; thornsPerProc = ModConfig.noxiousThornThornPerProc.Value; thornsPerStack = ModConfig.noxiousThornExtraThornPerProc.Value; targetsBase = ModConfig.noxiousThornBaseTargets.Value; targetPerStack = ModConfig.noxiousThornExtraTargets.Value; baseRange = ModConfig.noxiousThornRange.Value; bleedPerThorn = ModConfig.noxiousThornBleed.Value; } public void Init() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown LoadConfig(); Log.Info("Noxious Thorn Changes and Config Loaded."); ItemDef val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/TriggerEnemyDebuffs/TriggerEnemyDebuffs.asset").WaitForCompletion(); val.tags = (ItemTag[])(object)new ItemTag[2] { (ItemTag)21, (ItemTag)1 }; GlobalEventManager.ProcessHitEnemy += new hook_ProcessHitEnemy(GlobalEventManager_ProcessHitEnemy); object obj = <>c.<>9__9_0; if (obj == null) { Manipulator val2 = delegate(ILContext il) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown int num3Index = 0; ILCursor val3 = new ILCursor(il); val3.GotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "damage"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num3Index) }); ILCursor val4 = new ILCursor(il); int num3 = default(int); ILLabel val7 = default(ILLabel); ILLabel val6 = default(ILLabel); float num2 = default(float); float num = default(float); ILLabel val5 = default(ILLabel); val4.GotoNext(new Func[12] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num3), (Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val7), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdflda(x, "RoR2.HealthComponent", "itemCounts"), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "noxiousThorn"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val6), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchLdnull(x), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "CheckRoll"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val5) }); val4.Index += 1; val4.EmitDelegate>((Func)((bool boolean) => true)); }; <>c.<>9__9_0 = val2; obj = (object)val2; } HealthComponent.TakeDamageProcess += (Manipulator)obj; string text = "Chance to fire a burst of thorns at nearby enemies."; string text2 = $"{procChance}% chance fire {thornsPerProc} (+{thornsPerStack} per stack) thorn that deals {damageMult * 100f}% TOTAL damage to the {targetsBase} (+{targetPerStack} per stack) nearest targets within {baseRange}m. Fire an extra thorn for each unique debuff the initial target had and apply {1} bleed for every {bleedPerThorn} thorns fired."; LanguageAPI.Add("ITEM_TRIGGERENEMYDEBUFFS_PICKUP", text); LanguageAPI.Add("ITEM_TRIGGERENEMYDEBUFFS_DESC", text2); } private void GlobalEventManager_ProcessHitEnemy(orig_ProcessHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //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_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Expected O, but got Unknown //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Expected O, but got Unknown //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageInfo, victim); if (!Object.op_Implicit((Object)(object)damageInfo.attacker) || !Object.op_Implicit((Object)(object)victim)) { return; } CharacterBody component = damageInfo.attacker.GetComponent(); CharacterBody component2 = victim.GetComponent(); if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component2) || !Object.op_Implicit((Object)(object)component.master)) { return; } int itemCount = component.inventory.GetItemCount(Items.TriggerEnemyDebuffs); if (itemCount <= 0 || ((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)15) || !Util.CheckRoll(procChance * damageInfo.procCoefficient, component.master)) { return; } TeamIndex teamIndex = component.teamComponent.teamIndex; HurtBox[] hurtBoxes = new SphereSearch { origin = victim.transform.position, radius = baseRange, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, queryTriggerInteraction = (QueryTriggerInteraction)0 }.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(teamIndex)).OrderCandidatesByDistance() .FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(); if (hurtBoxes.Length <= 1) { return; } EffectManager.SpawnEffect(CommonAssets.thornExplosionEffect, new EffectData { origin = component2.coreTransform.position, scale = 10f, rotation = Quaternion.identity }, true); Util.PlaySound("Play_item_proc_triggerEnemyDebuffs", victim); float damageValue = Util.OnHitProcDamage(damageInfo.damage, component.damage, damageMult); int num = CheckForDebuff(component2); int num2 = 0; int num3 = targetsBase + targetPerStack * (itemCount - 1); int num4 = 0; for (int i = 0; i < hurtBoxes.Length; i++) { if ((Object)(object)hurtBoxes[i].healthComponent.body == (Object)(object)component2) { continue; } if (Object.op_Implicit((Object)(object)hurtBoxes[i]) && Object.op_Implicit((Object)(object)hurtBoxes[i].healthComponent) && hurtBoxes[i].healthComponent.alive) { for (int j = 0; j < thornsPerProc + thornsPerStack * (itemCount - 1) + num; j++) { LightningOrb val = new LightningOrb(); val.attacker = damageInfo.attacker.gameObject; val.bouncedObjects = null; val.bouncesRemaining = 0; val.damageCoefficientPerBounce = 1f; val.damageColorIndex = (DamageColorIndex)3; val.damageValue = damageValue; val.isCrit = damageInfo.crit; val.lightningType = (LightningType)3; ((Orb)val).origin = damageInfo.position; val.procChainMask = default(ProcChainMask); ((ProcChainMask)(ref val.procChainMask)).AddProc((ProcType)15); val.procCoefficient = 0.2f; val.range = 0f; val.speed = 6f; val.teamIndex = teamIndex; ((Orb)val).target = hurtBoxes[i]; OrbManager.instance.AddOrb((Orb)(object)val); num4++; } num2++; } if (num2 >= num3) { break; } } int num5 = num4 / bleedPerThorn; for (int k = 0; k < num5; k++) { DotController.InflictDot(victim, damageInfo.attacker, (DotIndex)0, 3f * damageInfo.procCoefficient, 1f, (uint?)null); } } private int CheckForDebuff(CharacterBody body) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_0071: Invalid comparison between Unknown and I4 //IL_0053: 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) //IL_006a: 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) int num = 0; BuffIndex[] debuffBuffIndices = BuffCatalog.debuffBuffIndices; foreach (BuffIndex val in debuffBuffIndices) { if (body.HasBuff(val)) { num++; } } DotController val2 = DotController.FindDotController(((Component)body).gameObject); if (Object.op_Implicit((Object)(object)val2)) { for (DotIndex val3 = (DotIndex)0; (int)val3 < 10; val3 = (DotIndex)(val3 + 1)) { if (val2.HasDotActive(val3)) { num++; } } } return num; } } internal class PrayerBeadsChanges { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__12_3; public static Func <>9__12_4; public static Func <>9__12_5; public static Func <>9__12_6; public static Func <>9__12_7; public static Func <>9__12_8; public static Func <>9__12_9; public static Func <>9__12_10; public static Func <>9__12_11; public static Func <>9__12_12; public static Func <>9__12_13; public static Func <>9__12_14; public static Func <>9__12_15; public static Func <>9__12_16; public static Func <>9__12_17; public static Func <>9__12_18; public static Manipulator <>9__12_0; public static Func <>9__12_19; public static Func <>9__12_20; public static Func <>9__12_21; public static Func <>9__12_22; public static Func <>9__12_23; public static Func <>9__12_24; public static Func <>9__12_25; public static Manipulator <>9__12_1; public static Func <>9__12_26; public static Func <>9__12_27; public static Func <>9__12_28; public static Func <>9__12_29; public static Func <>9__12_30; public static Manipulator <>9__12_2; internal void b__12_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown ILCursor val = new ILCursor(il); int num4 = default(int); ILLabel val6 = default(ILLabel); int num3 = default(int); int num2 = default(int); ILLabel val5 = default(ILLabel); val.GotoNext(new Func[7] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num4), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "extraStatsOnLevelUpCountModifier"), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val6), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num3), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val5) }); val.RemoveRange(5); val.Emit(OpCodes.Ldc_I4, 0); ILCursor val2 = new ILCursor(il); int num = default(int); ILLabel val4 = default(ILLabel); ILLabel val3 = default(ILLabel); val2.GotoNext((MoveType)2, new Func[8] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "extraStatsOnLevelUpCountModifier"), (Instruction x) => ILPatternMatchingExt.MatchBge(x, ref val4), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val3) }); val2.Index -= 1; val2.EmitDelegate>((Func)((bool boolean) => false)); } internal bool b__12_3(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdloc(x, ref num); } internal bool b__12_4(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__12_5(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "extraStatsOnLevelUpCountModifier"); } internal bool b__12_6(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBle(x, ref val); } internal bool b__12_7(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdloc(x, ref num); } internal bool b__12_8(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdcI4(x, ref num); } internal bool b__12_9(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBle(x, ref val); } internal bool b__12_10(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdloc(x, ref num); } internal bool b__12_11(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__12_12(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "extraStatsOnLevelUpCountModifier"); } internal bool b__12_13(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBge(x, ref val); } internal bool b__12_14(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__12_15(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"); } internal bool b__12_16(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"); } internal bool b__12_17(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } internal bool b__12_18(bool boolean) { return false; } internal void b__12_1(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); int num = default(int); ILLabel val2 = default(ILLabel); val.GotoNext(new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "ExtraStatsOnLevelUp"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCount"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val2) }); val.Index += 4; val.EmitDelegate>((Func)((int value) => 0)); } internal bool b__12_19(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__12_20(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"); } internal bool b__12_21(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "ExtraStatsOnLevelUp"); } internal bool b__12_22(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCount"); } internal bool b__12_23(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdcI4(x, ref num); } internal bool b__12_24(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBle(x, ref val); } internal int b__12_25(int value) { return 0; } internal void b__12_2(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); ILLabel val2 = default(ILLabel); val.GotoNext((MoveType)2, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val2) }); val.Index -= 1; val.EmitDelegate>((Func)((bool boolean) => false)); } internal bool b__12_26(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__12_27(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"); } internal bool b__12_28(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"); } internal bool b__12_29(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } internal bool b__12_30(bool boolean) { return false; } } private float chanceExtraItem = 10f; private float greenWeight = 0.4f; private float redWeight = 0.15f; private float bossWeight = 0.05f; private float void1Weight = 0.1f; private float void2Weight = 0.25f; private float void3Weight = 0.05f; private float greenChance; private float redChance; private float bossChance; private float voidChance; private void LoadConfig() { chanceExtraItem = ModConfig.prayerBeadsChance.Value; greenWeight = ModConfig.prayerBeadsTier2.Value; redWeight = ModConfig.prayerBeadsTier3.Value; bossWeight = ModConfig.prayerBeadsBoss.Value; void1Weight = ModConfig.prayerBeadsVoid1.Value; void2Weight = ModConfig.prayerBeadsVoid2.Value; void3Weight = ModConfig.prayerBeadsVoid3.Value; float num = greenWeight + redWeight + bossWeight + void1Weight + void2Weight + void3Weight; greenChance = greenWeight / num; redChance = redWeight / num; bossChance = bossWeight / num; voidChance = (void1Weight + void2Weight + void3Weight) / num; } public void Init() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown //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_0093: Expected O, but got Unknown //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown LoadConfig(); Log.Info("Prayer Beads Changes and Config Loaded."); ItemDef val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/ExtraStatsOnLevelUp/ExtraStatsOnLevelUp.asset").WaitForCompletion(); ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); val.tags = (ItemTag[])(object)array; CharacterMaster.OnServerStageBegin += new hook_OnServerStageBegin(CharacterMaster_OnServerStageBegin); object obj = <>c.<>9__12_0; if (obj == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown ILCursor val9 = new ILCursor(il); int num5 = default(int); ILLabel val14 = default(ILLabel); int num4 = default(int); int num3 = default(int); ILLabel val13 = default(ILLabel); val9.GotoNext(new Func[7] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num5), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "extraStatsOnLevelUpCountModifier"), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val14), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num4), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num3), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val13) }); val9.RemoveRange(5); val9.Emit(OpCodes.Ldc_I4, 0); ILCursor val10 = new ILCursor(il); int num2 = default(int); ILLabel val12 = default(ILLabel); ILLabel val11 = default(ILLabel); val10.GotoNext((MoveType)2, new Func[8] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "extraStatsOnLevelUpCountModifier"), (Instruction x) => ILPatternMatchingExt.MatchBge(x, ref val12), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val11) }); val10.Index -= 1; val10.EmitDelegate>((Func)((bool boolean) => false)); }; <>c.<>9__12_0 = val2; obj = (object)val2; } CharacterBody.RecalculateStats += (Manipulator)obj; object obj2 = <>c.<>9__12_1; if (obj2 == null) { Manipulator val3 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val7 = new ILCursor(il); int num = default(int); ILLabel val8 = default(ILLabel); val7.GotoNext(new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "ExtraStatsOnLevelUp"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCount"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val8) }); val7.Index += 4; val7.EmitDelegate>((Func)((int value) => 0)); }; <>c.<>9__12_1 = val3; obj2 = (object)val3; } CharacterMaster.OnBodyStart += (Manipulator)obj2; object obj3 = <>c.<>9__12_2; if (obj3 == null) { Manipulator val4 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val5 = new ILCursor(il); ILLabel val6 = default(ILLabel); val5.GotoNext((MoveType)2, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val6) }); val5.Index -= 1; val5.EmitDelegate>((Func)((bool boolean) => false)); }; <>c.<>9__12_2 = val4; obj3 = (object)val4; } CharacterMaster.TrackBeadExperience += (Manipulator)obj3; string text = "Transform into a copy of one of your items at the start of the stage."; string text2 = $"At the start of the stage this item transform into a copy of {1} (+{1} per stack) of your items ({greenChance * 100f}%/{redChance * 100f}%/{bossChance * 100f}%/{voidChance * 100f}%) with a {chanceExtraItem}% chance to transform into 2 copies.\n(Increase chance of high rarity with item stack.)"; LanguageAPI.Add("ITEM_EXTRASTATSONLEVELUP_PICKUP", text); LanguageAPI.Add("ITEM_EXTRASTATSONLEVELUP_DESC", text2); } private void CharacterMaster_OnServerStageBegin(orig_OnServerStageBegin orig, CharacterMaster self, Stage stage) { orig.Invoke(self, stage); TryPrayerBeads(self, self.cloverVoidRng); } public void TryPrayerBeads(CharacterMaster master, Xoroshiro128Plus rng) { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: 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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected I4, but got Unknown //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0127: 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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Expected I4, but got Unknown int itemCount = master.inventory.GetItemCount(Items.ExtraStatsOnLevelUp); if (itemCount <= 0) { return; } List list = new List(master.inventory.itemAcquisitionOrder); List list2 = new List(); List list3 = new List(); List list4 = new List(); List list5 = new List(); List list6 = new List(); List list7 = new List(); int num = 0; int num2 = 0; int num3 = 0; int num4 = 0; int num5 = 0; int num6 = 0; foreach (ItemIndex item in list) { ItemDef itemDef = ItemCatalog.GetItemDef(item); if (!((Object)(object)itemDef == (Object)(object)Items.ExtraStatsOnLevelUp) && !itemDef.ContainsTag((ItemTag)10) && !itemDef.ContainsTag((ItemTag)9)) { ItemTier tier = itemDef.tier; ItemTier val = tier; switch (val - 1) { case 0: list2.Add(item); num = 1; break; case 1: list3.Add(item); num2 = 1; break; case 3: list4.Add(item); num3 = 1; break; case 5: list5.Add(item); num4 = 1; break; case 6: list6.Add(item); num5 = 1; break; case 7: list7.Add(item); num6 = 1; break; } } } if (num == 0 && num2 == 0 && num3 == 0 && num4 == 0 && num5 == 0 && num6 == 0) { return; } WeightedSelection val2 = new WeightedSelection(4); val2.AddChoice((ItemTier)1, greenWeight * (float)num); val2.AddChoice((ItemTier)2, redWeight * (float)itemCount * (float)num2); val2.AddChoice((ItemTier)4, bossWeight * Mathf.Pow((float)itemCount, 2f) * (float)num3); val2.AddChoice((ItemTier)6, void1Weight * (float)num4); val2.AddChoice((ItemTier)7, void2Weight * (float)num5); val2.AddChoice((ItemTier)8, void3Weight * (float)num6); for (int i = 0; i < itemCount; i++) { ItemTier val3 = val2.Evaluate(rng.nextNormalizedFloat); Log.Warning("Choosen Tier: " + ((object)(ItemTier)(ref val3)).ToString()); ItemTier val4 = val3; ItemTier val5 = val4; switch (val5 - 1) { case 0: GiveRemoveItemProcess(list2, rng, master); break; case 1: GiveRemoveItemProcess(list3, rng, master); break; case 3: GiveRemoveItemProcess(list4, rng, master); break; case 5: GiveRemoveItemProcess(list5, rng, master); break; case 6: GiveRemoveItemProcess(list6, rng, master); break; case 7: GiveRemoveItemProcess(list7, rng, master); break; } } } private void GiveRemoveItemProcess(List list, Xoroshiro128Plus rng, CharacterMaster master) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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) Util.ShuffleList(list, rng); ItemDef itemDef = ItemCatalog.GetItemDef(list[0]); master.inventory.RemoveItem(Items.ExtraStatsOnLevelUp, 1); master.inventory.GiveItem(itemDef, 1); if (Util.CheckRoll(chanceExtraItem, 0f, master)) { master.inventory.GiveItem(itemDef, 1); } CharacterMasterNotificationQueue.SendTransformNotification(master, Items.ExtraStatsOnLevelUp.itemIndex, itemDef.itemIndex, (TransformationType)0); } } internal class SaleStarChanges { private float triggerDistance = 4f; private void LoadConfig() { triggerDistance = ModConfig.saleStarDistance.Value; } public void Init() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown LoadConfig(); InteractionDriver.MyFixedUpdate += (Manipulator)delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Expected O, but got Unknown //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Expected O, but got Unknown //IL_042c: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); ILLabel val9 = default(ILLabel); ILLabel val8 = default(ILLabel); val.GotoNext((MoveType)2, new Func[7] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "inputReceived"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val9), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "currentInteractable"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val8) }); ILLabel val7 = default(ILLabel); val.GotoNext(new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "currentInteractable"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val7) }); val.Index += 3; val.EmitDelegate>((Func)((bool boolean) => false)); ILCursor val2 = new ILCursor(il); ILLabel val6 = default(ILLabel); val2.GotoNext((MoveType)2, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "saleStarEffect"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val6) }); ILLabel val5 = default(ILLabel); val2.GotoNext(new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "saleStarEffect"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val5) }); val2.Index += 3; val2.EmitDelegate>((Func)((bool boolean) => true)); ILCursor val3 = new ILCursor(il); val3.GotoNext((MoveType)2, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "saleStarEffect"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "Destroy") }); val3.GotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "saleStarEffect"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "Destroy") }); val3.RemoveRange(3); val3.Emit(OpCodes.Ldarg_0); val3.EmitDelegate>((Action)delegate(InteractionDriver interactionDriver) { //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)interactionDriver.currentInteractable)) { if (interactionDriver.characterBody.inventory.GetItemCount(Items.LowerPricedChests) > 0) { PurchaseInteraction component = interactionDriver.currentInteractable.GetComponent(); if ((Object)(object)component != (Object)null && component.saleStarCompatible && Object.op_Implicit((Object)(object)interactionDriver.currentInteractable.GetComponent()) && Object.op_Implicit((Object)(object)interactionDriver.currentInteractable.GetComponent()) && !Object.op_Implicit((Object)(object)interactionDriver.saleStarEffect)) { interactionDriver.saleStarEffect = Object.Instantiate(LegacyResourcesAPI.Load("Prefabs/Effects/LowerPricedChestsGlow"), interactionDriver.currentInteractable.transform.position, Quaternion.identity, interactionDriver.currentInteractable.transform); } } else if (Object.op_Implicit((Object)(object)interactionDriver.saleStarEffect)) { Object.Destroy((Object)(object)interactionDriver.saleStarEffect); } } else if (interactionDriver.characterBody.inventory.GetItemCount(Items.LowerPricedChests) > 0) { float maxInteractionDistance = interactionDriver.interactor.maxInteractionDistance; Interactor interactor = interactionDriver.interactor; interactor.maxInteractionDistance *= triggerDistance; GameObject val4 = interactionDriver.FindBestInteractableObject(); interactionDriver.interactor.maxInteractionDistance = maxInteractionDistance; if (Object.op_Implicit((Object)(object)val4)) { PurchaseInteraction component2 = val4.GetComponent(); if ((Object)(object)component2 != (Object)null && component2.saleStarCompatible && Object.op_Implicit((Object)(object)val4.GetComponent()) && Object.op_Implicit((Object)(object)val4.GetComponent()) && !Object.op_Implicit((Object)(object)interactionDriver.saleStarEffect)) { interactionDriver.saleStarEffect = Object.Instantiate(LegacyResourcesAPI.Load("Prefabs/Effects/LowerPricedChestsGlow"), val4.transform.position, Quaternion.identity, val4.transform); } } else if (Object.op_Implicit((Object)(object)interactionDriver.saleStarEffect)) { Object.Destroy((Object)(object)interactionDriver.saleStarEffect); } } else if (Object.op_Implicit((Object)(object)interactionDriver.saleStarEffect)) { Object.Destroy((Object)(object)interactionDriver.saleStarEffect); } }); }; Log.Info("Sale Star Changes and Config Loaded."); } } internal class UnstableTransmiterChanges { private float healthThreshold = 0.25f; private float damageMult = 3.5f; private float extraDamageMult = 3.5f; private float baseCooldown = 180f; private float cooldownReduction = 0.1f; private float minimumCooldown = 30f; private void LoadConfig() { damageMult = (float)ModConfig.unstableTransmitterBaseDamage.Value / 100f; extraDamageMult = (float)ModConfig.unstableTransmitterExtraDamage.Value / 100f; baseCooldown = ModConfig.unstableTransmitterBaseCooldown.Value; cooldownReduction = ModConfig.unstableTransmitterCooldownReduction.Value / 100f; minimumCooldown = ModConfig.unstableTransmitterMinimumCooldown.Value; } public void Init() { //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_0031: 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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown ItemDef val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/TeleportOnLowHealth/TeleportOnLowHealth.asset").WaitForCompletion(); ItemTag[] array = new ItemTag[5]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); val.tags = (ItemTag[])(object)array; BuffDef val2 = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/TeleportOnLowHealth/bdTeleportOnLowHealthCooldown.asset").WaitForCompletion(); val2.isHidden = false; CharacterBody.RpcTeleportCharacterToSafety += new hook_RpcTeleportCharacterToSafety(CharacterBody_RpcTeleportCharacterToSafety); HealthComponent.TakeDamageProcess += (Manipulator)delegate(ILContext il) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) int num3ID = 0; ILCursor val5 = new ILCursor(il); val5.GotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "damage"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num3ID) }); ILCursor val6 = new ILCursor(il); ILLabel val8 = default(ILLabel); int num9 = default(int); int num8 = default(int); ILLabel val7 = default(ILLabel); val6.GotoNext(new Func[12] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "body"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_hasOneShotProtection"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val8), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "damageType"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num9), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "op_BitwiseAnd"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num8), (Instruction x) => ILPatternMatchingExt.MatchBeq(x, ref val7) }); val6.Index += 3; val6.Emit(OpCodes.Ldarg_0); val6.Emit(OpCodes.Ldarg_1); val6.Emit(OpCodes.Ldloc, num3ID); val6.EmitDelegate>((Func)delegate(bool boolean, HealthComponent hc, DamageInfo di, float num3) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Invalid comparison between Unknown and I4 //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_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) if (Object.op_Implicit((Object)(object)hc) && Object.op_Implicit((Object)(object)hc.body) && hc.body.HasBuff(Buffs.TeleportOnLowHealth) && hc.combinedHealth >= (hc.fullCombinedHealth + hc.barrier) * healthThreshold && num3 >= hc.combinedHealth && (int)DamageTypeCombo.op_Implicit(di.damageType & DamageTypeCombo.op_Implicit((DamageType)1)) != 1) { di.damageType |= DamageTypeCombo.op_Implicit((DamageType)1); } return boolean; }); }; HealthComponent.UpdateLastHitTime += (Manipulator)delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0224: Unknown result type (might be due to invalid IL or missing references) ILCursor val4 = new ILCursor(il); int num7 = default(int); int num6 = default(int); int num5 = default(int); val4.GotoNext(new Func[15] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num7), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num6), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdflda(x, "itemCounts"), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "unstableTransmitter"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 1), (Instruction x) => ILPatternMatchingExt.MatchSub(x), (Instruction x) => ILPatternMatchingExt.MatchConvR4(x), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.2f), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchSub(x), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 15f), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Mathf", "Max"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num5) }); val4.RemoveRange(14); val4.Emit(OpCodes.Ldarg_0); val4.EmitDelegate>((Func)((HealthComponent hc) => Mathf.Max(baseCooldown - baseCooldown * cooldownReduction * (float)(hc.itemCounts.unstableTransmitter - 1), minimumCooldown))); }; CharacterBody.RpcTeleportCharacterToSafety += (Manipulator)delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val3 = new ILCursor(il); int num4 = default(int); val3.GotoNext(new Func[7] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_damage"), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num4), (Instruction x) => ILPatternMatchingExt.MatchConvR4(x), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 3.5f), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "baseDamage") }); val3.Index += 2; val3.RemoveRange(3); val3.EmitDelegate>((Func)((int value) => damageMult + extraDamageMult * (float)(value - 1))); }; string text = "On low health, explode and teleport away a short distance cleansing most negative effects."; string text2 = $"Taking damage to below {healthThreshold * 100f}% health blasts nearby enemies dealing {damageMult * 100f}% (+{extraDamageMult * 100f}% per item stack) damage and teleporting you to a random location cleansing all timed debuffs and damage over time effects. This effect has a cooldown of {baseCooldown / 60f} (-{cooldownReduction * 100f}% per item stack) minutes, down to a minimum of {minimumCooldown} seconds."; LanguageAPI.Add("ITEM_TELEPORTONLOWHEALTH_PICKUP", text); LanguageAPI.Add("ITEM_TELEPORTONLOWHEALTH_DESC", text2); Log.Info("Unstable Transmitter Changes and Config Loaded."); } private void CharacterBody_RpcTeleportCharacterToSafety(orig_RpcTeleportCharacterToSafety orig, CharacterBody self) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown orig.Invoke(self); Vector3 corePosition = self.corePosition; EffectData val = new EffectData { origin = corePosition }; val.SetHurtBoxReference(self.mainHurtBox); EffectManager.SpawnEffect(LegacyResourcesAPI.Load("Prefabs/Effects/CleanseEffect"), val, true); Util.CleanseBody(self, true, false, false, true, true, false); } } } namespace ItemsReworked.LegendaryItems { internal class WarBondsChanges { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__9_2; public static Func <>9__9_3; public static Func <>9__9_4; public static Func <>9__9_5; public static Func <>9__9_6; public static Func <>9__9_7; public static Func <>9__9_8; public static Func <>9__9_9; public static Manipulator <>9__9_0; public static Func <>9__9_10; public static Func <>9__9_11; public static Func <>9__9_12; public static Func <>9__9_13; public static Func <>9__9_14; public static Func <>9__9_15; public static Func <>9__9_16; public static Manipulator <>9__9_1; internal void b__9_0(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); ILLabel val2 = default(ILLabel); int num = default(int); val.GotoNext((MoveType)2, new Func[7] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBr(x, ref val2), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "GoldOnStageStart"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCount"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num) }); val.Index -= 1; val.EmitDelegate>((Func)((int value) => 0)); } internal bool b__9_2(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 0); } internal bool b__9_3(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBr(x, ref val); } internal bool b__9_4(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__9_5(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"); } internal bool b__9_6(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "GoldOnStageStart"); } internal bool b__9_7(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCount"); } internal bool b__9_8(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchStloc(x, ref num); } internal int b__9_9(int value) { return 0; } internal void b__9_1(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); ILLabel val2 = default(ILLabel); val.GotoNext((MoveType)2, new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "body"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchLdnull(x), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Inequality"), (Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val2) }); val.Index -= 1; val.EmitDelegate>((Func)((bool boolean) => true)); } internal bool b__9_10(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__9_11(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "body"); } internal bool b__9_12(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"); } internal bool b__9_13(Instruction x) { return ILPatternMatchingExt.MatchLdnull(x); } internal bool b__9_14(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Inequality"); } internal bool b__9_15(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrtrue(x, ref val); } internal bool b__9_16(bool boolean) { return true; } } private int baseChest = 3; private int extraChest = 1; private float smallChestWeight = 0.79f; private float largeChestWeight = 0.2f; private float legendaryChestWeight = 0.01f; private SpawnCard chest1; private SpawnCard chest2; private SpawnCard legendaryChest; private void LoadConfig() { baseChest = ModConfig.warBondsBaseChests.Value; extraChest = ModConfig.warBondsExtraChests.Value; smallChestWeight = (float)ModConfig.warBondsTier1Weight.Value / 100f; largeChestWeight = (float)ModConfig.warBondsTier2Weight.Value / 100f; legendaryChestWeight = (float)ModConfig.warBondsTier3Weight.Value / 100f; } public void Init() { //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_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_003e: 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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown LoadConfig(); chest1 = Addressables.LoadAssetAsync((object)"RoR2/Base/Chest1/iscChest1.asset").WaitForCompletion(); chest2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Chest2/iscChest2.asset").WaitForCompletion(); legendaryChest = Addressables.LoadAssetAsync((object)"RoR2/Base/GoldChest/iscGoldChest.asset").WaitForCompletion(); SceneDirector.PopulateScene += new hook_PopulateScene(SceneDirector_PopulateScene); object obj = <>c.<>9__9_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val5 = new ILCursor(il); ILLabel val6 = default(ILLabel); int num = default(int); val5.GotoNext((MoveType)2, new Func[7] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBr(x, ref val6), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "GoldOnStageStart"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCount"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num) }); val5.Index -= 1; val5.EmitDelegate>((Func)((int value) => 0)); }; <>c.<>9__9_0 = val; obj = (object)val; } CharacterBody.Start += (Manipulator)obj; object obj2 = <>c.<>9__9_1; if (obj2 == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val3 = new ILCursor(il); ILLabel val4 = default(ILLabel); val3.GotoNext((MoveType)2, new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "body"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchLdnull(x), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Inequality"), (Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val4) }); val3.Index -= 1; val3.EmitDelegate>((Func)((bool boolean) => true)); }; <>c.<>9__9_1 = val2; obj2 = (object)val2; } GoldOnStageStartBehaviour.GiveWarBondsGold += (Manipulator)obj2; string text = "Spawn extra chests at the start of every stage."; string text2 = $"Spawn {baseChest} (+{extraChest} per stack) chests at the start of every stage, each chest has a {smallChestWeight * 100f}% chance to be a Small Chest, {largeChestWeight * 100f}% to be a Large Chest and a {legendaryChestWeight * 100f}% to be a Legendary Chest.\n(Decrease chance of Small Chests per stack)"; LanguageAPI.Add("ITEM_GOLDONSTAGESTART_PICKUP", text); LanguageAPI.Add("ITEM_GOLDONSTAGESTART_DESC", text2); Log.Info("War Bonds Changes and Config Loaded."); } private void SceneDirector_PopulateScene(orig_PopulateScene orig, SceneDirector self) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_019e: 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_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Expected O, but got Unknown //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Expected O, but got Unknown //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Invalid comparison between Unknown and I4 orig.Invoke(self); Xoroshiro128Plus val = new Xoroshiro128Plus(Run.instance.seed); Dictionary dictionary = new Dictionary(); int num = 0; using (IEnumerator enumerator = CharacterMaster.readOnlyInstancesList.GetEnumerator()) { while (enumerator.MoveNext()) { if (enumerator.Current.inventory.GetItemCount(Items.GoldOnStageStart) > 0) { int itemCount = enumerator.Current.inventory.GetItemCount(Items.GoldOnStageStart); dictionary.Add(num, itemCount); num++; } } } for (int i = 0; i < dictionary.Count; i++) { WeightedSelection val2 = new WeightedSelection(8); val2.AddChoice(chest1, smallChestWeight * (float)dictionary[i]); val2.AddChoice(chest2, largeChestWeight * Mathf.Pow((float)dictionary[i], 2f)); val2.AddChoice(legendaryChest, legendaryChestWeight * Mathf.Pow((float)dictionary[i], 2f)); float num2 = smallChestWeight * (float)dictionary[i] + largeChestWeight * Mathf.Pow((float)dictionary[i], 2f) + legendaryChestWeight * Mathf.Pow((float)dictionary[i], 2f); int num3 = baseChest + extraChest * (dictionary[i] - 1); int num4 = 0; int num5 = 0; int num6 = 0; for (int j = 0; j < num3; j++) { SpawnCard val3 = val2.Evaluate(self.rng.nextNormalizedFloat); GameObject val4 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(val3, new DirectorPlacementRule { placementMode = (PlacementMode)4, preventOverhead = false }, self.rng)); if (Object.op_Implicit((Object)(object)val4)) { PurchaseInteraction component = val4.GetComponent(); if (Object.op_Implicit((Object)(object)component) && (int)component.costType == 1) { component.Networkcost = Run.instance.GetDifficultyScaledCost(component.cost); } } if ((Object)(object)val4 != (Object)null) { if ((Object)(object)val3 == (Object)(object)chest1) { num4++; } else if ((Object)(object)val3 == (Object)(object)chest2) { num5++; } else { num6++; } } } } } } } namespace ItemsReworked.CommonItems { internal class AntlersChanges { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__5_2; public static Func <>9__5_3; public static Func <>9__5_4; public static Func <>9__5_5; public static Func <>9__5_6; public static Func <>9__5_7; public static Func <>9__5_8; public static Func <>9__5_9; public static Func <>9__5_10; public static Func <>9__5_11; public static Func <>9__5_12; public static Func <>9__5_13; public static Manipulator <>9__5_0; public static Func <>9__5_14; public static Func <>9__5_15; public static Func <>9__5_16; internal void b__5_0(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); int num2 = default(int); float num = default(float); ILLabel val2 = default(ILLabel); val.GotoNext((MoveType)2, new Func[11] { (Instruction x) => ILPatternMatchingExt.MatchLdflda(x, "RoR2.HealthComponent", "itemCounts"), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "antlerShield"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchSub(x), (Instruction x) => ILPatternMatchingExt.MatchConvR4(x), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchAdd(x), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchLdnull(x), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "CheckRoll"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val2) }); val.Index -= 1; val.EmitDelegate>((Func)((bool boolean) => false)); } internal bool b__5_2(Instruction x) { return ILPatternMatchingExt.MatchLdflda(x, "RoR2.HealthComponent", "itemCounts"); } internal bool b__5_3(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "antlerShield"); } internal bool b__5_4(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdcI4(x, ref num); } internal bool b__5_5(Instruction x) { return ILPatternMatchingExt.MatchSub(x); } internal bool b__5_6(Instruction x) { return ILPatternMatchingExt.MatchConvR4(x); } internal bool b__5_7(Instruction x) { return ILPatternMatchingExt.MatchMul(x); } internal bool b__5_8(Instruction x) { return ILPatternMatchingExt.MatchAdd(x); } internal bool b__5_9(Instruction x) { float num = default(float); return ILPatternMatchingExt.MatchLdcR4(x, ref num); } internal bool b__5_10(Instruction x) { return ILPatternMatchingExt.MatchLdnull(x); } internal bool b__5_11(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "CheckRoll"); } internal bool b__5_12(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } internal bool b__5_13(bool boolean) { return false; } internal bool b__5_14(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__5_15(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent", "shield"); } internal bool b__5_16(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchStloc(x, ref num); } } private float extraMovSpeed = 0.1f; private float shieldPerStack = 0.04f; private float jumpPower = 0.25f; private BuffDef AntlersSpeedBuff = ScriptableObject.CreateInstance(); private void LoadConfig() { extraMovSpeed = ModConfig.antlerShieldSpeed.Value / 100f; shieldPerStack = ModConfig.antlerShieldShield.Value / 100f; jumpPower = ModConfig.antlerShieldJump.Value / 100f; } public void Init() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown LoadConfig(); Log.Info("Antlers Changes and Config Loaded."); ItemDef val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/NegateAttack/NegateAttack.asset").WaitForCompletion(); val.tags = (ItemTag[])(object)new ItemTag[2] { (ItemTag)21, (ItemTag)3 }; ((Object)AntlersSpeedBuff).name = "Antlers Speed Buff"; AntlersSpeedBuff.buffColor = Color.cyan; AntlersSpeedBuff.canStack = false; AntlersSpeedBuff.isDebuff = false; AntlersSpeedBuff.isCooldown = false; AntlersSpeedBuff.iconSprite = Addressables.LoadAssetAsync((object)"RoR2/Base/SprintOutOfCombat/bdWhipBoost.asset").WaitForCompletion().iconSprite; ContentAddition.AddBuffDef(AntlersSpeedBuff); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); object obj = <>c.<>9__5_0; if (obj == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val4 = new ILCursor(il); int num3 = default(int); float num2 = default(float); ILLabel val5 = default(ILLabel); val4.GotoNext((MoveType)2, new Func[11] { (Instruction x) => ILPatternMatchingExt.MatchLdflda(x, "RoR2.HealthComponent", "itemCounts"), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "antlerShield"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num3), (Instruction x) => ILPatternMatchingExt.MatchSub(x), (Instruction x) => ILPatternMatchingExt.MatchConvR4(x), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchAdd(x), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num2), (Instruction x) => ILPatternMatchingExt.MatchLdnull(x), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "CheckRoll"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val5) }); val4.Index -= 1; val4.EmitDelegate>((Func)((bool boolean) => false)); }; <>c.<>9__5_0 = val2; obj = (object)val2; } HealthComponent.TakeDamageProcess += (Manipulator)obj; HealthComponent.ServerFixedUpdate += (Manipulator)delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) ILCursor val3 = new ILCursor(il); int num = default(int); val3.GotoNext((MoveType)2, new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent", "shield"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num) }); val3.Emit(OpCodes.Ldarg_0); val3.EmitDelegate>((Action)delegate(HealthComponent hc) { if (Object.op_Implicit((Object)(object)hc) && Object.op_Implicit((Object)(object)hc.body) && Object.op_Implicit((Object)(object)hc.body.inventory)) { int itemCount = hc.body.inventory.GetItemCount(Items.NegateAttack); if (hc.body.HasBuff(AntlersSpeedBuff) && (hc.shield <= 0f || itemCount <= 0)) { hc.body.RemoveBuff(AntlersSpeedBuff); } if (itemCount > 0 && hc.shield > 0f && !hc.body.HasBuff(AntlersSpeedBuff)) { hc.body.AddBuff(AntlersSpeedBuff); } } }); }; string text = "Gain a recharging shield. Increase movement speed and jump height while you have shield."; string text2 = $"Gain a shield equal to {shieldPerStack * 100f}% (+{shieldPerStack * 100f}% per stack) of your maximum health that recharges outside of danger. Increase movement speed by {extraMovSpeed * 100f}% (+{extraMovSpeed * 100f}% per stack) and jump height by {jumpPower * 100f}% while you have a shield."; LanguageAPI.Add("ITEM_NEGATEATTACK_PICKUP", text); LanguageAPI.Add("ITEM_NEGATEATTACK_DESC", text2); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender) && Object.op_Implicit((Object)(object)sender.inventory)) { int itemCount = sender.inventory.GetItemCount(Items.NegateAttack); args.baseShieldAdd += shieldPerStack * (float)itemCount * sender.maxHealth; if (itemCount > 0 && sender.HasBuff(AntlersSpeedBuff)) { args.moveSpeedMultAdd += extraMovSpeed * (float)itemCount; args.jumpPowerMultAdd += jumpPower; } } } } internal class ChronicExpansionChanges { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__7_3; public static Func <>9__7_4; public static Func <>9__7_5; public static Func <>9__7_6; public static Func <>9__7_7; public static Func <>9__7_8; public static Func <>9__7_9; public static Func <>9__7_10; public static Func <>9__7_11; public static Func <>9__7_12; public static Func <>9__7_13; public static Func <>9__7_14; public static Func <>9__7_15; public static Func <>9__7_16; public static Func <>9__7_17; public static Func <>9__7_18; public static Func <>9__7_19; public static Func <>9__7_20; public static Func <>9__7_21; public static Manipulator <>9__7_0; public static Func <>9__7_22; public static Func <>9__7_23; public static Func <>9__7_24; public static Func <>9__7_25; public static Func <>9__7_26; public static Func <>9__7_27; public static Func <>9__7_28; public static Manipulator <>9__7_1; public static Func <>9__7_29; public static Func <>9__7_30; public static Func <>9__7_31; public static Func <>9__7_32; public static Func <>9__7_33; public static Manipulator <>9__7_2; internal void b__7_0(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown ILCursor val = new ILCursor(il); val.GotoNext(new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_increasedDamageKillCountBuff"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchAdd(x), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "set_increasedDamageKillCountBuff") }); val.RemoveRange(6); ILCursor val2 = new ILCursor(il); ILLabel val5 = default(ILLabel); ILLabel val4 = default(ILLabel); ILLabel val3 = default(ILLabel); val.GotoNext((MoveType)2, new Func[12] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val5), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBr(x, ref val4), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "IncreaseDamageOnMultiKill"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCount"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val3) }); val.Index -= 2; val.EmitDelegate>((Func)((int value) => 0)); } internal bool b__7_3(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__7_4(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__7_5(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_increasedDamageKillCountBuff"); } internal bool b__7_6(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 1); } internal bool b__7_7(Instruction x) { return ILPatternMatchingExt.MatchAdd(x); } internal bool b__7_8(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "set_increasedDamageKillCountBuff"); } internal bool b__7_9(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__7_10(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"); } internal bool b__7_11(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"); } internal bool b__7_12(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrtrue(x, ref val); } internal bool b__7_13(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 0); } internal bool b__7_14(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBr(x, ref val); } internal bool b__7_15(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__7_16(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"); } internal bool b__7_17(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "IncreaseDamageOnMultiKill"); } internal bool b__7_18(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCount"); } internal bool b__7_19(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 0); } internal bool b__7_20(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBle(x, ref val); } internal int b__7_21(int value) { return 0; } internal void b__7_1(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.GotoNext((MoveType)2, new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "increasedDamageKillTimer"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchSub(x), (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "increasedDamageKillTimer") }); val.Index -= 1; val.Emit(OpCodes.Ldarg_0); val.EmitDelegate>((Func)delegate(float value, CharacterBody body) { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return 1f; } if (body.inventory.GetItemCount(Items.IncreaseDamageOnMultiKill) <= 0) { body.increasedDamageKillCount = 0; body.increasedDamageKillCountBuff = 0; if (body.GetBuffCount(Buffs.IncreaseDamageBuff) > 0) { body.RemoveBuff(Buffs.IncreaseDamageBuff); } } return 1f; }); } internal bool b__7_22(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__7_23(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__7_24(Instruction x) { return ILPatternMatchingExt.MatchLdfld(x, "increasedDamageKillTimer"); } internal bool b__7_25(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 1); } internal bool b__7_26(Instruction x) { return ILPatternMatchingExt.MatchSub(x); } internal bool b__7_27(Instruction x) { return ILPatternMatchingExt.MatchStfld(x, "increasedDamageKillTimer"); } internal float b__7_28(float value, CharacterBody body) { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return 1f; } if (body.inventory.GetItemCount(Items.IncreaseDamageOnMultiKill) <= 0) { body.increasedDamageKillCount = 0; body.increasedDamageKillCountBuff = 0; if (body.GetBuffCount(Buffs.IncreaseDamageBuff) > 0) { body.RemoveBuff(Buffs.IncreaseDamageBuff); } } return 1f; } internal void b__7_2(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); ILLabel val2 = default(ILLabel); val.GotoNext((MoveType)2, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "IncreaseDamageBuff"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "HasBuff"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val2) }); val.Index -= 1; val.EmitDelegate>((Func)((bool boolean) => false)); } internal bool b__7_29(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__7_30(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "IncreaseDamageBuff"); } internal bool b__7_31(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "HasBuff"); } internal bool b__7_32(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } internal bool b__7_33(bool boolean) { return false; } } private int killsPerStack = 5; private int maxStackCount = 20; private float extraDmg = 1.25f; private float extraDmgPerStack = 1.25f; private int eliteValue = 5; private int championValue = 25; private void LoadConfig() { killsPerStack = ModConfig.chronicExpansionKillPerStack.Value; maxStackCount = ModConfig.chronicExpansionMaxStacks.Value; extraDmg = ModConfig.chronicExpansionBaseStackDamage.Value; extraDmgPerStack = ModConfig.chronicExpansionExtraStackDamage.Value; eliteValue = ModConfig.chronicExpansionEliteValue.Value; championValue = ModConfig.chronicExpansionChampionValue.Value; } public void Init() { //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_0027: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_0066: 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_0071: Expected O, but got Unknown LoadConfig(); object obj = <>c.<>9__7_0; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown ILCursor val7 = new ILCursor(il); val7.GotoNext(new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_increasedDamageKillCountBuff"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchAdd(x), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "set_increasedDamageKillCountBuff") }); val7.RemoveRange(6); ILCursor val8 = new ILCursor(il); ILLabel val11 = default(ILLabel); ILLabel val10 = default(ILLabel); ILLabel val9 = default(ILLabel); val7.GotoNext((MoveType)2, new Func[12] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "UnityEngine.Object", "op_Implicit"), (Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val11), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBr(x, ref val10), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "IncreaseDamageOnMultiKill"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "GetItemCount"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val9) }); val7.Index -= 2; val7.EmitDelegate>((Func)((int value) => 0)); }; <>c.<>9__7_0 = val; obj = (object)val; } CharacterBody.AddMultiKill += (Manipulator)obj; object obj2 = <>c.<>9__7_1; if (obj2 == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) ILCursor val6 = new ILCursor(il); val6.GotoNext((MoveType)2, new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "increasedDamageKillTimer"), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchSub(x), (Instruction x) => ILPatternMatchingExt.MatchStfld(x, "increasedDamageKillTimer") }); val6.Index -= 1; val6.Emit(OpCodes.Ldarg_0); val6.EmitDelegate>((Func)delegate(float value, CharacterBody body) { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return 1f; } if (body.inventory.GetItemCount(Items.IncreaseDamageOnMultiKill) <= 0) { body.increasedDamageKillCount = 0; body.increasedDamageKillCountBuff = 0; if (body.GetBuffCount(Buffs.IncreaseDamageBuff) > 0) { body.RemoveBuff(Buffs.IncreaseDamageBuff); } } return 1f; }); }; <>c.<>9__7_1 = val2; obj2 = (object)val2; } CharacterBody.UpdateMultiKill += (Manipulator)obj2; object obj3 = <>c.<>9__7_2; if (obj3 == null) { Manipulator val3 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val4 = new ILCursor(il); ILLabel val5 = default(ILLabel); val4.GotoNext((MoveType)2, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "IncreaseDamageBuff"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "HasBuff"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val5) }); val4.Index -= 1; val4.EmitDelegate>((Func)((bool boolean) => false)); }; <>c.<>9__7_2 = val3; obj3 = (object)val3; } CharacterBody.RecalculateStats += (Manipulator)obj3; CharacterBody.HandleOnKillEffectsServer += new hook_HandleOnKillEffectsServer(CharacterBody_HandleOnKillEffectsServer); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); string text = "Gain stacking damage after killing enemies."; string text2 = $"Every {killsPerStack} enemies killed grants a stacking damage bonus up to a maximum of {maxStackCount}, Elites count as {eliteValue} kills and Champions as {championValue}. Each damage stack increases base damage by {extraDmg}% (+{extraDmgPerStack}% per item stack), damage stacks are reset back to {0} at the start of the stage."; LanguageAPI.Add("ITEM_INCREASEDAMAGEONMULTIKILL_PICKUP", text); LanguageAPI.Add("ITEM_INCREASEDAMAGEONMULTIKILL_DESC", text2); Log.Info("Chronic Expansion Changes and Config Loaded."); } private void CharacterBody_HandleOnKillEffectsServer(orig_HandleOnKillEffectsServer orig, CharacterBody self, DamageReport damageReport) { //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown orig.Invoke(self, damageReport); int itemCount = self.inventory.GetItemCount(Items.IncreaseDamageOnMultiKill); if (itemCount <= 0 || self.GetBuffCount(Buffs.IncreaseDamageBuff) >= maxStackCount) { return; } int num = 0; if (damageReport.victimIsElite) { num += eliteValue; } if (damageReport.victimIsChampion) { num += championValue; } if (num == 0) { num = 1; } self.increasedDamageKillCountBuff += num; int num2 = self.increasedDamageKillCountBuff / killsPerStack; if (num2 < 1) { return; } for (int i = 0; i < num2; i++) { if (self.HasBuff(Buffs.IncreaseDamageBuff) && self.GetBuffCount(Buffs.IncreaseDamageBuff) >= maxStackCount) { self.increasedDamageKillCountBuff = 0; break; } self.AddBuff(Buffs.IncreaseDamageBuff); self.increasedDamageKillCountBuff -= killsPerStack; EffectManager.SpawnEffect(LegacyResourcesAPI.Load("Prefabs/Effects/IncreaseDamageOnMultiKillVFX"), new EffectData { origin = ((Component)self).gameObject.transform.position }, true); } } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (!Object.op_Implicit((Object)(object)sender) || !Object.op_Implicit((Object)(object)sender.inventory)) { return; } int itemCount = sender.inventory.GetItemCount(Items.IncreaseDamageOnMultiKill); if (itemCount > 0 && sender.HasBuff(Buffs.IncreaseDamageBuff)) { int buffCount = sender.GetBuffCount(Buffs.IncreaseDamageBuff); if (buffCount > 0) { args.damageMultAdd += (extraDmg + extraDmgPerStack * (float)(itemCount - 1)) * (float)buffCount / 100f; } } } } internal class KnockbackFinChanges { private float newProcChance = 10f; private float baseDmg = 0.15f; private float dmgPerStack = 0.15f; private void LoadConfig() { newProcChance = ModConfig.knockBackFinChance.Value; baseDmg = ModConfig.knockBackFinBaseDamage.Value / 100f; dmgPerStack = ModConfig.knockBackFinExtraDamage.Value / 100f; } public void Init() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown LoadConfig(); Log.Info("Fin Changes and Config Loaded."); ItemDef val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/KnockBackHitEnemies/KnockBackHitEnemies.asset").WaitForCompletion(); val.tags = (ItemTag[])(object)new ItemTag[2] { (ItemTag)21, (ItemTag)1 }; GlobalEventManager.ProcessHitEnemy += (Manipulator)delegate(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Expected O, but got Unknown //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Expected O, but got Unknown ILCursor val4 = new ILCursor(il); int itemCount2 = 0; ILLabel val10 = default(ILLabel); float num6 = default(float); MethodReference val9 = default(MethodReference); ILLabel val8 = default(ILLabel); val4.GotoNext(new Func[15] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "KnockUpHitEnemies"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, (MethodBase)typeof(CharacterBody).GetMethod("HasBuff", new Type[1] { typeof(BuffDef) })), (Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val10), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 7.5f), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref itemCount2), (Instruction x) => ILPatternMatchingExt.MatchConvR4(x), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.DamageInfo", "procCoefficient"), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "ConvertAmplificationPercentageIntoReductionPercentage"), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num6), (Instruction x) => ILPatternMatchingExt.MatchLdnull(x), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, ref val9), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val8) }); val4.Index += 3; val4.Next.Operand = newProcChance; ILCursor val5 = new ILCursor(il); float num2 = 1f; int bodyIndex = 0; MethodReference val7 = default(MethodReference); val5.GotoNext(new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref bodyIndex), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "KnockUpHitEnemies"), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 5f), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, ref val7) }); val5.Index += 2; val5.Next.Operand = num2; ILCursor val6 = new ILCursor(il); int num5 = default(int); int num4 = default(int); int num3 = default(int); val6.GotoNext(new Func[10] { (Instruction x) => ILPatternMatchingExt.MatchDup(x), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 10f), (Instruction x) => ILPatternMatchingExt.MatchDiv(x), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num5), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num4), (Instruction x) => ILPatternMatchingExt.MatchSub(x), (Instruction x) => ILPatternMatchingExt.MatchConvR4(x), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchAdd(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num3) }); val6.RemoveRange(9); }; HealthComponent.TakeDamageProcess += (Manipulator)delegate(ILContext il) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) ILCursor val2 = new ILCursor(il); int dmgIndex = 0; int num = default(int); val2.GotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.DamageInfo", "damage"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref dmgIndex) }); ILCursor val3 = new ILCursor(il); int cmIndex = 0; val3.GotoNext((MoveType)2, new Func[5] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref cmIndex), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterMaster", "get_inventory"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "NearbyDamageBonus"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Inventory", "GetItemCount"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 27) }); val3.Emit(OpCodes.Ldloc, dmgIndex); val3.Emit(OpCodes.Ldloc, cmIndex); val3.Emit(OpCodes.Ldarg_0); val3.Emit(OpCodes.Ldarg_1); val3.EmitDelegate>((Func)delegate(float dmg, CharacterMaster attacker, HealthComponent victim, DamageInfo dmgInfo) { //IL_008b: 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_0092: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)attacker)) { Log.Warning("No Attacker: " + (object)attacker); return dmg; } int itemCount = attacker.inventory.GetItemCount(Items.KnockBackHitEnemies); if (itemCount > 0 && (!Object.op_Implicit((Object)(object)victim.body.characterMotor) || !victim.body.characterMotor.isGrounded)) { dmg *= 1f + (float)itemCount * baseDmg; dmgInfo.damageColorIndex = (DamageColorIndex)(dmgInfo.damageColorIndex | 5); } return dmg; }); val3.Emit(OpCodes.Stloc, dmgIndex); }; string text = "Deal bonus damage to airborne enemies. On hit, enemies are knocked into the air."; string text2 = $"Increase damage by {baseDmg * 100f}% (+{dmgPerStack * 100f}% per stack) against airborne enemies. {newProcChance}% (+{newProcChance}% per stack) chance on hit to knock grounded enemies into the air."; LanguageAPI.Add("ITEM_KNOCKBACKHITENEMIES_PICKUP", text); LanguageAPI.Add("ITEM_KNOCKBACKHITENEMIES_DESC", text2); } } internal class LanternChanges { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func <>9__5_4; public static Func <>9__5_5; public static Func <>9__5_6; public static Func <>9__5_7; public static Func <>9__5_8; public static Func <>9__5_9; public static Manipulator <>9__5_0; public static Func <>9__5_10; public static Func <>9__5_11; public static Func <>9__5_12; public static Func <>9__5_13; public static Func <>9__5_14; public static Func <>9__5_15; public static Func <>9__5_16; public static Manipulator <>9__5_1; public static Func <>9__5_17; public static Func <>9__5_18; public static Func <>9__5_19; public static Func <>9__5_21; public static Func <>9__5_22; public static Func <>9__5_23; public static Func <>9__5_24; public static Func <>9__5_25; public static Manipulator <>9__5_3; internal void b__5_0(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); ILLabel val2 = default(ILLabel); val.GotoNext(new Func[5] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterMaster", "GetBody"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "LowerHealthHigherDamageBuff"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "HasBuff"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val2) }); val.Index += 4; val.EmitDelegate>((Func)((bool boolean) => false)); } internal bool b__5_4(Instruction x) { return ILPatternMatchingExt.MatchLdloc(x, 0); } internal bool b__5_5(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterMaster", "GetBody"); } internal bool b__5_6(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "LowerHealthHigherDamageBuff"); } internal bool b__5_7(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "HasBuff"); } internal bool b__5_8(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } internal bool b__5_9(bool boolean) { return false; } internal void b__5_1(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); ILLabel val3 = default(ILLabel); ILLabel val2 = default(ILLabel); val.GotoNext((MoveType)2, new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Inventory", "GetItemCount"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val3), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.HealthComponent", "get_alive"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val2) }); val.Index -= 1; val.EmitDelegate>((Func)((bool boolean) => false)); } internal bool b__5_10(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Inventory", "GetItemCount"); } internal bool b__5_11(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 0); } internal bool b__5_12(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBle(x, ref val); } internal bool b__5_13(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__5_14(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.HealthComponent", "get_alive"); } internal bool b__5_15(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } internal bool b__5_16(bool boolean) { return false; } internal bool b__5_17(Instruction x) { int num = default(int); return ILPatternMatchingExt.MatchLdloc(x, ref num); } internal bool b__5_18(Instruction x) { return ILPatternMatchingExt.MatchLdcI4(x, 0); } internal bool b__5_19(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBle(x, ref val); } internal void b__5_3(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); ILLabel val2 = default(ILLabel); val.GotoNext((MoveType)2, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "LowerHealthHigherDamageBuff"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "HasBuff"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val2) }); val.Index -= 1; val.EmitDelegate>((Func)((bool boolean) => false)); } internal bool b__5_21(Instruction x) { return ILPatternMatchingExt.MatchLdarg(x, 0); } internal bool b__5_22(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "LowerHealthHigherDamageBuff"); } internal bool b__5_23(Instruction x) { return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "HasBuff"); } internal bool b__5_24(Instruction x) { ILLabel val = default(ILLabel); return ILPatternMatchingExt.MatchBrfalse(x, ref val); } internal bool b__5_25(bool boolean) { return false; } } private float baseArmor = 10f; private float extraArmor = 5f; private float healthThreshold = 0.5f; private BuffDef LanternBuff = ScriptableObject.CreateInstance(); private void LoadConfig() { baseArmor = ModConfig.bolsteringLanternBaseArmor.Value; extraArmor = ModConfig.bolsteringLanternExtraArmor.Value; healthThreshold = (float)ModConfig.bolsteringLanternThreshold.Value / 100f; } public void Init() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_00fa: 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_0105: Expected O, but got Unknown //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_013c: Expected O, but got Unknown LoadConfig(); Log.Info("Lantern Changes and Config Loaded."); ItemDef val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/LowerHealthHigherDamage/LowerHealthHigherDamage.asset").WaitForCompletion(); val.tags = (ItemTag[])(object)new ItemTag[2] { (ItemTag)21, (ItemTag)3 }; ((Object)LanternBuff).name = "Bolstering Lantern Buff Active"; LanternBuff.buffColor = Color.yellow; LanternBuff.canStack = false; LanternBuff.isDebuff = false; LanternBuff.isCooldown = false; LanternBuff.iconSprite = Addressables.LoadAssetAsync((object)"RoR2/DLC2/bdLowerHealthHigherDamageBuff.asset").WaitForCompletion().iconSprite; ContentAddition.AddBuffDef(LanternBuff); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); object obj = <>c.<>9__5_0; if (obj == null) { Manipulator val2 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val12 = new ILCursor(il); ILLabel val13 = default(ILLabel); val12.GotoNext(new Func[5] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterMaster", "GetBody"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "LowerHealthHigherDamageBuff"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "HasBuff"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val13) }); val12.Index += 4; val12.EmitDelegate>((Func)((bool boolean) => false)); }; <>c.<>9__5_0 = val2; obj = (object)val2; } HealthComponent.TakeDamageProcess += (Manipulator)obj; object obj2 = <>c.<>9__5_1; if (obj2 == null) { Manipulator val3 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val9 = new ILCursor(il); ILLabel val11 = default(ILLabel); ILLabel val10 = default(ILLabel); val9.GotoNext((MoveType)2, new Func[6] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Inventory", "GetItemCount"), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val11), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.HealthComponent", "get_alive"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val10) }); val9.Index -= 1; val9.EmitDelegate>((Func)((bool boolean) => false)); }; <>c.<>9__5_1 = val3; obj2 = (object)val3; } HealthComponent.Heal += (Manipulator)obj2; CharacterBody.UpdateLowerHealthHigherDamage += (Manipulator)delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) ILCursor val7 = new ILCursor(il); int num = default(int); ILLabel val8 = default(ILLabel); val7.GotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val8) }); val7.Emit(OpCodes.Ldarg_0); val7.EmitDelegate>((Action)delegate(CharacterBody body) { LowHpTrigger(body, LanternBuff); }); val7.Remove(); val7.Emit(OpCodes.Ldc_I4, 0); }; object obj3 = <>c.<>9__5_3; if (obj3 == null) { Manipulator val4 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val5 = new ILCursor(il); ILLabel val6 = default(ILLabel); val5.GotoNext((MoveType)2, new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "LowerHealthHigherDamageBuff"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "HasBuff"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val6) }); val5.Index -= 1; val5.EmitDelegate>((Func)((bool boolean) => false)); }; <>c.<>9__5_3 = val4; obj3 = (object)val4; } CharacterBody.RecalculateStats += (Manipulator)obj3; string text = "Gain armor, double this armor gain at lower health."; string text2 = $"Increase armor by {baseArmor} (+{extraArmor} per stack), when below {healthThreshold * 100f}% health double this armor increase."; LanguageAPI.Add("ITEM_LOWERHEALTHHIGHERDAMAGE_PICKUP", text); LanguageAPI.Add("ITEM_LOWERHEALTHHIGHERDAMAGE_DESC", text2); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)sender) || !Object.op_Implicit((Object)(object)sender.inventory)) { return; } int itemCount = sender.inventory.GetItemCount(Items.LowerHealthHigherDamage); if (itemCount > 0) { args.armorAdd += baseArmor + extraArmor * (float)(itemCount - 1); if (sender.HasBuff(LanternBuff.buffIndex)) { args.armorAdd += baseArmor + extraArmor * (float)(itemCount - 1); } } } private void LowHpTrigger(CharacterBody body, BuffDef lanternBuffDef) { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return; } if (body.inventory.GetItemCount(Items.LowerHealthHigherDamage) > 0 && body.healthComponent.combinedHealthFraction < healthThreshold) { if (!body.HasBuff(lanternBuffDef)) { body.AddBuff(lanternBuffDef); Util.PlaySound("Play_item_proc_lowerHealthHigherDamage_proc", ((Component)body).gameObject); } } else if (body.HasBuff(lanternBuffDef)) { body.RemoveBuff(lanternBuffDef); } } private void BuffCountCheck(CharacterBody body, BuffDef lanternBuffDef) { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: 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_011f: Invalid comparison between Unknown and I4 //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_014b: 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_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) int num = 0; int num2 = 0; int num3 = 0; if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return; } if (body.inventory.GetItemCount(Items.LowerHealthHigherDamage) <= 0) { if (body.HasBuff(lanternBuffDef)) { body.SetBuffCount(lanternBuffDef.buffIndex, 0); } return; } BuffIndex[] activeBuffsList = body.activeBuffsList; foreach (BuffIndex val in activeBuffsList) { if (BuffCatalog.buffDefs[val].isCooldown) { num3++; } } BuffIndex[] debuffBuffIndices = BuffCatalog.debuffBuffIndices; foreach (BuffIndex val2 in debuffBuffIndices) { if (body.HasBuff(val2)) { num++; } } DotController val3 = DotController.FindDotController(((Component)body).gameObject); if (Object.op_Implicit((Object)(object)val3)) { for (DotIndex val4 = (DotIndex)0; (int)val4 < 10; val4 = (DotIndex)(val4 + 1)) { if (val3.HasDotActive(val4)) { num2++; } } } int num4 = num + num2 + num3; if (num4 > 0) { if (body.HasBuff(lanternBuffDef)) { body.SetBuffCount(lanternBuffDef.buffIndex, num4); return; } Util.PlaySound("Play_item_proc_lowerHealthHigherDamage_proc", ((Component)body).gameObject); body.AddBuff(lanternBuffDef); body.SetBuffCount(lanternBuffDef.buffIndex, num4); } else if (body.HasBuff(lanternBuffDef)) { body.SetBuffCount(lanternBuffDef.buffIndex, 0); } } } internal class WarpedEchoChanges { private float damageThreshold = 0.25f; private float damageSplitGradual = 0.5f; private float dmgDuration = 4f; private float extraDuration = 0.5f; private float cooldown = 10f; private BuffDef EchoDamageBuff; private void LoadConfig() { damageThreshold = (float)ModConfig.warpedEchoThreshold.Value / 100f; damageSplitGradual = (float)ModConfig.warpedEchoSplit.Value / 100f; dmgDuration = ModConfig.warpedEchoBaseDuration.Value; extraDuration = ModConfig.warpedEchoExtraDuration.Value; cooldown = ModConfig.warpedEchoCooldown.Value; } public void Init() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: 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_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Expected O, but got Unknown //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Expected O, but got Unknown //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Expected O, but got Unknown //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Expected O, but got Unknown LoadConfig(); Log.Info("WarpedEcho Changes and Config Loaded."); ItemDef val = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/DelayedDamage/DelayedDamage.asset").WaitForCompletion(); ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); val.tags = (ItemTag[])(object)array; BuffDef val2 = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/DelayedDamage/bdDelayedDamageBuff.asset").WaitForCompletion(); val2.canStack = false; EchoDamageBuff = ScriptableObject.CreateInstance(); ((Object)EchoDamageBuff).name = "Echo delayed damage"; EchoDamageBuff.buffColor = Color.red; EchoDamageBuff.canStack = false; EchoDamageBuff.isDebuff = true; EchoDamageBuff.isCooldown = false; EchoDamageBuff.iconSprite = Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/DelayedDamage/bdDelayedDamageBuff.asset").WaitForCompletion().iconSprite; ContentAddition.AddBuffDef(EchoDamageBuff); DotDef val3 = new DotDef { associatedBuff = EchoDamageBuff, damageColorIndex = (DamageColorIndex)11, interval = 0.25f, damageCoefficient = 1f }; DotIndex echoIndex = DotAPI.RegisterDotDef(val3, (CustomDotBehaviour)null, (CustomDotVisual)null); GenericPickupController.AttemptGrant += new hook_AttemptGrant(GenericPickupController_AttemptGrant); CharacterBody.UpdateDelayedDamage += new hook_UpdateDelayedDamage(CharacterBody_UpdateDelayedDamage); HealthComponent.TakeDamageProcess += (Manipulator)delegate(ILContext il) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Expected O, but got Unknown //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Expected O, but got Unknown //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_051a: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Expected O, but got Unknown //IL_055f: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_059b: Expected O, but got Unknown //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0649: Unknown result type (might be due to invalid IL or missing references) int num3ID = 0; int num17ID = 0; ILCursor val5 = new ILCursor(il); val5.GotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "damage"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num3ID) }); ILCursor val6 = new ILCursor(il); ILLabel val19 = default(ILLabel); ILLabel val18 = default(ILLabel); val6.GotoNext(new Func[7] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num17ID), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0f), (Instruction x) => ILPatternMatchingExt.MatchBleUn(x, ref val19), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "barrier"), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0f), (Instruction x) => ILPatternMatchingExt.MatchBleUn(x, ref val18) }); ILCursor val7 = new ILCursor(il); int num26 = default(int); ILLabel val17 = default(ILLabel); ILLabel val16 = default(ILLabel); ILLabel val15 = default(ILLabel); ILLabel val14 = default(ILLabel); ILLabel val13 = default(ILLabel); val7.GotoNext((MoveType)2, new Func[17] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num26), (Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val17), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent", "body"), (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "DelayedDamageBuff"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "HasBuff"), (Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val16), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.DamageInfo", "damage"), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0f), (Instruction x) => ILPatternMatchingExt.MatchBleUn(x, ref val15), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.DamageInfo", "delayedDamageSecondHalf"), (Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val14), (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.DamageInfo", "rejected"), (Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val13) }); val7.Index -= 1; val7.Emit(OpCodes.Ldloc, num17ID); val7.Emit(OpCodes.Ldarg_0); val7.Emit(OpCodes.Ldarg_1); val7.EmitDelegate>((Func)delegate(bool boolean, float num17Dmg, HealthComponent hc, DamageInfo di) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_006a: Invalid comparison between Unknown and I4 if (!Object.op_Implicit((Object)(object)hc) || !Object.op_Implicit((Object)(object)hc.body) || !Object.op_Implicit((Object)(object)hc.body.inventory)) { return true; } return (num17Dmg < hc.fullCombinedHealth * damageThreshold || (int)DamageTypeCombo.op_Implicit(di.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) == 67108864) ? true : false; }); ILCursor val8 = new ILCursor(il); int num25 = default(int); int num24 = default(int); val8.GotoNext(new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num25), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.5f), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num24) }); val8.Index += 1; val8.RemoveRange(2); val8.Emit(OpCodes.Ldarg_0); val8.EmitDelegate>((Func)delegate(float num17Value, HealthComponent hc) { if (!Object.op_Implicit((Object)(object)hc) || !Object.op_Implicit((Object)(object)hc.body)) { return num17Value * 0.5f; } hc.body.oldDelayedDamageCount = (int)num17Value; return num17Value - (float)hc.body.oldDelayedDamageCount * damageSplitGradual; }); ILCursor val9 = new ILCursor(il); val9.GotoNext(new Func[2] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, num17ID), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, num3ID) }); val9.Index += 1; val9.Emit(OpCodes.Ldarg_0); val9.EmitDelegate>((Func)((float num17, HealthComponent hc) => (float)hc.body.oldDelayedDamageCount * (1f - damageSplitGradual))); ILCursor val10 = new ILCursor(il); int num23 = default(int); val10.GotoNext(new Func[4] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "body"), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num23), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "SecondHalfOfDelayedDamage") }); val10.RemoveRange(4); val10.Emit(OpCodes.Ldarg_0); val10.Emit(OpCodes.Ldarg_1); val10.EmitDelegate>((Action)delegate(HealthComponent hc, DamageInfo di) { //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0115: 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) if (Object.op_Implicit((Object)(object)hc) && Object.op_Implicit((Object)(object)hc.body) && Object.op_Implicit((Object)(object)hc.body.inventory)) { float num20 = (float)hc.body.oldDelayedDamageCount * damageSplitGradual; int itemCount = hc.body.inventory.GetItemCount(Items.DelayedDamage); float num21 = dmgDuration + extraDuration * (float)(itemCount - 1); float num22 = num21 * 4f; if ((float)(int)num20 < num22) { num20 = (int)num20; num21 = num20 / 4f; num20 = 1f; } else { num20 = (num20 / dmgDuration + extraDuration * (float)(itemCount - 1)) * 0.5f; } InflictDotInfo val11 = default(InflictDotInfo); val11.attackerObject = ((Component)hc).gameObject; val11.victimObject = ((Component)hc).gameObject; val11.damageMultiplier = num20; val11.dotIndex = echoIndex; val11.duration = num21; InflictDotInfo val12 = val11; DotController.InflictDot(ref val12); if (hc.body.HasBuff(Buffs.DelayedDamageBuff)) { hc.body.RemoveBuff(Buffs.DelayedDamageBuff); } } }); }; DotController.AddDot += (Manipulator)delegate(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) //IL_0098: 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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) ILCursor val4 = new ILCursor(il); int num19 = default(int); int num18 = default(int); val4.GotoNext(new Func[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num19), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "get_damage"), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num18) }); val4.Index += 2; val4.Emit(OpCodes.Ldarg, 4); val4.Emit(OpCodes.Ldarg_3); val4.EmitDelegate>((Func)((float attckerDmg, float dmgMult, DotIndex dotIndex) => (dotIndex == echoIndex) ? dmgMult : attckerDmg)); val4.Index += 1; val4.Emit(OpCodes.Ldarg, 4); val4.Emit(OpCodes.Ldarg_3); val4.EmitDelegate>((Func)((float dmgmult, DotIndex dotIndex) => (dotIndex == echoIndex) ? 1f : dmgmult)); val4.Emit(OpCodes.Starg, 4); }; string text = "Splits incoming damage and applies it gradually."; string text2 = $"Taking damage equal or higher than {damageThreshold * 100f}% of your maximum health will instead deal {(1f - damageSplitGradual) * 100f}% upfront and the rest will be applied gradually over the next {dmgDuration} (+{extraDuration} per stack) seconds. This effect has a cooldown of {cooldown} seconds after all of the damage is dealt."; LanguageAPI.Add("ITEM_DELAYEDDAMAGE_PICKUP", text); LanguageAPI.Add("ITEM_DELAYEDDAMAGE_DESC", text2); } [Server] private void CharacterBody_UpdateDelayedDamage(orig_UpdateDelayedDamage orig, CharacterBody self, float deltaTime) { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void RoR2.CharacterBody::UpdateDelayedDamage(System.Single)' called on client"); } else { if (!Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)self.inventory)) { return; } int itemCount = self.inventory.GetItemCount(Items.DelayedDamage); if (itemCount > 0) { if (!self.HasBuff(Buffs.DelayedDamageBuff)) { if (!self.HasBuff(EchoDamageBuff)) { self.delayedDamageRefreshTime -= deltaTime; if (self.delayedDamageRefreshTime <= 0f) { self.AddBuff(Buffs.DelayedDamageBuff); self.delayedDamageRefreshTime = cooldown; self.oldDelayedDamageCount = 0; } } } else { self.delayedDamageRefreshTime = cooldown; } } else { self.delayedDamageRefreshTime = 0f; self.oldDelayedDamageCount = 0; if (self.HasBuff(Buffs.DelayedDamageBuff)) { self.RemoveBuff(Buffs.DelayedDamageBuff); } } } } private void GenericPickupController_AttemptGrant(orig_AttemptGrant orig, GenericPickupController self, CharacterBody body) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory) && ((PickupIndex)(ref self.pickupIndex)).pickupDef.itemIndex == Items.DelayedDamage.itemIndex && body.inventory.GetItemCount(Items.DelayedDamage) <= 0) { body.AddBuff(Buffs.DelayedDamageBuff); body.delayedDamageRefreshTime = cooldown; } orig.Invoke(self, body); } } }