Decompiled source of 2R4R v1.3.17

RiskierRain.dll

Decompiled 2 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using EntityStates;
using EntityStates.BeetleQueenMonster;
using EntityStates.ClayBruiser.Weapon;
using EntityStates.GoldGat;
using EntityStates.Gup;
using EntityStates.ImpBossMonster;
using EntityStates.LunarWisp;
using EntityStates.Missions.Arena.NullWard;
using EntityStates.NullifierMonster;
using EntityStates.QuestVolatileBattery;
using EntityStates.ShrineHalcyonite;
using EntityStates.VagrantMonster;
using EntityStates.VagrantNovaItem;
using HG;
using IL.RoR2;
using IL.RoR2.Items;
using IL.RoR2.Orbs;
using IL.RoR2.Projectile;
using IL.RoR2.Skills;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using MonoMod.RuntimeDetour;
using MoreStats;
using On.EntityStates.CaptainSupplyDrop;
using On.EntityStates.ClayBruiser.Weapon;
using On.EntityStates.Gup;
using On.EntityStates.LunarWisp;
using On.EntityStates.Missions.Arena.NullWard;
using On.EntityStates.NullifierMonster;
using On.EntityStates.QuestVolatileBattery;
using On.EntityStates.ShrineHalcyonite;
using On.EntityStates.VagrantMonster;
using On.EntityStates.VagrantNovaItem;
using On.RoR2;
using On.RoR2.Items;
using On.RoR2.Orbs;
using On.RoR2.UI;
using R2API;
using R2API.Utils;
using RainrotSharedUtils.Difficulties;
using RainrotSharedUtils.Shelters;
using RiskierRain.Components;
using RiskierRain.CoreModules;
using RoR2;
using RoR2.ContentManagement;
using RoR2.Items;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using RoR2BepInExPack.GameAssetPaths.Version_1_39_0;
using RoR2BepInExPack.GameAssetPathsBetter;
using SwanSongExtended;
using SwanSongExtended.Modules;
using SwanSongExtended.Storms;
using ThreeEyedGames;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.ResourceManagement.AsyncOperations;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("RiskierRain")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("RiskierRain")]
[assembly: AssemblyTitle("RiskierRain")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
namespace RiskierRain
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.RiskOfBrainrot.RiskierRain", "RiskierRain", "1.3.9")]
	[R2APISubmoduleDependency(new string[] { "LanguageAPI", "PrefabAPI", "DirectorAPI", "ItemAPI", "RecalculateStatsAPI", "EliteAPI" })]
	internal class RiskierRainPlugin : BaseUnityPlugin
	{
		public delegate bool orig_getHasOneShotProtection(CharacterBody self);

		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static Func<Instruction, bool> <>9__25_0;

			public static Func<Instruction, bool> <>9__25_1;

			public static Func<Instruction, bool> <>9__25_2;

			public static Func<Instruction, bool> <>9__25_3;

			public static Func<Instruction, bool> <>9__25_4;

			public static Func<Instruction, bool> <>9__26_1;

			public static Func<Instruction, bool> <>9__26_2;

			public static Func<Instruction, bool> <>9__26_3;

			public static Func<Instruction, bool> <>9__26_4;

			public static Func<Instruction, bool> <>9__26_5;

			public static Func<Instruction, bool> <>9__26_6;

			public static Func<Instruction, bool> <>9__26_8;

			public static Func<Instruction, bool> <>9__26_9;

			public static Func<Instruction, bool> <>9__26_10;

			public static Func<Instruction, bool> <>9__26_11;

			public static Func<Instruction, bool> <>9__26_12;

			public static Func<Instruction, bool> <>9__26_13;

			public static Func<float, float> <>9__26_14;

			public static Func<Instruction, bool> <>9__57_0;

			public static Func<Instruction, bool> <>9__57_1;

			public static Func<Instruction, bool> <>9__58_0;

			public static Func<Instruction, bool> <>9__60_0;

			public static Func<Instruction, bool> <>9__60_1;

			public static Func<Instruction, bool> <>9__60_2;

			public static Func<Instruction, bool> <>9__138_0;

			public static Func<uint> <>9__138_2;

			public static Action<GameObject> <>9__188_0;

			public static Func<Instruction, bool> <>9__208_0;

			public static Action<CharacterBody> <>9__208_1;

			public static hook_OnEnter <>9__219_0;

			public static hook_OnEnter <>9__219_1;

			public static hook_OnEnter <>9__254_0;

			public static hook_OnEnter <>9__278_1;

			public static hook_OnEnter <>9__278_2;

			public static hook_OnEnter <>9__278_3;

			public static hook_OnEnter <>9__279_1;

			public static hook_OnEnter <>9__279_2;

			public static hook_OnEnter <>9__279_3;

			public static Func<Instruction, bool> <>9__309_0;

			public static Func<Instruction, bool> <>9__319_0;

			public static Func<Instruction, bool> <>9__319_1;

			public static Func<Instruction, bool> <>9__319_2;

			public static Func<Instruction, bool> <>9__320_0;

			public static Func<Instruction, bool> <>9__320_1;

			public static Func<Instruction, bool> <>9__320_2;

			public static Func<Instruction, bool> <>9__320_3;

			public static Func<Instruction, bool> <>9__323_0;

			public static Func<Instruction, bool> <>9__323_1;

			public static Func<Instruction, bool> <>9__323_4;

			public static Func<Instruction, bool> <>9__328_0;

			public static Func<Instruction, bool> <>9__328_1;

			public static Func<Instruction, bool> <>9__328_2;

			public static Func<Instruction, bool> <>9__328_5;

			public static Func<Instruction, bool> <>9__328_6;

			public static Func<Instruction, bool> <>9__328_8;

			public static Func<Instruction, bool> <>9__331_0;

			public static Func<Instruction, bool> <>9__339_0;

			public static Func<Instruction, bool> <>9__339_1;

			public static Func<Instruction, bool> <>9__339_4;

			public static Func<Instruction, bool> <>9__339_5;

			public static Func<int, int, CharacterBody, int> <>9__339_7;

			public static Func<Instruction, bool> <>9__349_0;

			public static Func<Instruction, bool> <>9__349_1;

			public static Func<Instruction, bool> <>9__349_4;

			public static Func<Instruction, bool> <>9__349_5;

			public static Func<Instruction, bool> <>9__349_6;

			public static Func<Instruction, bool> <>9__355_0;

			public static Func<Instruction, bool> <>9__355_1;

			public static Func<Instruction, bool> <>9__355_2;

			public static Func<Instruction, bool> <>9__361_0;

			public static Func<Instruction, bool> <>9__361_1;

			public static Func<int, HealthComponent, int> <>9__361_2;

			public static Func<Instruction, bool> <>9__366_0;

			public static Func<Instruction, bool> <>9__366_1;

			public static Func<Instruction, bool> <>9__367_0;

			public static Func<Instruction, bool> <>9__367_2;

			public static Func<Instruction, bool> <>9__375_0;

			public static Func<Instruction, bool> <>9__375_1;

			public static Func<Instruction, bool> <>9__375_3;

			public static Func<float, int, float> <>9__375_4;

			public static Func<Instruction, bool> <>9__377_0;

			public static Func<ChestBehavior, int, ChestBehavior> <>9__377_2;

			public static Func<Instruction, bool> <>9__378_0;

			public static Func<Instruction, bool> <>9__378_1;

			public static Func<Instruction, bool> <>9__378_3;

			public static Func<Instruction, bool> <>9__378_4;

			public static Func<Instruction, bool> <>9__378_7;

			public static Func<ChestBehavior, int, int> <>9__378_8;

			public static Func<Instruction, bool> <>9__378_9;

			public static Func<RouletteChestController, int, int> <>9__378_10;

			public static Func<Instruction, bool> <>9__413_0;

			public static Func<Instruction, bool> <>9__414_0;

			public static Func<float, SprintWispBodyBehavior, float> <>9__414_1;

			public static Func<Instruction, bool> <>9__416_0;

			public static Func<Vector3, DevilOrb, Vector3> <>9__416_1;

			public static Func<Instruction, bool> <>9__417_0;

			public static Func<float, DamageReport, int, float> <>9__417_1;

			public static Func<Instruction, bool> <>9__417_2;

			public static Func<float, DamageReport, int, float> <>9__417_3;

			public static Func<Instruction, bool> <>9__418_0;

			public static Func<Instruction, bool> <>9__418_1;

			public static Func<Instruction, bool> <>9__418_2;

			public static Func<Instruction, bool> <>9__418_3;

			public static Func<Instruction, bool> <>9__418_4;

			public static Func<Instruction, bool> <>9__418_5;

			public static Func<float, int, float> <>9__418_6;

			public static Func<Instruction, bool> <>9__418_7;

			public static Func<float, DamageReport, int, float> <>9__418_8;

			public static Func<Instruction, bool> <>9__419_0;

			public static Func<Instruction, bool> <>9__419_2;

			public static Func<float, int, float> <>9__419_3;

			public static Func<Instruction, bool> <>9__419_4;

			public static Func<float, int, float> <>9__419_5;

			public static Func<Instruction, bool> <>9__420_0;

			public static Func<int, int> <>9__420_2;

			public static Func<Instruction, bool> <>9__420_3;

			public static Func<float, int, float> <>9__420_4;

			public static Func<Instruction, bool> <>9__420_5;

			public static Func<float, int, float> <>9__420_6;

			public static Func<Instruction, bool> <>9__429_0;

			public static Func<Instruction, bool> <>9__429_2;

			public static Func<Instruction, bool> <>9__429_5;

			public static Func<float, CharacterBody, float> <>9__429_6;

			public static Func<Instruction, bool> <>9__429_8;

			public static Func<Instruction, bool> <>9__429_9;

			public static Func<float, CharacterBody, float> <>9__429_10;

			public static Func<Instruction, bool> <>9__430_0;

			public static Func<Instruction, bool> <>9__430_2;

			public static Func<Instruction, bool> <>9__430_4;

			public static Func<Instruction, bool> <>9__430_5;

			public static Func<Instruction, bool> <>9__430_8;

			public static Func<float, CharacterBody, float> <>9__430_9;

			public static Func<Instruction, bool> <>9__431_0;

			public static Func<Instruction, bool> <>9__431_2;

			public static Func<Instruction, bool> <>9__431_4;

			public static Func<Instruction, bool> <>9__431_5;

			public static Func<Instruction, bool> <>9__431_8;

			public static Func<float, CharacterBody, float> <>9__431_9;

			public static Func<GameObject, bool> <>9__434_0;

			public static Func<GameObject, bool> <>9__434_1;

			public static Func<Instruction, bool> <>9__452_0;

			public static Func<Instruction, bool> <>9__452_1;

			public static Action<CharacterBody, BuffDef, float, float> <>9__452_3;

			public static Func<Instruction, bool> <>9__453_0;

			public static Func<Instruction, bool> <>9__453_1;

			public static Func<Instruction, bool> <>9__453_2;

			public static Func<float, HealthComponent, float> <>9__453_3;

			public static Func<Instruction, bool> <>9__478_0;

			public static Func<Instruction, bool> <>9__478_1;

			public static Func<Instruction, bool> <>9__479_0;

			public static Func<Instruction, bool> <>9__479_1;

			public static Func<Instruction, bool> <>9__490_0;

			public static Func<Instruction, bool> <>9__490_2;

			public static Func<float, float> <>9__490_3;

			public static Func<Instruction, bool> <>9__492_0;

			public static Func<Instruction, bool> <>9__492_1;

			public static Func<Instruction, bool> <>9__496_0;

			public static Func<Instruction, bool> <>9__496_3;

			public static Func<Instruction, bool> <>9__496_4;

			public static Func<float, float, float> <>9__496_5;

			public static Func<Instruction, bool> <>9__500_0;

			public static Func<Instruction, bool> <>9__500_2;

			public static Func<Instruction, bool> <>9__500_4;

			public static Func<float, float, float> <>9__500_5;

			public static Func<Instruction, bool> <>9__513_0;

			public static Func<Instruction, bool> <>9__513_1;

			public static Func<Instruction, bool> <>9__513_2;

			public static Func<Instruction, bool> <>9__515_0;

			public static Func<DamageTypeCombo, DamageTypeCombo> <>9__515_1;

			public static Func<Instruction, bool> <>9__516_0;

			public static Func<Instruction, bool> <>9__516_1;

			public static Func<Instruction, bool> <>9__516_2;

			public static Func<Instruction, bool> <>9__516_3;

			public static Func<Instruction, bool> <>9__516_4;

			public static Func<Instruction, bool> <>9__517_0;

			public static Func<Instruction, bool> <>9__517_1;

			public static Func<Instruction, bool> <>9__517_3;

			public static Func<Instruction, bool> <>9__517_4;

			public static Func<Instruction, bool> <>9__517_5;

			public static Func<Instruction, bool> <>9__517_6;

			public static Func<int, int, int> <>9__517_7;

			public static Func<Instruction, bool> <>9__518_0;

			public static Func<Instruction, bool> <>9__518_1;

			public static Func<Instruction, bool> <>9__518_4;

			public static Func<Instruction, bool> <>9__518_5;

			public static Func<Instruction, bool> <>9__521_0;

			public static Func<Instruction, bool> <>9__521_1;

			public static Func<Instruction, bool> <>9__521_2;

			public static Func<Instruction, bool> <>9__522_0;

			public static Func<Instruction, bool> <>9__522_1;

			public static Func<Instruction, bool> <>9__522_2;

			public static Func<Instruction, bool> <>9__523_0;

			public static Func<Instruction, bool> <>9__523_1;

			public static Func<float, JumpDamageStrikeBodyBehavior, float> <>9__523_2;

			public static Func<Instruction, bool> <>9__524_0;

			public static Func<float> <>9__524_1;

			public static Func<Instruction, bool> <>9__536_0;

			public static Func<Instruction, bool> <>9__536_1;

			public static Func<Instruction, bool> <>9__536_3;

			public static Func<float, int, float> <>9__536_4;

			public static Func<Instruction, bool> <>9__536_5;

			public static Func<float, float> <>9__536_6;

			public static Func<Instruction, bool> <>9__537_0;

			public static Func<Instruction, bool> <>9__537_1;

			public static Func<Instruction, bool> <>9__537_3;

			public static Func<Instruction, bool> <>9__537_4;

			public static Func<float, int, float> <>9__537_5;

			public static Func<Instruction, bool> <>9__537_6;

			public static Func<Instruction, bool> <>9__537_7;

			public static Func<float, float> <>9__537_8;

			public static Func<Instruction, bool> <>9__538_0;

			public static Func<Instruction, bool> <>9__538_2;

			public static Func<float, int, float> <>9__538_3;

			public static Func<Instruction, bool> <>9__540_0;

			public static Func<float, float> <>9__540_1;

			public static Func<Instruction, bool> <>9__541_0;

			public static Func<Instruction, bool> <>9__577_4;

			public static Func<Type, bool> <>9__593_0;

			internal bool <DirectorCreditGainChanges>b__25_0(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <DirectorCreditGainChanges>b__25_1(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <DirectorCreditGainChanges>b__25_2(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <DirectorCreditGainChanges>b__25_3(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchStloc(x, ref num);
			}

			internal bool <DirectorCreditGainChanges>b__25_4(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <AmbientLevelChanges>b__26_1(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <AmbientLevelChanges>b__26_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchMul(x);
			}

			internal bool <AmbientLevelChanges>b__26_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Mathf>(x, "Floor");
			}

			internal bool <AmbientLevelChanges>b__26_4(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <AmbientLevelChanges>b__26_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdarg(x, 0);
			}

			internal bool <AmbientLevelChanges>b__26_6(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<Run>(x, "stageClearCount");
			}

			internal bool <AmbientLevelChanges>b__26_8(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <AmbientLevelChanges>b__26_9(Instruction x)
			{
				return ILPatternMatchingExt.MatchMul(x);
			}

			internal bool <AmbientLevelChanges>b__26_10(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <AmbientLevelChanges>b__26_11(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdarg(x, 0);
			}

			internal bool <AmbientLevelChanges>b__26_12(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<Run>(x, "stageClearCount");
			}

			internal bool <AmbientLevelChanges>b__26_13(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld<Run>(x, "ambientLevelCap");
			}

			internal float <AmbientLevelChanges>b__26_14(float levelIn)
			{
				float ambientLevelBoost = GetAmbientLevelBoost();
				return levelIn + ambientLevelBoost;
			}

			internal bool <RemoveEclipseStats>b__57_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty");
			}

			internal bool <RemoveEclipseStats>b__57_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty");
			}

			internal bool <RemoveEclipseEffect>b__58_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty");
			}

			internal bool <EclipseHoldoutScale>b__60_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty");
			}

			internal bool <EclipseHoldoutScale>b__60_1(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdcI4(x, ref num);
			}

			internal bool <EclipseHoldoutScale>b__60_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<HealthComponent>(x, "get_fullHealth");
			}

			internal bool <ShrineBloodReward>b__138_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<ShrineBloodBehavior>(x, "goldToPaidHpRatio");
			}

			internal uint <ShrineBloodReward>b__138_2()
			{
				return (uint)Run.instance.GetDifficultyScaledCost(25, Stage.instance.entryDifficultyCoefficient);
			}

			internal void <DoubleChestHook>b__188_0(GameObject casinoChest)
			{
				PurchaseInteraction val = default(PurchaseInteraction);
				if (casinoChest.TryGetComponent<PurchaseInteraction>(ref val))
				{
					val.saleStarCompatible = false;
				}
				RouletteChestController val2 = default(RouletteChestController);
				if (casinoChest.TryGetComponent<RouletteChestController>(ref val2))
				{
					val2.dropCount = 2;
				}
			}

			internal bool <SoulShrineLuckBuff>b__208_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "ExtraLifeBuff");
			}

			internal void <SoulShrineLuckBuff>b__208_1(CharacterBody body)
			{
				body.AddBuff(Assets.soulShrineLuckBuff);
			}

			internal void <FixJellyNuke>b__219_0(orig_OnEnter orig, ChargeMegaNova self)
			{
				orig.Invoke(self);
				self.duration = ChargeMegaNova.baseDuration;
				if (((EntityState)self).characterBody.attackSpeed > 1.5f)
				{
					self.duration = 2f;
				}
			}

			internal void <FixJellyNuke>b__219_1(orig_OnEnter orig, ChargeState self)
			{
				orig.Invoke(self);
				self.duration = 3f;
			}

			internal void <GupChanges>b__254_0(orig_OnEnter orig, BaseSplitDeath self)
			{
				self.moneyMultiplier = 0f;
				orig.Invoke(self);
			}

			internal void <NerfTemplar>b__278_1(orig_OnEnter orig, MinigunFire self)
			{
				MinigunFire.baseFireInterval = templarFireInterval * templarBaseAttackSpeed;
				orig.Invoke(self);
			}

			internal void <NerfTemplar>b__278_2(orig_OnEnter orig, MinigunSpinUp self)
			{
				MinigunSpinUp.baseDuration = templarSpinUpDuration * templarBaseAttackSpeed;
				orig.Invoke(self);
			}

			internal void <NerfTemplar>b__278_3(orig_OnEnter orig, MinigunSpinDown self)
			{
				MinigunSpinDown.baseDuration = templarSpinDownDuration * templarBaseAttackSpeed;
				orig.Invoke(self);
			}

			internal void <NerfChimeraWisp>b__279_1(orig_OnEnter orig, FireLunarGuns self)
			{
				FireLunarGuns.baseFireInterval = 0.1f * chimeraWispBaseAttackSpeed;
				FireLunarGuns.baseDuration = 4f * chimeraWispBaseAttackSpeed;
				orig.Invoke(self);
			}

			internal void <NerfChimeraWisp>b__279_2(orig_OnEnter orig, ChargeLunarGuns self)
			{
				ChargeLunarGuns.baseDuration = chimeraWispChargeDuration * chimeraWispBaseAttackSpeed;
				ChargeLunarGuns.spinUpDuration = chimeraWispChargeDuration * chimeraWispBaseAttackSpeed;
				orig.Invoke(self);
			}

			internal void <NerfChimeraWisp>b__279_3(orig_OnEnter orig, SeekingBomb self)
			{
				SeekingBomb.spinUpDuration = 2f * chimeraWispBaseAttackSpeed;
				SeekingBomb.baseDuration = 3f * chimeraWispBaseAttackSpeed;
				orig.Invoke(self);
			}

			internal bool <GummyInheritItems>b__309_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchNewobj<DirectorSpawnRequest>(x);
			}

			internal bool <CapacitorNerf>b__319_0(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <CapacitorNerf>b__319_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchMul(x);
			}

			internal bool <CapacitorNerf>b__319_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<GenericDamageOrb>(x, "damageValue");
			}

			internal bool <CapacitorBuff>b__320_0(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdcI4(x, ref num);
			}

			internal bool <CapacitorBuff>b__320_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<BlastAttack>(x, "falloffModel");
			}

			internal bool <CapacitorBuff>b__320_2(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <CapacitorBuff>b__320_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<BlastAttack>(x, "radius");
			}

			internal bool <GlassesNerf>b__323_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "CritGlasses");
			}

			internal bool <GlassesNerf>b__323_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <GlassesNerf>b__323_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

			internal bool <RemovePauldronAttackSpeed>b__328_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterBody", "baseAttackSpeed");
			}

			internal bool <RemovePauldronAttackSpeed>b__328_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdarg(x, 0);
			}

			internal bool <RemovePauldronAttackSpeed>b__328_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld(x, "RoR2.CharacterBody", "levelAttackSpeed");
			}

			internal bool <RemovePauldronAttackSpeed>b__328_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "WarCryBuff");
			}

			internal bool <RemovePauldronAttackSpeed>b__328_6(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "HasBuff");
			}

			internal bool <RemovePauldronAttackSpeed>b__328_8(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcR4(x, 1f);
			}

			internal bool <MeteorFix>b__331_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<BlastAttack>(x, "falloffModel");
			}

			internal bool <InfusionBuff>b__339_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Infusion");
			}

			internal bool <InfusionBuff>b__339_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <InfusionBuff>b__339_4(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdcI4(x, ref num);
			}

			internal bool <InfusionBuff>b__339_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchMul(x);
			}

			internal int <InfusionBuff>b__339_7(int currentInfusionCap, int infusionCount, CharacterBody body)
			{
				float num = 100 * infusionCount;
				if ((Object)(object)body != (Object)null)
				{
					float num2 = 1f + 0.3f * (body.level - 1f);
					num = newInfusionBaseHealth * num2 * (float)infusionCount;
				}
				return (int)num;
			}

			internal bool <PolyluteDamage>b__349_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "ChainLightningVoid");
			}

			internal bool <PolyluteDamage>b__349_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <PolyluteDamage>b__349_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcI4(x, 0);
			}

			internal bool <PolyluteDamage>b__349_5(Instruction x)
			{
				ILLabel val = default(ILLabel);
				return ILPatternMatchingExt.MatchBle(x, ref val);
			}

			internal bool <PolyluteDamage>b__349_6(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <ModifyFireShuriken>b__355_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_damage");
			}

			internal bool <ModifyFireShuriken>b__355_1(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <ModifyFireShuriken>b__355_2(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <FixLostSeersDamageImmunity>b__361_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "CritGlassesVoid");
			}

			internal bool <FixLostSeersDamageImmunity>b__361_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal int <FixLostSeersDamageImmunity>b__361_2(int lensCount, HealthComponent hc)
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				CharacterBody body = hc.body;
				if (((Enum)body.bodyFlags).HasFlag((Enum)(object)(BodyFlags)2048))
				{
					return 0;
				}
				return lensCount;
			}

			internal bool <FuelCellStock>b__366_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "EquipmentMagazine");
			}

			internal bool <FuelCellStock>b__366_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <FuelCellCdr>b__367_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "EquipmentMagazine");
			}

			internal bool <FuelCellCdr>b__367_2(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <StickyBombRework>b__375_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "StickyBomb");
			}

			internal bool <StickyBombRework>b__375_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <StickyBombRework>b__375_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "OnHitProcDamage");
			}

			internal float <StickyBombRework>b__375_4(float damageCoefficient, int itemCount)
			{
				return stickyDamageCoeffBase + stickyDamageCoeffStack * (float)(itemCount - 1);
			}

			internal bool <SaleStarItemDrop>b__377_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<ChestBehavior>(x, "Roll");
			}

			internal ChestBehavior <SaleStarItemDrop>b__377_2(ChestBehavior chest, int droppedIndex)
			{
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_0039: Unknown result type (might be due to invalid IL or missing references)
				if (droppedIndex + 1 >= chest.maxDropCount && chest.maxDropCount > chest.dropCount)
				{
					chest.maxDropCount = chest.dropCount;
					chest.dropTable = Addressables.LoadAssetAsync<PickupDropTable>((object)RoR2_Base_ShrineChance.dtShrineChance_asset).WaitForCompletion();
				}
				return chest;
			}

			internal bool <SaleStarOnInteraction>b__378_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<PurchaseInteraction>(x, "saleStarCompatible");
			}

			internal bool <SaleStarOnInteraction>b__378_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Inventory/ItemTransformation/TryTransformResult", "get_totalTransformed");
			}

			internal bool <SaleStarOnInteraction>b__378_3(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdcI4(x, ref num);
			}

			internal bool <SaleStarOnInteraction>b__378_4(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchStloc(x, ref num);
			}

			internal bool <SaleStarOnInteraction>b__378_7(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<ChestBehavior>(x, "dropCount");
			}

			internal int <SaleStarOnInteraction>b__378_8(ChestBehavior chest, int totalTransformed)
			{
				chest.maxDropCount = chest.dropCount;
				return chest.dropCount + totalTransformed;
			}

			internal bool <SaleStarOnInteraction>b__378_9(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<RouletteChestController>(x, "dropCount");
			}

			internal int <SaleStarOnInteraction>b__378_10(RouletteChestController chest, int totalTransformed)
			{
				return chest.dropCount + totalTransformed;
			}

			internal bool <NkuhanasBuff>b__413_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<DevilOrb>(x, "damageValue");
			}

			internal bool <NerfDiscipleDamage>b__414_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<DevilOrb>(x, "damageValue");
			}

			internal float <NerfDiscipleDamage>b__414_1(float damageIn, SprintWispBodyBehavior behavior)
			{
				return damageIn / (float)((BaseItemBodyBehavior)behavior).stack;
			}

			internal bool <BuffDevilOrb>b__416_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<DamageInfo>(x, "force");
			}

			internal Vector3 <BuffDevilOrb>b__416_1(Vector3 forceIn, DevilOrb orb)
			{
				//IL_0068: Unknown result type (might be due to invalid IL or missing references)
				//IL_006d: Unknown result type (might be due to invalid IL or missing references)
				//IL_006f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0071: Unknown result type (might be due to invalid IL or missing references)
				//IL_0073: Unknown result type (might be due to invalid IL or missing references)
				//IL_009f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0079: Unknown result type (might be due to invalid IL or missing references)
				//IL_007c: Invalid comparison between Unknown and I4
				//IL_0107: Unknown result type (might be due to invalid IL or missing references)
				//IL_0117: Unknown result type (might be due to invalid IL or missing references)
				//IL_011c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0121: Unknown result type (might be due to invalid IL or missing references)
				//IL_0125: Unknown result type (might be due to invalid IL or missing references)
				//IL_0131: Unknown result type (might be due to invalid IL or missing references)
				//IL_0136: Unknown result type (might be due to invalid IL or missing references)
				//IL_0137: Unknown result type (might be due to invalid IL or missing references)
				//IL_0138: Unknown result type (might be due to invalid IL or missing references)
				//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
				//IL_013c: Unknown result type (might be due to invalid IL or missing references)
				HealthComponent healthComponent = ((Orb)orb).target.healthComponent;
				float num = 1f;
				if ((Object)(object)healthComponent.body.characterMotor != (Object)null)
				{
					num = healthComponent.body.characterMotor.mass;
				}
				else if ((Object)(object)healthComponent.body.rigidbody != (Object)null)
				{
					num = healthComponent.body.rigidbody.mass;
				}
				EffectType effectType = orb.effectType;
				EffectType val = effectType;
				if ((int)val != 0)
				{
					if ((int)val == 1)
					{
						if (useDiscipleKnockbackSlow)
						{
							num *= 15f;
							healthComponent.body.AddTimedBuffAuthority(Buffs.Slow50.buffIndex, 3f);
						}
						else
						{
							num *= 0f;
						}
					}
				}
				else if (useNkuhanaKnockbackSlow)
				{
					num *= 25f;
					healthComponent.body.AddTimedBuffAuthority(Buffs.Slow50.buffIndex, 3f);
				}
				else
				{
					num *= 0f;
				}
				Vector3 val2 = ((Component)((Orb)orb).target).transform.position - orb.attacker.transform.position;
				return ((Vector3)(ref val2)).normalized * (100f + num);
			}

			internal bool <GasChanges>b__417_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<InflictDotInfo>(x, "totalDamage");
			}

			internal float <GasChanges>b__417_1(float currentDamage, DamageReport damageReport, int itemCount)
			{
				return (gasBaseBurnDamage + gasStackBurnDamage * (float)(itemCount - 1)) * damageReport.attackerBody.damage;
			}

			internal bool <GasChanges>b__417_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<BlastAttack>(x, "baseDamage");
			}

			internal float <GasChanges>b__417_3(float currentDamage, DamageReport damageReport, int itemCount)
			{
				return (gasBaseDamage + gasStackDamage * (float)itemCount) * damageReport.attackerBody.damage;
			}

			internal bool <GasChangesOld>b__418_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcR4(x, 1.5f);
			}

			internal bool <GasChangesOld>b__418_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcR4(x, 1.5f);
			}

			internal bool <GasChangesOld>b__418_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdarg(x, 1);
			}

			internal bool <GasChangesOld>b__418_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

			internal bool <GasChangesOld>b__418_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchMul(x);
			}

			internal bool <GasChangesOld>b__418_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchAdd(x);
			}

			internal float <GasChangesOld>b__418_6(float currentDuration, int itemCount)
			{
				return gasBaseBurnDamage + gasStackBurnDamage * (float)(itemCount - 1);
			}

			internal bool <GasChangesOld>b__418_7(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<BlastAttack>(x, "baseDamage");
			}

			internal float <GasChangesOld>b__418_8(float currentDamage, DamageReport damageReport, int itemCount)
			{
				return (gasBaseDamage + gasStackDamage * (float)itemCount) * damageReport.attackerBody.damage;
			}

			internal bool <WillOWispChanges>b__419_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "ExplodeOnDeath");
			}

			internal bool <WillOWispChanges>b__419_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "OnKillProcDamage");
			}

			internal float <WillOWispChanges>b__419_3(float currentDamage, int itemCount)
			{
				return willowispBaseDamage * (1f + willowispScaleFraction * (float)(itemCount - 1));
			}

			internal bool <WillOWispChanges>b__419_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<DelayBlast>(x, "radius");
			}

			internal float <WillOWispChanges>b__419_5(float currentRadius, int itemCount)
			{
				return willowispBaseRange + willowispStackRange * (float)itemCount;
			}

			internal bool <VoidsentFlameChanges>b__420_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "ExplodeOnDeathVoid");
			}

			internal int <VoidsentFlameChanges>b__420_2(int itemCountIn)
			{
				if (itemCountIn > 0 && Util.CheckRoll(voidsentBaseChance + voidsentStackChance * (float)(itemCountIn - 1), 0f, (CharacterMaster)null))
				{
					return itemCountIn;
				}
				return 0;
			}

			internal bool <VoidsentFlameChanges>b__420_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "OnKillProcDamage");
			}

			internal float <VoidsentFlameChanges>b__420_4(float currentDamage, int itemCount)
			{
				return voidsentBaseDamage * (1f + voidsentScaleFraction * (float)(itemCount - 1));
			}

			internal bool <VoidsentFlameChanges>b__420_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<DelayBlast>(x, "radius");
			}

			internal float <VoidsentFlameChanges>b__420_6(float currentRadius, int itemCount)
			{
				return voidsentBaseRange + voidsentStackRange * (float)itemCount;
			}

			internal bool <CooldownBuff>b__429_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "IceRing");
			}

			internal bool <CooldownBuff>b__429_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcI4(x, 1);
			}

			internal bool <CooldownBuff>b__429_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

			internal float <CooldownBuff>b__429_6(float cooldown, CharacterBody self)
			{
				float num = 1f;
				if (Object.op_Implicit((Object)(object)self.skillLocator.special))
				{
					float cooldownScale = self.skillLocator.special.cooldownScale;
					num *= cooldownScale;
					if (!(self.skillLocator.special.flatCooldownReduction < 9f))
					{
					}
				}
				return cooldown * num;
			}

			internal bool <CooldownBuff>b__429_8(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

			internal bool <CooldownBuff>b__429_9(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal float <CooldownBuff>b__429_10(float seconds, CharacterBody self)
			{
				float num = 0f;
				if (Object.op_Implicit((Object)(object)self.skillLocator.special))
				{
				}
				return Mathf.Max(seconds - num, 1f);
			}

			internal bool <RunaldNerf>b__430_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "IceRing");
			}

			internal bool <RunaldNerf>b__430_2(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <RunaldNerf>b__430_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

			internal bool <RunaldNerf>b__430_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchMul(x);
			}

			internal bool <RunaldNerf>b__430_8(Instruction x)
			{
				MethodReference val = default(MethodReference);
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, ref val);
			}

			internal float <RunaldNerf>b__430_9(float damage, CharacterBody attackerBody)
			{
				float num = attackerBody.baseDamage * runaldBaseDamage;
				return damage + num;
			}

			internal bool <KjaroNerf>b__431_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "FireRing");
			}

			internal bool <KjaroNerf>b__431_2(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <KjaroNerf>b__431_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

			internal bool <KjaroNerf>b__431_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchMul(x);
			}

			internal bool <KjaroNerf>b__431_8(Instruction x)
			{
				MethodReference val = default(MethodReference);
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, ref val);
			}

			internal float <KjaroNerf>b__431_9(float damage, CharacterBody attackerBody)
			{
				float num = attackerBody.baseDamage * kjaroBaseDamage;
				return damage + num;
			}

			internal bool <SceneDirector_Start>b__434_0(GameObject obj)
			{
				return ((Object)obj).name == "NewtStatue" || ((Object)obj).name == "NewtStatue (1)" || ((Object)obj).name == "NewtStatue (2)" || ((Object)obj).name == "NewtStatue (3)" || ((Object)obj).name == "NewtStatue (4)";
			}

			internal bool <SceneDirector_Start>b__434_1(GameObject obj)
			{
				return ((Object)obj).name == "NewtStatue, Guarantee" || ((Object)obj).name == "NewtStatue, Guaranteed" || ((Object)obj).name == "NewtStatue (Permanent)";
			}

			internal bool <DeathMarkFix_Stacking>b__452_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "DeathMark");
			}

			internal bool <DeathMarkFix_Stacking>b__452_1(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal void <DeathMarkFix_Stacking>b__452_3(CharacterBody body, BuffDef buffDef, float duration, float itemCount)
			{
				int buffCount = body.GetBuffCount(Buffs.DeathMark);
				int num = 0;
				if (buffCount < (int)itemCount)
				{
					num = (int)itemCount - buffCount;
				}
				for (float num2 = 0f; num2 < (float)num; num2 += 1f)
				{
					body.AddTimedBuff(buffDef, duration);
				}
			}

			internal bool <DeathMarkFix_Damage>b__453_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Buffs", "DeathMark");
			}

			internal bool <DeathMarkFix_Damage>b__453_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "HasBuff");
			}

			internal bool <DeathMarkFix_Damage>b__453_2(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal float <DeathMarkFix_Damage>b__453_3(float damage, HealthComponent hc)
			{
				CharacterBody body = hc.body;
				float num = 1f;
				int buffCount = body.GetBuffCount(Buffs.DeathMark);
				num += deathMarkBonusDamage * (float)buffCount;
				Debug.Log((object)(damage + " " + num));
				return num;
			}

			internal bool <RevokeShatterspleenBleedRights>b__478_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "BleedOnHitAndExplode");
			}

			internal bool <RevokeShatterspleenBleedRights>b__478_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <RevokeShatterspleenDeathRights>b__479_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "BleedOnHitAndExplode");
			}

			internal bool <RevokeShatterspleenDeathRights>b__479_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <VoidBearChanges>b__490_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "BearVoid");
			}

			internal bool <VoidBearChanges>b__490_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "AddTimedBuff");
			}

			internal float <VoidBearChanges>b__490_3(float inDuration)
			{
				float num = 15f;
				float num2 = 5f;
				return num2 + inDuration * ((num - num2) / num);
			}

			internal bool <TeddyChanges>b__492_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "bear");
			}

			internal bool <TeddyChanges>b__492_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.Util", "ConvertAmplificationPercentageIntoReductionPercentage");
			}

			internal bool <HoofNerf>b__496_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Hoof");
			}

			internal bool <HoofNerf>b__496_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

			internal bool <HoofNerf>b__496_4(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal float <HoofNerf>b__496_5(float itemCount, float speedBonus)
			{
				float result = 0f;
				if (itemCount > 0f)
				{
					result = hoofSpeedBonusBase + hoofSpeedBonusStack * (itemCount - 1f);
				}
				return result;
			}

			internal bool <DrinkNerf>b__500_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "SprintBonus");
			}

			internal bool <DrinkNerf>b__500_2(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <DrinkNerf>b__500_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchConvR4(x);
			}

			internal float <DrinkNerf>b__500_5(float speedBonus, float itemCount)
			{
				float result = 0f;
				if (itemCount > 0f)
				{
					result = drinkSpeedBonusBase + drinkSpeedBonusStack * (itemCount - 1f);
				}
				return result;
			}

			internal bool <FaradaySparks>b__513_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC3Content/Buffs", "JumpDamageStrikeCharge");
			}

			internal bool <FaradaySparks>b__513_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "GetBuffCount");
			}

			internal bool <FaradaySparks>b__513_2(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdcI4(x, ref num);
			}

			internal bool <ChangeFaradayDischargeDamageType>b__515_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<BlastAttack>(x, "damageType");
			}

			internal DamageTypeCombo <ChangeFaradayDischargeDamageType>b__515_1(DamageTypeCombo doesntMatter)
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				//IL_000f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				return new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)32), (DamageTypeExtended)0, (DamageSource)8);
			}

			internal bool <IncreaseFaradayDischargeDamage>b__516_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_damage");
			}

			internal bool <IncreaseFaradayDischargeDamage>b__516_1(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <IncreaseFaradayDischargeDamage>b__516_2(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <IncreaseFaradayDischargeDamage>b__516_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdarg(x, 0);
			}

			internal bool <IncreaseFaradayDischargeDamage>b__516_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<BaseItemBodyBehavior>(x, "stack");
			}

			internal bool <ReduceFaradayMaxDischarge>b__517_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC3Content/Buffs", "JumpDamageStrikeCharge");
			}

			internal bool <ReduceFaradayMaxDischarge>b__517_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "GetBuffCount");
			}

			internal bool <ReduceFaradayMaxDischarge>b__517_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC3Content/Buffs", "JumpDamageStrikeCharge");
			}

			internal bool <ReduceFaradayMaxDischarge>b__517_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<BuffDef>(x, "get_buffIndex");
			}

			internal bool <ReduceFaradayMaxDischarge>b__517_5(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdcI4(x, ref num);
			}

			internal bool <ReduceFaradayMaxDischarge>b__517_6(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "SetBuffCount");
			}

			internal int <ReduceFaradayMaxDischarge>b__517_7(int doesntMatter, int buffCount)
			{
				int num = buffCount - faradayMaxDischarge;
				if (num < 0)
				{
					return 0;
				}
				if (num == faradayRequiredCharge && faradayPreventDoubleDischarge)
				{
					return faradayRequiredCharge - 1;
				}
				return num;
			}

			internal bool <IncreaseFaradayChargeRequirement_DischargeEffects>b__518_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC3Content/Buffs", "JumpDamageStrikeCharge");
			}

			internal bool <IncreaseFaradayChargeRequirement_DischargeEffects>b__518_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "GetBuffCount");
			}

			internal bool <IncreaseFaradayChargeRequirement_DischargeEffects>b__518_4(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdcI4(x, ref num);
			}

			internal bool <IncreaseFaradayChargeRequirement_DischargeEffects>b__518_5(Instruction x)
			{
				ILLabel val = default(ILLabel);
				return ILPatternMatchingExt.MatchBge(x, ref val);
			}

			internal bool <IncreaseFaradayChargeRequirement_UpdateCharge>b__521_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdarg(x, 1);
			}

			internal bool <IncreaseFaradayChargeRequirement_UpdateCharge>b__521_1(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdcI4(x, ref num);
			}

			internal bool <IncreaseFaradayChargeRequirement_UpdateCharge>b__521_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchClt(x);
			}

			internal bool <IncreaseFaradayChargeRequirement_GetRadius>b__522_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdarg(x, 1);
			}

			internal bool <IncreaseFaradayChargeRequirement_GetRadius>b__522_1(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdcI4(x, ref num);
			}

			internal bool <IncreaseFaradayChargeRequirement_GetRadius>b__522_2(Instruction x)
			{
				ILLabel val = default(ILLabel);
				return ILPatternMatchingExt.MatchBge(x, ref val);
			}

			internal bool <BuffFaradayChargeRate>b__523_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<JumpDamageStrikeBodyBehavior>(x, "isCharging");
			}

			internal bool <BuffFaradayChargeRate>b__523_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<JumpDamageStrikeBodyBehavior>(x, "distanceTraveled");
			}

			internal float <BuffFaradayChargeRate>b__523_2(float addedDistance, JumpDamageStrikeBodyBehavior behavior)
			{
				float num = Mathf.Pow((1f + faradayChargeIncreaseStack * (float)(((BaseItemBodyBehavior)behavior).stack - 1)) * faradayChargeIncreaseBase, 0.2f);
				return addedDistance * num;
			}

			internal bool <FixFaradayDeltaTime>b__524_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Time>(x, "get_deltaTime");
			}

			internal float <FixFaradayDeltaTime>b__524_1()
			{
				return Time.fixedDeltaTime;
			}

			internal bool <MonsterToothHealChange>b__536_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Tooth");
			}

			internal bool <MonsterToothHealChange>b__536_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <MonsterToothHealChange>b__536_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<HealthPickup>(x, "flatHealing");
			}

			internal float <MonsterToothHealChange>b__536_4(float currentHealAmt, int itemCount)
			{
				return monsterToothFlatHeal * (float)itemCount;
			}

			internal bool <MonsterToothHealChange>b__536_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<HealthPickup>(x, "fractionalHealing");
			}

			internal float <MonsterToothHealChange>b__536_6(float currentHealAmt)
			{
				return monsterToothPercentHeal;
			}

			internal bool <MedkitHealChange>b__537_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Medkit");
			}

			internal bool <MedkitHealChange>b__537_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <MedkitHealChange>b__537_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcR4(x, 20f);
			}

			internal bool <MedkitHealChange>b__537_4(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchStloc(x, ref num);
			}

			internal float <MedkitHealChange>b__537_5(float currentHealAmt, int itemCount)
			{
				return medkitFlatHeal * (float)itemCount;
			}

			internal bool <MedkitHealChange>b__537_6(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "get_maxHealth");
			}

			internal bool <MedkitHealChange>b__537_7(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcR4(x, 0.05f);
			}

			internal float <MedkitHealChange>b__537_8(float currentHealAmt)
			{
				return medkitPercentHeal;
			}

			internal bool <ScytheNerf>b__538_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "HealOnCrit");
			}

			internal bool <ScytheNerf>b__538_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<HealthComponent>(x, "Heal");
			}

			internal float <ScytheNerf>b__538_3(float currentHealAmt, int itemCount)
			{
				return scytheBaseHeal + scytheStackHeal * (float)itemCount;
			}

			internal bool <ReduceBungusInterval>b__540_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<HealingWard>(x, "interval");
			}

			internal float <ReduceBungusInterval>b__540_1(float interval)
			{
				return fungusHealInterval;
			}

			internal bool <ReduceBungusWaitTime>b__541_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "notMovingStopwatch");
			}

			internal bool <InitializeEverything>b__577_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<SkillDef>(x, "attackSpeedBuffsRestockSpeed");
			}

			internal bool <InitializeCoreModules>b__593_0(Type type)
			{
				return !type.IsAbstract && type.IsSubclassOf(typeof(CoreModule));
			}
		}

		public static float drizzleDifficultyBoost = 0f;

		public static float rainstormDifficultyBoost = 0f;

		public static float monsoonDifficultyBoost = 3f;

		public static float eclipseDifficultyBoost = 6f;

		public static float baseScalingMultiplier = 0.9f;

		public static float difficultyIncreasePerMinutePerDifficulty = 0.01f;

		public static float difficultyIncreasePerMinuteBase = 1f;

		public static float difficultyIncreasePerStage = 0.9f;

		public static float difficultyIncreasePerLoop = 1.3f;

		public static float playerBaseDifficultyFactor = 0.2f;

		public static float playerScalingDifficultyFactor = 0.2f;

		public static float playerSpawnRateFactor = 0.5f;

		public static float difficultySpawnRateFactor = 0.4f;

		public static int ambientLevelCapDrizzle = 99;

		public static int ambientLevelCap = 999;

		public static float easyTeleParticleRadius = 1f;

		public static float normalTeleParticleRadius = 0.8f;

		public static float hardTeleParticleRadius = 0.4f;

		public static float eclipseTeleParticleRadius = 0.4f;

		public static float defaultTeleParticleRadius = 0.9f;

		public static DifficultyIndex eclipseLevelBossShield = (DifficultyIndex)3;

		public static float eclipseBossShieldFraction = 0.1f;

		public static string eclipseOneDesc = "\n<mspace=0.5em>(1)</mspace> Boss Shields: <style=cIsHealth>+" + Tools.ConvertDecimal(eclipseBossShieldFraction) + "</style>";

		public static DifficultyIndex eclipseLevelHoldoutLoss = (DifficultyIndex)4;

		public static float eclipseHoldoutLossRate = 0.03f;

		public static string eclipseTwoDesc = "\n<mspace=0.5em>(2)</mspace> Holdout Zone Discharge: <style=cIsHealth>-" + Tools.ConvertDecimal(eclipseHoldoutLossRate) + " per second</style>";

		public static DifficultyIndex eclipseLevelEnemyCdr = (DifficultyIndex)5;

		public static float eclipseEnemyCdr = 0.5f;

		public static string eclipseThreeDesc = "\n<mspace=0.5em>(3)</mspace> Enemy Cooldowns: <style=cIsHealth>-" + Tools.ConvertDecimal(eclipseEnemyCdr) + "</style>";

		public static DifficultyIndex eclipseLevelSmallHoldout = (DifficultyIndex)6;

		public static float eclipseHoldoutScale = 0.7f;

		public static string eclipseFourDesc = "\n<mspace=0.5em>(4)</mspace> Holdout Zone Radius: <style=cIsHealth>-" + Tools.ConvertDecimal(1f - eclipseHoldoutScale) + "</style>";

		public static DifficultyIndex eclipseLevelEnemyMspd = (DifficultyIndex)7;

		public static float eclipseEnemyMspd = 0.25f;

		public static string eclipseFiveDesc = "\n<mspace=0.5em>(5)</mspace> Enemy Speed: <style=cIsHealth>+" + Tools.ConvertDecimal(eclipseEnemyMspd) + "</style>";

		public static DifficultyIndex eclipseLevelSpiteArtifact = (DifficultyIndex)8;

		public static string eclipseSixDesc = "\n<mspace=0.5em>(6)</mspace> On Kill: <style=cIsHealth>Enemies drop exploding bombs</style>";

		public static DifficultyIndex eclipseLevelVeryHard = (DifficultyIndex)9;

		public static string eclipseSevenDesc = "\n<mspace=0.5em>(7)</mspace> Difficulty: <style=cIsHealth>Very Hard</style>";

		public static DifficultyIndex eclipseLevelPlayerDegen = (DifficultyIndex)10;

		public static float eclipsePlayerDegen = 0.2f;

		public static string eclipseEightDesc = "\n<mspace=0.5em>(8)</mspace> Health Degeneration: <style=cIsHealth>-" + Tools.ConvertDecimal(eclipsePlayerDegen) + " per level</style>";

		public static float voidFieldsTimeCost = 120f;

		public static float fastDirectorEliteBias = 1.2f;

		public static float fastDirectorCreditMultiplier = 0.75f;

		public static float slowDirectorEliteBias = 1.2f;

		public static float slowDirectorCreditMultiplier = 1f;

		public static float teleLesserEliteBias = 1f;

		public static float teleLesserCreditMultiplier = 0.8f;

		public static float teleBossEliteBias = 1f;

		public static float teleBossCreditMultiplier = 1f;

		public static float teleBossCreditMultiplierStage1 = 0.5f;

		private static bool pityChargeOn = false;

		private static float pityChargeShrinkDelta = 0f;

		private static float pityChargeRecolorDelta = 0f;

		private GameObject awu = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/SuperRoboBallBossBody");

		private CharacterBody awuBody;

		private float awuArmor = 40f;

		private float awuAdditionalArmor = 0f;

		private int awuAdaptiveArmorCount = 1;

		private static float costExponent = 1.15f;

		private static float goldRewardMultiplierGlobal = 0.3f;

		private static float expRewardMultiplierGlobal = 0.4f;

		private static float compensationForStartingLevel = 1f;

		public float interactableCreditsAdd = 125f;

		public float monsterCreditsMultiplier = 1f;

		private PurchaseInteraction smallChest = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Chest1/Chest1.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction smallCategoryChestDamage = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/CategoryChest/CategoryChestDamage.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction smallCategoryChestHealing = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/CategoryChest/CategoryChestHealing.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction smallCategoryChestUtility = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/CategoryChest/CategoryChestUtility.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction bigChest = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Chest2/Chest2.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction bigCategoryChestDamage = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/CategoryChest2/CategoryChest2Damage Variant.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction bigCategoryChestHealing = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/CategoryChest2/CategoryChest2Healing Variant.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction bigCategoryChestUtility = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/CategoryChest2/CategoryChest2Utility Variant.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction casinoChest = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/CasinoChest/CasinoChest.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction chanceShrine = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineChance/ShrineChance.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction chanceShrineSnowy = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineChance/ShrineChanceSnowy Variant.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private PurchaseInteraction chanceShrineSandy = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineChance/ShrineChanceSandy Variant.prefab").WaitForCompletion().GetComponent<PurchaseInteraction>();

		private MultiShopController smallShop = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/TripleShop/TripleShop.prefab").WaitForCompletion().GetComponent<MultiShopController>();

		private MultiShopController bigShop = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/TripleShopLarge/TripleShopLarge.prefab").WaitForCompletion().GetComponent<MultiShopController>();

		private MultiShopController equipmentShop = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/TripleShopEquipment/TripleShopEquipment.prefab").WaitForCompletion().GetComponent<MultiShopController>();

		private string discountChestPrefix = "Bargain";

		private int smallChestTypeCost = 20;

		private int smallShopTypeCost = 35;

		private int smallCategoryChestTypeCost = 25;

		private int bigChestTypeCost = 45;

		private int bigShopTypeCost = 70;

		private int bigCategoryChestTypeCost = 50;

		private int goldChestTypeCost = 200;

		private int bigDroneTypeCost = 160;

		private int casinoChestTypeCost = 30;

		private int chanceShrineTypeCost = 15;

		private GameObject goldShrine = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineGoldshoresAccess/ShrineGoldshoresAccess.prefab").WaitForCompletion();

		private int goldShrineCost = 5;

		private static int teamMaxHealth;

		private static int totalBloodGoldValue = 60;

		private const float totalHealthFraction = 2.18f;

		private static float chestsPerHealthBar = 2f;

		public int equipBarrelWeightS1 = 20;

		public int equipBarrelLimitS1 = 5;

		public int equipBarrelWeight = 6;

		public int equipBarrelLimit = 2;

		public int equipShopWeightS3 = 20;

		public int equipShopLimitS3 = 4;

		public int equipShopWeight = 4;

		public int equipShopLimit = 2;

		public int scrapperWeight = 1000;

		public int scrapperLimit = 3;

		public int doubleChestWeight = 15;

		public static GameObject whitePrinter = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/chest/Duplicator");

		public static GameObject greenPrinter = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/chest/DuplicatorLarge");

		public static GameObject redPrinter = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/chest/DuplicatorMilitary");

		public static GameObject scrapper = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/chest/Scrapper");

		public int printerGreenWeight = 20;

		public int printerGreenLimit = 4;

		public int printerRedWeight = 4;

		public int printerRedLimit = 1;

		public int printerRedWeightS5 = 1000;

		public int printerRedLimitS5 = 2;

		public int lunarPodWeightS1 = 20;

		public int lunarPodLimitS1 = 6;

		public int lunarPodWeight = 6;

		public int lunarPodLimit = 2;

		private BasicPickupDropTable doubleChestDropTable = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/CasinoChest/dtCasinoChest.asset").WaitForCompletion();

		private InteractableSpawnCard doubleChestSpawnCard = Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"RoR2/Base/CasinoChest/iscCasinoChest.asset").WaitForCompletion();

		public DirectorCard doubleChestDirectorCard;

		public static int halcyoniteShrineLowGoldCost = 35;

		public static int halcyoniteShrineMidGoldCost = 75;

		public static int halcyoniteShrineMaxGoldCost = 125;

		public static float halcyoniteShrineRadius = 30f;

		public static int soulShrineLuckIncrease = 1;

		private GameObject soulShrine = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/ShrineColossusAccess.prefab").WaitForCompletion();

		public static int Tier2EliteMinimumStageDefault = 6;

		public static int Tier2EliteMinimumStageDrizzle = 11;

		public static int Tier2EliteMinimumStageRainstorm = 6;

		public static int Tier2EliteMinimumStageMonsoon = 4;

		public static int Tier2EliteMinimumStageEclipse = 4;

		private static string Tier2EliteName = "Rare";

		private float genesisLoopBlastDamageCoefficient = 30f;

		private float vagrantBaseHealth = 1600f;

		private GameObject vagrantPrefab;

		private GameObject pestPrefab;

		private GameObject pestSpit;

		private float pestBaseHealth = 50f;

		private float pestBaseDamage = 6f;

		private float pestBaseSpeed = 4f;

		private float pestSpitVelocity = 70f;

		private GameObject queenSpitPrefab;

		private GameObject queenAcidPrefab;

		private float spitDamageCoefficient = 0.4f;

		private float acidSize = 2f;

		private float acidDamageCoefficient = 2.5f;

		private float acidDamageFrequency = 4f;

		private CharacterSpawnCard gupSpawnCard;

		private int gupCreditCost = 200;

		private GameObject gupPrefab;

		private float gupBaseHealth = 1000f;

		private float gupBaseArmor = 0f;

		private float gupBaseDamage = 12f;

		private float gupBaseSpeed = 14f;

		private float gupBaseRegen = 0f;

		private GameObject geepPrefab;

		private float geepBaseHealth = 500f;

		private float geepBaseArmor = 0f;

		private float geepBaseDamage = 8f;

		private float geepBaseSpeed = 10f;

		private float geepBaseRegen = 0f;

		private GameObject gipPrefab;

		private float gipBaseHealth = 250f;

		private float gipBaseArmor = 0f;

		private float gipBaseDamage = 5f;

		private float gipBaseSpeed = 6f;

		private float gipBaseRegen = 0f;

		private int nulliferBombCount = 10;

		private GameObject barnaclePrefab;

		private float fuckBarnacleRegen = 0f;

		private GameObject lesserWispPrefab;

		private float wispBaseDamage = 1.5f;

		private GameObject templarPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/ClayBruiserBody");

		public static float templarBaseDamage = 9f;

		public static float templarBaseAttackSpeed = 1f;

		public static float templarFireInterval = 0.05f;

		public static float templarSpinUpDuration = 1.5f;

		public static float templarSpinDownDuration = 2f;

		private GameObject chimeraWispPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/characterbodies/LunarWispBody");

		public static float chimeraWispBaseDamage = 5f;

		public static float chimeraWispBaseAttackSpeed = 1f;

		public static float chimeraWispFireInterval = 0.1f;

		public static float chimeraWispFireDuration = 4f;

		public static float chimeraWispChargeDuration = 3.33f;

		public static int solusScorcherCreditCost = 18;

		public static float solusScorcherBaseHealth = 111f;

		public static float solusScorcherBaseMovespeed = 9f;

		public static int solusProspectorCreditCost = 11;

		public static float solusProspectorBaseHealth = 110f;

		public static float solusProspectorBaseMovespeed = 11.5f;

		public static EquipmentDef[] scavBlacklistedEquips = (EquipmentDef[])(object)new EquipmentDef[3]
		{
			Equipment.PassiveHealing,
			Equipment.Fruit,
			Equipment.LifestealOnHit
		};

		public float crunderFunnyMoneyProcChance = 10f;

		public Func<ItemIndex, bool> gooboItemCopyFilter = Inventory.defaultItemCopyFilterDelegate.Invoke;

		private float gummyLifetime = 30f;

		private int gummyDamage = 0;

		private float gummyDamageMultiplier = 0.7f;

		private int gummyHealth = 20;

		private float gummyHealthMultiplier = 1f;

		public int blastShowerBuffCount = 3;

		public static float capacitorDamageCoefficient = 10f;

		public static float capacitorBlastRadius = 13f;

		public static float capacitorCooldown = 20f;

		private float glassesNewCritChance = 10f;

		private float pauldronDamageMultiplier = 1f;

		private float pauldronAspdMultiplier = 0.5f;

		private FalloffModel falloffModel = (FalloffModel)0;

		private float justiceMinDamageCoeff = 8f;

		public static float newInfusionBaseHealth = 40f;

		public float wungusRegenBase = 1.5f;

		public float wungusRegenStack = 1.5f;

		public float luteDamageCoefficient = 0.4f;

		private GameObject shurikenProjectilePrefab;

		public float shurikenBaseDamage = 0.8f;

		public float shurikenStackDamage = 0f;

		public float shurikenProcCoefficient = 2f;

		public float daisyRadiusMultiplier = 1.15f;

		public const float fuelCellCooldownMultiplier = 0.67f;

		public static string fuelCellEquipCdr = Tools.ConvertDecimal(0.32999998f);

		public static int fuelCellStock = 2;

		public const float chaosCooldownMultiplier = 0.67f;

		public static string chaosEquipCdr = Tools.ConvertDecimal(0.32999998f);

		public static float stickyDamageCoeffBase = 3.2f;

		public static float stickyDamageCoeffStack = 0.4f;

		private GameObject daggerPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/DaggerProjectile");

		private GameObject willowispPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/WilloWispDelay");

		private GameObject voidsentPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/ExplodeOnDeathVoid/ExplodeOnDeathVoidExplosion.prefab").WaitForCompletion();

		private GameObject spleenPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/BleedOnHitAndExplodeDelay");

		private GameObject fireworkProjectilePrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/projectiles/FireworkProjectile");

		private GameObject resdiscProjectilePrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/projectiles/LaserTurbineBomb");

		private GameObject meatballProjectilePrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/FireMeatBall");

		private static float willowispProcCoeff = 0.75f;

		private static float willowispBaseDamage = 3.6f;

		private static float willowispScaleFraction = 0.75f;

		private static float willowispBaseRange = 16f;

		private static float willowispStackRange = 0f;

		private static float voidsentProcCoeff = 1f;

		private static float voidsentBaseDamage = 5.6f;

		private static float voidsentScaleFraction = 0.75f;

		private static float voidsentBaseRange = 24f;

		private static float voidsentStackRange = 0f;

		private static float voidsentBaseChance = 33f;

		private static float voidsentStackChance = 0f;

		private static float gasBaseDamage = 0.5f;

		private static float gasStackDamage = 0f;

		private static float gasBaseBurnDamage = 1f;

		private static float gasStackBurnDamage = 1f;

		private float discipleDevilorbProc = 0.4f;

		private float opinionDevilorbProc = 0.75f;

		public static bool useNkuhanaKnockbackSlow = false;

		public static bool useDiscipleKnockbackSlow = false;

		private float nkuhanaNewDamageMultiplier = 3.5f;

		private static float runaldBaseDamage = 6f;

		private static float runaldTotalDamage = 1f;

		private static float kjaroBaseDamage = 6f;

		private static float kjaroTotalDamage = 1f;

		private static string runaldTotal = Tools.ConvertDecimal(runaldTotalDamage);

		private static string kjaroTotal = Tools.ConvertDecimal(kjaroTotalDamage);

		public static float newtAltarChance = 0.3f;

		public static float deathMarkBonusDamage = 0.3f;

		private float elephantBuffDuration = 10f;

		private int elephantArmor = 200;

		public static float tarSlowAspdReduction = 0.3f;

		public static float kitSlowAspdReduction = 0.3f;

		public static float chronoSlowAspdReduction = 0.5f;

		public static float chillSlowAspdReduction = 0.6f;

		private float critHudDamageMul = 1f;

		private GameObject healPack = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/HealPack");

		private float toothDuration = 15f;

		private GameObject ammoPack = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/AmmoPack");

		private GameObject moneyPack = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/BonusMoneyPack");

		public static int minSpikes = 3;

		public static int maxSpikes = 4;

		public static int baseSpikesPerBuff = 2;

		public static int stackSpikesPerBuff = 1;

		public static float minDamageCoefficient = 5f;

		public static float releaseSpeed = 2f;

		public static float spikeDamageCoefficient = 0.3f;

		public static float spikeProcCoefficient = 1f;

		public static int shatterspleenBleedChance = 20;

		public static GameObject impBleedSpikePrefab;

		public static int rapFreeArmor = 2;

		public static int knurlFreeArmor = 15;

		public static int bucklerFreeArmor = 10;

		public static float voidBearNewMaxCooldown = 15f;

		public static float voidBearNewMinCooldown = 5f;

		public static float teddyNewMaxValue = 0.5f;

		public static float hoofSpeedBonusBase = 0.1f;

		public static float hoofSpeedBonusStack = 0.1f;

		public static float drinkSpeedBonusBase = 0.2f;

		public static float drinkSpeedBonusStack = 0.15f;

		public static float faradayMaxMoveSpeed = 1f;

		public static float faradayMaxJumpStrength = 1.5f;

		public static float faradayChargeIncreaseBase = 1.5f;

		public static float faradayChargeIncreaseStack = 0.5f;

		public static float faradayDamageBase = 8f;

		public static float faradayDamageStack = 5f;

		public static int faradayRequiredCharge = 34;

		public static int faradayMaxDischarge = 66;

		public static bool faradayPreventDoubleDischarge = true;

		public static float scytheBaseHeal = 0f;

		public static float scytheStackHeal = 5f;

		public static float monsterToothFlatHeal = 10f;

		public static float monsterToothPercentHeal = 0f;

		public static float medkitFlatHeal = 40f;

		public static float medkitPercentHeal = 0f;

		public static float notMovingRequirement = 0.1f;

		public static float fungusHealInterval = 0.125f;

		public const string guid = "com.RiskOfBrainrot.RiskierRain";

		public const string teamName = "RiskOfBrainrot";

		public const string modName = "RiskierRain";

		public const string version = "1.3.9";

		public static bool isAELoaded = Tools.isLoaded("com.Borbo.ArtificerExtended");

		public static bool isHBULoaded = Tools.isLoaded("com.Borbo.HuntressBuffULTIMATE");

		public static bool isScepterLoaded = Tools.isLoaded("com.DestroyedClone.AncientScepter");

		public static bool autosprintLoaded = Tools.isLoaded("com.johnedwa.RTAutoSprintEx");

		public static bool acridLungeLoaded = Tools.isLoaded("Withor.AcridBiteLunge");

		public static bool ucrLoaded = Tools.isLoaded("HIFU.UltimateCustomRun");

		public static string drizzleDesc = "Simplifies difficulty for players new to the game. Weeping and gnashing is replaced by laughter and tickles.<style=cStack>\n\n>Player Health Regeneration: <style=cIsHealing>+50%</style> \n>Difficulty Scaling: <style=cIsHealing>-50%</style> \n>Player Damage Reduction: <style=cIsHealing>+38%</style>";

		public static string rainstormDesc = "This is the way the game is meant to be played! Test your abilities and skills against formidable foes.<style=cStack>\n\n>Player Health Regeneration: +0% \n>Difficulty Scaling: +0% ";

		public static string monsoonDesc = "For hardcore players. Every bend introduces pain and horrors of the planet. You will die.<style=cStack>\n\n>Player Health Regeneration: <style=cIsHealth>-40%</style> \n>Difficulty Scaling: <style=cIsHealth>+50%</style>";

		private GameObject meatballNapalmPool;

		private static float faradayChargeIncreaseStackInverse => faradayChargeIncreaseStack / (1f + faradayChargeIncreaseStack);

		public static PluginInfo PInfo { get; private set; }

		public static string dropPrefabsPath => Assets.dropPrefabsPath;

		public static string iconsPath => Assets.iconsPath;

		public static string eliteMaterialsPath => Assets.eliteMaterialsPath;

		internal static ConfigFile CustomConfigFile { get; set; }

		public static ConfigEntry<bool> EnableConfig { get; set; }

		internal static float GetAmbientLevelBoost()
		{
			return DifficultyUtilsModule.GetAmbientLevelBoost();
		}

		private void FreezeTimeScalingOnFinalLevels()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			Run.ShouldUpdateRunStopwatch += new hook_ShouldUpdateRunStopwatch(ModifyShouldUpdateRunStopwatch);
		}

		private bool ModifyShouldUpdateRunStopwatch(orig_ShouldUpdateRunStopwatch orig, Run self)
		{
			bool flag = orig.Invoke(self);
			if (!flag)
			{
				return flag;
			}
			return !SceneCatalog.mostRecentSceneDef.isFinalStage;
		}

		private void ChangeDifficultyCoefficientCalculation()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			Run.ambientLevelCap = ambientLevelCap;
			Run.RecalculateDifficultyCoefficentInternal += new hook_RecalculateDifficultyCoefficentInternal(DifficultyCoefficientChanges);
			DirectorMoneyWave.Update += new Manipulator(DirectorCreditGainChanges);
			drizzleDesc = drizzleDesc + "\n>Starting Difficulty: <style=cIsHealing>Easy</style>" + $"\n>Max Enemy Level: <style=cIsHealing>{ambientLevelCapDrizzle - ambientLevelCap}</style> " + $"\n>{Tier2EliteName} Elites: <style=cIsHealing>Stage {Tier2EliteMinimumStageDrizzle}</style>" + "\n>Teleporter Visuals: <style=cIsHealing>+" + Tools.ConvertDecimal(easyTeleParticleRadius / normalTeleParticleRadius - 1f) + "</style> ";
			rainstormDesc = rainstormDesc + "\n>Starting Difficulty: Medium" + $"\n>{Tier2EliteName} Elites: Stage {Tier2EliteMinimumStageRainstorm}" + "\n>Teleporter Visuals: +" + Tools.ConvertDecimal(normalTeleParticleRadius / normalTeleParticleRadius - 1f) + " ";
			monsoonDesc = monsoonDesc + "\n>Starting Difficulty: <style=cIsHealth>Hard</style>" + $"\n>{Tier2EliteName} Elites: <style=cIsHealth>Stage {Tier2EliteMinimumStageMonsoon}</style>" + "\n>Teleporter Visuals: <style=cIsHealth>" + Tools.ConvertDecimal(1f - hardTeleParticleRadius / normalTeleParticleRadius) + "</style> ";
			RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(AddDifficultyStats));
		}

		private void AddDifficultyStats()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Expected I4, but got Unknown
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < 11; i++)
			{
				DifficultyIndex val = (DifficultyIndex)i;
				DifficultyDef difficultyDef = DifficultyCatalog.GetDifficultyDef(val);
				StartingDifficulty val2 = (StartingDifficulty)0;
				float num = 0f;
				float num2 = difficultyDef.scalingValue - 1f;
				int num3 = ambientLevelCap;
				int num4 = 5;
				float num5 = 1f;
				DifficultyIndex val3 = val;
				DifficultyIndex val4 = val3;
				switch ((int)val4)
				{
				case 0:
					val2 = (StartingDifficulty)0;
					num = drizzleDifficultyBoost;
					num4 = Tier2EliteMinimumStageDrizzle;
					num5 = easyTeleParticleRadius;
					num3 = ambientLevelCapDrizzle;
					break;
				case 1:
					val2 = (StartingDifficulty)3;
					num = rainstormDifficultyBoost;
					num4 = Tier2EliteMinimumStageRainstorm;
					num5 = normalTeleParticleRadius;
					break;
				case 2:
					val2 = (StartingDifficulty)6;
					num = monsoonDifficultyBoost;
					num4 = Tier2EliteMinimumStageMonsoon;
					num5 = hardTeleParticleRadius;
					break;
				default:
					val2 = (StartingDifficulty)6;
					num = monsoonDifficultyBoost;
					num4 = Tier2EliteMinimumStageMonsoon;
					num5 = hardTeleParticleRadius;
					if (val >= eclipseLevelVeryHard)
					{
						num = eclipseDifficultyBoost;
						num2 += 1f;
						val2 = (StartingDifficulty)9;
					}
					break;
				}
				MoreDifficultyStats moreDifficultyStats = DifficultyUtilsModule.GetMoreDifficultyStats(val);
				moreDifficultyStats.startingDifficultyDisplay = (float)val2;
				moreDifficultyStats.startingLevelBoost = num;
				moreDifficultyStats.startingDifficultyCoefficientBoost = num2;
				moreDifficultyStats.ambientLevelCap = num3;
				moreDifficultyStats.tier2EliteStage = num4;
				moreDifficultyStats.teleporterParticleRangeMultiplier = num5;
				DifficultyUtilsModule.difficultyCustomStats[val] = moreDifficultyStats;
			}
		}

		private void DirectorCreditGainChanges(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			float num5 = default(float);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num5)
			});
			int index = val.Index;
			val.Index = index - 1;
			val.Remove();
			val.Emit(OpCodes.Ldc_R4, 1f - playerSpawnRateFactor);
			float num4 = default(float);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num4)
			});
			index = val.Index;
			val.Index = index - 1;
			val.Remove();
			val.Emit(OpCodes.Ldc_R4, playerSpawnRateFactor);
			float num3 = default(float);
			int num2 = default(int);
			float num = default(float);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num3),
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num2),
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num)
			});
			index = val.Index;
			val.Index = index - 1;
			val.Remove();
			val.Emit(OpCodes.Ldc_R4, difficultySpawnRateFactor);
		}

		private void AmbientLevelChanges(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			int timeLoc = 2;
			int num = 2;
			float num5 = default(float);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[4]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref timeLoc),
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num5),
				(Instruction x) => ILPatternMatchingExt.MatchMul(x),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Mathf>(x, "Floor")
			});
			int index = val.Index;
			val.Index = index - 1;
			val.Emit(OpCodes.Ldc_R4, baseScalingMultiplier);
			val.Emit(OpCodes.Mul);
			float num4 = default(float);
			val.GotoNext((MoveType)0, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num4),
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<Run>(x, "stageClearCount")
			});
			val.Remove();
			val.Emit(OpCodes.Ldc_R4, difficultyIncreasePerStage);
			float num3 = default(float);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref timeLoc),
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num3),
				(Instruction x) => ILPatternMatchingExt.MatchMul(x)
			});
			val.Emit(OpCodes.Ldc_R4, baseScalingMultiplier);
			val.Emit(OpCodes.Mul);
			float num2 = default(float);
			val.GotoNext((MoveType)0, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num2),
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<Run>(x, "stageClearCount")
			});
			val.Remove();
			val.Emit(OpCodes.Ldc_R4, difficultyIncreasePerStage);
			val.GotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld<Run>(x, "ambientLevelCap")
			});
			val.EmitDelegate<Func<float, float>>((Func<float, float>)delegate(float levelIn)
			{
				float ambientLevelBoost = GetAmbientLevelBoost();
				return levelIn + ambientLevelBoost;
			});
		}

		private void DifficultyCoefficientChanges(orig_RecalculateDifficultyCoefficentInternal orig, Run self)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			float timeInMinutes = self.GetRunStopwatch() * (1f / 60f);
			int stageClearCount = self.stageClearCount;
			float playerBaseFactor;
			float difficultyCoefficient = GetDifficultyCoefficient(self, timeInMinutes, stageClearCount, out playerBaseFactor);
			float coefficientBoostForDifficulty = GetCoefficientBoostForDifficulty(self.selectedDifficulty);
			self.difficultyCoefficient = difficultyCoefficient;
			self.compensatedDifficultyCoefficient = difficultyCoefficient + coefficientBoostForDifficulty;
			self.oneOverCompensatedDifficultyCoefficientSquared = 1f / (self.compensatedDifficultyCoefficient * self.compensatedDifficultyCoefficient);
			self.ambientLevel = Mathf.Min(1f + GetAmbientLevelBoost() + 3f * (difficultyCoefficient - playerBaseFactor), (float)Run.ambientLevelCap);
			int ambientLevelFloor = self.ambientLevelFloor;
			self.ambientLevelFloor = Mathf.FloorToInt(self.ambientLevel);
			if (ambientLevelFloor != self.ambientLevelFloor && ambientLevelFloor != 0 && self.ambientLevelFloor > ambientLevelFloor)
			{
				self.OnAmbientLevelUp();
			}
		}

		public static float GetCoefficientBoostForDifficulty(DifficultyIndex difficulty)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			DifficultyDef difficultyDef = DifficultyCatalog.GetDifficultyDef(difficulty);
			float result = 0f;
			if (DifficultyUtilsModule.ValidateCachedDifficultyStats())
			{
				result = DifficultyUtilsModule.cachedDifficultyStats.startingDifficultyCoefficientBoost;
			}
			return result;
		}

		public static float GetScalingValueForDifficulty(DifficultyIndex difficulty)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			DifficultyDef difficultyDef = DifficultyCatalog.GetDifficultyDef(difficulty);
			return difficultyDef.scalingValue;
		}

		public static float GetDifficultyCoefficient(Run run, float timeInMinutes, int stageClearCount, out float playerBaseFactor)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			float scalingValueForDifficulty = GetScalingValueForDifficulty(run.selectedDifficulty);
			float num = 0.0506f * baseScalingMultiplier;
			float num2 = GetTimeDifficultyFactor(timeInMinutes, scalingValueForDifficulty);
			float num3 = GetStageDifficultyFactor(stageClearCount);
			playerBaseFactor = 1f + playerBaseDifficultyFactor * (float)(run.participatingPlayerCount - 1);
			float num4 = Mathf.Pow((float)run.participatingPlayerCount, playerScalingDifficultyFactor);
			float num5 = num * scalingValueForDifficulty * num4;
			return (playerBaseFactor + num5 * timeInMinutes) * num2 * num3;
			static float GetStageDifficultyFactor(int stageClearCount)
			{
				float num6 = Mathf.Pow(difficultyIncreasePerStage, (float)stageClearCount);
				int num7 = Mathf.FloorToInt((float)stageClearCount / 5f);
				if (stageClearCount % 5 <= 1 && Object.op_Implicit((Object)(object)Stage.instance) && SceneCatalog.GetSceneDefForCurrentScene().isFinalStage)
				{
					num7--;
				}
				float num8 = Mathf.Pow(difficultyIncreasePerLoop, (float)num7);
				return num6 * num8;
			}
			static float GetTimeDifficultyFactor(float timeInMinutes, float scalingValue)
			{
				return Mathf.Pow(difficultyIncreasePerMinuteBase + difficultyIncreasePerMinutePerDifficulty * scalingValue, timeInMinutes);
			}
		}

		private void MonsoonStatBoost()
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Expected O, but got Unknown
			monsoonDesc += "\n>Enemies gain <style=cIsHealth>unique scaling</style></style>";
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(MonsoonPlusStatBuffs2);
		}

		private void MonsoonPlusStatBuffs2(CharacterBody sender, StatHookEventArgs args)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Invalid comparison between Unknown and I4
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Invalid comparison between Unknown and I4
			DifficultyIndex selectedDifficulty = Run.instance.selectedDifficulty;
			float ambientLevelBoost = GetAmbientLevelBoost();
			if ((int)sender.teamComponent.teamIndex != 1 && (int)selectedDifficulty >= 2)
			{
				float num = sender.level - ambientLevelBoost;
				float num2 = Mathf.Clamp01(num / 200f);
				float num3 = ((sender.baseNameToken == "CLAYBRUISER_BODY_NAME" || sender.baseNameToken == "LUNARWISP_BODY_NAME" || sender.baseNameToken == "JELLYFISH_BODY_NAME") ? 2f : 4f);
				args.attackSpeedMultAdd += num2 * num3;
				if (sender.isChampion)
				{
					args.armorAdd += 3f * num;
				}
				else
				{
					args.moveSpeedMultAdd += num2 * 2f;
				}
			}
		}

		private void EclipseChanges()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Expected O, but got Unknown
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Expected O, but got Unknown
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Expected O, but got Unknown
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Expected O, but got Unknown
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Expected O, but got Unknown
			CharacterMaster.OnBodyStart += new Manipulator(RemoveEclipseEffect);
			GlobalEventManager.OnCharacterHitGroundServer += new Manipulator(RemoveEclipseEffect);
			HealthComponent.Heal += new Manipulator(RemoveEclipseEffect);
			DeathRewards.OnKilledServer += new Manipulator(RemoveEclipseEffect);
			HealthComponent.TakeDamageProcess += new Manipulator(RemoveEclipseEffect);
			CharacterBody.RecalculateStats += new Manipulator(RemoveEclipseStats);
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(EclipseStatBuffs);
			CharacterBody.RecalculateStats += new hook_RecalculateStats(EclipseCdr);
			RunArtifactManager.SetArtifactEnabled += new hook_SetArtifactEnabled(EclipseSpiteArtifact);
			HoldoutZoneController.DoUpdate += new Manipulator(EclipseHoldoutScale);
			HoldoutZoneController.Start += new hook_Start(EclipseHoldoutDischarge);
			string text = "\"You only celebrate in the light... because I allow it.\" \n\n";
			string text2 = "Starts at baseline Monsoon difficulty.<style=cSub>\n";
			string text3 = "</style>";
			LanguageAPI.Add("ECLIPSE_1_DESCRIPTION", text2 + eclipseOneDesc + text3);
			LanguageAPI.Add("ECLIPSE_2_DESCRIPTION", text2 + eclipseOneDesc + eclipseTwoDesc + text3);
			LanguageAPI.Add("ECLIPSE_3_DESCRIPTION", text2 + eclipseOneDesc + eclipseTwoDesc + eclipseThreeDesc + text3);
			LanguageAPI.Add("ECLIPSE_4_DESCRIPTION", text2 + eclipseOneDesc + eclipseTwoDesc + eclipseThreeDesc + eclipseFourDesc + text3);
			LanguageAPI.Add("ECLIPSE_5_DESCRIPTION", text2 + eclipseOneDesc + eclipseTwoDesc + eclipseThreeDesc + eclipseFourDesc + eclipseFiveDesc + text3);
			LanguageAPI.Add("ECLIPSE_6_DESCRIPTION", text2 + eclipseOneDesc + eclipseTwoDesc + eclipseThreeDesc + eclipseFourDesc + eclipseFiveDesc + eclipseSixDesc + text3);
			LanguageAPI.Add("ECLIPSE_7_DESCRIPTION", text2 + eclipseOneDesc + eclipseTwoDesc + eclipseThreeDesc + eclipseFourDesc + eclipseFiveDesc + eclipseSixDesc + eclipseSevenDesc + text3);
			LanguageAPI.Add("ECLIPSE_8_DESCRIPTION", text + text2 + eclipseOneDesc + eclipseTwoDesc + eclipseThreeDesc + eclipseFourDesc + eclipseFiveDesc + eclipseSixDesc + eclipseSevenDesc + eclipseEightDesc + text3);
		}

		private void EclipseCdr(orig_RecalculateStats orig, CharacterBody self)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Invalid comparison between Unknown and I4
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			DifficultyIndex selectedDifficulty = Run.instance.selectedDifficulty;
			if ((int)self.teamComponent.teamIndex != 1 && selectedDifficulty >= eclipseLevelEnemyCdr)
			{
				float cooldownScale = 1f - eclipseEnemyCdr;
				SkillLocator skillLocator = self.skillLocator;
				if ((Object)(object)skillLocator != (Object)null)
				{
					StatHooks.ApplyCooldownScale(skillLocator.primary, cooldownScale);
					StatHooks.ApplyCooldownScale(skillLocator.secondary, cooldownScale);
					StatHooks.ApplyCooldownScale(skillLocator.utility, cooldownScale);
					StatHooks.ApplyCooldownScale(skillLocator.special, cooldownScale);
				}
			}
		}

		private void RemoveEclipseStats(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty")
			});
			val.Emit(OpCodes.Pop);
			val.Emit(OpCodes.Ldc_I4, -1);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty")
			});
			val.Emit(OpCodes.Pop);
			val.Emit(OpCodes.Ldc_I4, -1);
		}

		private void RemoveEclipseEffect(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty")
			});
			val.Emit(OpCodes.Pop);
			val.Emit(OpCodes.Ldc_I4, -1);
		}

		private void EclipseHoldoutDischarge(orig_Start orig, HoldoutZoneController self)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			if (Run.instance.selectedDifficulty >= eclipseLevelHoldoutLoss)
			{
				self.dischargeRate = Mathf.Max(self.dischargeRate, eclipseHoldoutLossRate);
			}
			orig.Invoke(self);
		}

		private void EclipseHoldoutScale(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Expected I4, but got Unknown
			ILCursor val = new ILCursor(il);
			int num = 3;
			int num2 = default(int);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Run>(x, "get_selectedDifficulty"),
				(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, ref num2)
			});
			int index = val.Index;
			val.Index = index - 1;
			val.Remove();
			val.Emit(OpCodes.Ldc_I4, (int)eclipseLevelSmallHoldout);
		}

		private void EclipseSpiteArtifact(orig_SetArtifactEnabled orig, RunArtifactManager self, ArtifactDef artifactDef, bool newEnabled)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)Run.instance == (Object)null)
			{
				orig.Invoke(self, artifactDef, newEnabled);
				return;
			}
			if (Run.instance.selectedDifficulty >= eclipseLevelSpiteArtifact && (Object)(object)artifactDef == (Object)(object)Artifacts.bombArtifactDef)
			{
				newEnabled = true;
			}
			orig.Invoke(self, artifactDef, newEnabled);
		}

		private void EclipseStatBuffs(CharacterBody sender, Stat

SwanSongExtended.dll

Decompiled 2 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using BetterSoulCost;
using BossDropRework;
using EntityStates;
using EntityStates.AI.Walker;
using EntityStates.Bandit2;
using EntityStates.BrotherMonster.Weapon;
using EntityStates.Captain.Weapon;
using EntityStates.CaptainSupplyDrop;
using EntityStates.GrandParent;
using EntityStates.LaserTurbine;
using EntityStates.Mage.Weapon;
using EntityStates.Missions.BrotherEncounter;
using EntityStates.MoonElevator;
using EntityStates.NullifierMonster;
using EntityStates.TeleporterHealNovaController;
using HG;
using HG.BlendableTypes;
using HG.Reflection;
using HarmonyLib;
using IL.RoR2;
using IL.RoR2.Items;
using IL.RoR2.Orbs;
using KinematicCharacterController;
using MissileRework;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using MonoMod.RuntimeDetour;
using MoreStats;
using On.EntityStates;
using On.EntityStates.LaserTurbine;
using On.EntityStates.Missions.BrotherEncounter;
using On.EntityStates.TeleporterHealNovaController;
using On.RoR2;
using On.RoR2.Items;
using On.RoR2.Orbs;
using R2API;
using R2API.Utils;
using RainrotSharedUtils;
using RainrotSharedUtils.Components;
using RainrotSharedUtils.Difficulties;
using RainrotSharedUtils.Shelters;
using RainrotSharedUtils.Status;
using RoR2;
using RoR2.Achievements;
using RoR2.Artifacts;
using RoR2.Audio;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.EntitlementManagement;
using RoR2.ExpansionManagement;
using RoR2.Hologram;
using RoR2.Items;
using RoR2.Navigation;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using RoR2BepInExPack.GameAssetPaths;
using RoR2BepInExPack.GameAssetPaths.Version_1_39_0;
using RoR2BepInExPack.GameAssetPathsBetter;
using SwanSongExtended.Artifacts;
using SwanSongExtended.Characters;
using SwanSongExtended.Components;
using SwanSongExtended.Elites;
using SwanSongExtended.Equipment;
using SwanSongExtended.Equipment.Zapinator;
using SwanSongExtended.Interactables;
using SwanSongExtended.Items;
using SwanSongExtended.Modules;
using SwanSongExtended.Scavengers;
using SwanSongExtended.Skills;
using SwanSongExtended.States;
using SwanSongExtended.Storms;
using ThreeEyedGames;
using Unity;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.ResourceManagement.AsyncOperations;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: OptIn]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("SwanSongExtended")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("SwanSongExtended")]
[assembly: AssemblyTitle("SwanSongExtended")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
namespace RiskierRainContent.Interactables
{
	internal static class CombatEncounterHelper
	{
		public enum CustomDirectorType
		{
			GalleryDirector = 1,
			ConstructDirector
		}

		public static GameObject MethodOne(PurchaseInteraction purchaseInteraction, Interactor activator, int credits, CustomDirectorType directorType)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Expected O, but got Unknown
			Vector3 val = Vector3.zero;
			Quaternion rotation = Quaternion.identity;
			Transform transform = ((Component)purchaseInteraction).gameObject.transform;
			if (Object.op_Implicit((Object)(object)transform))
			{
				val = transform.position;
				rotation = transform.rotation;
			}
			GameObject val2 = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Encounters/MonstersOnShrineUseEncounter");
			if ((Object)(object)val2 == (Object)null)
			{
				return null;
			}
			GameObject val3 = Object.Instantiate<GameObject>(val2, val, Quaternion.identity);
			NetworkServer.Spawn(val3);
			CombatDirector component = val3.GetComponent<CombatDirector>();
			ParseDirectorType(((Component)component).gameObject, directorType);
			if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)Stage.instance))
			{
				return null;
			}
			float num = (float)credits * Stage.instance.entryDifficultyCoefficient;
			DirectorCard val4 = component.SelectMonsterCardForCombatShrine(num);
			if (val4 != null)
			{
				component.CombatShrineActivation(activator, num, val4);
				EffectData val5 = new EffectData
				{
					origin = val,
					rotation = rotation
				};
				if (directorType == CustomDirectorType.ConstructDirector)
				{
					GameObject val6 = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/MonstersOnShrineUse");
					EffectManager.SpawnEffect(val6, val5, true);
				}
			}
			return val3;
		}

		public static void ParseDirectorType(GameObject obj, CustomDirectorType value)
		{
			switch (value)
			{
			case CustomDirectorType.GalleryDirector:
				obj.AddComponent<GalleryDirector>();
				break;
			case CustomDirectorType.ConstructDirector:
				obj.AddComponent<ConstructDirector>();
				break;
			default:
				obj.AddComponent<GalleryDirector>();
				break;
			}
		}
	}
	internal class GalleryDirector : MonoBehaviour
	{
	}
	internal class ConstructDirector : MonoBehaviour
	{
	}
}
namespace SwanSongExtended
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[R2APISubmoduleDependency(new string[] { "LanguageAPI", "PrefabAPI", "RecalculateStatsAPI", "DotAPI" })]
	[BepInPlugin("com.RiskOfBrainrot.SwanSongExtended", "SwanSongExtended", "0.1.0")]
	public class SwanSongPlugin : BaseUnityPlugin
	{
		public delegate void orig_idc(LaserTurbineController self);

		private class ResDiscContext
		{
			public LaserTurbineController laserTurbineController;

			public ResDiscContext(LaserTurbineController passive)
			{
				laserTurbineController = passive;
			}
		}

		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static Action<AsyncOperationHandle<GameObject>> <>9__15_0;

			public static Action<AsyncOperationHandle<GameObject>> <>9__15_1;

			public static Action<AsyncOperationHandle<GameObject>> <>9__15_2;

			public static Action<AsyncOperationHandle<GameObject>> <>9__15_3;

			public static Func<Instruction, bool> <>9__25_0;

			public static Func<Instruction, bool> <>9__45_0;

			public static Func<Instruction, bool> <>9__45_1;

			public static Func<Instruction, bool> <>9__46_0;

			public static Action<PayCostContext> <>9__48_0;

			public static Func<Instruction, bool> <>9__54_0;

			public static Func<Inventory, int> <>9__54_1;

			public static Func<Instruction, bool> <>9__64_0;

			public static Func<int, int> <>9__64_1;

			public static Func<Instruction, bool> <>9__66_0;

			public static Func<Instruction, bool> <>9__66_1;

			public static Func<Instruction, bool> <>9__66_2;

			public static Func<Instruction, bool> <>9__67_0;

			public static Func<float, float> <>9__67_1;

			public static Func<Instruction, bool> <>9__74_0;

			public static Func<int, EquipmentSlot, int> <>9__74_1;

			public static Func<Instruction, bool> <>9__75_0;

			public static Func<Instruction, bool> <>9__75_1;

			public static Func<Instruction, bool> <>9__75_2;

			public static Func<int, Inventory, int> <>9__75_3;

			public static Func<Instruction, bool> <>9__79_0;

			public static Func<Instruction, bool> <>9__79_1;

			public static Func<Instruction, bool> <>9__82_0;

			public static Func<Instruction, bool> <>9__82_1;

			public static Action<EquipmentSlot> <>9__82_2;

			public static Func<Instruction, bool> <>9__84_0;

			public static Func<Instruction, bool> <>9__84_1;

			public static Func<Instruction, bool> <>9__92_0;

			public static Func<Instruction, bool> <>9__92_1;

			public static Func<Instruction, bool> <>9__94_0;

			public static Func<Instruction, bool> <>9__94_1;

			public static Func<Instruction, bool> <>9__94_2;

			public static Func<Instruction, bool> <>9__94_3;

			public static Func<int, int> <>9__94_4;

			public static Func<Instruction, bool> <>9__95_0;

			public static Func<Instruction, bool> <>9__95_1;

			public static Func<Instruction, bool> <>9__95_3;

			public static Func<Instruction, bool> <>9__95_6;

			public static Func<Instruction, bool> <>9__95_7;

			public static Func<Instruction, bool> <>9__95_8;

			public static Func<float, int, float> <>9__95_11;

			public static Func<int, int, CharacterBody, int> <>9__95_12;

			public static Func<Instruction, bool> <>9__103_0;

			public static Func<Instruction, bool> <>9__103_1;

			public static Func<Instruction, bool> <>9__109_0;

			public static Func<Instruction, bool> <>9__109_1;

			public static Func<bool, DamageInfo, bool> <>9__109_2;

			public static Func<Instruction, bool> <>9__116_0;

			public static hook_TrackBeadExperience <>9__121_1;

			public static Func<Instruction, bool> <>9__125_0;

			public static Func<Instruction, bool> <>9__125_1;

			public static Func<Instruction, bool> <>9__125_4;

			public static Func<Instruction, bool> <>9__125_5;

			public static Action<int, CharacterBody> <>9__125_7;

			public static Func<Instruction, bool> <>9__125_8;

			public static Func<Instruction, bool> <>9__125_9;

			public static Func<int, int> <>9__125_10;

			public static Func<Instruction, bool> <>9__125_17;

			public static Func<Instruction, bool> <>9__125_18;

			public static Func<Instruction, bool> <>9__139_0;

			public static Func<HealthComponent, LightningOrb, HealthComponent> <>9__139_3;

			public static Func<Instruction, bool> <>9__140_0;

			public static Func<Instruction, bool> <>9__140_1;

			public static Func<Instruction, bool> <>9__140_2;

			public static Func<Instruction, bool> <>9__140_3;

			public static Func<Instruction, bool> <>9__140_4;

			public static Func<Instruction, bool> <>9__140_5;

			public static Func<Instruction, bool> <>9__140_6;

			public static Func<Instruction, bool> <>9__140_8;

			public static Func<Instruction, bool> <>9__140_9;

			public static Func<Instruction, bool> <>9__140_10;

			public static Func<Instruction, bool> <>9__140_11;

			public static Func<Instruction, bool> <>9__140_12;

			public static Action<CraftableDef> <>9__225_0;

			internal void <MakePillarsFun>b__15_0(AsyncOperationHandle<GameObject> ctx)
			{
				<MakePillarsFun>g__AddPillarItemDrop|15_4(ctx.Result, PillarItemDropper.PillarType.Blood);
			}

			internal void <MakePillarsFun>b__15_1(AsyncOperationHandle<GameObject> ctx)
			{
				<MakePillarsFun>g__AddPillarItemDrop|15_4(ctx.Result, PillarItemDropper.PillarType.Design);
			}

			internal void <MakePillarsFun>b__15_2(AsyncOperationHandle<GameObject> ctx)
			{
				<MakePillarsFun>g__AddPillarItemDrop|15_4(ctx.Result, PillarItemDropper.PillarType.Mass);
			}

			internal void <MakePillarsFun>b__15_3(AsyncOperationHandle<GameObject> ctx)
			{
				<MakePillarsFun>g__AddPillarItemDrop|15_4(ctx.Result, PillarItemDropper.PillarType.Soul);
			}

			internal bool <RemoveAegisOverheal>b__25_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "barrierOnOverHeal");
			}

			internal bool <RemoveCrownReward>b__45_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "GoldOnHit");
			}

			internal bool <RemoveCrownReward>b__45_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <RemoveCrownPenalty>b__46_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "goldOnHit");
			}

			internal void <PatchMoneyCostForBrittleCrown>b__48_0(PayCostContext ctx)
			{
				CharacterBody activatorBody = ctx.activatorBody;
				if (Object.op_Implicit((Object)(object)activatorBody) && Object.op_Implicit((Object)(object)ctx.activatorMaster) && ctx.activatorMaster.money < ctx.cost)
				{
					ctx.cost = 0;
				}
			}

			internal bool <FreezeCard>b__54_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "get_currentEquipmentIndex");
			}

			internal int <FreezeCard>b__54_1(Inventory inv)
			{
				return -1;
			}

			internal bool <FoconUpdate>b__64_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "cap");
			}

			internal int <FoconUpdate>b__64_1(int cap)
			{
				return foconMaxStack;
			}

			internal bool <FoconApplyRadius>b__66_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "convergenceRadiusDivisor");
			}

			internal bool <FoconApplyRadius>b__66_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "convergenceRadiusDivisor");
			}

			internal bool <FoconApplyRadius>b__66_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchStindR4(x);
			}

			internal bool <FoconApplyRate>b__67_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "convergenceChargeRateBonus");
			}

			internal float <FoconApplyRate>b__67_1(float chargeBonus)
			{
				return foconChargeBonus;
			}

			internal bool <AllowGestureUndercast>b__74_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<EquipmentSlot>(x, "get_stock");
			}

			internal int <AllowGestureUndercast>b__74_1(int stock, EquipmentSlot slot)
			{
				if (stock > 0)
				{
					return stock;
				}
				if (slot.inventory.GetItemCountEffective(Items.AutoCastEquipment) > 0)
				{
					return 1;
				}
				return 0;
			}

			internal bool <FixMaxStock>b__75_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "EquipmentMagazine");
			}

			internal bool <FixMaxStock>b__75_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <FixMaxStock>b__75_2(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchStloc(x, ref num);
			}

			internal int <FixMaxStock>b__75_3(int stock, Inventory inv)
			{
				stock += GetGestureStockFromInventory(inv);
				return stock;
			}

			internal bool <RemoveGestureCdr>b__79_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "AutoCastEquipment");
			}

			internal bool <RemoveGestureCdr>b__79_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <AddPreonAccumulatorBreak>b__82_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcR4(x, 0f);
			}

			internal bool <AddPreonAccumulatorBreak>b__82_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld<EquipmentSlot>(x, "bfgChargeTimer");
			}

			internal void <AddPreonAccumulatorBreak>b__82_2(EquipmentSlot self)
			{
				TryGestureEquipmentBreak(self);
			}

			internal bool <RemoveGestureAutocast>b__84_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "AutoCastEquipment");
			}

			internal bool <RemoveGestureAutocast>b__84_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <RevokeHappiestMaskRights>b__92_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "GhostOnKill");
			}

			internal bool <RevokeHappiestMaskRights>b__92_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <ChangeMoveSpeed>b__94_0(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <ChangeMoveSpeed>b__94_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdarg(x, 0);
			}

			internal bool <ChangeMoveSpeed>b__94_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Buffs", "KillMoveSpeed");
			}

			internal bool <ChangeMoveSpeed>b__94_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "GetBuffCount");
			}

			internal int <ChangeMoveSpeed>b__94_4(int buffCount)
			{
				if (buffCount > 0)
				{
					return 1;
				}
				return 0;
			}

			internal bool <ChangeDuration>b__95_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "MoveSpeedOnKill");
			}

			internal bool <ChangeDuration>b__95_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <ChangeDuration>b__95_3(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcI4(x, 5);
			}

			internal bool <ChangeDuration>b__95_6(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Buffs", "KillMoveSpeed");
			}

			internal bool <ChangeDuration>b__95_7(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "ClearTimedBuffs");
			}

			internal bool <ChangeDuration>b__95_8(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "AddTimedBuff");
			}

			internal float <ChangeDuration>b__95_11(float baseBuffDuration, int iterator)
			{
				return iterator + 1;
			}

			internal int <ChangeDuration>b__95_12(int vanillaBuffCount, int itemCount, CharacterBody attackerBody)
			{
				if (itemCount > 25)
				{
					return itemCount;
				}
				int buffCount = attackerBody.GetBuffCount(Buffs.KillMoveSpeed);
				return Mathf.Min(25, buffCount + itemCount);
			}

			internal bool <RevokeScopeRights>b__103_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "CritDamage");
			}

			internal bool <RevokeScopeRights>b__103_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective");
			}

			internal bool <FuckLeechingSeed>b__109_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcI4(x, 6);
			}

			internal bool <FuckLeechingSeed>b__109_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.ProcChainMask", "HasProc");
			}

			internal bool <FuckLeechingSeed>b__109_2(bool cantProc, DamageInfo damageInfo)
			{
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_001e: Invalid comparison between Unknown and I4
				return cantProc || (!((DamageTypeCombo)(ref damageInfo.damageType)).IsDamageSourceSkillBased && (int)damageInfo.damageType.damageSource != 64);
			}

			internal bool <FuckPlanula>b__116_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "parentEgg");
			}

			internal void <PrayerBeadsRework>b__121_1(orig_TrackBeadExperience orig, CharacterMaster self, ulong idk)
			{
			}

			internal bool <ChangeBeadAppliedStats>b__125_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "ExtraStatsOnLevelUp");
			}

			internal bool <ChangeBeadAppliedStats>b__125_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountPermanent");
			}

			internal bool <ChangeBeadAppliedStats>b__125_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdarg(x, 0);
			}

			internal bool <ChangeBeadAppliedStats>b__125_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<CharacterBody>(x, "extraStatsOnLevelUpCount_CachedLastApplied");
			}

			internal void <ChangeBeadAppliedStats>b__125_7(int itemCount, CharacterBody self)
			{
				//IL_0067: Unknown result type (might be due to invalid IL or missing references)
				int num = self.extraStatsOnLevelUpCount_CachedLastApplied - itemCount;
				self.extraStatsOnLevelUpCount_CachedLastApplied = itemCount;
				Inventory inventory = self.inventory;
				inventory.beadAppliedHealth += (float)num;
				Inventory inventory2 = self.inventory;
				inventory2.beadAppliedShield += (float)num;
				Inventory inventory3 = self.inventory;
				inventory3.beadAppliedRegen += (float)num;
				Inventory inventory4 = self.inventory;
				inventory4.beadAppliedDamage += (float)num;
				self.SetBuffCount(Buffs.ExtraStatsOnLevelUpBuff.buffIndex, (int)self.inventory.beadAppliedHealth);
			}

			internal bool <ChangeBeadAppliedStats>b__125_8(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "ExtraStatsOnLevelUpBuff");
			}

			internal bool <ChangeBeadAppliedStats>b__125_9(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "GetBuffCount");
			}

			internal int <ChangeBeadAppliedStats>b__125_10(int buffCount)
			{
				return 0;
			}

			internal bool <ChangeBeadAppliedStats>b__125_17(Instruction x)
			{
				float num = default(float);
				return ILPatternMatchingExt.MatchLdcR4(x, ref num);
			}

			internal bool <ChangeBeadAppliedStats>b__125_18(Instruction x)
			{
				ILLabel val = default(ILLabel);
				return ILPatternMatchingExt.MatchBleUn(x, ref val);
			}

			internal bool <RazorwireArrival>b__139_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<HurtBox>(x, "healthComponent");
			}

			internal HealthComponent <RazorwireArrival>b__139_3(HealthComponent hc, LightningOrb orb)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Invalid comparison between Unknown and I4
				if ((int)orb.lightningType == 6 && (Object)(object)hc != (Object)null)
				{
					for (int i = 0; (float)i < orb.procCoefficient; i++)
					{
						DotController.InflictDot(((Component)hc).gameObject, orb.attacker, hc.body.mainHurtBox, (DotIndex)0, razorwireBleedDuration, orb.damageValue, (uint?)null);
					}
					return null;
				}
				return hc;
			}

			internal bool <RazorwireBegin>b__140_0(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdflda<HealthComponent>(x, "itemCounts");
			}

			internal bool <RazorwireBegin>b__140_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "thorns");
			}

			internal bool <RazorwireBegin>b__140_2(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdcI4(x, ref num);
			}

			internal bool <RazorwireBegin>b__140_3(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdcI4(x, ref num);
			}

			internal bool <RazorwireBegin>b__140_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdflda<HealthComponent>(x, "itemCounts");
			}

			internal bool <RazorwireBegin>b__140_5(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "thorns");
			}

			internal bool <RazorwireBegin>b__140_6(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcI4(x, 0);
			}

			internal bool <RazorwireBegin>b__140_8(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdflda<HealthComponent>(x, "itemCounts");
			}

			internal bool <RazorwireBegin>b__140_9(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "thorns");
			}

			internal bool <RazorwireBegin>b__140_10(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdcI4(x, ref num);
			}

			internal bool <RazorwireBegin>b__140_11(Instruction x)
			{
				int num = default(int);
				return ILPatternMatchingExt.MatchLdcI4(x, ref num);
			}

			internal bool <RazorwireBegin>b__140_12(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallOrCallvirt<OrbManager>(x, "AddOrb");
			}

			internal void <RemoveCraftingRecipe>b__225_0(CraftableDef craftableDef)
			{
				craftableDef.recipes = (Recipe[])(object)new Recipe[0];
			}
		}

		public static int ignitionTankBurnChance = 15;

		public float ignitionBurnDamage = 2f;

		public float ignitionBurnDuration = 2f;

		private bool shouldIgnitionDamageAndDurationCompound = false;

		public static int stacheBurnChance = 25;

		public static int brandBurnChance = 30;

		public static float pillarDropOffset = 2.5f;

		public static float pillarDropForce = 20f;

		public static int baseRewardCount = 1;

		public static bool scaleRewardsByPlayerCount = true;

		public static float _aegisBarrierFlat = 40f;

		public static float _aegisBarrierPercent = 10f;

		public static BuffDef aegisDecayBuff;

		public static int brittleCrownStealCountBase = 2;

		public static int brittleCrownStealCountStack = 1;

		public static float crownCommonStealSoulCost = 0.25f;

		public static float crownUncommonStealSoulCost = 0.5f;

		public static float crownRareStealSoulCost = 0.8f;

		private string common = Tools.ConvertDecimal(crownCommonStealSoulCost);

		private string uncommon = Tools.ConvertDecimal(crownUncommonStealSoulCost);

		private string rare = Tools.ConvertDecimal(crownRareStealSoulCost);

		public static float cooldown = 90f;

		public static float secondsPerCost = 0.5f;

		public static float foconMinRadius = 8f;

		public static float foconRadiusMultiplier = 0.5f;

		public static float foconChargeBonus = 1f;

		public static int foconMaxStack = 5;

		public static float gestureEquipBreakChance = 40f;

		public static int gestureStockBase = 4;

		public static int gestureStockStack = 2;

		public static float gestureCdiBase = 1f;

		public static float gestureCdiStack = 0.5f;

		public static float hauntExecutionThreshold = 0.25f;

		private float ghostSpawnChanceOnExecute = 100f;

		private float ghostDurationPerStack = 6.66f;

		public int scopeBaseCrit = 5;

		public int scopeStackCrit = 0;

		public int scopeBaseStationaryCrit = 40;

		public int scopeStackStationaryCrit = 0;

		public static ItemDef seedItemDef;

		public static float seedRegenDurationBase = 0.25f;

		public static float seedRegenDurationStack = 0.25f;

		public static float sunDurationBase = 10f;

		public static float sunDurationStack = 5f;

		public static float beadsPermanentStatBonus = 0.07f;

		private static float razorwireArmorBase = 8f;

		private static float razorwireArmorStack = 8f;

		private static float razorwireRangeBase = 40f;

		private static float razorwireRangeStack = 0f;

		private static float razorwireTargetsBase = 5f;

		private static float razorwireTargetsStack = 2f;

		private static float razorwireBleedDuration = 5f;

		private static float razorwireDamage = 3.6f;

		private static float razorwireProcCoeff = 0.2f;

		private static float razorwireCooldown = 1f;

		public static GameObject laserTurbineControllerPrefab;

		private readonly Dictionary<EntityState, ResDiscContext> resDiscStateContext = new Dictionary<EntityState, ResDiscContext>();

		public static SpawnCard exploderCard = Resources.Load<SpawnCard>("spawncards/characterspawncards/cscLunarExploder");

		private List<DirectorCard> exploderCards = new List<DirectorCard>();

		public static ExploderDirector exploderDirector;

		internal static float phaseTwoRate = 0f;

		internal static float phaseThreeRate = 1f;

		public const string guid = "com.RiskOfBrainrot.SwanSongExtended";

		public const string teamName = "RiskOfBrainrot";

		public const string modName = "SwanSongExtended";

		public const string version = "0.1.0";

		public const string expansionName = "Swan Song";

		public const string expansionName2 = "Secrets of the Scug";

		public const string expansionToken = "EXPANSION2R4R";

		public const string expansionToken2 = "EXPANSIONSOTS";

		public const string DEVELOPER_PREFIX = "FRUIT";

		public static SwanSongPlugin instance;

		public static ExpansionDef expansionDefSS2;

		public static ExpansionDef expansionDefSOTS;

		public const string iconsPath = "";

		private BuffDef brittleCrownBuff => CommonAssets.brittleCrownCursePurchase;

		private static float minSpin => LaserTurbineController.minSpin;

		private static float maxSpin => LaserTurbineController.maxSpin;

		private static float spinPerKill => LaserTurbineController.spinGeneratedOnKill;

		private static float spinDecayRate => LaserTurbineController.spinDecayPerSecondAfterRefresh;

		private GameObject meatballNapalmPool => CommonAssets.meatballNapalmPool;

		public static AssetBundle mainAssetBundle => CommonAssets.mainAssetBundle;

		public static AssetBundle orangeAssetBundle => CommonAssets.orangeAssetBundle;

		public static AssetBundle retierAssetBundle => CommonAssets.retierAssetBundle;

		public static bool iabMissilesLoaded => ModLoaded("com.HouseOfFruits.IAmBecomeMissiles");

		public static bool isAELoaded => ModLoaded("com.Borbo.ArtificerExtended");

		public static bool is2R4RLoaded => ModLoaded("com.HouseOfFruits.RiskierRain");

		public static bool isHBULoaded => ModLoaded("com.Borbo.HuntressBuffULTIMATE");

		public static bool isScepterLoaded => ModLoaded("com.DestroyedClone.AncientScepter");

		public static bool autosprintLoaded => ModLoaded("com.johnedwa.RTAutoSprintEx");

		public static bool acridLungeLoaded => ModLoaded("Withor.AcridBiteLunge");

		public static bool ucrLoaded => ModLoaded("HIFU.UltimateCustomRun");

		private void BurnReworks()
		{
			IgnitionTankRework();
		}

		private void IgnitionTankRework()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			StatHooks.GetMoreStatCoefficients += new MoreStatHookEventHandler(IgniTankBurnChance);
			StrengthenBurnUtils.CheckDotForUpgrade += new hook_CheckDotForUpgrade(OverrideIgnitionBurn);
			LanguageAPI.Add("ITEM_STRENGTHENBURN_PICKUP", "Your ignite effects deal triple damage.");
			LanguageAPI.Add("ITEM_STRENGTHENBURN_DESC", $"Gain <style=cIsDamage>{ignitionTankBurnChance}% ignite chance</style>. " + "All ignition effects deal <style=cIsDamage>+" + Tools.ConvertDecimal(ignitionBurnDamage) + "</style> <style=cStack>(+" + Tools.ConvertDecimal(ignitionBurnDamage) + " per stack)</style> more damage and last <style=cIsUtility>+" + Tools.ConvertDecimal(ignitionBurnDuration) + "</style> <style=cStack>(+" + Tools.ConvertDecimal(ignitionBurnDuration) + " per stack)</style> longer.");
		}

		private void IgniTankBurnChance(CharacterBody sender, MoreStatHookEventArgs args)
		{
			Inventory inventory = sender.inventory;
			if (Object.op_Implicit((Object)(object)inventory) && inventory.GetItemCountEffective(Items.StrengthenBurn) > 0)
			{
				args.burnChanceOnHit += (float)ignitionTankBurnChance;
			}
		}

		private void OverrideIgnitionBurn(orig_CheckDotForUpgrade orig, Inventory inventory, ref InflictDotInfo dotInfo)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Invalid comparison between Unknown and I4
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			if ((int)dotInfo.dotIndex != 1 && (int)dotInfo.dotIndex != 2)
			{
				return;
			}
			int itemCountEffective = inventory.GetItemCountEffective(Items.StrengthenBurn);
			if (itemCountEffective > 0)
			{
				dotInfo.preUpgradeDotIndex = dotInfo.dotIndex;
				dotInfo.dotIndex = (DotIndex)7;
				float num = 1f + ignitionBurnDamage * (float)itemCountEffective;
				float num2 = 1f + ignitionBurnDuration * (float)itemCountEffective;
				if (shouldIgnitionDamageAndDurationCompound)
				{
					dotInfo.totalDamage *= num * num2;
					dotInfo.damageMultiplier *= num;
				}
				else
				{
					dotInfo.totalDamage *= num;
					dotInfo.damageMultiplier *= num / num2;
				}
			}
		}

		public static int GetBurnCount(CharacterBody victimBody)
		{
			return victimBody.GetBuffCount(Buffs.OnFire) + victimBody.GetBuffCount(Buffs.StrongerBurn);
		}

		private void MakePillarsFun()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			MoonBatteryMissionController.Awake += new hook_Awake(ReduceRequiredPillars);
			AsyncOperationHandle<GameObject> val = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_moon2.MoonBatteryBlood_prefab);
			val.Completed += delegate(AsyncOperationHandle<GameObject> ctx)
			{
				AddPillarItemDrop(ctx.Result, PillarItemDropper.PillarType.Blood);
			};
			val = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_moon2.MoonBatteryDesign_prefab);
			val.Completed += delegate(AsyncOperationHandle<GameObject> ctx)
			{
				AddPillarItemDrop(ctx.Result, PillarItemDropper.PillarType.Design);
			};
			val = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_moon2.MoonBatteryMass_prefab);
			val.Completed += delegate(AsyncOperationHandle<GameObject> ctx)
			{
				AddPillarItemDrop(ctx.Result, PillarItemDropper.PillarType.Mass);
			};
			val = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_moon2.MoonBatterySoul_prefab);
			val.Completed += delegate(AsyncOperationHandle<GameObject> ctx)
			{
				AddPillarItemDrop(ctx.Result, PillarItemDropper.PillarType.Soul);
			};
			static void AddPillarItemDrop(GameObject pillarPrefab, PillarItemDropper.PillarType pillarType)
			{
				PillarItemDropper pillarItemDropper = pillarPrefab.AddComponent<PillarItemDropper>();
				pillarItemDropper.pillarType = pillarType;
			}
		}

		private void ReduceRequiredPillars(orig_Awake orig, MoonBatteryMissionController self)
		{
			orig.Invoke(self);
			self._numRequiredBatteries = 2;
			GameObject[] moonBatteries = self.moonBatteries;
			foreach (GameObject val in moonBatteries)
			{
				PillarItemDropper pillarItemDropper = val.GetComponent<PillarItemDropper>();
				if (!Object.op_Implicit((Object)(object)pillarItemDropper))
				{
					pillarItemDropper = val.AddComponent<PillarItemDropper>();
					PillarItemDropper.PillarType pillarType = PillarItemDropper.PillarType.None;
					string name = ((Object)val).name;
					switch (name.Substring(11, 4))
					{
					case "Mass":
						pillarType = PillarItemDropper.PillarType.Mass;
						break;
					case "Desi":
						pillarType = PillarItemDropper.PillarType.Design;
						break;
					case "Bloo":
						pillarType = PillarItemDropper.PillarType.Blood;
						break;
					case "Soul":
						pillarType = PillarItemDropper.PillarType.Soul;
						break;
					}
					pillarItemDropper.pillarType = pillarType;
				}
				pillarItemDropper.shouldDropItem = true;
			}
		}

		private void PillarsDropItems(orig_OnBatteryCharged orig, MoonBatteryMissionController self, HoldoutZoneController holdoutZone)
		{
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Expected O, but got Unknown
			int participatingPlayerCount = Run.instance.participatingPlayerCount;
			if (participatingPlayerCount != 0)
			{
				DropPillarItemFromHoldout(holdoutZone, participatingPlayerCount);
			}
			self.Network_numChargedBatteries = self._numChargedBatteries + 1;
			if (self._numChargedBatteries < self._numRequiredBatteries || !NetworkServer.active)
			{
				return;
			}
			for (int i = 0; i < self.batteryHoldoutZones.Length; i++)
			{
				if (((Behaviour)self.batteryHoldoutZones[i]).enabled)
				{
					self.batteryHoldoutZones[i].FullyChargeHoldoutZone();
					((UnityEvent<HoldoutZoneController>)(object)self.batteryHoldoutZones[i].onCharged).RemoveListener((UnityAction<HoldoutZoneController>)self.OnBatteryCharged);
				}
			}
			for (int j = 0; j < self.elevatorStateMachines.Length; j++)
			{
				self.elevatorStateMachines[j].SetNextState((EntityState)new InactiveToReady());
			}
		}

		public static void DropPillarItemFromHoldout(HoldoutZoneController holdoutZone)
		{
			Log.Warning(((Object)((Component)holdoutZone).gameObject).name + "3");
			DropPillarItemFromHoldout(holdoutZone, Object.op_Implicit((Object)(object)Run.instance) ? Run.instance.participatingPlayerCount : 0);
		}

		public static void DropPillarItemFromHoldout(HoldoutZoneController holdoutZone, int participatingPlayerCount)
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			Log.Warning(((Object)((Component)holdoutZone).gameObject).name + "4");
			if (participatingPlayerCount == 0)
			{
				return;
			}
			Vector3 val = ((Component)holdoutZone).gameObject.transform.position + Vector3.up * pillarDropOffset;
			PickupIndex pickupIndexFromPillarType = GetPickupIndexFromPillarType(((Component)holdoutZone).gameObject);
			if (pickupIndexFromPillarType != PickupIndex.none)
			{
				Log.Warning(((Object)((Component)holdoutZone).gameObject).name + "5");
				int num = baseRewardCount;
				if (scaleRewardsByPlayerCount)
				{
					num *= participatingPlayerCount;
				}
				float num2 = 360f / (float)num;
				Vector3 val2 = Quaternion.AngleAxis((float)Random.Range(0, 360), Vector3.up) * (Vector3.up * pillarDropForce + Vector3.forward * 5f);
				Quaternion val3 = Quaternion.AngleAxis(num2, Vector3.up);
				int num3 = 0;
				while (num3 < num)
				{
					Log.Warning(((Object)((Component)holdoutZone).gameObject).name + "6");
					PickupDropletController.CreatePickupDroplet(new UniquePickup(pickupIndexFromPillarType), val, val2, false);
					num3++;
					val2 = val3 * val2;
				}
			}
		}

		public static PickupIndex GetPickupIndexFromPillarType(GameObject pillar)
		{
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			ItemBase itemBase = null;
			string name = ((Object)pillar).name;
			switch (name.Substring(11, 4))
			{
			case "Mass":
				itemBase = ItemBase<MassAnomaly>.instance;
				break;
			case "Desi":
				itemBase = ItemBase<DesignAnomaly>.instance;
				break;
			case "Bloo":
				itemBase = ItemBase<BloodAnomaly>.instance;
				break;
			case "Soul":
				itemBase = ItemBase<SoulAnomaly>.instance;
				break;
			}
			if (itemBase != null)
			{
				ItemIndex itemIndex = itemBase.ItemsDef.itemIndex;
				return PickupCatalog.FindPickupIndex(itemIndex);
			}
			Debug.Log((object)"No pickup index found!");
			return PickupIndex.none;
		}

		public void ReworkAegis()
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			CreateBuff();
			Hooks();
			HealthComponent.Heal += new Manipulator(RemoveAegisOverheal);
			LanguageAPI.Add("ITEM_BARRIERONOVERHEAL_PICKUP", "Gain barrier on any interaction. While out of danger, barrier stops decaying.");
			LanguageAPI.Add("ITEM_BARRIERONOVERHEAL_DESC", "Using any interactable grants a <style=cIsHealing>temporary barrier</style> " + $"for <style=cIsHealing>{_aegisBarrierFlat} health</style> <style=cStack>(+{_aegisBarrierFlat} per stack)</style> " + "plus an additional " + $"<style=cIsHealing>{_aegisBarrierPercent}%</style> <style=cStack>(+{_aegisBarrierPercent}% per stack)</style> " + "of <style=cIsHealing>maximum health</style>. While outside of danger, <style=cIsUtility>barrier will not decay</style>.");
		}

		private void RemoveAegisOverheal(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "barrierOnOverHeal")
			});
			val.Emit(OpCodes.Pop);
			val.Emit(OpCodes.Ldc_I4_0);
		}

		private void CreateBuff()
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			aegisDecayBuff = ScriptableObject.CreateInstance<BuffDef>();
			((Object)aegisDecayBuff).name = "AegisDecayFreeze";
			aegisDecayBuff.buffColor = new Color(0.95f, 0.85f, 0.08f);
			aegisDecayBuff.canStack = false;
			aegisDecayBuff.isDebuff = false;
			aegisDecayBuff.iconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/texBuffGenericShield.tif").WaitForCompletion();
			ContentAddition.AddBuffDef(aegisDecayBuff);
		}

		public void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			MultiShopCardUtils.OnMoneyPurchase += new hook_OnMoneyPurchase(OnMoneyPurchase);
			MultiShopCardUtils.OnNonMoneyPurchase += new hook_OnNonMoneyPurchase(OnNonMoneyPurchase);
			CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddItemBehavior);
			StatHooks.GetMoreStatCoefficients += new MoreStatHookEventHandler(AegisDecayFreeze);
		}

		private void AegisDecayFreeze(CharacterBody body, MoreStatHookEventArgs args)
		{
			if (body.HasBuff(aegisDecayBuff))
			{
				args.barrierFreezeCount++;
			}
		}

		private void OnNonMoneyPurchase(orig_OnNonMoneyPurchase orig, PayCostContext context)
		{
			AegisBarrierGrant(context);
			orig.Invoke(context);
		}

		private void OnMoneyPurchase(orig_OnMoneyPurchase orig, PayCostContext context)
		{
			AegisBarrierGrant(context);
			orig.Invoke(context);
		}

		private void AddItemBehavior(orig_OnInventoryChanged orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (NetworkServer.active)
			{
				self.AddItemBehavior<AegisDecayBehavior>(self.inventory.GetItemCountEffective(Items.BarrierOnOverHeal));
			}
		}

		private void AegisBarrierGrant(PayCostContext context)
		{
			CharacterMaster activatorMaster = context.activatorMaster;
			CharacterBody val = ((activatorMaster != null) ? activatorMaster.GetBody() : null);
			if (Object.op_Implicit((Object)(object)val))
			{
				int itemCountEffective = val.inventory.GetItemCountEffective(Items.BarrierOnOverHeal);
				HealthComponent healthComponent = val.healthComponent;
				if (itemCountEffective > 0 && (Object)(object)healthComponent != (Object)null)
				{
					float num = Util.ConvertAmplificationPercentageIntoReductionNormalized(_aegisBarrierPercent * 0.01f) * healthComponent.fullCombinedHealth;
					float num2 = (float)itemCountEffective * _aegisBarrierFlat;
					healthComponent.AddBarrierAuthority(num + num2);
				}
			}
		}

		public void BrittleCrownChanges()
		{
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Expected O, but got Unknown
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Expected O, but got Unknown
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Expected O, but got Unknown
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Expected O, but got Unknown
			LanguageAPI.Add("ITEM_GOLDONHIT_NAME", "Sunken Crown");
			LanguageAPI.Add("ITEM_GOLDONHIT_PICKUP", "Steal from chests... " + Language.Styling.HealthColor("at the cost of health."));
			LanguageAPI.Add("ITEM_GOLDONHIT_DESC", "Allows interacting with chests without the ability to afford them, opening the chest " + Language.Styling.UtilityColor("without spending ANY money") + ". Stealing from chests costs " + Language.Styling.HealthColor("[ " + common + " / " + uncommon + " / " + rare + " ]") + " of your " + Language.Styling.HealthColor("maximum health") + ", depending on the size of the chest. " + $"Can steal up to {brittleCrownStealCountBase} {Language.Styling.StackText($"+{brittleCrownStealCountStack}")} times per stage.");
			HealthComponent.TakeDamageProcess += new Manipulator(RemoveCrownPenalty);
			GlobalEventManager.ProcessHitEnemy += new Manipulator(RemoveCrownReward);
			PurchaseInteraction.CanBeAffordedByInteractor += new hook_CanBeAffordedByInteractor(PurchaseInteraction_CanBeAffordedByInteractor);
			CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddBrittleCrownBehavior);
		}

		private void AddBrittleCrownBehavior(orig_OnInventoryChanged orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (NetworkServer.active)
			{
				self.AddItemBehavior<BrittleCrownBehavior>(self.inventory.GetItemCountEffective(Items.GoldOnHit));
			}
		}

		private void RemoveCrownReward(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "GoldOnHit"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective")
			});
			val.Emit(OpCodes.Pop);
			val.Emit(OpCodes.Ldc_I4, 0);
		}

		private void RemoveCrownPenalty(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<ItemCounts>(x, "goldOnHit")
			});
			val.Emit(OpCodes.Pop);
			val.Emit(OpCodes.Ldc_I4, 0);
		}

		private void CTCInit(orig_Init orig)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Expected O, but got Unknown
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			orig.Invoke();
			CostTypeDef costTypeDef = CostTypeCatalog.GetCostTypeDef((CostTypeIndex)1);
			MethodInfo method = ((Delegate)(object)costTypeDef.payCost).Method;
			ILHook val = new ILHook((MethodBase)method, new Manipulator(PatchMoneyCostForBrittleCrown));
		}

		private void PatchMoneyCostForBrittleCrown(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.Emit(OpCodes.Ldarg_1);
			val.EmitDelegate<Action<PayCostContext>>((Action<PayCostContext>)delegate(PayCostContext ctx)
			{
				CharacterBody activatorBody = ctx.activatorBody;
				if (Object.op_Implicit((Object)(object)activatorBody) && Object.op_Implicit((Object)(object)ctx.activatorMaster) && ctx.activatorMaster.money < ctx.cost)
				{
					ctx.cost = 0;
				}
			});
		}

		private bool PurchaseInteraction_CanBeAffordedByInteractor(orig_CanBeAffordedByInteractor orig, PurchaseInteraction self, Interactor activator)
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Invalid comparison between Unknown and I4
			bool flag = orig.Invoke(self, activator);
			if (flag)
			{
				return flag;
			}
			CharacterBody val = null;
			if ((int)self.costType == 1 && self.saleStarCompatible && ((Component)activator).gameObject.TryGetComponent<CharacterBody>(ref val) && val.HasBuff(brittleCrownBuff) && val.master.money < self.cost)
			{
				int num = 1;
				int difficultyScaledCost = Run.instance.GetDifficultyScaledCost(45, Stage.instance.entryDifficultyCoefficient);
				int difficultyScaledCost2 = Run.instance.GetDifficultyScaledCost(245, Stage.instance.entryDifficultyCoefficient);
				if (self.cost >= num && self.cost < difficultyScaledCost)
				{
					CounterfeitCalculations(val, crownCommonStealSoulCost);
				}
				else if (self.cost >= difficultyScaledCost && self.cost < difficultyScaledCost2)
				{
					CounterfeitCalculations(val, crownUncommonStealSoulCost);
				}
				else
				{
					CounterfeitCalculations(val, crownRareStealSoulCost);
				}
				flag = true;
			}
			return flag;
		}

		public void CounterfeitCalculations(CharacterBody activator, float soulCost)
		{
			SoulCostPlugin.AddSoulCostToBody(activator, soulCost);
			Util.PlaySound("sfx_lunarmoney_start", ((Component)activator).gameObject);
			if (NetworkServer.active)
			{
				activator.AddBuff(Buffs.FreeUnlocks);
				activator.RemoveBuff(brittleCrownBuff);
			}
		}

		public void ExecutiveCardChanges()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Expected O, but got Unknown
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Expected O, but got Unknown
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Expected O, but got Unknown
			EquipmentDef val = Addressables.LoadAssetAsync<EquipmentDef>((object)"RoR2/DLC1/MultiShopCard/MultiShopCard.asset").WaitForCompletion();
			val.cooldown = cooldown;
			LanguageAPI.Add("EQUIPMENT_MULTISHOPCARD_PICKUP", "Hack a targeted interactable. Hacked Multishops remain open.");
			LanguageAPI.Add("EQUIPMENT_MULTISHOPCARD_DESC", "Target an interactable to <style=cIsUtility>hack</style> it, unlocking its contents for <style=cIsUtility>free</style>. If the target is a <style=cIsUtility>multishop</style> terminal, the other terminals will <style=cIsUtility>remain open</style>.");
			MultiShopCardUtils.OnPurchase += new Manipulator(FreezeCard);
			EquipmentSlot.UpdateTargets += new hook_UpdateTargets(CardTargetInteractables);
			EquipmentSlot.PerformEquipmentAction += new hook_PerformEquipmentAction(PerformEquipmentAction);
		}

		private void FreezeCard(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "get_currentEquipmentIndex")
			});
			val.Remove();
			val.EmitDelegate<Func<Inventory, int>>((Func<Inventory, int>)((Inventory inv) => -1));
		}

		private bool PerformEquipmentAction(orig_PerformEquipmentAction orig, EquipmentSlot self, EquipmentDef equipmentDef)
		{
			if ((Object)(object)equipmentDef == (Object)(object)Equipment.MultiShopCard)
			{
				return ActivateEquipment(self);
			}
			return orig.Invoke(self, equipmentDef);
			static bool ActivateEquipment(EquipmentSlot slot)
			{
				bool result = false;
				GameObject rootObject = slot.currentTarget.rootObject;
				if ((Object)(object)rootObject != (Object)null)
				{
					PurchaseInteraction component = rootObject.GetComponent<PurchaseInteraction>();
					if ((Object)(object)component != (Object)null && HackingMainState.PurchaseInteractionIsValidTarget(component))
					{
						component.Networkcost = 0;
						ShopTerminalBehavior component2 = rootObject.GetComponent<ShopTerminalBehavior>();
						if (Object.op_Implicit((Object)(object)component2))
						{
							component2.serverMultiShopController.SetCloseOnTerminalPurchase(((Component)component).GetComponent<PurchaseInteraction>(), false);
						}
						CharacterBody characterBody = slot.characterBody;
						Interactor val = ((characterBody != null) ? ((Component)characterBody).GetComponent<Interactor>() : null);
						if (Object.op_Implicit((Object)(object)val))
						{
							val.AttemptInteraction(rootObject);
						}
						slot.InvalidateCurrentTarget();
						result = true;
					}
				}
				return result;
			}
		}

		private void CardTargetInteractables(orig_UpdateTargets orig, EquipmentSlot self, EquipmentIndex targetingEquipmentIndex, bool userShouldAnticipateTarget)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02da: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			if (targetingEquipmentIndex != Equipment.MultiShopCard.equipmentIndex || !userShouldAnticipateTarget)
			{
				orig.Invoke(self, targetingEquipmentIndex, userShouldAnticipateTarget);
				return;
			}
			float num = 150f;
			float num2 = 10f;
			float num3 = Mathf.Cos(Mathf.Clamp(num2, 0f, 180f) * MathF.PI / 180f);
			float num4 = default(float);
			Ray val = CameraRigController.ModifyAimRayIfApplicable(self.GetAimRay(), ((Component)self.characterBody).gameObject, ref num4);
			Collider[] array = Physics.OverlapSphere(((Ray)(ref val)).origin, num + num4, -1, (QueryTriggerInteraction)2);
			bool flag = false;
			GameObject rootObject = self.currentTarget.rootObject;
			Vector3 val3;
			if ((Object)(object)rootObject != (Object)null)
			{
				PurchaseInteraction val2 = ((rootObject != null) ? rootObject.GetComponent<PurchaseInteraction>() : null);
				if ((Object)(object)val2 != (Object)null)
				{
					flag = HackingMainState.PurchaseInteractionIsValidTarget(val2) && val2.available;
				}
				Vector3 origin = ((Ray)(ref val)).origin;
				Vector3 position = rootObject.transform.position;
				if (flag)
				{
					val3 = position - origin;
					if (!(((Vector3)(ref val3)).sqrMagnitude > num * num))
					{
						Vector3 direction = ((Ray)(ref val)).direction;
						val3 = position - origin;
						if (!(Vector3.Dot(direction, ((Vector3)(ref val3)).normalized) < num3))
						{
							goto IL_0146;
						}
					}
				}
				self.InvalidateCurrentTarget();
			}
			goto IL_0146;
			IL_0146:
			bool flag2 = false;
			PurchaseInteraction val4 = null;
			Collider[] array2 = array;
			foreach (Collider val5 in array2)
			{
				Vector3 direction2 = ((Ray)(ref val)).direction;
				val3 = ((Component)val5).transform.position - ((Ray)(ref val)).origin;
				float num5 = Vector3.Dot(direction2, ((Vector3)(ref val3)).normalized);
				if (num5 < num3)
				{
					continue;
				}
				Vector3 origin2 = ((Ray)(ref val)).origin;
				Vector3 position2 = ((Component)val5).transform.position;
				if (!HasLos(origin2, position2))
				{
					continue;
				}
				EntityLocator component = ((Component)val5).GetComponent<EntityLocator>();
				if (!Object.op_Implicit((Object)(object)component))
				{
					continue;
				}
				PurchaseInteraction component2 = component.entity.GetComponent<PurchaseInteraction>();
				if (Object.op_Implicit((Object)(object)component2))
				{
					flag2 = HackingMainState.PurchaseInteractionIsValidTarget(component2);
					if (flag2)
					{
						flag2 = true;
						val4 = component2;
						break;
					}
					if ((Object)(object)val4 == (Object)null && component2.available)
					{
						val4 = component2;
					}
				}
			}
			if ((Object)(object)val4 != (Object)null)
			{
				if (flag2 && userShouldAnticipateTarget)
				{
					self.targetIndicator.visualizerPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/RecyclerIndicator");
				}
				else
				{
					self.targetIndicator.visualizerPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/RecyclerBadIndicator");
				}
				self.currentTarget = new UserTargetInfo
				{
					transformToIndicateAt = ((Component)val4).gameObject.transform,
					pickupController = null,
					hurtBox = null,
					rootObject = ((Component)val4).gameObject
				};
				self.targetIndicator.active = true;
				self.targetIndicator.targetTransform = self.currentTarget.transformToIndicateAt;
			}
			else
			{
				self.InvalidateCurrentTarget();
				self.targetIndicator.active = false;
			}
		}

		public bool HasLos(Vector3 origin, Vector3 targetPosition)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = targetPosition - origin;
			RaycastHit val2 = default(RaycastHit);
			return !Physics.Raycast(origin, val, ref val2, ((Vector3)(ref val)).magnitude - 1f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1);
		}

		private void FreezeCardf(orig_OnPurchase orig, PayCostContext context, int moneyCost)
		{
		}

		public void FocusedConvergenceChanges()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			FocusConvergenceController.ApplyRadius += new hook_ApplyRadius(FoconNewRadius);
			FocusConvergenceController.ApplyRate += new Manipulator(FoconApplyRate);
			FocusConvergenceController.DoUpdate += new Manipulator(FoconUpdate);
			LanguageAPI.Add("ITEM_FOCUSEDCONVERGENCE_PICKUP", $"Increase the speed Holdout Zones charge... <color=#FF7F7F>BUT reduce the size of the zone</color>. Max of {foconMaxStack}.");
			LanguageAPI.Add("ITEM_FOCUSEDCONVERGENCE_DESC", "Holdout Zones charge <style=cIsUtility>" + Tools.ConvertDecimal(foconChargeBonus) + " <style=cStack>(+" + Tools.ConvertDecimal(foconChargeBonus) + " per stack)</style> faster</style>, but are <style=cIsHealth>" + Tools.ConvertDecimal(1f - foconRadiusMultiplier) + " smaller</style> <style=cStack>(-" + Tools.ConvertDecimal(1f - foconRadiusMultiplier) + " per stack)</style>. " + $"Max of {foconMaxStack}.");
		}

		private void FoconUpdate(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "cap")
			});
			val.EmitDelegate<Func<int, int>>((Func<int, int>)((int cap) => foconMaxStack));
		}

		private void FoconNewRadius(orig_ApplyRadius orig, MonoBehaviour self, ref float radius)
		{
			FocusConvergenceController val = (FocusConvergenceController)(object)((self is FocusConvergenceController) ? self : null);
			if (val.currentFocusConvergenceCount > 0)
			{
				radius -= foconMinRadius;
				radius *= Mathf.Pow(foconRadiusMultiplier, (float)val.currentFocusConvergenceCount);
				radius += foconMinRadius;
			}
		}

		private void FoconApplyRadius(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "convergenceRadiusDivisor")
			});
			val.Emit(OpCodes.Ldc_R4, foconMinRadius);
			val.Emit(OpCodes.Sub);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "convergenceRadiusDivisor")
			});
			val.Remove();
			val.Emit(OpCodes.Ldc_R4, 2);
			val.GotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchStindR4(x)
			});
			val.Emit(OpCodes.Ldc_R4, foconMinRadius);
			val.Emit(OpCodes.Add);
		}

		private void FoconApplyRate(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld<FocusConvergenceController>(x, "convergenceChargeRateBonus")
			});
			val.EmitDelegate<Func<float, float>>((Func<float, float>)((float chargeBonus) => foconChargeBonus));
		}

		public void GestureChanges()
		{
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Expected O, but got Unknown
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Expected O, but got Unknown
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Expected O, but got Unknown
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Expected O, but got Unknown
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Expected O, but got Unknown
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: Expected O, but got Unknown
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Expected O, but got Unknown
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Expected O, but got Unknown
			LanguageAPI.Add("ITEM_AUTOCASTEQUIPMENT_PICKUP", "Greatly increase equipment stock... " + Language.Styling.HealthColor("BUT greatly increase equipment cooldown.") + " Equipments can be activated during their cooldown, " + Language.Styling.HealthColor("with a chance to break."));
			LanguageAPI.Add("ITEM_AUTOCASTEQUIPMENT_DESC", "Hold " + Language.Styling.UtilityColor($"{gestureStockBase} additional equipment charges") + " " + Language.Styling.StackText($"+{gestureStockStack}") + "... " + Language.Styling.HealthColor("BUT increase equipment cooldown by +" + Tools.ConvertDecimal(gestureCdiBase)) + " " + Language.Styling.StackText("+" + Tools.ConvertDecimal(gestureCdiStack)) + ". Using your equipment without charges " + Language.Styling.UtilityColor("under-casts") + " it, allowing it to be used " + Language.Styling.HealthColor($"with a {gestureEquipBreakChance}% chance to break") + ". " + Language.Styling.UtilityColor("Unaffected by luck."));
			EquipmentSlot.MyFixedUpdate += new Manipulator(RemoveGestureAutocast);
			Inventory.CalculateEquipmentCooldownScale += new Manipulator(RemoveGestureCdr);
			EquipmentSlot.ExecuteIfReady += new Manipulator(AllowGestureUndercast);
			EquipmentSlot.OnEquipmentExecuted += new hook_OnEquipmentExecuted(AddGestureUndercast);
			Inventory.CalculateEquipmentCooldownScale += new hook_CalculateEquipmentCooldownScale(AddGestureCdi);
			Inventory.GetEquipmentSlotMaxCharges += new hook_GetEquipmentSlotMaxCharges(AddGestureStock);
			EquipmentSlot.MyFixedUpdate += new hook_MyFixedUpdate(AddGestureBreak);
			Inventory.UpdateEquipment += new Manipulator(FixMaxStock);
		}

		private void AllowGestureUndercast(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<EquipmentSlot>(x, "get_stock")
			});
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<Func<int, EquipmentSlot, int>>((Func<int, EquipmentSlot, int>)delegate(int stock, EquipmentSlot slot)
			{
				if (stock > 0)
				{
					return stock;
				}
				return (slot.inventory.GetItemCountEffective(Items.AutoCastEquipment) > 0) ? 1 : 0;
			});
		}

		private void FixMaxStock(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "EquipmentMagazine"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective")
			});
			int num = default(int);
			val.GotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref num)
			});
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<Func<int, Inventory, int>>((Func<int, Inventory, int>)delegate(int stock, Inventory inv)
			{
				stock += GetGestureStockFromInventory(inv);
				return stock;
			});
		}

		private int AddGestureStock(orig_GetEquipmentSlotMaxCharges orig, Inventory self)
		{
			int num = orig.Invoke(self);
			return num + GetGestureStockFromInventory(self);
		}

		public static int GetGestureStockFromInventory(Inventory inv)
		{
			int itemCountEffective = inv.GetItemCountEffective(Items.AutoCastEquipment);
			if (itemCountEffective > 0)
			{
				return 4 + 2 * (itemCountEffective - 1);
			}
			return 0;
		}

		private float AddGestureCdi(orig_CalculateEquipmentCooldownScale orig, Inventory self)
		{
			float num = orig.Invoke(self);
			int itemCountEffective = self.GetItemCountEffective(Items.AutoCastEquipment);
			if (itemCountEffective > 0)
			{
				num *= 1f + gestureCdiBase + gestureCdiStack * (float)(itemCountEffective - 1);
			}
			return num;
		}

		private void RemoveGestureCdr(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "AutoCastEquipment"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective")
			});
			val.Emit(OpCodes.Pop);
			val.Emit(OpCodes.Ldc_I4, 0);
		}

		private void AddGestureUndercast(orig_OnEquipmentExecuted orig, EquipmentSlot self)
		{
			bool flag = false;
			if (NetworkServer.active && self.stock <= 0 && self.inventory.GetItemCountEffective(Items.AutoCastEquipment) > 0)
			{
				self.inventory.RestockEquipmentCharges(self.activeEquipmentSlot, 1);
				flag = true;
			}
			orig.Invoke(self);
			if (NetworkServer.active && flag)
			{
				self.characterBody.AddBuff(CommonAssets.gestureQueueEquipBreak);
				if (self.subcooldownTimer <= 0f)
				{
					TryGestureEquipmentBreak(self);
				}
			}
		}

		private void AddGestureBreak(orig_MyFixedUpdate orig, EquipmentSlot self, float deltaTime)
		{
			orig.Invoke(self, deltaTime);
			if (NetworkServer.active && self.subcooldownTimer <= 0f)
			{
				TryGestureEquipmentBreak(self);
			}
		}

		private void AddPreonAccumulatorBreak(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0f),
				(Instruction x) => ILPatternMatchingExt.MatchStfld<EquipmentSlot>(x, "bfgChargeTimer")
			});
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<Action<EquipmentSlot>>((Action<EquipmentSlot>)delegate(EquipmentSlot self)
			{
				TryGestureEquipmentBreak(self);
			});
		}

		public static void TryGestureEquipmentBreak(EquipmentSlot self)
		{
			if (NetworkServer.active && self.characterBody.HasBuff(CommonAssets.gestureQueueEquipBreak))
			{
				if (Util.CheckRoll(gestureEquipBreakChance, 0f, (CharacterMaster)null))
				{
					self.inventory.SetEquipmentIndex((EquipmentIndex)(-1));
				}
				self.characterBody.RemoveBuff(CommonAssets.gestureQueueEquipBreak);
			}
		}

		private void RemoveGestureAutocast(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "AutoCastEquipment"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective")
			});
			val.Emit(OpCodes.Pop);
			val.Emit(OpCodes.Ldc_I4, 0);
		}

		public void HappiestMaskRework()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			StatHooks.GetMoreStatCoefficients += new MoreStatHookEventHandler(MaskExecution);
			GlobalEventManager.onServerCharacterExecuted += HappiestMaskGhostSpawn;
			GlobalEventManager.OnCharacterDeath += new Manipulator(RevokeHappiestMaskRights);
			CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddMaskBehavior);
			LanguageAPI.Add("ITEM_GHOSTONKILL_PICKUP", "Haunt nearby enemies, marking them for execution. Executing enemies summons a ghost.");
			LanguageAPI.Add("ITEM_GHOSTONKILL_DESC", $"Once every <style=cIsDamage>{HappiestMaskBehavior.baseHauntInterval}</style> seconds, " + "<style=cIsDamage>Haunt</style> a nearby non-boss enemy, marking them for Execution below <style=cIsHealth>" + Tools.ConvertDecimal(hauntExecutionThreshold) + "</style> health. Execution <style=cIsDamage>spawns a ghost</style> of the killed enemy with <style=cIsDamage>1500%</style> damage, " + $"lasting for <style=cIsDamage>{ghostDurationPerStack}s</style> <style=cStack>(+{ghostDurationPerStack}s per stack)</style> " + Language.Styling.UtilityColor("(double for Haunted enemies)") + ".");
			LanguageAPI.Add("ITEM_GHOSTONKILL_LORE", "<style=cMono>\r\n//--AUTO-TRANSCRIPTION FROM RALLYPOINT DELTA --//</style>\r\n\r\n“Sir, the ghosts are back.”\r\n\r\nThe man sighed. After a routine expedition, one of the crew members – a simple soldier - had recovered an artifact thought to have been aboard the Contact Light – a simple mask, adorned with a painfully happy grin. \r\n\r\n“I’ll take care of it.” The man trudged down the hall towards the barracks. The Lemurians he had killed earlier that day walked down the hall by him, barely earning a second glance from the man. This had become so commonplace that most of the crew members in this block had grown accustomed to having a ghostly room-mate.\r\n\r\nBut enough was enough. Stepping through the ghost of an Imp, the man slammed the door open. The lights were off, and in the corner sat the soldier.\r\n\r\n“Alright, we’ve had enough fun playing with the dead. Fork it over.”\r\n\r\nNo response. The man grunted and hoisted the soldier to his feet, giving him a few rough shakes. “Hey, can you hear me!? I said hand over the mask! I’m tired of waking up next to Beetles, so give it a rest already--”\r\n\r\nThe soldier’s limp body moved. Slowly, the soldier raised his finger – pointing directly at the man.\r\n\r\n“What are you...?” With a sense of dread, the man turned and saw the Lemurians he had killed earlier step into the room. Their mouths began to glow with an otherworldly light.\r\n\r\nThe man cursed under his breath as he loaded his shotgun. “This planet, I tell you...”");
		}

		private void MaskExecution(CharacterBody sender, MoreStatHookEventArgs args)
		{
			bool flag = sender.HasBuff(CommonAssets.hauntDebuff);
			args.ModifyBaseExecutionThreshold(hauntExecutionThreshold, flag);
		}

		private void AddMaskBehavior(orig_OnInventoryChanged orig, CharacterBody self)
		{
			orig.Invoke(self);
			int itemCountEffective = self.inventory.GetItemCountEffective(Items.GhostOnKill);
			self.AddItemBehavior<HappiestMaskBehavior>(itemCountEffective);
		}

		private void HappiestMaskGhostSpawn(DamageReport damageReport, float executionHealthLost)
		{
			CharacterBody victimBody = damageReport.victimBody;
			CharacterBody attackerBody = damageReport.attackerBody;
			if (!Object.op_Implicit((Object)(object)victimBody) || !Object.op_Implicit((Object)(object)attackerBody))
			{
				return;
			}
			Inventory inventory = attackerBody.inventory;
			if (!Object.op_Implicit((Object)(object)inventory))
			{
				return;
			}
			int num = inventory.GetItemCountEffective(Items.GhostOnKill);
			if (num > 0 && Object.op_Implicit((Object)(object)victimBody) && Util.CheckRoll(ghostSpawnChanceOnExecute, attackerBody.master))
			{
				if (victimBody.HasBuff(CommonAssets.hauntDebuff))
				{
					num *= 2;
				}
				Util.TryToCreateGhost(victimBody, attackerBody, Mathf.CeilToInt((float)num * ghostDurationPerStack));
			}
		}

		private void RevokeHappiestMaskRights(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "GhostOnKill"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective")
			});
			val.Emit(OpCodes.Ldc_I4, 0);
			val.Emit(OpCodes.Mul);
		}

		public void HuntersHarpoonRework()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			CharacterBody.RecalculateStats += new Manipulator(ChangeMoveSpeed);
			GlobalEventManager.OnCharacterDeath += new Manipulator(ChangeDuration);
			LanguageAPI.Add("ITEM_MOVESPEEDONKILL_DESC", "Killing an enemy increases <style=cIsUtility>movement speed</style> by <style=cIsUtility>125%</style> for <style=cIsUtility>1</style> <style=cStack>(+1 per stack)</style> seconds. Consecutive kills increase buff duration to up to 25 seconds.");
		}

		public static void ChangeMoveSpeed(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);
			float num = default(float);
			if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[4]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, ref num),
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Buffs", "KillMoveSpeed"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "GetBuffCount")
			}))
			{
				Log.DebugBreakpoint("ChangeMoveSpeed");
				return;
			}
			val.Next.Operand = 1.25f;
			val.Index += 4;
			val.EmitDelegate<Func<int, int>>((Func<int, int>)((int buffCount) => (buffCount > 0) ? 1 : 0));
		}

		private void ChangeDuration(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_025b: Unknown result type (might be due to invalid IL or missing references)
			//IL_029d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02af: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			int attackerBodyLoc = 16;
			int itemCountLoc = 54;
			int buffCountLoc = 86;
			int iteratorLoc = 91;
			ILLabel val2 = val.DefineLabel();
			ILLabel val3 = val.DefineLabel();
			if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "MoveSpeedOnKill"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective"),
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref itemCountLoc)
			}))
			{
				Log.DebugBreakpoint("ChangeDuration", 1);
				return;
			}
			if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 5),
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref buffCountLoc)
			}))
			{
				Log.DebugBreakpoint("ChangeDuration", 2);
				return;
			}
			int index = val.Index;
			val.Index = index + 1;
			val2 = val.MarkLabel();
			if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref attackerBodyLoc),
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Buffs", "KillMoveSpeed"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "ClearTimedBuffs")
			}))
			{
				Log.DebugBreakpoint("ChangeDuration", 3);
				return;
			}
			if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<CharacterBody>(x, "AddTimedBuff")
			}))
			{
				Log.DebugBreakpoint("ChangeDuration", 4);
				return;
			}
			val3 = val.MarkLabel();
			if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref iteratorLoc),
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, buffCountLoc)
			}))
			{
				Log.DebugBreakpoint("ChangeDuration", 5);
				return;
			}
			val.GotoLabel(val3, (MoveType)1, false);
			val.Emit(OpCodes.Ldloc, iteratorLoc);
			val.EmitDelegate<Func<float, int, float>>((Func<float, int, float>)((float baseBuffDuration, int iterator) => iterator + 1));
			val.GotoLabel(val2, (MoveType)1, false);
			val.Emit(OpCodes.Ldloc, itemCountLoc);
			val.Emit(OpCodes.Ldloc, attackerBodyLoc);
			val.EmitDelegate<Func<int, int, CharacterBody, int>>((Func<int, int, CharacterBody, int>)delegate(int vanillaBuffCount, int itemCount, CharacterBody attackerBody)
			{
				if (itemCount > 25)
				{
					return itemCount;
				}
				int buffCount = attackerBody.GetBuffCount(Buffs.KillMoveSpeed);
				return Mathf.Min(25, buffCount + itemCount);
			});
		}

		public void ReworkLaserScope()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Expected O, but got Unknown
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Expected O, but got Unknown
			ItemDef val = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC1/CritDamage/CritDamage.asset").WaitForCompletion();
			RetierItemAsync(RoR2_DLC1_CritDamage.CritDamage_asset, (ItemTier)1, FixIcon);
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(ScopeCritChance);
			CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddScopeItemBehavior);
			LanguageAPI.Add("ITEM_CRITDAMAGE_NAME", "Combat Telescope");
			LanguageAPI.Add("ITEM_CRITDAMAGE_PICKUP", "Increases 'Critical Strike' chance and damage while stationary.");
			LanguageAPI.Add("ITEM_CRITDAMAGE_DESC", "<style=cIsDamage>Critical Strikes</style> deal an additional <style=cIsDamage>100% damage</style> <style=cStack>(+100% per stack)</style>. " + $"Gain <style=cIsDamage>{scopeBaseCrit}% critical chance</style>, " + $"or <style=cIsDamage>{scopeBaseStationaryCrit}%</style> after standing still " + $"for <style=cIsUtility>{CombatTelescopeBehavior.combatTelescopeWaitTime}</style> seconds.");
			static void FixIcon(ItemDef itemDef)
			{
				Sprite val2 = retierAssetBundle.LoadAsset<Sprite>("Assets/Icons/Laser_Scope.png");
				if (Object.op_Implicit((Object)(object)val2))
				{
					itemDef.pickupIconSprite = val2;
				}
			}
		}

		private void AddScopeItemBehavior(orig_OnInventoryChanged orig, CharacterBody self)
		{
			orig.Invoke(self);
			self.AddItemBehavior<CombatTelescopeBehavior>(self.inventory.GetItemCountEffective(Items.CritDamage));
		}

		private void ScopeCritChance(CharacterBody sender, StatHookEventArgs args)
		{
			if (!Object.op_Implicit((Object)(object)sender.inventory))
			{
				return;
			}
			int itemCountEffective = sender.inventory.GetItemCountEffective(Items.CritDamage);
			if (itemCountEffective > 0)
			{
				int num = scopeBaseCrit;
				int buffCount = sender.GetBuffCount(CommonAssets.combatTelescopeCritChance);
				if (buffCount > 0)
				{
					num = scopeBaseStationaryCrit;
				}
				args.critAdd += (float)num;
			}
		}

		private void RevokeScopeRights(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC1Content/Items", "CritDamage"),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCountEffective")
			});
			val.Emit(OpCodes.Ldc_I4, 0);
			val.Emit(OpCodes.Mul);
		}

		public void ReworkLeechingSeed()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			RetierItemAsync(RoR2_Base_Seed.Seed_asset, (ItemTier)0, FixIcon);
			GlobalEventManager.ProcessHitEnemy += new Manipulator(FuckLeechingSeed);
			static void FixIcon(ItemDef itemDef)
			{
				Sprite val = retierAssetBundle.LoadAsset<Sprite>("Assets/Icons/Leeching_Seed.png");
				if (Object.op_Implicit((Object)(object)val))
				{
					itemDef.pickupIconSprite = val;
				}
			}
		}

		private void NewSeedBehavior(CharacterBody body, DamageInfo damageInfo, CharacterBody victimBody)
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			if (((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)6))
			{
				return;
			}
			Inventory inventory = body.inventory;
			if ((Object)(object)inventory != (Object)null)
			{
				int itemCountEffective = inventory.GetItemCountEffective(seedItemDef);
				if (itemCountEffective > 0)
				{
					ProcChainMask procChainMask = damageInfo.procChainMask;
					((ProcChainMask)(ref procChainMask)).AddProc((ProcType)6);
					body.AddTimedBuff(Buffs.MeatRegenBoost, (seedRegenDurationBase + seedRegenDurationStack * (float)(itemCountEffective - 1)) * damageInfo.procCoefficient);
				}
			}
		}

		private void FuckLeechingSeed(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0065: 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>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 6),
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, "RoR2.ProcChainMask", "HasProc")
			}))
			{
				val.Emit(OpCodes.Ldarg_1);
				val.EmitDelegate<Func<bool, DamageInfo, bool>>((Func<bool, DamageInfo, bool>)((bool cantProc, DamageInfo damageInfo) => cantProc || (!((DamageTypeCombo)(ref damageInfo.damageType)).IsDamageSourceSkillBased && (int)damageInfo.damageType.damageSource != 64)));
			}
		}

		public void ReworkFreshMeat()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Expected O, but got Unknown
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Expected O, but got Unknown
			ChangeBuffStacking("MeatRegenBoost", canStack: true);
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(LetMeatActuallyStack);
			GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(MeatRegen);
			LanguageAPI.Add("ITEM_FLATHEALTH_PICKUP", "Regenerate health after killing an enemy.");
			LanguageAPI.Add("ITEM_FLATHEALTH_DESC", "Increases <style=cIsHealing>base health regeneration</style> by <style=cIsHealing>+2 hp/s</style> for <style=cIsUtility>3s</style> <style=cStack>(+3s per stack)</style> after killing an enemy.");
		}

		private void MeatRegen(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport)
		{
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			CharacterBody attackerBody = damageReport.attackerBody;
			if ((Object)(object)attackerBody != (Object)null && (Object)(object)attackerBody.inventory != (Object)null)
			{
				Inventory inventory = attackerBody.inventory;
				int itemCountEffective = inventory.GetItemCountEffective(Items.FlatHealth);
				if (itemCountEffective > 0)
				{
					attackerBody.AddTimedBuffAuthority(Buffs.MeatRegenBoost.buffIndex, (float)(3 * itemCountEffective));
				}
			}
			orig.Invoke(self, damageReport);
		}

		private void LetMeatActuallyStack(CharacterBody sender, StatHookEventArgs args)
		{
			int buffCount = sender.GetBuffCount(Buffs.MeatRegenBoost);
			if (buffCount > 1)
			{
				args.baseRegenAdd += 2f * (1f + 0.2f * (sender.level - 1f)) * (float)(buffCount - 1);
			}
			Inventory inventory = sender.inventory;
			if ((Object)(object)inventory != (Object)null)
			{
				args.baseHealthAdd -= (float)(inventory.GetItemCountEffective(Items.FlatHealth) * 25);
			}
		}

		private void PlanulaChanges()
		{
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Expected O, but got Unknown
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Expected O, but got Unknown
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Expected O, but got Unknown
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Expected O, but got Unknown
			LanguageAPI.Add("ITEM_PARENTEGG_PICKUP", "The unmatched power of the sun!");
			LanguageAPI.Add("ITEM_PARENTEGG_DESC", "After beginning the teleporter event, " + Language.Styling.DamageColor("summon a sun overhead") + " that lasts for " + Language.Styling.DamageColor(sunDurationBase.ToString()) + " seconds " + Language.Styling.StackText($"+{sunDurationStack}") + ". " + Language.Styling.HealthColor("All enemies and allies burn near the sun") + ".");
			HealthComponent.TakeDamageProcess += new Manipulator(FuckPlanula);
			IdleToChargingState.OnEnter += new hook_OnEnter(OnTeleporterEventPreStart);
			ChargingState.OnEnter += new hook_OnEnter(OnTeleporterEventStart);
			ChargingState.FixedUpdate += new hook_FixedUpdate(OnTeleporterEventUpdate);
		}

		private void FuckPlanula(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent/ItemCounts", "parentEgg")
			});
			val.Emit(OpCodes.Pop);
			val.Emit(OpCodes.Ldc_I4_0);
		}

		private void OnTeleporterEventPreStart(orig_OnEnter orig, IdleToChargingState self)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if (!NetworkServer.active)
			{
				return;
			}
			int itemCountForTeam = Util.GetItemCountForTeam((TeamIndex)1, Items.ParentEgg.itemIndex, false, false);
			if (itemCountForTeam <= 0)
			{
				return;
			}
			TeleporterInteraction teleporterInteraction = ((BaseTeleporterState)self).teleporterInteraction;
			GameObject chargeActivatorServer = teleporterInteraction.chargeActivatorServer;
			PlanulaSunController planulaSunController = ((Component)teleporterInteraction).gameObject.AddComponent<PlanulaSunController>();
			Debug.Log((object)((Object)(object)planulaSunController != (Object)null));
			if ((Object)(object)planulaSunController != (Object)null)
			{
				planulaSunController.holdoutZoneController = teleporterInteraction.holdoutZoneController;
				Transform val = ((EntityState)self).transform.Find("FireworkOrigin");
				if ((Object)(object)val == (Object)null)
				{
					val = ((Component)teleporterInteraction).transform;
				}
				planulaSunController.activator = chargeActivatorServer;
				planulaSunController.CreateBeamEffect(val);
				planulaSunController.SetSunDuration(itemCountForTeam);
			}
		}

		private void OnTeleporterEventStart(orig_OnEnter orig, ChargingState self)
		{
			orig.Invoke(self);
			if (NetworkServer.active)
			{
				PlanulaSunController component = ((EntityState)self).gameObject.GetComponent<PlanulaSunController>();
				if ((Object)(object)component != (Object)null)
				{
					component.EndBeamEffect();
					component.CreateSun();
				}
			}
		}

		private void OnTeleporterEventUpdate(orig_FixedUpdate orig, ChargingState self)
		{
			orig.Invoke(self);
			if (NetworkServer.active)
			{
			}
		}

		public void PrayerBeadsRework()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Expected O, but got Unknown
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Expected O, but got Unknown
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Expected O, but got Unknown
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Expected O, but got Unknown
			RetierItemAsync(RoR2_DLC2_Items_ExtraStatsOnLevelUp.ExtraStatsOnLevelUp_asset, (ItemTier)1, ChangeTags);
			CharacterMaster.OnBodyStart += new hook_OnBodyStart(InitializeBeadBuff);
			object obj = <>c.<>9__121_1;
			if (obj == null)
			{
				hook_TrackBeadExperience val = delegate
				{
				};
				<>c.<>9__121_1 = val;
				obj = (object)val;
			}
			CharacterMaster.TrackBeadExperience += (hook_TrackBeadExperience)obj;
			CharacterBody.RecalculateStats += new Manipulator(ChangeBeadAppliedStats);
			ExperienceManager.AwardExperience += new hook_AwardExperience(BeadExperience);
			StatHooks.GetMoreStatCoefficients +=