using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using HG;
using IL.RoR2;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.RoR2;
using R2API;
using RoR2;
using RoR2.Items;
using RoR2.Orbs;
using RoR2.Projectile;
using StormItemBuffs.Properties;
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 = "")]
[assembly: AssemblyCompany("StormItemBuffs")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("StormItemBuffs")]
[assembly: AssemblyTitle("StormItemBuffs")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
namespace StormItemBuffs
{
public static class ArrayUtil
{
public static T[] Add<T>(this T[] array, params T[] items)
{
return (array ?? Enumerable.Empty<T>()).Concat(items).ToArray();
}
public static T[] Remove<T>(this T[] array, params T[] items)
{
return (array ?? Enumerable.Empty<T>()).Except(items).ToArray();
}
}
public class WConfig
{
public static ConfigFile ConfigFileUNSORTED = new ConfigFile(Paths.ConfigPath + "\\Wolfo.Storm_Item_Buffs.cfg", true);
public static ConfigEntry<bool> cfg_White_Antler;
public static ConfigEntry<bool> cfg_White_Chronic;
public static ConfigEntry<bool> cfg_White_Chronic_FIX;
public static ConfigEntry<bool> cfg_White_BolsterLantern;
public static ConfigEntry<bool> cfg_White_WarpedEcho;
public static ConfigEntry<bool> cfg_White_WarpedEcho_FIX;
public static ConfigEntry<bool> cfg_White_KnockbackFin;
public static ConfigEntry<bool> cfg_Green_Beads;
public static ConfigEntry<bool> cfg_Green_Beads_FIX;
public static ConfigEntry<bool> cfg_Green_NoxThorn;
public static ConfigEntry<bool> cfg_Green_NoxThorn_FIX;
public static ConfigEntry<bool> cfg_Green_UnstableTrans;
public static ConfigEntry<bool> cfg_Green_LumShot;
public static ConfigEntry<bool> cfg_Green_LumShot_FIX;
public static ConfigEntry<bool> cfg_Red_WarBonds;
public static ConfigEntry<bool> cfg_Red_WarBonds_FIX;
public static ConfigEntry<bool> cfg_Red_Meteor;
public static ConfigEntry<bool> cfg_Red_Nectar;
public static ConfigEntry<bool> cfg_Red_Nectar_FIX;
public static ConfigEntry<bool> cfg_Red_Boomerang;
public static ConfigEntry<bool> cfg_Elite_Twisted;
public static void InitConfig()
{
cfg_White_Antler = ConfigFileUNSORTED.Bind<bool>("White", "Antler Shield", true, "Changes as described on store page.");
cfg_White_Chronic = ConfigFileUNSORTED.Bind<bool>("White", "Chronic Expansion", true, "Changes as described on store page.");
cfg_White_Chronic_FIX = ConfigFileUNSORTED.Bind<bool>("White - Fixes", "Chronic Expansion", true, "Fixes as described on store page.");
cfg_White_BolsterLantern = ConfigFileUNSORTED.Bind<bool>("White", "Bolstering Lantern", true, "Changes as described on store page.");
cfg_White_KnockbackFin = ConfigFileUNSORTED.Bind<bool>("White", "Knockback Fin", true, "Buffs as described on store page.");
cfg_White_WarpedEcho = ConfigFileUNSORTED.Bind<bool>("White", "Warped Echo", true, "Buffs as described on store page.");
cfg_White_WarpedEcho_FIX = ConfigFileUNSORTED.Bind<bool>("White - Fixes", "Warped Echo", true, "Fixes as described on store page.");
cfg_Green_Beads = ConfigFileUNSORTED.Bind<bool>("Green", "Prayer Beads", true, "Buffs as described on store page.");
cfg_Green_Beads_FIX = ConfigFileUNSORTED.Bind<bool>("Green - Fixes", "Prayer Beads", true, "Fixes as described on store page.");
cfg_Green_NoxThorn = ConfigFileUNSORTED.Bind<bool>("Green", "Noxious Thorn", true, "Buffs as described on store page.");
cfg_Green_NoxThorn_FIX = ConfigFileUNSORTED.Bind<bool>("Green - Fixes", "Noxious Thorn", true, "Fixes as described on store page.");
cfg_Green_UnstableTrans = ConfigFileUNSORTED.Bind<bool>("Green", "Unstable Transmitter", true, "Buffs as described on store page.");
cfg_Green_LumShot = ConfigFileUNSORTED.Bind<bool>("Green", "Luminous Shot", true, "Buffs as described on store page.");
cfg_Green_LumShot_FIX = ConfigFileUNSORTED.Bind<bool>("Green - Fixes", "Luminous Shot", true, "Fixes as described on store page.");
cfg_Red_WarBonds_FIX = ConfigFileUNSORTED.Bind<bool>("Red - Fixes", "War Bonds", true, "Fix giving 25 less gold than intended.");
cfg_Red_WarBonds = ConfigFileUNSORTED.Bind<bool>("Red", "War Bonds", true, "Buffs as described on store page. Golden Gun.");
cfg_Red_Meteor = ConfigFileUNSORTED.Bind<bool>("Red", "Runic Lens", true, "Uncapped as described on store page.");
cfg_Red_Nectar = ConfigFileUNSORTED.Bind<bool>("Red", "Growth Nectar", true, "Buffs as described on store page.");
cfg_Red_Nectar_FIX = ConfigFileUNSORTED.Bind<bool>("Red - Fixes", "Growth Nectar", true, "Fixes as described on store page.");
cfg_Red_Boomerang = ConfigFileUNSORTED.Bind<bool>("Red", "Electric Boomerang", true, "Changes as described on store page.");
cfg_Elite_Twisted = ConfigFileUNSORTED.Bind<bool>("Elite", "Twisted Elite", true, "Nerfs as described on store page.");
}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.Wolfo.StormItemBuffs", "StormItemBuffs", "1.1.0")]
public class StormItemBuffs : BaseUnityPlugin
{
[Serializable]
[CompilerGenerated]
private sealed class <>c
{
public static readonly <>c <>9 = new <>c();
public static Func<Instruction, bool> <>9__4_6;
public static Func<Instruction, bool> <>9__4_0;
public static Func<int, int> <>9__4_1;
public static Func<Instruction, bool> <>9__4_2;
public static Func<Instruction, bool> <>9__4_3;
public static Func<Instruction, bool> <>9__4_4;
public static Func<float, CharacterBody, float> <>9__4_5;
public static Func<Instruction, bool> <>9__8_1;
public static Func<Instruction, bool> <>9__8_0;
public static Func<EliteRules, bool> <>9__11_1;
public static Action <>9__11_0;
public static Func<Instruction, bool> <>9__12_1;
public static Func<Instruction, bool> <>9__12_0;
public static Func<Instruction, bool> <>9__13_1;
public static Func<float, DamageReport, float> <>9__13_0;
public static Func<Instruction, bool> <>9__15_3;
public static Func<float, DamageInfo, float> <>9__15_0;
public static Func<Instruction, bool> <>9__15_1;
public static Func<DifficultyIndex, DamageInfo, DifficultyIndex> <>9__15_2;
public static Func<Instruction, bool> <>9__17_2;
public static Func<Instruction, bool> <>9__17_0;
public static Func<float, CharacterBody, float> <>9__17_1;
public static Func<Instruction, bool> <>9__18_0;
public static Func<Instruction, bool> <>9__18_2;
public static Func<Instruction, bool> <>9__18_1;
public static Func<Instruction, bool> <>9__19_2;
public static Func<Instruction, bool> <>9__19_0;
public static Func<float, DamageInfo, float> <>9__19_1;
public static Func<Instruction, bool> <>9__21_1;
public static Func<Instruction, bool> <>9__21_0;
public static Func<Instruction, bool> <>9__23_2;
public static Func<Instruction, bool> <>9__23_0;
public static Func<Instruction, bool> <>9__23_1;
public static Func<Instruction, bool> <>9__24_7;
public static Func<Instruction, bool> <>9__24_0;
public static Func<Instruction, bool> <>9__24_1;
public static Func<CharacterBody, CharacterBody> <>9__24_2;
public static Func<Instruction, bool> <>9__24_3;
public static Func<Instruction, bool> <>9__24_4;
public static Func<Instruction, bool> <>9__24_5;
public static Func<LightningOrb, DamageInfo, CharacterBody, LightningOrb> <>9__24_6;
public static Func<Instruction, bool> <>9__26_2;
public static Func<Instruction, bool> <>9__26_0;
public static Func<float, CharacterBody, float> <>9__26_1;
public static Func<Instruction, bool> <>9__28_9;
public static Func<Instruction, bool> <>9__28_0;
public static Func<Instruction, bool> <>9__28_1;
public static Func<Instruction, bool> <>9__28_2;
public static Func<Instruction, bool> <>9__28_3;
public static Func<Instruction, bool> <>9__28_4;
public static Func<CharacterBody, DamageInfo, CharacterBody> <>9__28_5;
public static Func<Instruction, bool> <>9__28_6;
public static Func<Instruction, bool> <>9__28_7;
public static Func<CharacterMotor, float, float> <>9__28_8;
public static Func<Instruction, bool> <>9__29_2;
public static Func<float, float> <>9__29_0;
public static Func<Instruction, bool> <>9__29_1;
public static StatHookEventHandler <>9__30_0;
public static Func<Instruction, bool> <>9__31_1;
public static Func<int, int> <>9__31_0;
public static Func<Instruction, bool> <>9__32_6;
public static Func<Instruction, bool> <>9__32_0;
public static Func<Instruction, bool> <>9__32_1;
public static Func<float, HealthComponent, float> <>9__32_2;
public static Func<Instruction, bool> <>9__32_3;
public static Func<float, float> <>9__32_4;
public static Func<Instruction, bool> <>9__32_5;
public static Func<Instruction, bool> <>9__34_0;
public static Func<Instruction, bool> <>9__34_2;
public static Func<int, CharacterBody, int> <>9__34_1;
public static Func<Instruction, bool> <>9__35_2;
public static Func<Instruction, bool> <>9__35_0;
public static Func<Instruction, bool> <>9__35_1;
public static Func<Instruction, bool> <>9__36_6;
public static Func<Instruction, bool> <>9__36_0;
public static Func<int, int> <>9__36_1;
public static Func<Instruction, bool> <>9__36_2;
public static Func<Instruction, bool> <>9__36_3;
public static Func<Instruction, bool> <>9__36_4;
public static Func<float, CharacterBody, float> <>9__36_5;
public static StatHookEventHandler <>9__38_0;
public static StatHookEventHandler <>9__39_0;
public static StatHookEventHandler <>9__40_0;
internal bool <ChronicFixNOBUFF>b__4_6(Instruction x)
{
return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "IncreaseDamageBuff");
}
internal bool <ChronicFixNOBUFF>b__4_0(Instruction x)
{
return ILPatternMatchingExt.MatchLdcI4(x, 5);
}
internal int <ChronicFixNOBUFF>b__4_1(int val)
{
return val + 1;
}
internal bool <ChronicFixNOBUFF>b__4_2(Instruction x)
{
return ILPatternMatchingExt.MatchLdcI4(x, 1);
}
internal bool <ChronicFixNOBUFF>b__4_3(Instruction x)
{
return ILPatternMatchingExt.MatchLdcI4(x, 1);
}
internal bool <ChronicFixNOBUFF>b__4_4(Instruction x)
{
return ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterBody", "baseDamage");
}
internal float <ChronicFixNOBUFF>b__4_5(float damage, CharacterBody body)
{
damage += body.levelDamage * (body.level - 1f);
return damage;
}
internal bool <Chronic4Kill>b__8_1(Instruction x)
{
return ILPatternMatchingExt.MatchStfld(x, "RoR2.CharacterBody", "increasedDamageKillTimer");
}
internal bool <Chronic4Kill>b__8_0(Instruction x)
{
return ILPatternMatchingExt.MatchLdcI4(x, 5);
}
internal void <GildedTierFix>b__11_0()
{
Debug.LogWarning((object)"Gilded Elite tier 1.5x");
if (CombatDirector.eliteTiers.Length >= 6)
{
CombatDirector.eliteTiers[1].isAvailable = (EliteRules rules) => CombatDirector.NotEliteOnlyArtifactActive() && (int)rules == 0;
CombatDirector.eliteTiers[3].costMultiplier = 9f;
CombatDirector.eliteTiers[3].eliteTypes = (EliteDef[])(object)new EliteDef[1] { Elites.Aurelionite };
}
}
internal bool <GildedTierFix>b__11_1(EliteRules rules)
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: Invalid comparison between Unknown and I4
return CombatDirector.NotEliteOnlyArtifactActive() && (int)rules == 0;
}
internal bool <NoxThornChance>b__12_1(Instruction x)
{
return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "TriggerEnemyDebuffs");
}
internal bool <NoxThornChance>b__12_0(Instruction x)
{
return ILPatternMatchingExt.MatchLdcR4(x, 25f);
}
internal bool <EchoNoFuckShieldHard>b__13_1(Instruction x)
{
return ILPatternMatchingExt.MatchLdfld(x, "RoR2.DamageReport", "damageDealt");
}
internal float <EchoNoFuckShieldHard>b__13_0(float value, DamageReport damage)
{
if (damage.damageInfo.delayedDamageSecondHalf)
{
return -1f;
}
return value;
}
internal bool <EchoArmorAndE8>b__15_3(Instruction x)
{
return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "get_armor");
}
internal float <EchoArmorAndE8>b__15_0(float value, DamageInfo damage)
{
if (damage.delayedDamageSecondHalf)
{
return 0f;
}
return value;
}
internal bool <EchoArmorAndE8>b__15_1(Instruction x)
{
return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Run", "get_selectedDifficulty");
}
internal DifficultyIndex <EchoArmorAndE8>b__15_2(DifficultyIndex value, DamageInfo damage)
{
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
if (damage.delayedDamageSecondHalf)
{
return (DifficultyIndex)0;
}
return value;
}
internal bool <LumShotStatsIL>b__17_2(Instruction x)
{
return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.SkillLocator", "get_secondaryBonusStockSkill");
}
internal bool <LumShotStatsIL>b__17_0(Instruction x)
{
return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.GenericSkill", "set_cooldownScale");
}
internal float <LumShotStatsIL>b__17_1(float number, CharacterBody body)
{
if (Object.op_Implicit((Object)(object)body.inventory))
{
int itemCount = body.inventory.GetItemCount(Items.IncreasePrimaryDamage);
if (itemCount > 0)
{
number *= 0.85f;
}
}
return number;
}
internal bool <NoGoldPerLevel>b__18_0(Instruction x)
{
return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "GoldOnStageStart");
}
internal bool <NoGoldPerLevel>b__18_2(Instruction x)
{
return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "GoldOnStageStart");
}
internal bool <NoGoldPerLevel>b__18_1(Instruction x)
{
return ILPatternMatchingExt.MatchLdcR4(x, 1.5f);
}
internal bool <WarBondsDamage>b__19_2(Instruction x)
{
return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "get_canPerformBackstab");
}
internal bool <WarBondsDamage>b__19_0(Instruction x)
{
return ILPatternMatchingExt.MatchLdfld(x, "RoR2.DamageInfo", "damage");
}
internal float <WarBondsDamage>b__19_1(float flot, DamageInfo damageInfo)
{
if (flot > 0f)
{
CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
int buffCount = component.GetBuffCount(WarBondsBuff);
if (buffCount > 0)
{
flot *= 1f + (float)buffCount * 0.03f;
}
}
return flot;
}
internal bool <LowerLanternDamage>b__21_1(Instruction x)
{
return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "LowerHealthHigherDamageBuff");
}
internal bool <LowerLanternDamage>b__21_0(Instruction x)
{
return ILPatternMatchingExt.MatchLdcR4(x, 0.2f);
}
internal bool <LanterHealthVal>b__23_2(Instruction x)
{
return ILPatternMatchingExt.MatchLdcR8(x, 0.5);
}
internal bool <LanterHealthVal>b__23_0(Instruction x)
{
return ILPatternMatchingExt.MatchLdcR8(x, 0.5);
}
internal bool <LanterHealthVal>b__23_1(Instruction x)
{
return ILPatternMatchingExt.MatchLdcR8(x, 0.5);
}
internal bool <NerfTwistedElites>b__24_7(Instruction x)
{
return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "EliteBeadCorruption");
}
internal bool <NerfTwistedElites>b__24_0(Instruction x)
{
return ILPatternMatchingExt.MatchLdcR4(x, 0.025f);
}
internal bool <NerfTwistedElites>b__24_1(Instruction x)
{
return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "get_teamComponent");
}
internal CharacterBody <NerfTwistedElites>b__24_2(CharacterBody body)
{
body.ClearTimedBuffs(Buffs.EliteBeadCorruption);
return body;
}
internal bool <NerfTwistedElites>b__24_3(Instruction x)
{
return ILPatternMatchingExt.MatchStfld(x, "RoR2.Orbs.LightningOrb", "procCoefficient");
}
internal bool <NerfTwistedElites>b__24_4(Instruction x)
{
return ILPatternMatchingExt.MatchStfld(x, "RoR2.Orbs.LightningOrb", "range");
}
internal bool <NerfTwistedElites>b__24_5(Instruction x)
{
return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Orbs.OrbManager", "AddOrb");
}
internal LightningOrb <NerfTwistedElites>b__24_6(LightningOrb orb, DamageInfo damageInfo, CharacterBody characterBody)
{
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
orb.bouncedObjects = new List<HealthComponent>();
orb.teamIndex = characterBody.teamComponent.teamIndex;
HurtBox val = orb.PickNextTarget(damageInfo.position);
if (Object.op_Implicit((Object)(object)val))
{
((Orb)orb).target = val;
}
else
{
((Orb)orb).target = null;
}
return orb;
}
internal bool <LumShotWorkBetter>b__26_2(Instruction x)
{
return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "get_luminousShotReady");
}
internal bool <LumShotWorkBetter>b__26_0(Instruction x)
{
return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.GenericSkill", "set_cooldownScale");
}
internal float <LumShotWorkBetter>b__26_1(float number, CharacterBody body)
{
if (Object.op_Implicit((Object)(object)body.inventory))
{
int itemCount = body.inventory.GetItemCount(Items.IncreasePrimaryDamage);
if (itemCount > 0)
{
number *= 0.85f;
}
}
return number;
}
internal bool <KnockMeUp>b__28_9(Instruction x)
{
return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "KnockBackHitEnemies");
}
internal bool <KnockMeUp>b__28_0(Instruction x)
{
return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "get_isBoss");
}
internal bool <KnockMeUp>b__28_1(Instruction x)
{
return ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterBody", "isChampion");
}
internal bool <KnockMeUp>b__28_2(Instruction x)
{
return ILPatternMatchingExt.MatchLdcR4(x, 7.5f);
}
internal bool <KnockMeUp>b__28_3(Instruction x)
{
return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "KnockUpHitEnemies");
}
internal bool <KnockMeUp>b__28_4(Instruction x)
{
return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "KnockUpHitEnemies");
}
internal CharacterBody <KnockMeUp>b__28_5(CharacterBody characterBody, DamageInfo damageInfo)
{
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_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_0042: 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_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_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: 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_0078: Expected O, but got Unknown
float damage = Util.OnHitProcDamage(damageInfo.damage, 0f, 0.8f);
DamageInfo val = new DamageInfo
{
damage = damage,
damageColorIndex = (DamageColorIndex)3,
damageType = DamageTypeCombo.op_Implicit((DamageType)0),
attacker = damageInfo.attacker,
crit = damageInfo.crit,
force = Vector3.zero,
inflictor = null,
position = damageInfo.position,
procCoefficient = 0f
};
characterBody.healthComponent.TakeDamage(val);
return characterBody;
}
internal bool <KnockMeUp>b__28_6(Instruction x)
{
return ILPatternMatchingExt.MatchLdcR4(x, 5f);
}
internal bool <KnockMeUp>b__28_7(Instruction x)
{
return ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterMotor", "mass");
}
internal float <KnockMeUp>b__28_8(CharacterMotor motor, float mass)
{
if (motor.body.isBoss || motor.body.isChampion)
{
return motor.mass * mass * 0.3f;
}
return motor.mass * mass;
}
internal bool <BetterUnstableTransmitter>b__29_2(Instruction x)
{
return ILPatternMatchingExt.MatchLdcR4(x, 3.5f);
}
internal float <BetterUnstableTransmitter>b__29_0(float mass)
{
return mass + 4f;
}
internal bool <BetterUnstableTransmitter>b__29_1(Instruction x)
{
return ILPatternMatchingExt.MatchLdcR4(x, 25f);
}
internal void <LumShotStats>b__30_0(CharacterBody body, StatHookEventArgs args)
{
if (!((Object)(object)body.inventory != (Object)null))
{
return;
}
int itemCount = body.inventory.GetItemCount(Items.IncreasePrimaryDamage);
if (itemCount > 0)
{
float num = Mathf.Pow(0.85f, (float)itemCount);
args.secondaryCooldownMultAdd += num;
if (Object.op_Implicit((Object)(object)body.skillLocator.secondaryBonusStockSkill))
{
GenericSkill secondaryBonusStockSkill = body.skillLocator.secondaryBonusStockSkill;
secondaryBonusStockSkill.cooldownScale *= num;
}
}
}
internal bool <NoMoreBuffMaxIncrease>b__31_1(Instruction x)
{
return ILPatternMatchingExt.MatchLdcI4(x, 4);
}
internal int <NoMoreBuffMaxIncrease>b__31_0(int number)
{
return 5;
}
internal bool <BetterAntlerReflect>b__32_6(Instruction x)
{
return ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "antlerShield");
}
internal bool <BetterAntlerReflect>b__32_0(Instruction x)
{
return ILPatternMatchingExt.MatchLdcR4(x, 50f);
}
internal bool <BetterAntlerReflect>b__32_1(Instruction x)
{
return ILPatternMatchingExt.MatchLdcR4(x, 10f);
}
internal float <BetterAntlerReflect>b__32_2(float damage, HealthComponent healthComponent)
{
float num = (float)healthComponent.itemCounts.antlerShield * 4f + 4f;
if (damage > healthComponent.body.damage * num)
{
damage = healthComponent.body.damage * num;
}
return damage;
}
internal bool <BetterAntlerReflect>b__32_3(Instruction x)
{
return ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "antlerShield");
}
internal float <BetterAntlerReflect>b__32_4(float itemCount)
{
return 1f;
}
internal bool <BetterAntlerReflect>b__32_5(Instruction x)
{
return ILPatternMatchingExt.MatchLdcR4(x, 0.3f);
}
internal bool <MoreGrowthNectarCanditates>b__34_0(Instruction x)
{
return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "BoostAllStatsBuff");
}
internal bool <MoreGrowthNectarCanditates>b__34_2(Instruction x)
{
return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "BoostAllStatsBuff");
}
internal int <MoreGrowthNectarCanditates>b__34_1(int number, CharacterBody body)
{
if (Object.op_Implicit((Object)(object)body.inventory))
{
if (body.inventory.GetItemCount(Items.HealWhileSafe) > 0 && body.outOfDanger)
{
number++;
}
if (body.inventory.GetItemCount(Items.SprintArmor) > 0 && body.isSprinting)
{
number++;
}
if (body.inventory.GetItemCount(Items.Icicle) > 0 && ((Component)body).GetComponent<IcicleBodyBehavior>().icicleAura.icicleLifetimes.Count > 0)
{
number++;
}
}
return number;
}
internal bool <UncapMeteor>b__35_2(Instruction x)
{
return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "MeteorAttackOnHighDamage");
}
internal bool <UncapMeteor>b__35_0(Instruction x)
{
return ILPatternMatchingExt.MatchLdcR4(x, 50f);
}
internal bool <UncapMeteor>b__35_1(Instruction x)
{
return ILPatternMatchingExt.MatchLdcR4(x, 75f);
}
internal bool <ChronicExpansionFixBuff>b__36_6(Instruction x)
{
return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "IncreaseDamageBuff");
}
internal bool <ChronicExpansionFixBuff>b__36_0(Instruction x)
{
return ILPatternMatchingExt.MatchLdcI4(x, 5);
}
internal int <ChronicExpansionFixBuff>b__36_1(int damage)
{
return 0;
}
internal bool <ChronicExpansionFixBuff>b__36_2(Instruction x)
{
return ILPatternMatchingExt.MatchLdcI4(x, 1);
}
internal bool <ChronicExpansionFixBuff>b__36_3(Instruction x)
{
return ILPatternMatchingExt.MatchLdcI4(x, 1);
}
internal bool <ChronicExpansionFixBuff>b__36_4(Instruction x)
{
return ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterBody", "baseDamage");
}
internal float <ChronicExpansionFixBuff>b__36_5(float damage, CharacterBody body)
{
damage += body.levelDamage * (body.level - 1f);
return damage;
}
internal void <LanternSpeed>b__38_0(CharacterBody sender, StatHookEventArgs args)
{
if ((Object)(object)sender.inventory != (Object)null && sender.HasBuff(Buffs.LowerHealthHigherDamageBuff))
{
args.moveSpeedMultAdd += (float)sender.inventory.GetItemCount(Items.LowerHealthHigherDamage) * 0.2f;
}
}
internal void <AntlerArmor>b__39_0(CharacterBody sender, StatHookEventArgs args)
{
if ((Object)(object)sender.inventory != (Object)null)
{
args.armorAdd += (float)sender.inventory.GetItemCount(Items.NegateAttack) * 6f;
}
}
internal void <WarBondsStats>b__40_0(CharacterBody sender, StatHookEventArgs args)
{
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
if (!((Object)(object)sender.inventory != (Object)null))
{
return;
}
int itemCount = sender.inventory.GetItemCount(Items.GoldOnStageStart);
if (itemCount > 0 && Object.op_Implicit((Object)(object)Stage.instance))
{
int num = 400 + 200 * Run.instance.loopClearCount;
int num2 = (int)(sender.master.money * 10 / Run.instance.GetDifficultyScaledCost(num, Stage.instance.entryDifficultyCoefficient));
if (num2 > 10)
{
num2 = 10;
}
sender.SetBuffCount(WarBondsBuff.buffIndex, num2);
args.moveSpeedMultAdd += 0.04f * (float)num2;
args.attackSpeedMultAdd += 0.04f * (float)num2;
}
else
{
sender.SetBuffCount(WarBondsBuff.buffIndex, 0);
}
}
}
public static BuffDef WarBondsBuff = Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/DLC2/Child/bdChildFrolicCooldown.asset").WaitForCompletion();
public static float KnockbackFinDamage = 0.8f;
public static float KnockbackFinCooldown = 0.1f;
public void Awake()
{
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Expected O, but got Unknown
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Expected O, but got Unknown
//IL_0119: Unknown result type (might be due to invalid IL or missing references)
//IL_0123: Expected O, but got Unknown
//IL_012b: Unknown result type (might be due to invalid IL or missing references)
//IL_0135: Expected O, but got Unknown
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: Expected O, but got Unknown
//IL_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Expected O, but got Unknown
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Expected O, but got Unknown
//IL_00b0: 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_00d0: Unknown result type (might be due to invalid IL or missing references)
//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
//IL_017f: Unknown result type (might be due to invalid IL or missing references)
//IL_0189: Expected O, but got Unknown
//IL_0267: Unknown result type (might be due to invalid IL or missing references)
//IL_0271: Expected O, but got Unknown
//IL_0279: Unknown result type (might be due to invalid IL or missing references)
//IL_0283: Expected O, but got Unknown
//IL_0289: Unknown result type (might be due to invalid IL or missing references)
//IL_028e: Unknown result type (might be due to invalid IL or missing references)
//IL_0242: Unknown result type (might be due to invalid IL or missing references)
//IL_024c: Expected O, but got Unknown
//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
//IL_01eb: Expected O, but got Unknown
//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
//IL_01fd: Expected O, but got Unknown
//IL_0205: Unknown result type (might be due to invalid IL or missing references)
//IL_020f: Expected O, but got Unknown
//IL_0217: Unknown result type (might be due to invalid IL or missing references)
//IL_0221: Expected O, but got Unknown
//IL_0328: Unknown result type (might be due to invalid IL or missing references)
//IL_0332: Expected O, but got Unknown
//IL_0304: Unknown result type (might be due to invalid IL or missing references)
//IL_030e: Expected O, but got Unknown
//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
//IL_02e6: Expected O, but got Unknown
//IL_039a: Unknown result type (might be due to invalid IL or missing references)
//IL_03a4: Expected O, but got Unknown
//IL_03ac: Unknown result type (might be due to invalid IL or missing references)
//IL_03b6: Expected O, but got Unknown
//IL_03bc: Unknown result type (might be due to invalid IL or missing references)
//IL_03c1: 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_0419: Unknown result type (might be due to invalid IL or missing references)
//IL_034b: Unknown result type (might be due to invalid IL or missing references)
//IL_0355: Expected O, but got Unknown
//IL_035d: Unknown result type (might be due to invalid IL or missing references)
//IL_0367: Expected O, but got Unknown
//IL_0452: Unknown result type (might be due to invalid IL or missing references)
//IL_045c: Expected O, but got Unknown
//IL_049d: Unknown result type (might be due to invalid IL or missing references)
//IL_04a7: Expected O, but got Unknown
//IL_04c4: Unknown result type (might be due to invalid IL or missing references)
//IL_04ce: Expected O, but got Unknown
//IL_0659: Unknown result type (might be due to invalid IL or missing references)
//IL_065e: Unknown result type (might be due to invalid IL or missing references)
//IL_0672: Unknown result type (might be due to invalid IL or missing references)
//IL_0677: Unknown result type (might be due to invalid IL or missing references)
//IL_068b: Unknown result type (might be due to invalid IL or missing references)
//IL_0690: 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_06a9: Unknown result type (might be due to invalid IL or missing references)
//IL_06bd: Unknown result type (might be due to invalid IL or missing references)
//IL_06c2: Unknown result type (might be due to invalid IL or missing references)
//IL_04ea: Unknown result type (might be due to invalid IL or missing references)
//IL_04f4: Expected O, but got Unknown
//IL_0508: Unknown result type (might be due to invalid IL or missing references)
//IL_050f: Expected O, but got Unknown
//IL_053c: Unknown result type (might be due to invalid IL or missing references)
//IL_054b: Unknown result type (might be due to invalid IL or missing references)
//IL_057c: Unknown result type (might be due to invalid IL or missing references)
//IL_0581: Unknown result type (might be due to invalid IL or missing references)
//IL_0586: Unknown result type (might be due to invalid IL or missing references)
//IL_05c7: Unknown result type (might be due to invalid IL or missing references)
//IL_05cc: Unknown result type (might be due to invalid IL or missing references)
//IL_05dc: Unknown result type (might be due to invalid IL or missing references)
//IL_05e1: Unknown result type (might be due to invalid IL or missing references)
//IL_0724: Unknown result type (might be due to invalid IL or missing references)
//IL_0730: Unknown result type (might be due to invalid IL or missing references)
//IL_073a: Expected O, but got Unknown
//IL_06e9: Unknown result type (might be due to invalid IL or missing references)
//IL_06f3: Expected O, but got Unknown
//IL_07ce: Unknown result type (might be due to invalid IL or missing references)
//IL_07cf: Unknown result type (might be due to invalid IL or missing references)
//IL_07d9: Unknown result type (might be due to invalid IL or missing references)
//IL_07de: Unknown result type (might be due to invalid IL or missing references)
//IL_07ec: Unknown result type (might be due to invalid IL or missing references)
//IL_07ed: Unknown result type (might be due to invalid IL or missing references)
//IL_07f7: Unknown result type (might be due to invalid IL or missing references)
//IL_07fc: Unknown result type (might be due to invalid IL or missing references)
//IL_080a: Unknown result type (might be due to invalid IL or missing references)
//IL_080b: Unknown result type (might be due to invalid IL or missing references)
//IL_0815: Unknown result type (might be due to invalid IL or missing references)
//IL_081a: Unknown result type (might be due to invalid IL or missing references)
//IL_0847: Unknown result type (might be due to invalid IL or missing references)
//IL_0754: Unknown result type (might be due to invalid IL or missing references)
//IL_075e: Expected O, but got Unknown
//IL_0764: Unknown result type (might be due to invalid IL or missing references)
//IL_0769: Unknown result type (might be due to invalid IL or missing references)
WConfig.InitConfig();
if (WConfig.cfg_White_WarpedEcho_FIX.Value)
{
HealthComponent.TriggerOneShotProtection += new hook_TriggerOneShotProtection(EchoOSP);
HealthComponent.TakeDamageProcess += new Manipulator(EchoArmorAndE8);
if (WConfig.cfg_White_WarpedEcho.Value)
{
CharacterBody.SecondHalfOfDelayedDamage += new hook_SecondHalfOfDelayedDamage(EchoNoBypass);
CharacterBody.OnTakeDamageServer += new Manipulator(EchoNoFuckShieldHard);
Texture2D val = new Texture2D(128, 128, (TextureFormat)12, false);
ImageConversion.LoadImage(val, Resources.texBuffDelayedDamageOnIcon, true);
((Texture)val).filterMode = (FilterMode)1;
Sprite iconSprite = Sprite.Create(val, new Rect(0f, 0f, 128f, 128f), new Vector2(0.5f, 0.5f));
BuffDef val2 = Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/DLC2/Items/DelayedDamage/bdDelayedDamageDebuff.asset").WaitForCompletion();
val2.isHidden = false;
val2.canStack = true;
val2.iconSprite = iconSprite;
}
}
if (WConfig.cfg_White_BolsterLantern.Value)
{
LanternSpeed();
CharacterBody.UpdateLowerHealthHigherDamage += new Manipulator(LanterHealthVal);
HealthComponent.TakeDamageProcess += new Manipulator(LowerLanternDamage);
LanguageAPI.Add("ITEM_LOWERHEALTHHIGHERDAMAGE_PICKUP", "Bonus speed and damage when hurt.", "en");
LanguageAPI.Add("ITEM_LOWERHEALTHHIGHERDAMAGE_DESC", "When below <style=cIsHealth>80% health</style> increase speed by <style=cIsUtility>20%</style> <style=cStack>(+20% per stack)</style> and damage by <style=cIsDamage>5%</style> <style=cStack>(+5% per stack)</style>.", "en");
}
if (WConfig.cfg_White_Antler.Value)
{
AntlerArmor();
HealthComponent.TakeDamageProcess += new Manipulator(BetterAntlerReflect);
LanguageAPI.Add("ITEM_NEGATEATTACK_PICKUP", "Reduces incoming damage a little and reflects it.", "en");
LanguageAPI.Add("ITEM_NEGATEATTACK_DESC", "<style=cIsHealing>Increase armor</style> by <style=cIsHealing>6</style> <style=cStack>(+6 per stack)</style>. Getting hit reflects <style=cIsUtility>100%</style> damage, limited to <style=cIsUtility>800%</style> <style=cStack>(+800% per stack)</style> of your damage, back to the attacker.", "en");
}
if (WConfig.cfg_White_Chronic_FIX.Value)
{
if (WConfig.cfg_White_Chronic.Value)
{
CharacterBody.RecalculateStats += new Manipulator(ChronicExpansionFixBuff);
CharacterBody.AddMultiKill += new hook_AddMultiKill(CapChronic);
CharacterBody.AddMultiKill += new Manipulator(Chronic4Kill);
CharacterBody.AddIncreasedDamageMultiKillTime += new hook_AddIncreasedDamageMultiKillTime(ChronicDuration);
LanguageAPI.Add("ITEM_INCREASEDAMAGEONMULTIKILL_DESC", "Every <style=cIsDamage>4</style> enemies slain grants a <style=cIsDamage>stacking damage buff</style>, increasing damage by <style=cIsDamage>10%</style> <style=cStack>(+10% per item stack)</style> up to a maximimum of 3 buffs. <style=cIsDamage>Resets</style> outside of combat.", "en");
}
else
{
CharacterBody.RecalculateStats += new Manipulator(ChronicFixNOBUFF);
}
}
if (WConfig.cfg_White_KnockbackFin.Value)
{
GlobalEventManager.ProcessHitEnemy += new Manipulator(KnockMeUp);
GlobalEventManager.ProcessHitEnemy += new hook_ProcessHitEnemy(KnockMeDown);
Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/DLC2/Items/KnockBackHitEnemies/bdKnockDownHitEnemies.asset").WaitForCompletion().isHidden = true;
LanguageAPI.Add("ITEM_KNOCKBACKHITENEMIES_DESC", "<style=cIsUtility>10%</style> <style=cStack>(+10% per stack)</style> chance on hit to knock enemies into or out of the air dealing <style=cIsDamage>80%</style> TOTAL damage. <style=cStack>(Height increases per stack)</style>.", "en");
}
if (WConfig.cfg_Green_NoxThorn_FIX.Value)
{
if (WConfig.cfg_Green_NoxThorn.Value)
{
HealthComponent.TakeDamageProcess += new Manipulator(NoxThornChance);
LanguageAPI.Add("ITEM_TRIGGERENEMYDEBUFFS_DESC", "<style=cIsDamage>33%</style> chance on getting hit to inflict <style=cIsDamage>2</style> <style=cStack>(+1 per stack)</style> stack of <style=cIsDamage>bleed</style> and <style=cIsDamage>2</style> <style=cStack>(+1 per stack)</style> of every other <style=cIsUtility>present stackable debuff</style> to every enemy in a <style=cIsDamage>30m</style> radius.", "en");
}
CharacterBody.TriggerEnemyDebuffs += new hook_TriggerEnemyDebuffs(NoxiousThornFix);
}
if (WConfig.cfg_Green_LumShot_FIX.Value)
{
CharacterBody.AddIncreasePrimaryDamageStack += new hook_AddIncreasePrimaryDamageStack(FixLumShotWrongDamageStat);
if (WConfig.cfg_Green_LumShot.Value)
{
CharacterBody.AddIncreasePrimaryDamageStack += new Manipulator(NoMoreBuffMaxIncrease);
CharacterBody.RecalculateStats += new Manipulator(LumShotStatsIL);
LanguageAPI.Add("ITEM_INCREASEPRIMARYDAMAGE_DESC", "Using the secondary skill charges the next primary attack, dealing <style=cIsDamage>+200%</style> damage <style=cStack>(+200% per stack)</style> per charge up to <style=cIsUtility>5</style> times. <style=cIsUtility>Reduces Secondary skill cooldown</style> by <style=cIsUtility>15%</style></style>.", "en");
}
}
if (WConfig.cfg_Green_UnstableTrans.Value)
{
CharacterBody.RpcTeleportCharacterToSafety += new Manipulator(BetterUnstableTransmitter);
HealthComponent.UpdateLastHitTime += new hook_UpdateLastHitTime(TransmitterBeforeElixir);
GameObject val3 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Items/TeleportOnLowHealth/PickupTeleportOnLowHealth.prefab").WaitForCompletion();
((Component)val3.transform.GetChild(0)).transform.localPosition = new Vector3(0f, -0.1f, 0f);
((Component)val3.transform.GetChild(1)).transform.localPosition = new Vector3(0f, -0.1f, 0f);
LanguageAPI.Add("ITEM_TELEPORTONLOWHEALTH_DESC", "Falling below <style=cIsHealth>25% health</style> causes you to explode, dealing <style=cIsDamage>3500%</style> <style=cStack>(+875% per stack)</style> damage and teleports you to safety. This effect recharges after <style=cIsUtility>2</style> minutes <style=cStack>(-20% per stack)</style>.", "en");
}
if (WConfig.cfg_Green_Beads_FIX.Value)
{
CharacterBody.prayerBeadCalculateAppliedStats += new hook_prayerBeadCalculateAppliedStats(FixBreadBeadsInvasive);
if (WConfig.cfg_Green_Beads.Value)
{
LanguageAPI.Add("ITEM_EXTRASTATSONLEVELUP_DESC", "Store an extra <style=cIsUtility>20%</style> <style=cStack>(+5% per stack)</style> of experience gained. Upon removal, increases <style=cIsHealing>max health</style>, <style=cIsHealing>regen</style>, and <style=cIsDamage>damage</style> by <style=cIsUtility>20%</style> <style=cStack>(+10% per stack)</style> of your <style=cIsUtility>leveling stats</style> based on stored experience.", "en");
}
}
if (WConfig.cfg_Red_Meteor.Value)
{
GlobalEventManager.ProcessHitEnemy += new Manipulator(UncapMeteor);
}
if (WConfig.cfg_Red_WarBonds_FIX.Value)
{
CharacterBody.Start += new hook_Start(FixWarBonds);
if (WConfig.cfg_Red_WarBonds.Value)
{
CharacterBody.Start += new Manipulator(NoGoldPerLevel);
WarBondsStats();
Texture2D val4 = new Texture2D(128, 128, (TextureFormat)12, false);
ImageConversion.LoadImage(val4, Resources.WarBondsBuff, true);
((Texture)val4).filterMode = (FilterMode)1;
Sprite iconSprite2 = Sprite.Create(val4, new Rect(0f, 0f, 128f, 128f), new Vector2(0.5f, 0.5f));
WarBondsBuff.iconSprite = iconSprite2;
WarBondsBuff.buffColor = Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue));
WarBondsBuff.isDebuff = false;
WarBondsBuff.isCooldown = false;
WarBondsBuff.isHidden = false;
WarBondsBuff.canStack = true;
WarBondsBuff.ignoreGrowthNectar = false;
GameObject val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Items/GoldOnStageStart/PickupTreasuryDividends.prefab").WaitForCompletion();
Material val6 = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC2/Items/GoldOnStageStart/matGoldOnStageStartMetal.mat").WaitForCompletion();
((Renderer)((Component)val5.transform.GetChild(0)).GetComponent<MeshRenderer>()).materials = (Material[])(object)new Material[2] { val6, val6 };
LanguageAPI.Add("ITEM_GOLDONSTAGESTART_PICKUP", "Increase attack and movement speed based on gold. Gain gold on stage start.", "en");
LanguageAPI.Add("ITEM_GOLDONSTAGESTART_DESC", "Gain upwards of a <style=cIsDamage>30% attack speed</style> and <style=cIsUtility>40% movement speed</style> boost based on current gold, capping at 400 gold <style=cStack>(+200 per loop)</style>. Gain 120 <style=cStack>(+80 per stack)</style> gold at the start of every stage. <style=cIsUtility>Gold values scale with Time</style>", "en");
}
}
if (WConfig.cfg_Red_Nectar_FIX.Value)
{
Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/Base/ElementalRings/bdElementalRingsReady.asset").WaitForCompletion().ignoreGrowthNectar = false;
Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/DLC1/ElementalRingVoid/bdElementalRingVoidReady.asset").WaitForCompletion().ignoreGrowthNectar = false;
Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/DLC1/BearVoid/bdBearVoidReady.asset").WaitForCompletion().ignoreGrowthNectar = false;
Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/DLC1/ImmuneToDebuff/bdImmuneToDebuffReady.asset").WaitForCompletion().ignoreGrowthNectar = false;
Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/Base/EliteHaunted/bdEliteHaunted.asset").WaitForCompletion().ignoreGrowthNectar = false;
if (WConfig.cfg_Red_Nectar.Value)
{
CharacterBody.RecalculateStats += new Manipulator(MoreGrowthNectarCanditates);
}
}
if (WConfig.cfg_Red_Boomerang.Value)
{
GameObject val7 = LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/StunAndPierceBoomerang");
val7.GetComponent<ProjectileDamage>().damageType.damageType = (DamageType)16777216;
SetStateOnHurt.SetShockInternal += new hook_SetShockInternal(SetStateOnHurt_SetShockInternal);
}
if (WConfig.cfg_Elite_Twisted.Value)
{
GlobalEventManager.ProcessHitEnemy += new Manipulator(NerfTwistedElites);
EliteDef val8 = Addressables.LoadAssetAsync<EliteDef>((object)"RoR2/DLC2/Elites/EliteBead/edBead.asset").WaitForCompletion();
val8.healthBoostCoefficient = 18f;
val8.damageBoostCoefficient = 7f;
}
((ResourceAvailability)(ref GameModeCatalog.availability)).CallWhenAvailable((Action)LateRunningMethod);
Color colorShrineRewardJackpot = default(Color);
((Color)(ref colorShrineRewardJackpot))..ctor(0.3f, 1f, 0.1f, 1f);
LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/shrines/ShrineChance").GetComponent<ShrineChanceBehavior>().colorShrineRewardJackpot = colorShrineRewardJackpot;
Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineChance/ShrineChanceSandy Variant.prefab").WaitForCompletion().GetComponent<ShrineChanceBehavior>()
.colorShrineRewardJackpot = colorShrineRewardJackpot;
Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineChance/ShrineChanceSnowy Variant.prefab").WaitForCompletion().GetComponent<ShrineChanceBehavior>()
.colorShrineRewardJackpot = colorShrineRewardJackpot;
((Component)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Items/IncreasePrimaryDamage/IncreasePrimaryDamageImpact.prefab").WaitForCompletion().transform.GetChild(0)).GetComponent<Light>().color = new Color(1f, 1f, 0f, 1f);
}
private void ChronicFixNOBUFF(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0149: Unknown result type (might be due to invalid IL or missing references)
ILCursor val2 = new ILCursor(il);
if (val2.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "IncreaseDamageBuff")
}))
{
val2.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 5)
});
val2.EmitDelegate<Func<int, int>>((Func<int, int>)((int val) => val + 1));
val2.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 1)
});
val2.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 1)
});
val2.Next.OpCode = OpCodes.Ldc_I4;
val2.Next.Operand = 5;
val2.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterBody", "baseDamage")
});
val2.Emit(OpCodes.Ldarg_0);
val2.EmitDelegate<Func<float, CharacterBody, float>>((Func<float, CharacterBody, float>)delegate(float damage, CharacterBody body)
{
damage += body.levelDamage * (body.level - 1f);
return damage;
});
}
else
{
Debug.LogWarning((object)"IL Failed: Chronic F");
}
}
private void FixLumShotWrongDamageStat(orig_AddIncreasePrimaryDamageStack orig, CharacterBody self)
{
orig.Invoke(self);
if (WConfig.cfg_Green_LumShot.Value)
{
int buffCount = self.GetBuffCount(Buffs.IncreasePrimaryDamageBuff);
int itemCount = self.inventory.GetItemCount(Items.IncreasePrimaryDamage);
self.luminousShotDamage = self.damage * (2f * (float)itemCount) * (float)buffCount;
}
else
{
int buffCount2 = self.GetBuffCount(Buffs.IncreasePrimaryDamageBuff);
int itemCount2 = self.inventory.GetItemCount(Items.IncreasePrimaryDamage);
self.luminousShotDamage = self.damage * (1.25f + 0.25f * (float)itemCount2) * (float)buffCount2;
}
}
private void CombatChronic(orig_OnSkillActivated orig, CharacterBody self, GenericSkill skill)
{
orig.Invoke(self, skill);
if (skill.isCombatSkill)
{
self.increasedDamageKillTimer = 5f;
}
}
private void ChronicDuration(orig_AddIncreasedDamageMultiKillTime orig, CharacterBody self)
{
orig.Invoke(self);
self.increasedDamageKillTimer = 7f;
}
private void Chronic4Kill(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchStfld(x, "RoR2.CharacterBody", "increasedDamageKillTimer")
}))
{
val.Prev.Operand = 7f;
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 5)
});
val.Next.OpCode = OpCodes.Ldc_I4_4;
}
else
{
Debug.LogWarning((object)"IL Failed: Chronic kills");
}
}
public static void LateRunningMethod()
{
Items.IncreaseDamageOnMultiKill.tags = Items.IncreaseDamageOnMultiKill.tags.Add((ItemTag)4);
Items.NegateAttack.tags = Items.NegateAttack.tags.Add((ItemTag)4, (ItemTag)2);
Items.DelayedDamage.tags = Items.DelayedDamage.tags.Add((ItemTag)4);
Items.ExtraStatsOnLevelUp.tags = Items.ExtraStatsOnLevelUp.tags.Add((ItemTag)4, (ItemTag)2);
Items.TriggerEnemyDebuffs.tags = Items.TriggerEnemyDebuffs.tags.Add((ItemTag)4);
Items.ExtraShrineItem.tags = Items.ExtraShrineItem.tags.Add((ItemTag)4);
Items.LowerPricedChests.tags = Items.LowerPricedChests.tags.Add((ItemTag)4);
Items.GoldOnStageStart.tags = Items.GoldOnStageStart.tags.Add((ItemTag)4);
Items.ResetChests.tags = Items.ResetChests.tags.Add((ItemTag)4);
Items.BoostAllStats.tags = Items.BoostAllStats.tags.Add((ItemTag)4);
}
private void SetStateOnHurt_SetShockInternal(orig_SetShockInternal orig, SetStateOnHurt self, float duration)
{
if (duration == 1f)
{
orig.Invoke(self, 5f);
}
else
{
orig.Invoke(self, duration);
}
}
private void GildedTierFix()
{
RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, (Action)delegate
{
Debug.LogWarning((object)"Gilded Elite tier 1.5x");
if (CombatDirector.eliteTiers.Length >= 6)
{
CombatDirector.eliteTiers[1].isAvailable = (EliteRules rules) => CombatDirector.NotEliteOnlyArtifactActive() && (int)rules == 0;
CombatDirector.eliteTiers[3].costMultiplier = 9f;
CombatDirector.eliteTiers[3].eliteTypes = (EliteDef[])(object)new EliteDef[1] { Elites.Aurelionite };
}
});
}
private void NoxThornChance(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "TriggerEnemyDebuffs")
}))
{
val.TryGotoPrev((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 25f)
});
val.Next.Operand = 33f;
}
else
{
Debug.LogWarning((object)"IL Failed: Nox Chance");
}
}
private void EchoNoFuckShieldHard(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.DamageReport", "damageDealt")
}))
{
val.Emit(OpCodes.Ldarg_1);
val.EmitDelegate<Func<float, DamageReport, float>>((Func<float, DamageReport, float>)((float value, DamageReport damage) => damage.damageInfo.delayedDamageSecondHalf ? (-1f) : value));
}
else
{
Debug.LogWarning((object)"IL Failed: Warped Echo SHIELD");
}
}
private void EchoNoBypass(orig_SecondHalfOfDelayedDamage orig, CharacterBody self, DamageInfo halfDamage)
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
if (((Enum)halfDamage.damageType.damageType).HasFlag((Enum)(object)(DamageType)1))
{
halfDamage.damageType.damageType = (DamageType)1;
}
else
{
halfDamage.damageType.damageType = (DamageType)0;
}
orig.Invoke(self, halfDamage);
}
private void EchoArmorAndE8(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_0040: 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 val = new ILCursor(il);
if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "get_armor")
}))
{
val.Emit(OpCodes.Ldarg_1);
val.EmitDelegate<Func<float, DamageInfo, float>>((Func<float, DamageInfo, float>)((float value, DamageInfo damage) => damage.delayedDamageSecondHalf ? 0f : value));
val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Run", "get_selectedDifficulty")
});
val.Emit(OpCodes.Ldarg_1);
val.EmitDelegate<Func<DifficultyIndex, DamageInfo, DifficultyIndex>>((Func<DifficultyIndex, DamageInfo, DifficultyIndex>)((DifficultyIndex value, DamageInfo damage) => damage.delayedDamageSecondHalf ? ((DifficultyIndex)0) : value));
}
else
{
Debug.LogWarning((object)"IL Failed: Warped Echo");
}
}
private void EchoOSP(orig_TriggerOneShotProtection orig, HealthComponent self)
{
orig.Invoke(self);
self.body.protectFromOneShot = true;
}
private void LumShotStatsIL(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.SkillLocator", "get_secondaryBonusStockSkill")
}))
{
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.GenericSkill", "set_cooldownScale")
});
val.Emit(OpCodes.Ldarg_0);
val.EmitDelegate<Func<float, CharacterBody, float>>((Func<float, CharacterBody, float>)delegate(float number, CharacterBody body)
{
if (Object.op_Implicit((Object)(object)body.inventory))
{
int itemCount = body.inventory.GetItemCount(Items.IncreasePrimaryDamage);
if (itemCount > 0)
{
number *= 0.85f;
}
}
return number;
});
}
else
{
Debug.LogWarning((object)"IL Failed: Lum Shot 2");
}
}
private void NoGoldPerLevel(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
ILCursor val = new ILCursor(il);
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "GoldOnStageStart")
});
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "GoldOnStageStart")
}))
{
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f)
});
val.Next.Operand = 0f;
}
else
{
Debug.LogWarning((object)"IL Failed: War Bonds Level");
}
}
private void WarBondsDamage(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "get_canPerformBackstab")
}))
{
val.TryGotoPrev((MoveType)2, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.DamageInfo", "damage")
});
val.Emit(OpCodes.Ldarg_1);
val.EmitDelegate<Func<float, DamageInfo, float>>((Func<float, DamageInfo, float>)delegate(float flot, DamageInfo damageInfo)
{
if (flot > 0f)
{
CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
int buffCount = component.GetBuffCount(WarBondsBuff);
if (buffCount > 0)
{
flot *= 1f + (float)buffCount * 0.03f;
}
}
return flot;
});
}
else
{
Debug.LogWarning((object)"IL Failed: Leeching Seed");
}
}
private void TransmitterBeforeElixir(orig_UpdateLastHitTime orig, HealthComponent self, float damageValue, Vector3 damagePosition, bool damageIsSilent, GameObject attacker)
{
//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
if (NetworkServer.active && Object.op_Implicit((Object)(object)self.body) && damageValue > 0f)
{
float num = 120f;
if (self.isHealthLow && self.body.HasBuff(Buffs.TeleportOnLowHealth) && self.itemCounts.unstableTransmitter > 0)
{
self.body.RemoveBuff(Buffs.TeleportOnLowHealth);
float num2 = Mathf.Max(num - num * ((float)(self.itemCounts.unstableTransmitter - 1) * 0.2f), 15f);
self.body.AddTimedBuff(Buffs.TeleportOnLowHealthCooldown, num2);
self.body.hasTeleported = true;
self.body.AddTimedBuff(Buffs.Immune, 5f);
self.body.CallRpcTeleportCharacterToSafety();
}
}
orig.Invoke(self, damageValue, damagePosition, damageIsSilent, attacker);
}
private void LowerLanternDamage(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "LowerHealthHigherDamageBuff")
}))
{
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.2f)
});
val.Next.Operand = 0.05f;
}
else
{
Debug.LogWarning((object)"IL Failed: Less Lantern");
}
}
private void CapChronic(orig_AddMultiKill orig, CharacterBody self, int kills)
{
orig.Invoke(self, kills);
if (self.GetBuffCount(Buffs.IncreaseDamageBuff) >= 3)
{
self.increasedDamageKillCountBuff = 0;
}
}
private void LanterHealthVal(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR8(x, 0.5)
}))
{
val.Next.Operand = 0.8;
int index = val.Index;
val.Index = index + 1;
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR8(x, 0.5)
});
val.Next.Operand = 0.8;
index = val.Index;
val.Index = index + 1;
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR8(x, 0.5)
});
val.Next.Operand = 0.8;
}
else
{
Debug.LogWarning((object)"IL Failed: Lantern HP VAL");
}
}
private void NerfTwistedElites(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_0182: Unknown result type (might be due to invalid IL or missing references)
//IL_018e: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "EliteBeadCorruption")
}))
{
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.025f)
});
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "get_teamComponent")
});
val.EmitDelegate<Func<CharacterBody, CharacterBody>>((Func<CharacterBody, CharacterBody>)delegate(CharacterBody body)
{
body.ClearTimedBuffs(Buffs.EliteBeadCorruption);
return body;
});
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchStfld(x, "RoR2.Orbs.LightningOrb", "procCoefficient")
});
val.Prev.Operand = 0f;
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchStfld(x, "RoR2.Orbs.LightningOrb", "range")
});
val.Prev.Operand = 42f;
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Orbs.OrbManager", "AddOrb")
});
val.Emit(OpCodes.Ldarg_1);
val.Emit(OpCodes.Ldloc_2);
val.EmitDelegate<Func<LightningOrb, DamageInfo, CharacterBody, LightningOrb>>((Func<LightningOrb, DamageInfo, CharacterBody, LightningOrb>)delegate(LightningOrb orb, DamageInfo damageInfo, CharacterBody characterBody)
{
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
orb.bouncedObjects = new List<HealthComponent>();
orb.teamIndex = characterBody.teamComponent.teamIndex;
HurtBox val2 = orb.PickNextTarget(damageInfo.position);
if (Object.op_Implicit((Object)(object)val2))
{
((Orb)orb).target = val2;
}
else
{
((Orb)orb).target = null;
}
return orb;
});
}
else
{
Debug.LogWarning((object)"IL Failed: Nerf Twisted Elite");
}
}
private void FixBreadBeadsInvasive(orig_prayerBeadCalculateAppliedStats orig, CharacterBody self, float levelStat)
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Invalid comparison between Unknown and I4
if ((int)self.teamComponent.teamIndex == 1)
{
float num = 0f;
num = ((!WConfig.cfg_Green_Beads.Value) ? ((float)self.GetBuffCount(Buffs.ExtraStatsOnLevelUpBuff) * levelStat * (0.15f + 0.05f * (float)self.extraStatsOnLevelUpCountModifier)) : ((float)self.GetBuffCount(Buffs.ExtraStatsOnLevelUpBuff) * levelStat * (0.1f + 0.1f * (float)self.extraStatsOnLevelUpCountModifier)));
if (levelStat == self.levelMaxHealth)
{
float beadAppliedHealth = self.inventory.beadAppliedHealth;
Inventory inventory = self.inventory;
inventory.beadAppliedHealth += num;
}
else if (levelStat == self.levelMaxShield)
{
float beadAppliedShield = self.inventory.beadAppliedShield;
Inventory inventory2 = self.inventory;
inventory2.beadAppliedShield += num;
}
else if (levelStat == self.levelRegen)
{
float beadAppliedRegen = self.inventory.beadAppliedRegen;
Inventory inventory3 = self.inventory;
inventory3.beadAppliedRegen += num;
}
else if (levelStat == self.levelDamage)
{
float beadAppliedDamage = self.inventory.beadAppliedDamage;
Inventory inventory4 = self.inventory;
inventory4.beadAppliedDamage += num;
}
}
}
private void LumShotWorkBetter(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "get_luminousShotReady")
}))
{
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.GenericSkill", "set_cooldownScale")
});
val.Emit(OpCodes.Ldarg_0);
val.EmitDelegate<Func<float, CharacterBody, float>>((Func<float, CharacterBody, float>)delegate(float number, CharacterBody body)
{
if (Object.op_Implicit((Object)(object)body.inventory))
{
int itemCount = body.inventory.GetItemCount(Items.IncreasePrimaryDamage);
if (itemCount > 0)
{
number *= 0.85f;
}
}
return number;
});
}
else
{
Debug.LogWarning((object)"IL Failed: LUM SHOT PROC FIX");
}
}
private void KnockMeDown(orig_ProcessHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim)
{
//IL_0170: Unknown result type (might be due to invalid IL or missing references)
//IL_0175: Unknown result type (might be due to invalid IL or missing references)
//IL_017d: Unknown result type (might be due to invalid IL or missing references)
//IL_017f: Unknown result type (might be due to invalid IL or missing references)
//IL_0184: Unknown result type (might be due to invalid IL or missing references)
//IL_0186: Unknown result type (might be due to invalid IL or missing references)
//IL_018b: Unknown result type (might be due to invalid IL or missing references)
//IL_0190: Unknown result type (might be due to invalid IL or missing references)
//IL_019c: Unknown result type (might be due to invalid IL or missing references)
//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
//IL_01d3: Expected O, but got Unknown
//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
//IL_0201: Unknown result type (might be due to invalid IL or missing references)
//IL_0203: Unknown result type (might be due to invalid IL or missing references)
//IL_0216: Expected I4, but got Unknown
//IL_0238: Unknown result type (might be due to invalid IL or missing references)
//IL_023d: Unknown result type (might be due to invalid IL or missing references)
//IL_024a: Unknown result type (might be due to invalid IL or missing references)
//IL_0255: Unknown result type (might be due to invalid IL or missing references)
//IL_0263: Expected O, but got Unknown
//IL_0305: Unknown result type (might be due to invalid IL or missing references)
//IL_030a: Unknown result type (might be due to invalid IL or missing references)
//IL_0310: Unknown result type (might be due to invalid IL or missing references)
//IL_0312: Unknown result type (might be due to invalid IL or missing references)
//IL_0317: Unknown result type (might be due to invalid IL or missing references)
//IL_0337: Unknown result type (might be due to invalid IL or missing references)
//IL_033c: Unknown result type (might be due to invalid IL or missing references)
//IL_034a: Unknown result type (might be due to invalid IL or missing references)
//IL_034f: Unknown result type (might be due to invalid IL or missing references)
//IL_0354: Unknown result type (might be due to invalid IL or missing references)
orig.Invoke(self, damageInfo, victim);
if (damageInfo.procCoefficient == 0f || damageInfo.rejected || !NetworkServer.active || !Object.op_Implicit((Object)(object)damageInfo.attacker) || !(damageInfo.procCoefficient > 0f))
{
return;
}
CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
CharacterBody val = (Object.op_Implicit((Object)(object)victim) ? victim.GetComponent<CharacterBody>() : null);
if (!Object.op_Implicit((Object)(object)component))
{
return;
}
CharacterMaster master = component.master;
if (!Object.op_Implicit((Object)(object)master))
{
return;
}
Inventory inventory = master.inventory;
int itemCount = inventory.GetItemCount(Items.KnockBackHitEnemies);
if (itemCount <= 0 || val.HasBuff(Buffs.KnockUpHitEnemies))
{
return;
}
CharacterMotor component2 = victim.GetComponent<CharacterMotor>();
RigidbodyMotor component3 = victim.GetComponent<RigidbodyMotor>();
if (((Object.op_Implicit((Object)(object)component2) && !component2.isGrounded) || Object.op_Implicit((Object)(object)component3)) && Util.CheckRoll(Util.ConvertAmplificationPercentageIntoReductionPercentage(10f * (float)itemCount * damageInfo.procCoefficient), 0f, (CharacterMaster)null))
{
val.AddTimedBuff(Buffs.KnockUpHitEnemies, 0.1f);
float damage = Util.OnHitProcDamage(damageInfo.damage, 0f, 0.8f);
DamageInfo val2 = new DamageInfo
{
damage = damage,
damageColorIndex = (DamageColorIndex)3,
damageType = DamageTypeCombo.op_Implicit((DamageType)0),
attacker = damageInfo.attacker,
crit = damageInfo.crit,
force = Vector3.zero,
inflictor = null,
position = damageInfo.position,
procCoefficient = 0f
};
val.healthComponent.TakeDamage(val2);
Ray aimRay = component.inputBank.GetAimRay();
float scale = 1f;
HullClassification hullClassification = val.hullClassification;
HullClassification val3 = hullClassification;
switch ((int)val3)
{
case 0:
scale = 1f;
break;
case 1:
scale = 5f;
break;
case 2:
scale = 10f;
break;
}
EffectManager.SpawnEffect(CommonAssets.knockbackFinEffect, new EffectData
{
origin = ((Component)val).gameObject.transform.position,
scale = scale
}, true);
Vector3 val4 = default(Vector3);
((Vector3)(ref val4))..ctor(0f, 1f, 0f);
float num = 20f;
if (Object.op_Implicit((Object)(object)component2))
{
num = component2.mass * 20f;
}
else if (Object.op_Implicit((Object)(object)component3))
{
num = component3.mass * 20f;
}
if (val.isBoss || val.isChampion)
{
num *= 0.3f;
}
float num2 = 0f - (num + num / 10f);
float num3 = num + num / 20f * (float)(itemCount - 1);
PhysForceInfo val5 = PhysForceInfo.Create();
val5.force = num2 * val4;
((PhysForceInfo)(ref val5)).ignoreGroundStick = false;
((PhysForceInfo)(ref val5)).disableAirControlUntilCollision = false;
((PhysForceInfo)(ref val5)).massIsOne = false;
PhysForceInfo val6 = PhysForceInfo.Create();
val6.force = num3 / 2f * ((Ray)(ref aimRay)).direction;
((PhysForceInfo)(ref val6)).ignoreGroundStick = false;
((PhysForceInfo)(ref val6)).disableAirControlUntilCollision = false;
((PhysForceInfo)(ref val6)).massIsOne = false;
if (Object.op_Implicit((Object)(object)component2))
{
component2.ApplyForceImpulse(ref val5);
component2.ApplyForceImpulse(ref val6);
}
else if (Object.op_Implicit((Object)(object)component3))
{
component3.ApplyForceImpulse(ref val5);
component3.ApplyForceImpulse(ref val6);
}
Util.PlaySound("Play_item_proc_knockBackHitEnemies", ((Component)component).gameObject);
}
}
private void KnockMeUp(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_0180: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "KnockBackHitEnemies")
}))
{
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.CharacterBody", "get_isBoss")
});
int index = val.Index;
val.Index = index - 1;
val.RemoveRange(3);
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterBody", "isChampion")
});
index = val.Index;
val.Index = index - 1;
val.RemoveRange(3);
val.RemoveRange(5);
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 7.5f)
});
val.Next.Operand = 10f;
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "KnockUpHitEnemies")
});
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "KnockUpHitEnemies")
});
val.Emit(OpCodes.Ldarg_1);
val.EmitDelegate<Func<CharacterBody, DamageInfo, CharacterBody>>((Func<CharacterBody, DamageInfo, CharacterBody>)delegate(CharacterBody characterBody, DamageInfo damageInfo)
{
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_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_0042: 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_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_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: 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_0078: Expected O, but got Unknown
float damage = Util.OnHitProcDamage(damageInfo.damage, 0f, 0.8f);
DamageInfo val2 = new DamageInfo
{
damage = damage,
damageColorIndex = (DamageColorIndex)3,
damageType = DamageTypeCombo.op_Implicit((DamageType)0),
attacker = damageInfo.attacker,
crit = damageInfo.crit,
force = Vector3.zero,
inflictor = null,
position = damageInfo.position,
procCoefficient = 0f
};
characterBody.healthComponent.TakeDamage(val2);
return characterBody;
});
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 5f)
});
val.Next.Operand = 0.1f;
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterMotor", "mass")
});
val.Remove();
index = val.Index;
val.Index = index + 1;
val.Remove();
val.EmitDelegate<Func<CharacterMotor, float, float>>((Func<CharacterMotor, float, float>)((CharacterMotor motor, float mass) => (motor.body.isBoss || motor.body.isChampion) ? (motor.mass * mass * 0.3f) : (motor.mass * mass)));
}
else
{
Debug.LogWarning((object)"IL Failed: Knockback Fin");
}
}
private void BetterUnstableTransmitter(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 3.5f)
}))
{
val.Next.Operand = 7f;
val.EmitDelegate<Func<float, float>>((Func<float, float>)((float mass) => mass + 4f));
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 25f)
});
val.Next.Operand = 35f;
}
else
{
Debug.LogWarning((object)"IL Failed: Transmitter");
}
}
public static void LumShotStats()
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Expected O, but got Unknown
object obj = <>c.<>9__30_0;
if (obj == null)
{
StatHookEventHandler val = delegate(CharacterBody body, StatHookEventArgs args)
{
if ((Object)(object)body.inventory != (Object)null)
{
int itemCount = body.inventory.GetItemCount(Items.IncreasePrimaryDamage);
if (itemCount > 0)
{
float num = Mathf.Pow(0.85f, (float)itemCount);
args.secondaryCooldownMultAdd += num;
if (Object.op_Implicit((Object)(object)body.skillLocator.secondaryBonusStockSkill))
{
GenericSkill secondaryBonusStockSkill = body.skillLocator.secondaryBonusStockSkill;
secondaryBonusStockSkill.cooldownScale *= num;
}
}
}
};
<>c.<>9__30_0 = val;
obj = (object)val;
}
RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj;
}
private void NoMoreBuffMaxIncrease(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 4)
}))
{
val.Index += 3;
val.EmitDelegate<Func<int, int>>((Func<int, int>)((int number) => 5));
}
else
{
Debug.LogWarning((object)"IL Failed: Lum Shot");
}
}
private void BetterAntlerReflect(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "antlerShield")
}))
{
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 50f)
});
val.Next.Operand = 100f;
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 10f)
});
val.Next.Operand = 1f;
val.Emit(OpCodes.Ldarg_0);
val.EmitDelegate<Func<float, HealthComponent, float>>((Func<float, HealthComponent, float>)delegate(float damage, HealthComponent healthComponent)
{
float num = (float)healthComponent.itemCounts.antlerShield * 4f + 4f;
if (damage > healthComponent.body.damage * num)
{
damage = healthComponent.body.damage * num;
}
return damage;
});
val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "antlerShield")
});
int index = val.Index;
val.Index = index + 1;
val.EmitDelegate<Func<float, float>>((Func<float, float>)((float itemCount) => 1f));
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.3f)
});
val.Next.Operand = 0f;
}
else
{
Debug.LogWarning((object)"IL Failed: Antler Shield");
}
}
private static void FixWarBonds(orig_Start orig, CharacterBody self)
{
orig.Invoke(self);
if (!Object.op_Implicit((Object)(object)self.master) || !NetworkServer.active)
{
return;
}
int num = (((Object)(object)self.inventory != (Object)null) ? self.inventory.GetItemCount(Items.GoldOnStageStart) : 0);
if (num > 0)
{
if (WConfig.cfg_Red_WarBonds_FIX.Value)
{
uint difficultyScaledCost = (uint)Run.instance.GetDifficultyScaledCost(25 * num);
self.master.GiveMoney(difficultyScaledCost);
}
if (WConfig.cfg_Red_WarBonds.Value)
{
uint difficultyScaledCost2 = (uint)Run.instance.GetDifficultyScaledCost(45 + 55 * (num - 1));
self.master.GiveMoney(difficultyScaledCost2);
}
}
}
private static void MoreGrowthNectarCanditates(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)
ILCursor val = new ILCursor(il);
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "BoostAllStatsBuff")
});
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "BoostAllStatsBuff")
}))
{
val.Index -= 5;
val.Emit(OpCodes.Ldarg_0);
val.EmitDelegate<Func<int, CharacterBody, int>>((Func<int, CharacterBody, int>)delegate(int number, CharacterBody body)
{
if (Object.op_Implicit((Object)(object)body.inventory))
{
if (body.inventory.GetItemCount(Items.HealWhileSafe) > 0 && body.outOfDanger)
{
number++;
}
if (body.inventory.GetItemCount(Items.SprintArmor) > 0 && body.isSprinting)
{
number++;
}
if (body.inventory.GetItemCount(Items.Icicle) > 0 && ((Component)body).GetComponent<IcicleBodyBehavior>().icicleAura.icicleLifetimes.Count > 0)
{
number++;
}
}
return number;
});
}
else
{
Debug.LogWarning((object)"IL Failed: Growth Nectar");
}
}
private static void UncapMeteor(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "MeteorAttackOnHighDamage")
}))
{
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 50f)
});
int index = val.Index;
val.Index = index - 1;
val.RemoveRange(5);
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 75f)
});
index = val.Index;
val.Index = index - 1;
val.RemoveRange(5);
}
else
{
Debug.LogWarning((object)"IL Failed: Meteor Happens");
}
}
private static void ChronicExpansionFixBuff(ILContext il)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_0130: Unknown result type (might be due to invalid IL or missing references)
//IL_0162: Unknown result type (might be due to invalid IL or missing references)
//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
ILCursor val = new ILCursor(il);
if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "IncreaseDamageBuff")
}))
{
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 5)
});
val.Next.OpCode = OpCodes.Ldc_I4;
val.Next.Operand = 10;
int index = val.Index;
val.Index = index - 1;
val.EmitDelegate<Func<int, int>>((Func<int, int>)((int damage) => 0));
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 1)
});
val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 1)
});
val.Next.OpCode = OpCodes.Ldc_I4;
val.Next.Operand = 0;
val.Index += 2;
val.Next.OpCode = OpCodes.Ldc_I4;
val.Next.Operand = 10;
val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
{
(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterBody", "baseDamage")
});
val.Emit(OpCodes.Ldarg_0);
val.EmitDelegate<Func<float, CharacterBody, float>>((Func<float, CharacterBody, float>)delegate(float damage, CharacterBody body)
{
damage += body.levelDamage * (body.level - 1f);
return damage;
});
}
else
{
Debug.LogWarning((object)"IL Failed: Chronic");
}
}
private static void NoxiousThornFix(orig_TriggerEnemyDebuffs orig, CharacterBody self, DamageInfo damageInfo)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Expected O, but got Unknown
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: 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_008a: 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_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_00a7: 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_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00b8: Expected O, but got Unknown
//IL_0174: Unknown result type (might be due to invalid IL or missing references)
//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
//IL_01be: Unknown result type (might be due to invalid IL or missing references)
//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
//IL_020f: Unknown result type (might be due to invalid IL or missing references)
//IL_0248: Unknown result type (might be due to invalid IL or missing references)
//IL_0347: Unknown result type (might be due to invalid IL or missing references)
//IL_0380: Unknown result type (might be due to invalid IL or missing references)
//IL_0426: Unknown result type (might be due to invalid IL or missing references)
//IL_045f: Unknown result type (might be due to invalid IL or missing references)
//IL_04da: Unknown result type (might be due to invalid IL or missing references)
SphereSearch val = new SphereSearch();
List<HurtBox> list = CollectionPool<HurtBox, List<HurtBox>>.RentCollection();
val.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask;
val.origin = ((Component)self).gameObject.transform.position;
val.radius = 30f;
val.queryTriggerInteraction = (QueryTriggerInteraction)0;
val.RefreshCandidates();
val.FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(self.teamComponent.teamIndex));
val.OrderCandidatesByDistance();
val.FilterCandidatesByDistinctHurtBoxEntities();
val.GetHurtBoxes(list);
val.ClearCandidates();
EffectManager.SpawnEffect(CommonAssets.thornExplosionEffect, new EffectData
{
origin = self.coreTransform.position,
scale = 60f,
rotation = Quaternion.identity
}, true);
Util.PlaySound("Play_item_proc_triggerEnemyDebuffs", ((Component)self).gameObject);
for (int i = 0; i < list.Count; i++)
{
HurtBox val2 = list[i];
if (!Object.op_Implicit((Object)(object)val2) || !Object.op_Implicit((Object)(object)val2.healthComponent) || !val2.healthComponent.alive)
{
continue;
}
CharacterBody body = val2.healthComponent.body;
int num = self.inventory.GetItemCount(Items.TriggerEnemyDebuffs);
if (WConfig.cfg_Green_NoxThorn.Value)
{
num++;
}
bool flag = false;
int num2 = body.GetBuffCount(Buffs.OnFire) + body.GetBuffCount(Buffs.StrongerBurn);
if (num2 > 0)
{
flag = true;
float num3 = 0.5f;
InflictDotInfo val3 = default(InflictDotInfo);
val3.attackerObject = ((Component)self).gameObject;
val3.victimObject = ((Component)body).gameObject;
val3.totalDamage = damageInfo.damage * num3;
val3.damageMultiplier = 1f;
val3.dotIndex = (DotIndex)1;
InflictDotInfo val4 = val3;
for (int j = 0; j < num; j++)
{
DotController.InflictDot(ref val4);
}
}
num2 = body.GetBuffCount(Buffs.BeetleJuice);
if (num2 > 0)
{
flag = true;
int num4 = num2 + num;
body.SetBuffCount(Buffs.BeetleJuice.buffIndex, num4);
}
num2 = body.GetBuffCount(Buffs.NullifyStack);
if (num2 > 0)
{
flag = true;
int num5 = num2 + num;
body.SetBuffCount(Buffs.NullifyStack.buffIndex, num5);
}
num2 = body.GetBuffCount(Buffs.SuperBleed);
if (num2 > 0)
{
flag = true;
int num6 = num;
for (int k = 0; k < num6; k++)
{
DotController.InflictDot(((Component)body).gameObject, ((Component)self).gameObject, (DotIndex)6, 15f, 1f, (uint?)null);
}
}
num2 = body.GetBuffCount(Buffs.Blight);
if (num2 > 0)
{
flag = true;
int num7 = num;
for (int l = 0; l < num7; l++)
{
DotController.InflictDot(((Component)body).gameObject, ((Component)self).gameObject, (DotIndex)5, 5f, 1f, (uint?)null);
}
}
num2 = body.GetBuffCount(Buffs.Overheat);
if (num2 > 0)
{
flag = true;
int num8 = num2 + num;
body.SetBuffCount(Buffs.Overheat.buffIndex, num8);
}
num2 = body.GetBuffCount(Buffs.PulverizeBuildup);
if (num2 > 0)
{
flag = true;
int num9 = num2 + num;
body.SetBuffCount(Buffs.PulverizeBuildup.buffIndex, num9);
}
num2 = body.GetBuffCount(Buffs.Fracture);
if (num2 > 0)
{
flag = true;
int num10 = num;
DotDef dotDef = DotController.GetDotDef((DotIndex)8);
for (int m = 0; m < num10; m++)
{
DotController.InflictDot(((Component)body).gameObject, ((Component)self).gameObject, (DotIndex)8, dotDef.interval, 1f, (uint?)null);
}
}
num2 = body.GetBuffCount(Buffs.PermanentDebuff);
if (num2 > 0)
{
flag = true;
int num11 = num2 + num;
body.SetBuffCount(Buffs.PermanentDebuff.buffIndex, num11);
}
num2 = body.GetBuffCount(Buffs.lunarruin);
if (num2 > 0)
{
flag = true;
int num12 = num2 + num;
body.SetBuffCount(Buffs.lunarruin.buffIndex, num12);
for (int n = 0; n < num12; n++)
{
DotController.InflictDot(((Component)body).gameObject, ((Component)self).gameObject, (DotIndex)9, 5f, 1f, (uint?)null);
}
}
num2 = body.GetBuffCount(Buffs.LunarDetonationCharge);
if (num2 > 0)
{
flag = true;
int num13 = num2 + num;
body.SetBuffCount(Buffs.LunarDetonationCharge.buffIndex, num13);
}
if (!WConfig.cfg_Green_NoxThorn.Value)
{
num2 = body.GetBuffCount(Buffs.Bleeding);
if (num2 > 0)
{
flag = true;
for (int num14 = 0; num14 < num; num14++)
{
DotController.InflictDot(((Component)body).gameObject, ((Component)self).gameObject, (DotIndex)0, 3f, 1f, (uint?)null);
}
}
num++;
}
if (WConfig.cfg_Green_NoxThorn.Value || !flag)
{
for (int num15 = 0; num15 < num; num15++)
{
DotController.InflictDot(((Component)body).gameObject, ((Component)self).gameObject, (DotIndex)0, 3f, 1f, (uint?)null);
}
}
}
}
private static void LanternSpeed()
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Expected O, but got Unknown
object obj = <>c.<>9__38_0;
if (obj == null)
{
StatHookEventHandler val = delegate(CharacterBody sender, StatHookEventArgs args)
{
if ((Object)(object)sender.inventory != (Object)null && sender.HasBuff(Buffs.LowerHealthHigherDamageBuff))
{
args.moveSpeedMultAdd += (float)sender.inventory.GetItemCount(Items.LowerHealthHigherDamage) * 0.2f;
}
};
<>c.<>9__38_0 = val;
obj = (object)val;
}
RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj;
}
private static void AntlerArmor()
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Expected O, but got Unknown
object obj = <>c.<>9__39_0;
if (obj == null)
{
StatHookEventHandler val = delegate(CharacterBody sender, StatHookEventArgs args)
{
if ((Object)(object)sender.inventory != (Object)null)
{
args.armorAdd += (float)sender.inventory.GetItemCount(Items.NegateAttack) * 6f;
}
};
<>c.<>9__39_0 = val;
obj = (object)val;
}
RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj;
}
private static void WarBondsStats()
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Expected O, but got Unknown
object obj = <>c.<>9__40_0;
if (obj == null)
{
StatHookEventHandler val = delegate(CharacterBody sender, StatHookEventArgs args)
{
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)sender.inventory != (Object)null)
{
int itemCount = sender.inventory.GetItemCount(Items.GoldOnStageStart);
if (itemCount > 0 && Object.op_Implicit((Object)(object)Stage.instance))
{
int num = 400 + 200 * Run.instance.loopClearCount;
int num2 = (int)(sender.master.money * 10 / Run.instance.GetDifficultyScaledCost(num, Stage.instance.entryDifficultyCoefficient));
if (num2 > 10)
{
num2 = 10;
}
sender.SetBuffCount(WarBondsBuff.buffIndex, num2);
args.moveSpeedMultAdd += 0.04f * (float)num2;
args.attackSpeedMultAdd += 0.04f * (float)num2;
}
else
{
sender.SetBuffCount(WarBondsBuff.buffIndex, 0);
}
}
};
<>c.<>9__40_0 = val;
obj = (object)val;
}
RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj;
}
}
}
namespace StormItemBuffs.Properties
{
[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[DebuggerNonUserCode]
[CompilerGenerated]
public class Resources
{
private static ResourceManager resourceMan;
private static CultureInfo resourceCulture;
[EditorBrowsable(EditorBrowsableState.Advanced)]
public static ResourceManager ResourceManager
{
get
{
if (resourceMan == null)
{
ResourceManager resourceManager = new ResourceManager("StormItemBuffs.Properties.Resources", typeof(Resources).Assembly);
resourceMan = resourceManager;
}
return resourceMan;
}
}
[EditorBrowsable(EditorBrowsableState.Advanced)]
public static CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
public static byte[] WarBondsBuff
{
get
{
object @object = ResourceManager.GetObject("WarBondsBuff", resourceCulture);
return (byte[])@object;
}
}
public static byte[] texBuffDelayedDamageOnIcon
{
get
{
object @object = ResourceManager.GetObject("texBuffDelayedDamageOnIcon", resourceCulture);
return (byte[])@object;
}
}
internal Resources()
{
}
}
}