Decompiled source of BloonModpackBaseMod v1.5.1

BaseMod.dll

Decompiled a week ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AmpMod.Modules;
using AmpMod.SkillStates;
using AmpMod.SkillStates.Amp;
using AmpMod.SkillStates.BaseStates;
using AmpMod.SkillStates.Nemesis_Amp;
using BaseMod.Changes;
using BaseMod.Modules;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Logging;
using BubbetsItems;
using BubbetsItems.Items.BarrierItems;
using EclipseRevamped;
using EnemyAbilities.Abilities.Nullifier;
using EntityStates;
using EntityStates.BrotherMonster;
using EntityStates.Drone.DroneJunk;
using FathomlessVoidling.VoidlingEntityStates;
using FathomlessVoidling.VoidlingEntityStates.Phase3;
using FlatItemBuff.Items;
using HarmonyLib;
using IL.RoR2;
using IL.RoR2.Items;
using Microsoft.CodeAnalysis;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using MonoMod.RuntimeDetour;
using Morris.Components;
using Morris.Modules.NPC;
using On.EntityStates.BrotherMonster;
using On.RoR2;
using R2API;
using RoR2;
using RoR2.Audio;
using RoR2.ContentManagement;
using RoR2.Navigation;
using RoR2.Projectile;
using SS2;
using SS2.Components;
using SS2.Items;
using SeekingTheVoid;
using SkillStates.Ghoul;
using SkillStates.Morris;
using SkillStates.SharedStates;
using Skillsmas.Skills.Croco;
using TooManyItems.Items.Lunar;
using TooManyItems.Items.Tier1;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: IgnoresAccessChecksTo("AmpMod")]
[assembly: IgnoresAccessChecksTo("BubbetsItems")]
[assembly: IgnoresAccessChecksTo("EclipseRevamped")]
[assembly: IgnoresAccessChecksTo("EnemyAbilities")]
[assembly: IgnoresAccessChecksTo("FathomlessVoidling")]
[assembly: IgnoresAccessChecksTo("FlatItemBuff")]
[assembly: IgnoresAccessChecksTo("Morris")]
[assembly: IgnoresAccessChecksTo("SeekingTheVoid")]
[assembly: IgnoresAccessChecksTo("SkillsmasPlugin")]
[assembly: IgnoresAccessChecksTo("Starstorm2")]
[assembly: IgnoresAccessChecksTo("TooManyItems")]
[assembly: IgnoresAccessChecksTo("VanillaVoid")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("BaseMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("BaseMod")]
[assembly: AssemblyTitle("BaseMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace BaseMod
{
	[BepInPlugin("com.Bloonjitsu7.BloonModpackBaseMod", "BloonModpackBaseMod", "1.5.1")]
	[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.*/)]
	public class BaseMain : BaseUnityPlugin
	{
		public const string PluginGUID = "Bloonjitsu7.BloonModpackBaseModPlugin";

		public const string PluginAuthor = "Bloonjitsu7";

		public const string PluginName = "BloonModpackBaseModPlugin";

		public const string PluginVersion = "1.5.1";

		public void Awake()
		{
			Log.Init(((BaseUnityPlugin)this).Logger);
			new ContentPacks().Initialize();
			BaseChanges baseChanges = new BaseChanges();
			baseChanges.Initialize();
		}
	}
	internal static class Log
	{
		private static ManualLogSource _logSource;

		internal static void Init(ManualLogSource logSource)
		{
			_logSource = logSource;
		}

		internal static void Debug(object data)
		{
			_logSource.LogDebug(data);
		}

		internal static void Error(object data)
		{
			_logSource.LogError(data);
		}

		internal static void Fatal(object data)
		{
			_logSource.LogFatal(data);
		}

		internal static void Info(object data)
		{
			_logSource.LogInfo(data);
		}

		internal static void Message(object data)
		{
			_logSource.LogMessage(data);
		}

		internal static void Warning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
}
namespace BaseMod.Modules
{
	public static class Buffs
	{
		internal static List<BuffDef> buffDefs = new List<BuffDef>();

		internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, bool isCooldown, bool isHidden)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			BuffDef val = ScriptableObject.CreateInstance<BuffDef>();
			((Object)val).name = buffName;
			val.buffColor = buffColor;
			val.canStack = canStack;
			val.isDebuff = isDebuff;
			val.eliteDef = null;
			val.iconSprite = buffIcon;
			val.isCooldown = isCooldown;
			val.isHidden = isHidden;
			buffDefs.Add(val);
			return val;
		}
	}
	internal class ContentPacks : IContentPackProvider
	{
		internal ContentPack contentPack = new ContentPack();

		public string identifier => "com.Bloonjitsu7.BloonModpackBaseMod";

		public void Initialize()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders);
		}

		private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider)
		{
			addContentPackProvider.Invoke((IContentPackProvider)(object)this);
		}

		public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args)
		{
			contentPack.identifier = identifier;
			contentPack.buffDefs.Add(Buffs.buffDefs.ToArray());
			args.ReportProgress(1f);
			yield break;
		}

		public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args)
		{
			ContentPack.Copy(contentPack, args.output);
			args.ReportProgress(1f);
			yield break;
		}

		public IEnumerator FinalizeAsync(FinalizeAsyncArgs args)
		{
			args.ReportProgress(1f);
			yield break;
		}
	}
}
namespace BaseMod.Changes
{
	public class BaseChanges
	{
		private Hook e1Hook;

		internal static bool HasFlatItemBuff => Chainloader.PluginInfos.ContainsKey("com.kking117.FlatItemBuff");

		internal static bool HasBubbetsItems => Chainloader.PluginInfos.ContainsKey("bubbet.bubbetsitems");

		internal static bool HasStarstorm => Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm");

		internal static bool HasSeekingTheVoid => Chainloader.PluginInfos.ContainsKey("acanthi.SeekingTheVoid");

		internal static bool HasTooManyItems => Chainloader.PluginInfos.ContainsKey("shirograhm.TooManyItems");

		internal static bool HasVanillaVoid => Chainloader.PluginInfos.ContainsKey("com.Zenithrium.vanillaVoid");

		internal static bool HasAmpMod => Chainloader.PluginInfos.ContainsKey("com.NeonThink.Amp");

		internal static bool HasMorticianMod => Chainloader.PluginInfos.ContainsKey("com.Bog.Morris");

		internal static bool HasSkillsmas => Chainloader.PluginInfos.ContainsKey("com.themysticsword.skillsmas");

		internal static bool HasFathomlessVoidling => Chainloader.PluginInfos.ContainsKey("com.Nuxlar.FathomlessVoidling");

		internal static bool HasEnemyAbilities => Chainloader.PluginInfos.ContainsKey("Skeletogne.EnemyAbilities");

		internal static bool HasEclipseRevamped => Chainloader.PluginInfos.ContainsKey("Nuxlar.EclipseRevamped");

		public void Initialize()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Expected O, but got Unknown
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Expected O, but got Unknown
			ItemChanges itemChanges = new ItemChanges();
			itemChanges.Initialize();
			SurvivorChanges survivorChanges = new SurvivorChanges();
			survivorChanges.Initialize();
			BossChanges bossChanges = new BossChanges();
			bossChanges.Initialize();
			Harmony val = new Harmony("com.Bloonjitsu7.BloonModpackBaseMod");
			val.PatchAll();
			if (!HasEclipseRevamped)
			{
				Log.Warning("EclipseRevamped Content Disabled");
			}
			if (HasEclipseRevamped && Main.shouldChangeE1.Value)
			{
				MethodInfo methodInfo = AccessTools.Method(typeof(Main), "AddNewE1", (Type[])null, (Type[])null);
				e1Hook = new Hook((MethodBase)methodInfo, (Delegate)new Action<Action<Main, ILContext>, Main, ILContext>(OnAddNewE1));
				ChargingState.OnEnter += new Manipulator(IL_NewE1);
			}
		}

		private void OnAddNewE1(Action<Main, ILContext> orig, Main self, ILContext il)
		{
			Log.Message("Success!");
		}

		private void IL_NewE1(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: 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_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)2;
			if (val2.TryGotoNext(val3, new Func<Instruction, bool>[5]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 600f),
				(Instruction x) => ILPatternMatchingExt.MatchCall<Run>(x, "get_instance"),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(Run), "compensatedDifficultyCoefficient"),
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.5f),
				(Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(Mathf), "Pow")
			}))
			{
				val.Index -= 4;
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Func<TeleporterInteraction, float>>((Func<TeleporterInteraction, float>)delegate
				{
					//IL_002d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0032: Unknown result type (might be due to invalid IL or missing references)
					//IL_0033: Unknown result type (might be due to invalid IL or missing references)
					//IL_0035: Invalid comparison between Unknown and I4
					float result = 1f;
					if (!Object.op_Implicit((Object)(object)Run.instance))
					{
						Log.Warning("Run Instance Failed");
						return result;
					}
					DifficultyIndex selectedDifficulty = Run.instance.selectedDifficulty;
					if ((int)selectedDifficulty >= 3)
					{
						Log.Message("Eclipse Scaling Added To Teleporter!");
						result = 1.5f;
					}
					return result;
				});
				val.Emit(OpCodes.Mul);
			}
			else
			{
				Log.Warning("Hook 1 Failed!");
			}
		}
	}
	public class MeatBuffVFX : MonoBehaviour
	{
		public TemporaryVisualEffect effect;
	}
	public class ItemChanges
	{
		private float coffeeBuffDuration = 5f;

		private float boneDuration = 5f;

		private float boneDurationStack = 1f;

		private float boneProcChance = 6f;

		private float boneProcStack = 1.5f;

		private float duplicatorDropChance = 8f;

		private int duplicatorDuration = 30;

		private float bungusTimer = 0.5f;

		private float lanternSpeed = 0.09f;

		private float lanternSpeedStack = 0.045f;

		private int lanternAlly = 5;

		private int lanternAllyStack = 0;

		private float lanternRadius = 40f;

		private float lanternRadiusStack = 3f;

		private float jetBootsDamage = 4.5f;

		private float jetBootsDamageStack = 1.5f;

		private float apRoundsEliteDamage = 0.05f;

		private float vultureEliteDamage = 0.5f;

		private float vultureDropChance = 5f;

		private float vultureHealPercent = 0.2f;

		private float milkHealth = 20f;

		private float meatHealth = 30f;

		private float meatDuration = 3f;

		private float meatDurationStack = 1f;

		private float meatRegenAmount = 1.5f;

		private int meatMax = 2;

		private int meatMaxStack = 1;

		private static float loafRegenChance = 20f;

		private float multikillDuration = 9f;

		private float multikillDamage = 0.03f;

		private float multikillDamageStack = 0.005f;

		private float crucifixBurnPercent = 0.2f;

		private float crucifixBurnStack = 0.1f;

		private float crucifixResist = 0.95f;

		private float crucifixHealReduction = 0.5f;

		private int ignitionBurnBonus = 2;

		private float ignitionCooldownTime = 8f;

		private float ignitionCooldownStack = 0.15f;

		private float coreDuration = 2f;

		private float coreDurationStack = 0.5f;

		private float coreSlowChance = 6f;

		private Hook toxicHook;

		private Hook coffeeDamageHook;

		private Hook coffeeStatHook;

		private Hook coffeePickupHook;

		private Hook boneKillHook;

		private Hook bonePickupHook;

		private ILHook lampFireHook;

		private ILHook jetBootsHook;

		private Hook echoStatHook;

		private Hook milkHook;

		private Hook loafHook;

		private Hook crucifixHook;

		public static BuffDef MeatBuff = Buffs.MeatRegenBoost;

		public static BuffDef IgnitionCooldown;

		public static GameObject MeatBuffVFX = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/JunkContent/RegenBoostEffect.prefab").WaitForCompletion();

		private Xoroshiro128Plus rng;

		public void Initialize()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Expected O, but got Unknown
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Expected O, but got Unknown
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Expected O, but got Unknown
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Expected O, but got Unknown
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Expected O, but got Unknown
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Expected O, but got Unknown
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: 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
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Expected O, but got Unknown
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Expected O, but got Unknown
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Expected O, but got Unknown
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Expected O, but got Unknown
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Expected O, but got Unknown
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Expected O, but got Unknown
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Expected O, but got Unknown
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Expected O, but got Unknown
			//IL_0253: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Expected O, but got Unknown
			//IL_0258: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Expected O, but got Unknown
			//IL_0284: Unknown result type (might be due to invalid IL or missing references)
			//IL_028e: Expected O, but got Unknown
			//IL_0289: Unknown result type (might be due to invalid IL or missing references)
			//IL_0293: Expected O, but got Unknown
			//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c4: Expected O, but got Unknown
			//IL_02eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f5: Expected O, but got Unknown
			//IL_031c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0326: Expected O, but got Unknown
			//IL_037e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0388: Expected O, but got Unknown
			//IL_03af: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b9: Expected O, but got Unknown
			//IL_03ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f7: Expected O, but got Unknown
			//IL_042b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0435: Expected O, but got Unknown
			//IL_044c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0456: Expected O, but got Unknown
			//IL_047e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0488: Expected O, but got Unknown
			//IL_04e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ee: Expected O, but got Unknown
			//IL_0529: Unknown result type (might be due to invalid IL or missing references)
			//IL_0533: Expected O, but got Unknown
			CreateBuffs();
			DotController.AddDot_GameObject_float_HurtBox_DotIndex_float_Nullable1_Nullable1_Nullable1 += new Manipulator(IL_DotBypassArmor);
			TeamManager.GetLongstandingSolitudeItemCostScale += new hook_GetLongstandingSolitudeItemCostScale(OnItemCostScale);
			ExperienceManager.AwardExperience += new hook_AwardExperience(OnAwardExperience);
			AttackSpeedPerNearbyCollider.UpdateValues += new hook_UpdateValues(OnLanternUpdate);
			AttackSpeedPerNearbyCollider.Start += new hook_Start(OnLanternStart);
			CharacterBody.RecalculateStats += new Manipulator(IL_Lantern);
			SetStateOnHurt.OnTakeDamageServer += new Manipulator(IL_StunDamage);
			CharacterBody.GetNotMoving += new Manipulator(IL_NotMoving);
			ShrineChanceBehavior.AddShrineStack += new Manipulator(IL_ChanceShrine);
			GlobalEventManager.onCharacterDeathGlobal += OnDuplicatorDeath;
			ItemDef.AttemptGrant += new Manipulator(IL_GrantTempItem);
			DuplicatorBehavior.CalculateNewItemDecayDuration += new Manipulator(IL_Duplicator);
			HealthComponent.TakeDamageProcess += new Manipulator(IL_EliteDamage);
			GlobalEventManager.OnCharacterDeath += new Manipulator(IL_EliteDeath);
			GlobalEventManager.onCharacterDeathGlobal += OnEliteDeath;
			CharacterBody.AddIncreasedDamageMultiKillTime += new Manipulator(IL_MultikillTimer);
			CharacterBody.RecalculateStats += new Manipulator(IL_MultikillStats);
			CharacterBody.UpdateAllTemporaryVisualEffects += new Manipulator(IL_MeatEffect);
			GlobalEventManager.onCharacterDeathGlobal += OnMeatDeath;
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(OnMeatStats);
			StrengthenBurnUtils.CheckDotForUpgrade += new Manipulator(IL_StrengthenBurn);
			GlobalEventManager.ProcessHitEnemy += new Manipulator(IL_ProcessHit);
			if (!BaseChanges.HasStarstorm)
			{
				Log.Warning("Starstorm2 Content Disabled");
			}
			if (!BaseChanges.HasBubbetsItems)
			{
				Log.Warning("BubbetsItems Content Disabled");
			}
			if (!BaseChanges.HasFlatItemBuff)
			{
				Log.Warning("FlatItemBuff Content Disabled");
			}
			if (!BaseChanges.HasSeekingTheVoid)
			{
				Log.Warning("SeekingTheVoid Content Disabled");
			}
			if (!BaseChanges.HasTooManyItems)
			{
				Log.Warning("TooManyItems Content Disabled");
			}
			if (!BaseChanges.HasVanillaVoid)
			{
				Log.Warning("VanillaVoid Content Disabled");
			}
			if (BaseChanges.HasStarstorm)
			{
				MethodInfo methodInfo = AccessTools.Method(typeof(JetBoots), "DoJumpAuthority", (Type[])null, (Type[])null);
				jetBootsHook = new ILHook((MethodBase)methodInfo, new Manipulator(IL_JetBoots));
				MethodInfo methodInfo2 = AccessTools.Method(typeof(LampBehavior), "IncrementFire", (Type[])null, (Type[])null);
				lampFireHook = new ILHook((MethodBase)methodInfo2, new Manipulator(IL_LampFire));
				MethodInfo methodInfo3 = AccessTools.Method(typeof(CoffeeBag), "CalculateStatsCoffeeBag", (Type[])null, (Type[])null);
				coffeeStatHook = new Hook((MethodBase)methodInfo3, (Delegate)new Action<Action<CoffeeBag, CharacterBody, StatHookEventArgs>, CoffeeBag, CharacterBody, StatHookEventArgs>(OnCoffeeStat));
				MethodInfo methodInfo4 = AccessTools.Method(typeof(CoffeeBag), "OnServerDamageDealt", (Type[])null, (Type[])null);
				coffeeDamageHook = new Hook((MethodBase)methodInfo4, (Delegate)new Action<Action<CoffeeBag, DamageReport>, CoffeeBag, DamageReport>(OnCoffeeDamage));
				MethodInfo methodInfo5 = AccessTools.Method(typeof(CoffeeBeanPickup), "OnTriggerStay", (Type[])null, (Type[])null);
				coffeePickupHook = new Hook((MethodBase)methodInfo5, (Delegate)new Action<Action<CoffeeBeanPickup, Collider>, CoffeeBeanPickup, Collider>(OnCoffeePickup));
				GlobalEventManager.onCharacterDeathGlobal += OnCoffeeDeath;
			}
			if (BaseChanges.HasBubbetsItems)
			{
				GlobalEventManager.onServerDamageDealt += OnBoneDamageDealt;
				MethodInfo methodInfo6 = AccessTools.Method(typeof(BoneVisor), "OnDeath", (Type[])null, (Type[])null);
				boneKillHook = new Hook((MethodBase)methodInfo6, (Delegate)new Action<Action<BoneVisor, DamageReport>, BoneVisor, DamageReport>(OnBoneKill));
				MethodInfo methodInfo7 = AccessTools.Method(typeof(BonePickup), "OnTriggerStay", (Type[])null, (Type[])null);
				bonePickupHook = new Hook((MethodBase)methodInfo7, (Delegate)new Action<Action<BonePickup, Collider>, BonePickup, Collider>(OnBonePickup));
			}
			if (BaseChanges.HasFlatItemBuff)
			{
				MethodInfo methodInfo8 = AccessTools.Method(typeof(WarpedEcho), "GetStatCoefficients", (Type[])null, (Type[])null);
				echoStatHook = new Hook((MethodBase)methodInfo8, (Delegate)new Action<Action<WarpedEcho, CharacterBody, StatHookEventArgs, Inventory>, WarpedEcho, CharacterBody, StatHookEventArgs, Inventory>(OnEchoStat));
			}
			if (BaseChanges.HasSeekingTheVoid)
			{
				MethodInfo methodInfo9 = AccessTools.Method(typeof(ToxicodendronBrineBehavior), "TriggerPoisonSpread", (Type[])null, (Type[])null);
				toxicHook = new Hook((MethodBase)methodInfo9, (Delegate)new Action<Action<ToxicodendronBrineBehavior, CharacterBody, DamageReport>, ToxicodendronBrineBehavior, CharacterBody, DamageReport>(OnToxicKill));
			}
			if (BaseChanges.HasTooManyItems)
			{
				RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(OnMilkStats);
				MethodInfo methodInfo10 = AccessTools.Method(typeof(MilkCartonOrb), "OnArrival", (Type[])null, (Type[])null);
				milkHook = new Hook((MethodBase)methodInfo10, (Delegate)new Action<Action<MilkCartonOrb>, MilkCartonOrb>(OnMilkArrival));
				string pickupToken = "Gain 20 max health. Retaliate damage from elites.";
				string descriptionToken = "Increases <style=cIsHealing>max health</style> by <style=cIsHealing>20</style> <style=cStack>(+20 per stack)</style>. Retaliate <style=cIsDamage>200%</style> <style=cStack>(+200% per stack)</style> of the damage taken from <style=cIsDamage>elite enemies</style>.";
				MilkCarton.itemDef.pickupToken = pickupToken;
				MilkCarton.itemDef.descriptionToken = descriptionToken;
				MethodInfo methodInfo11 = AccessTools.Method(typeof(CharacterMasterNotificationQueue), "PushItemTransformNotification", (Type[])null, (Type[])null);
				loafHook = new Hook((MethodBase)methodInfo11, (Delegate)new Action<Action<CharacterMaster, ItemIndex, ItemIndex, TransformationType>, CharacterMaster, ItemIndex, ItemIndex, TransformationType>(OnLoafTransform));
				string descriptionToken2 = "Gain <style=cIsDamage>1 <style=cStack>(+1 per stack)</style> gold</style> on-kill. After <style=cIsUtility>25 kills</style>, scrap a stack of this item and gain an extra <style=cHumanObjective>25 gold</style>, with a <style=cIsUtility>20% chance</style> to regain a stack of this item. <style=cIsDamage>Gold amount scales over time</style>.";
				BreadLoaf.itemDef.descriptionToken = descriptionToken2;
				Crucifix.percentDamageReduction = crucifixResist;
				Crucifix.percentMaxHealthBurnAmount = crucifixBurnPercent;
				Crucifix.percentMaxHealthBurnAmountReduction = crucifixBurnStack;
				HealthComponent.Heal += new hook_Heal(OnCrucifixHeal);
				string descriptionToken3 = "Reduce damage taken by <style=cIsHealing>95%</style>, but taking damage <style=cDeath>burns you</style> for <style=cIsHealth>20% <style=cStack>(-10% per stack)</style> max health</style>. While burning, <style=cDeath>all healing recieved is reduced by 50%</style> <style=cStack>(+50% per stack)</style>.";
				Crucifix.itemDef.descriptionToken = descriptionToken3;
			}
			if (!BaseChanges.HasVanillaVoid)
			{
			}
		}

		private void CreateBuffs()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			MeatBuff = Buffs.AddNewBuff("BloonMeatBuff", Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Croco/texBuffRegenBoostIcon.tif").WaitForCompletion(), Color.green, canStack: true, isDebuff: false, isCooldown: false, isHidden: false);
			IgnitionCooldown = Buffs.AddNewBuff("BloonIgnitionCooldown", Addressables.LoadAssetAsync<Sprite>((object)"RoR2/DLC1/StrengthenBurn/texBuffStrongerBurnIcon.tif").WaitForCompletion(), Color.grey, canStack: false, isDebuff: true, isCooldown: true, isHidden: false);
		}

		private float GetStackedStats(float baseStat, float stackStat, int itemCount)
		{
			return baseStat - stackStat + stackStat * (float)itemCount;
		}

		private int GetStackedStatsInt(int baseStat, int stackStat, int itemCount)
		{
			return baseStat - stackStat + stackStat * itemCount;
		}

		private float ConvertReductionIntoStackingDivision(float baseFraction, int itemCount)
		{
			float num = 1f - baseFraction;
			float num2 = (1f + num) / num - 2f;
			num2 *= (float)(itemCount - 1);
			return num2 + 1f;
		}

		public float OnCrucifixHeal(orig_Heal orig, HealthComponent self, float amount, ProcChainMask procChainMask, bool nonRegen = true)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)self.body))
			{
				return orig.Invoke(self, amount, procChainMask, nonRegen);
			}
			if (self.body.HasBuff(Buffs.OnFire))
			{
				if (!Object.op_Implicit((Object)(object)self.body.inventory))
				{
					return orig.Invoke(self, amount, procChainMask, nonRegen);
				}
				int itemCountEffective = self.body.inventory.GetItemCountEffective(Crucifix.itemDef);
				if (itemCountEffective > 0)
				{
					for (int i = 0; i < itemCountEffective; i++)
					{
						amount *= crucifixHealReduction;
					}
				}
			}
			return orig.Invoke(self, amount, procChainMask, nonRegen);
		}

		public static void OnLoafTransform(Action<CharacterMaster, ItemIndex, ItemIndex, TransformationType> orig, CharacterMaster characterMaster, ItemIndex oldIndex, ItemIndex newIndex, TransformationType transformationType)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: 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_002b: Unknown result type (might be due to invalid IL or missing references)
			if (((object)(ItemIndex)(ref oldIndex)).Equals((object?)BreadLoaf.itemDef.itemIndex) && ((object)(ItemIndex)(ref newIndex)).Equals((object?)Items.ScrapWhite.itemIndex) && ((object)(TransformationType)(ref transformationType)).Equals((object)(TransformationType)0) && Util.CheckRoll(loafRegenChance, characterMaster))
			{
				Util.PlaySound("Play_ui_artifact_delusion_success", ((Component)characterMaster).gameObject);
				characterMaster.inventory.GiveItemPermanent(BreadLoaf.itemDef, 1);
			}
			orig(characterMaster, oldIndex, newIndex, transformationType);
		}

		private void OnMilkStats(CharacterBody sender, StatHookEventArgs args)
		{
			if (Object.op_Implicit((Object)(object)sender) && Object.op_Implicit((Object)(object)sender.inventory))
			{
				int itemCountEffective = sender.inventory.GetItemCountEffective(MilkCarton.itemDef);
				if (itemCountEffective > 0)
				{
					float num = (float)itemCountEffective * milkHealth;
					args.baseHealthAdd += num;
				}
			}
		}

		private void OnMilkArrival(Action<MilkCartonOrb> orig, MilkCartonOrb self)
		{
			MilkCarton.percentEliteDamageRetaliation = 2f;
			MilkCarton.percentEliteDamageRetaliationExtraStacks = 2f;
			orig(self);
		}

		public void IL_JetBoots(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: 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_0056: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			MoveType val4 = (MoveType)2;
			if (val2.TryGotoNext(val4, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(JetBoots), "baseDamage")
			}))
			{
				val.Emit(OpCodes.Pop);
				val.Emit(OpCodes.Ldloc_3);
				val.EmitDelegate<Func<int, float>>((Func<int, float>)((int num) => GetStackedStats(jetBootsDamage, jetBootsDamageStack, num)));
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		public void IL_LampFire(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 2f)
			}))
			{
				val.Next.Operand = 3f;
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		private void OnBoneDamageDealt(DamageReport report)
		{
			//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_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			BoneVisor val = default(BoneVisor);
			if (!NetworkServer.active || !SharedBase.TryGetInstance<BoneVisor>(ref val))
			{
				return;
			}
			int num = ((Object.op_Implicit((Object)(object)report.attackerBody) && Object.op_Implicit((Object)(object)report.attackerBody.inventory)) ? report.attackerBody.inventory.GetItemCountEffective(((ItemBase)val).ItemDef) : 0);
			if (num <= 0 || !Util.CheckRoll(boneProcChance + Util.ConvertAmplificationPercentageIntoReductionPercentage(boneProcStack * (float)num - 1f) * report.damageInfo.procCoefficient, report.attackerMaster))
			{
				return;
			}
			float num2 = Random.Range(-2f, 2f);
			float num3 = Random.Range(-2f, 2f);
			Vector3 val2 = default(Vector3);
			((Vector3)(ref val2))..ctor(num2, 0f, num3);
			GameObject val3 = Object.Instantiate<GameObject>(BoneVisor.ShardPrefab, ((Component)report.victim).transform.position + val2, Random.rotation);
			if (Object.op_Implicit((Object)(object)val3))
			{
				TeamFilter component = val3.GetComponent<TeamFilter>();
				if (Object.op_Implicit((Object)(object)component))
				{
					component.teamIndex = report.attackerTeamIndex;
				}
				NetworkServer.Spawn(val3);
			}
		}

		private void OnBonePickup(Action<BonePickup, Collider> orig, BonePickup self, Collider other)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			BoneVisor val = default(BoneVisor);
			if (!NetworkServer.active || !self.alive || TeamComponent.GetObjectTeam(((Component)other).gameObject) != self.teamFilter.teamIndex || !SharedBase.TryGetInstance<BoneVisor>(ref val))
			{
				return;
			}
			CharacterBody component = ((Component)other).GetComponent<CharacterBody>();
			if (!Object.op_Implicit((Object)(object)component))
			{
				return;
			}
			Inventory inventory = component.inventory;
			if (Object.op_Implicit((Object)(object)inventory))
			{
				int num = inventory.GetItemCountEffective(((ItemBase)val).ItemDef);
				if (num <= 0)
				{
					num = 1;
				}
				self.alive = false;
				component.OnPickup((PickupClass)1);
				component.healthComponent.AddBarrier(5f);
				float stackedStats = GetStackedStats(boneDuration, boneDurationStack, num);
				component.AddTimedBuff(BoneVisor.BuffDef, stackedStats, 5);
				Object.Destroy((Object)(object)self.baseObject);
			}
		}

		private void OnBoneKill(Action<BoneVisor, DamageReport> orig, BoneVisor self, DamageReport report)
		{
		}

		private void OnCoffeeDeath(DamageReport report)
		{
			//IL_003f: 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_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			CharacterBody attackerBody = report.attackerBody;
			if (!Object.op_Implicit((Object)(object)attackerBody))
			{
				return;
			}
			Inventory inventory = attackerBody.inventory;
			if (!Object.op_Implicit((Object)(object)inventory))
			{
				return;
			}
			int itemCountEffective = inventory.GetItemCountEffective(Items.CoffeeBag.itemIndex);
			if (itemCountEffective > 0)
			{
				int num = Random.RandomRangeInt(0, 5);
				Vector3[] array = (Vector3[])(object)new Vector3[4]
				{
					new Vector3(1.5f, 0f, -1.5f),
					new Vector3(-1.5f, 0f, 1.5f),
					new Vector3(1.5f, 0f, 1.5f),
					new Vector3(-1.5f, 0f, -1.5f)
				};
				Util.ShuffleArray<Vector3>(array);
				for (int i = 0; i < num; i++)
				{
					CoffeeBeanPooler.SpawnBean(report.damageInfo.position + array[i], itemCountEffective, report.attackerTeamIndex);
				}
			}
		}

		private void OnCoffeePickup(Action<CoffeeBeanPickup, Collider> orig, CoffeeBeanPickup self, Collider other)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_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)
			if (NetworkServer.active && self.initialized && self.alive && TeamComponent.GetObjectTeam(((Component)other).gameObject) == self.teamFilter.teamIndex)
			{
				CharacterBody component = ((Component)other).GetComponent<CharacterBody>();
				if (Object.op_Implicit((Object)(object)component))
				{
					component.AddTimedBuff(Buffs.BuffCoffeeBag, coffeeBuffDuration);
					EffectManager.SimpleEffect(self.pickupEffect, ((Component)self).transform.position, Quaternion.identity, true);
					self.alive = false;
					component.OnPickup((PickupClass)1);
					self.pooler.Cleanup();
				}
			}
		}

		private void OnCoffeeDamage(Action<CoffeeBag, DamageReport> orig, CoffeeBag self, DamageReport report)
		{
		}

		private void OnCoffeeStat(Action<CoffeeBag, CharacterBody, StatHookEventArgs> orig, CoffeeBag self, CharacterBody sender, StatHookEventArgs args)
		{
			int val = (Object.op_Implicit((Object)(object)sender.inventory) ? sender.inventory.GetItemCountEffective(((SS2Item)self).ItemDef) : 0);
			val = Math.Max(val, 1);
			int buffCount = sender.GetBuffCount(Buffs.BuffCoffeeBag);
			if (buffCount > 0)
			{
				args.attackSpeedMultAdd += 0.075f * (float)buffCount * (float)val;
				args.moveSpeedMultAdd += 0.07f * (float)buffCount * (float)val;
			}
		}

		private void OnEchoStat(Action<WarpedEcho, CharacterBody, StatHookEventArgs, Inventory> orig, WarpedEcho self, CharacterBody sender, StatHookEventArgs args, Inventory inventory)
		{
			if (sender.HasBuff(Buffs.DelayedDamageBuff))
			{
				int num = 0;
				if (Object.op_Implicit((Object)(object)sender.inventory))
				{
					num = sender.inventory.GetItemCountEffective(Items.DelayedDamage);
				}
				args.attackSpeedMultAdd += 0.15f * (float)num;
				args.moveSpeedMultAdd += 0.15f * (float)num;
				args.cooldownMultAdd -= 1f - Mathf.Pow(0.9f, (float)num);
			}
		}

		private void OnToxicKill(Action<ToxicodendronBrineBehavior, CharacterBody, DamageReport> orig, ToxicodendronBrineBehavior self, CharacterBody body, DamageReport report)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			float num = ((float)report.attackerBody.inventory.GetItemCountEffective(ToxicodendronBrine.ToxicodendronBrineDef.itemIndex) - 1f) * 0.1f;
			float num2 = report.attackerBody.skillLocator.GetSkill((SkillSlot)0).rechargeStopwatch * num;
			float num3 = report.attackerBody.skillLocator.GetSkill((SkillSlot)1).rechargeStopwatch * num;
			float num4 = report.attackerBody.skillLocator.GetSkill((SkillSlot)2).rechargeStopwatch * num;
			float num5 = report.attackerBody.skillLocator.GetSkill((SkillSlot)3).rechargeStopwatch * num;
			GenericSkill skill = report.attackerBody.skillLocator.GetSkill((SkillSlot)0);
			skill.rechargeStopwatch += num2;
			GenericSkill skill2 = report.attackerBody.skillLocator.GetSkill((SkillSlot)1);
			skill2.rechargeStopwatch += num3;
			GenericSkill skill3 = report.attackerBody.skillLocator.GetSkill((SkillSlot)2);
			skill3.rechargeStopwatch += num4;
			GenericSkill skill4 = report.attackerBody.skillLocator.GetSkill((SkillSlot)3);
			skill4.rechargeStopwatch += num5;
			orig(self, body, report);
		}

		public void IL_DotBypassArmor(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: 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_009d: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			MoveType val4 = (MoveType)2;
			if (val2.TryGotoNext(val4, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchMul(x),
				(Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(Mathf), "Min"),
				(Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(DotStack), "damage")
			}))
			{
				val.Emit(OpCodes.Ldloc, 5);
				val.Emit(OpCodes.Ldc_I4, 2);
				val.EmitDelegate<Action<DotStack, DamageType>>((Action<DotStack, DamageType>)delegate(DotStack dotStack, DamageType type)
				{
					//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)
					dotStack.damageType = DamageTypeCombo.op_Implicit(type);
				});
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		public void IL_TakeDamageArmor(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: 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_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: 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_01ad: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			MoveType val4 = (MoveType)2;
			if (val2.TryGotoNext(val4, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "NetworkSoundEventDefs/nseArmorPlateBlock")
			}))
			{
				ILCursor val5 = val;
				Func<Instruction, bool>[] array = new Func<Instruction, bool>[1];
				array[0] = (Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(EntitySoundManager), "EmitSoundServer");
				array[1] = (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0);
				if (val5.TryGotoNext(val4, array))
				{
					Instruction next = val.Next;
					ILCursor val6 = val;
					ILLabel val8 = default(ILLabel);
					if (val6.TryGotoPrev(val4, new Func<Instruction, bool>[1]
					{
						(Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val8)
					}))
					{
						val.Emit(OpCodes.Ldloc_0);
						val.EmitDelegate<Func<DamageInfo, bool>>((Func<DamageInfo, bool>)((DamageInfo damageInfo) => (DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) == 0) ? true : false));
						val.Emit(OpCodes.Brfalse, next);
						ILCursor val7 = val;
						if (val7.TryGotoNext(val3, new Func<Instruction, bool>[1]
						{
							(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 5f)
						}))
						{
							val.Emit(OpCodes.Ldloc_0);
							val.EmitDelegate<Func<DamageInfo, bool>>((Func<DamageInfo, bool>)((DamageInfo damageInfo) => (DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) == 0) ? true : false));
							val.Emit(OpCodes.Brfalse, next);
						}
						else
						{
							Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!");
						}
					}
					else
					{
						Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!");
					}
				}
				else
				{
					Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
				}
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		public void IL_MultikillStats(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "IncreaseDamageBuff")
			}))
			{
				ILCursor val4 = val;
				if (val4.TryGotoNext(val3, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.01f)
				}))
				{
					val.Next.Operand = multikillDamageStack;
					ILCursor val5 = val;
					if (val5.TryGotoNext(val3, new Func<Instruction, bool>[1]
					{
						(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.035f)
					}))
					{
						val.Next.Operand = multikillDamage;
					}
					else
					{
						Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!");
					}
				}
				else
				{
					Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
				}
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		public void IL_MultikillTimer(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 7f)
			}))
			{
				val.Next.Operand = multikillDuration;
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		private void OnEliteDeath(DamageReport report)
		{
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: 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_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			if (!NetworkServer.active)
			{
				return;
			}
			CharacterBody victimBody = report.victimBody;
			if (!victimBody.isElite)
			{
				return;
			}
			CharacterBody attackerBody = report.attackerBody;
			CharacterMaster attackerMaster = report.attackerMaster;
			Inventory val = (Object.op_Implicit((Object)(object)attackerMaster) ? attackerMaster.inventory : null);
			if (!Object.op_Implicit((Object)(object)val))
			{
				return;
			}
			int itemCountEffective = val.GetItemCountEffective(Items.HeadHunter);
			if (itemCountEffective <= 0)
			{
				return;
			}
			float num = (attackerBody.maxHealth + attackerBody.maxShield) * vultureHealPercent;
			attackerBody.healthComponent.Heal(num, report.damageInfo.procChainMask, true);
			EquipmentIndex val2 = (EquipmentIndex)(-1);
			EquipmentDef val3 = null;
			if (!Object.op_Implicit((Object)(object)victimBody.equipmentSlot))
			{
				return;
			}
			val2 = victimBody.equipmentSlot.equipmentIndex;
			val3 = EquipmentCatalog.GetEquipmentDef(val2);
			if (Object.op_Implicit((Object)(object)val3) && !((object)(EquipmentIndex)(ref val2)).Equals((object?)EquipmentCatalog.FindEquipmentIndex("EliteVoidEquipment")))
			{
				float num2 = (float)itemCountEffective * vultureDropChance;
				if (Util.CheckRoll(num2, attackerMaster))
				{
					PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(val2), report.victimBody.corePosition, Vector3.up * 20f);
				}
			}
		}

		public void IL_EliteDeath(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: 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_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			MoveType val4 = (MoveType)1;
			MoveType val5 = (MoveType)2;
			if (val2.TryGotoNext(val5, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 77)
			}))
			{
				Instruction next = val.Next;
				val.Emit(OpCodes.Ldc_I4, 0);
				val.Emit(OpCodes.Stloc, 77);
				val.Emit(OpCodes.Br, next);
				ILCursor val6 = val;
				if (val6.TryGotoNext(val3, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 3f)
				}))
				{
					val.Next.Operand = 0f;
					ILCursor val7 = val;
					if (val7.TryGotoNext(val3, new Func<Instruction, bool>[1]
					{
						(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 5f)
					}))
					{
						val.Next.Operand = 0f;
					}
					else
					{
						Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!");
					}
				}
				else
				{
					Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
				}
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		public void IL_EliteDamage(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)2;
			ILLabel val4 = default(ILLabel);
			if (val2.TryGotoNext(val3, new Func<Instruction, bool>[4]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterMaster>(x, "get_inventory"),
				(Instruction x) => ILPatternMatchingExt.MatchCall<Object>(x, "op_Implicit"),
				(Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val4),
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 4)
			}))
			{
				val.Index -= 1;
				Instruction next = val.Next;
				val.Emit(OpCodes.Ldarg_0);
				val.Emit(OpCodes.Ldloc_1);
				val.EmitDelegate<Func<HealthComponent, CharacterMaster, float>>((Func<HealthComponent, CharacterMaster, float>)delegate(HealthComponent self, CharacterMaster characterMaster)
				{
					float num = 1f;
					int itemCountEffective = characterMaster.inventory.GetItemCountEffective(Items.BossDamageBonus);
					int itemCountEffective2 = characterMaster.inventory.GetItemCountEffective(Items.HeadHunter);
					if (self.body.isElite)
					{
						if (itemCountEffective > 0 && !self.body.isBoss)
						{
							num *= 1f + apRoundsEliteDamage * (float)itemCountEffective;
						}
						if (itemCountEffective2 > 0 && (double)self.combinedHealth > (double)self.fullCombinedHealth * 0.5)
						{
							num *= 1f + vultureEliteDamage * (float)itemCountEffective2;
						}
					}
					return num;
				});
				val.Emit(OpCodes.Ldloc, 10);
				val.Emit(OpCodes.Mul);
				val.Emit(OpCodes.Stloc, 10);
				val.Emit(OpCodes.Br, next);
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		private void OnMeatStats(CharacterBody sender, StatHookEventArgs args)
		{
			if (Object.op_Implicit((Object)(object)sender) && Object.op_Implicit((Object)(object)sender.inventory))
			{
				int itemCountEffective = sender.inventory.GetItemCountEffective(Items.FlatHealth);
				if (itemCountEffective > 0)
				{
					float num = (float)itemCountEffective * (meatHealth - 25f);
					args.baseHealthAdd += num;
					float num2 = sender.GetBuffCount(MeatBuff);
					args.baseRegenAdd += num2 * meatRegenAmount;
				}
			}
		}

		public void IL_MeatEffect(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: 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_0079: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			MoveType val4 = (MoveType)2;
			if (val2.TryGotoNext(val4, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs), "MeatRegenBoost"),
				(Instruction x) => ILPatternMatchingExt.MatchCall(x, typeof(CharacterBody), "HasBuff")
			}))
			{
				val.Emit(OpCodes.Pop);
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Func<CharacterBody, bool>>((Func<CharacterBody, bool>)((CharacterBody self) => self.HasBuff(MeatBuff)));
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		private void OnMeatDeath(DamageReport report)
		{
			if (!NetworkServer.active)
			{
				return;
			}
			CharacterBody attackerBody = report.attackerBody;
			if (!Object.op_Implicit((Object)(object)attackerBody))
			{
				return;
			}
			Inventory inventory = attackerBody.inventory;
			if (Object.op_Implicit((Object)(object)inventory))
			{
				int itemCountEffective = inventory.GetItemCountEffective(Items.FlatHealth);
				if (itemCountEffective > 0)
				{
					float stackedStats = GetStackedStats(meatDuration, meatDurationStack, itemCountEffective);
					int stackedStatsInt = GetStackedStatsInt(meatMax, meatMaxStack, itemCountEffective);
					attackerBody.AddTimedBuff(MeatBuff, stackedStats, stackedStatsInt);
				}
			}
		}

		public void IL_ProcessHit(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: 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_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			MoveType val4 = (MoveType)2;
			if (val2.TryGotoNext(val4, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterBody>(x, "get_aimOrigin"),
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, 13),
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 10)
			}))
			{
				val.Index -= 1;
				Instruction next = val.Next;
				val.Emit(OpCodes.Ldloc_0);
				val.Emit(OpCodes.Ldloc_1);
				val.Emit(OpCodes.Ldarg_1);
				val.Emit(OpCodes.Ldloc, 10);
				val.Emit(OpCodes.Ldarg_2);
				val.EmitDelegate<Action<CharacterBody, CharacterBody, DamageInfo, Inventory, GameObject>>((Action<CharacterBody, CharacterBody, DamageInfo, Inventory, GameObject>)delegate(CharacterBody characterBody, CharacterBody victimBody, DamageInfo damageInfo, Inventory inventory, GameObject victim)
				{
					//IL_0004: Unknown result type (might be due to invalid IL or missing references)
					//IL_000e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0013: Unknown result type (might be due to invalid IL or missing references)
					//IL_018e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0073: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
					//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
					//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
					bool flag = true;
					if (DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)128)) != 0 || characterBody.HasBuff(Buffs.AffixRed))
					{
						flag = false;
					}
					if (flag)
					{
						int itemCountEffective = inventory.GetItemCountEffective(Items.StrengthenBurn);
						if (itemCountEffective > 0 && !characterBody.HasBuff(IgnitionCooldown))
						{
							float num = 0.5f;
							InflictDotInfo val5 = default(InflictDotInfo);
							val5.attackerObject = damageInfo.attacker;
							val5.victimObject = victim;
							val5.totalDamage = damageInfo.damage * num;
							val5.damageMultiplier = 1f;
							val5.dotIndex = (DotIndex)1;
							val5.maxStacksFromAttacker = uint.MaxValue;
							val5.hitHurtBox = damageInfo.inflictedHurtbox;
							InflictDotInfo val6 = val5;
							if (Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<OilController>()))
							{
								ProjectileController component = damageInfo.attacker.GetComponent<ProjectileController>();
								CharacterMaster component2 = component.owner.GetComponent<CharacterMaster>();
								if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component2))
								{
									StrengthenBurnUtils.CheckDotForUpgrade(component2.inventory, ref val6);
								}
							}
							else
							{
								StrengthenBurnUtils.CheckDotForUpgrade(inventory, ref val6);
							}
							DotController.InflictDot(ref val6);
							float num2 = ignitionCooldownTime / ConvertReductionIntoStackingDivision(ignitionCooldownTime, itemCountEffective);
							characterBody.AddTimedBuff(IgnitionCooldown, num2);
						}
					}
					if (BaseChanges.HasVanillaVoid && Object.op_Implicit((Object)(object)victimBody))
					{
						ItemDef itemDef = ItemCatalog.GetItemDef(ItemCatalog.FindItemIndex("VV_ITEM_CORE_ITEM"));
						if ((Object)(object)itemDef != (Object)null && inventory.GetItemCountEffective(itemDef) > 0 && Object.op_Implicit((Object)(object)characterBody.master) && Util.CheckRoll(coreSlowChance * damageInfo.procCoefficient, characterBody.master))
						{
							float stackedStats = GetStackedStats(coreDuration, coreDurationStack, inventory.GetItemCountEffective(itemDef));
							victimBody.AddTimedBuff(Buffs.ClayGoo, stackedStats);
						}
					}
				});
				val.Emit(OpCodes.Br, next);
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		public void IL_StrengthenBurn(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 3)
			}))
			{
				val.Next.Operand = ignitionBurnBonus;
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		private void OnDuplicatorDeath(DamageReport report)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Expected O, but got Unknown
			//IL_00d8: 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_00e2: 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_00f9: 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_0110: Unknown result type (might be due to invalid IL or missing references)
			if (!NetworkServer.active)
			{
				return;
			}
			rng = new Xoroshiro128Plus(Run.instance.treasureRng.nextUlong);
			CharacterBody attackerBody = report.attackerBody;
			if (!Object.op_Implicit((Object)(object)attackerBody))
			{
				return;
			}
			Inventory inventory = attackerBody.inventory;
			if (!Object.op_Implicit((Object)(object)inventory))
			{
				return;
			}
			int itemCountEffective = inventory.GetItemCountEffective(Items.Duplicator);
			if (itemCountEffective > 0 && Object.op_Implicit((Object)(object)report.victimMaster) && Object.op_Implicit((Object)(object)report.victimBody))
			{
				PickupDropTable dropTable = Surprise.dropTable;
				if (Util.CheckRoll(duplicatorDropChance, report.attackerMaster) && Object.op_Implicit((Object)(object)dropTable))
				{
					PickupIndex pickupIndex = dropTable.GeneratePickup(rng).pickupIndex;
					UniquePickup val = default(UniquePickup);
					((UniquePickup)(ref val))..ctor(pickupIndex);
					val.decayValue = 1f;
					PickupDropletController.CreatePickupDroplet(val, report.victimBody.corePosition, Vector3.up * 20f);
				}
			}
		}

		public void IL_Duplicator(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 10)
			}))
			{
				val.Next.Operand = duplicatorDuration;
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		public void IL_GrantTempItem(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(Inventory), "GiveItemPermanent")
			}))
			{
				ILCursor val4 = val;
				Func<Instruction, bool>[] array = new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1f)
				};
				if (val4.TryGotoNext(val3, array))
				{
					val.Next.Operand = 0f;
					ILCursor val5 = val;
					if (val5.TryGotoNext(val3, array))
					{
						val.Next.Operand = 0f;
					}
					else
					{
						Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!");
					}
				}
				else
				{
					Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
				}
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		public void IL_ChanceShrine(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Expected O, but got Unknown
			//IL_008f: 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_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: 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_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			MoveType val4 = (MoveType)2;
			if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 30)
			}))
			{
				val.Next.Operand = 50;
				ILCursor val5 = val;
				if (val5.TryGotoNext(val4, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 5)
				}))
				{
					val.Emit(OpCodes.Pop);
					val.Emit(OpCodes.Ldc_I4, 0);
				}
				else
				{
					Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
				}
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
			ILCursor val6 = new ILCursor(il);
			ILCursor val7 = val6;
			ILLabel val9 = default(ILLabel);
			if (val7.TryGotoNext(val4, new Func<Instruction, bool>[4]
			{
				(Instruction x) => ILPatternMatchingExt.MatchBr(x, ref val9),
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(ShrineChanceBehavior), "chanceDollWin")
			}))
			{
				val6.Index -= 2;
				val6.Emit(OpCodes.Ldarg_0);
				val6.Emit(OpCodes.Ldloc_1);
				val6.Emit(OpCodes.Ldloc_2);
				val6.EmitDelegate<Action<ShrineChanceBehavior, CharacterBody, Inventory>>((Action<ShrineChanceBehavior, CharacterBody, Inventory>)delegate(ShrineChanceBehavior self, CharacterBody component, Inventory inventory)
				{
					//IL_003b: 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_0058: Unknown result type (might be due to invalid IL or missing references)
					//IL_005f: Unknown result type (might be due to invalid IL or missing references)
					//IL_006a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0074: Unknown result type (might be due to invalid IL or missing references)
					//IL_0096: Unknown result type (might be due to invalid IL or missing references)
					//IL_009b: Unknown result type (might be due to invalid IL or missing references)
					//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
					//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
					//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b8: 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_00c4: Unknown result type (might be due to invalid IL or missing references)
					//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
					//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
					//IL_00d9: Expected O, but got Unknown
					if (inventory.GetItemCountEffective(Items.ExtraShrineItem) > 0 && Util.CheckRoll((float)(inventory.GetItemCountEffective(Items.ExtraShrineItem) * 10), component.master))
					{
						CreatePickupInfo val8 = default(CreatePickupInfo);
						((CreatePickupInfo)(ref val8)).pickupIndex = PickupCatalog.FindPickupIndex(Items.ScrapWhite.itemIndex);
						PickupDropletController.CreatePickupDroplet(val8, self.dropletOrigin.position, self.dropletOrigin.forward * 20f);
						Util.PlaySound("Play_ui_artifact_delusion_success", ((Component)component).gameObject);
						EffectManager.SpawnEffect(self.effectPrefabShrineRewardJackpotVFX, new EffectData
						{
							origin = ((Component)self).transform.position,
							rotation = Quaternion.identity,
							scale = 1f,
							color = Color32.op_Implicit(Color.white)
						}, true);
					}
				});
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!");
			}
		}

		public void IL_NotMoving(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1f)
			}))
			{
				val.Next.Operand = bungusTimer;
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		public void OnLanternUpdate(orig_UpdateValues orig, AttackSpeedPerNearbyCollider self, int itemCount, out float diameter)
		{
			orig.Invoke(self, itemCount, ref diameter);
			self.maxCharacterCount = lanternAlly + (itemCount - 1) * lanternAllyStack;
			diameter = lanternRadius + ((float)itemCount - 1f) * lanternRadiusStack;
		}

		public void OnLanternStart(orig_Start orig, AttackSpeedPerNearbyCollider self)
		{
			self.syncInterval = 0.5f;
			orig.Invoke(self);
		}

		public void IL_Lantern(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Buffs).GetField("AttackSpeedPerNearbyAllyOrEnemyBuff"))
			}))
			{
				ILCursor val4 = val;
				if (val4.TryGotoNext(val3, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.035f)
				}))
				{
					val.Next.Operand = lanternSpeedStack;
					ILCursor val5 = val;
					if (val5.TryGotoNext(val3, new Func<Instruction, bool>[1]
					{
						(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.065f)
					}))
					{
						val.Next.Operand = lanternSpeed - lanternSpeedStack;
					}
					else
					{
						Log.Error(((MemberReference)il.Method).Name + " Hook 3 failed!");
					}
				}
				else
				{
					Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
				}
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		public void IL_StunDamage(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: 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_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)2;
			bool flag;
			if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, typeof(EffectManager), "SimpleImpactEffect")
			}))
			{
				ILCursor val4 = val;
				MoveType val5 = (MoveType)2;
				flag = val4.TryGotoNext(val5, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<SetStateOnHurt>(x, "SetStun")
				});
			}
			else
			{
				flag = false;
			}
			if (!flag)
			{
				return;
			}
			val.Emit(OpCodes.Ldarg, 1);
			val.Emit(OpCodes.Ldloc, 3);
			val.EmitDelegate<Action<DamageReport, int>>((Action<DamageReport, int>)delegate(DamageReport damageReport, int stunGrenadeCount)
			{
				//IL_001e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0023: Unknown result type (might be due to invalid IL or missing references)
				//IL_002f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0040: Unknown result type (might be due to invalid IL or missing references)
				//IL_0057: Unknown result type (might be due to invalid IL or missing references)
				//IL_0059: Unknown result type (might be due to invalid IL or missing references)
				//IL_005e: Unknown result type (might be due to invalid IL or missing references)
				//IL_006a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0071: Unknown result type (might be due to invalid IL or missing references)
				//IL_0076: Unknown result type (might be due to invalid IL or missing references)
				//IL_007b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0087: Expected O, but got Unknown
				if (NetworkServer.active && Object.op_Implicit((Object)(object)damageReport.attackerBody))
				{
					DamageInfo val6 = new DamageInfo
					{
						attacker = damageReport.attacker,
						crit = damageReport.damageInfo.crit,
						damage = 2f * damageReport.attackerBody.damage,
						damageColorIndex = (DamageColorIndex)3,
						inflictor = damageReport.attacker,
						position = damageReport.damageInfo.position,
						procCoefficient = 0f
					};
					damageReport.victim.TakeDamage(val6);
					GlobalEventManager.instance.OnHitEnemy(val6, ((Component)damageReport.victim).gameObject);
					GlobalEventManager.instance.OnHitAll(val6, ((Component)damageReport.victim).gameObject);
				}
			});
		}

		public void OnAwardExperience(orig_AwardExperience orig, ExperienceManager self, Vector3 origin, CharacterBody body, ulong amount)
		{
			//IL_001c: 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)
			if (body.inventory.GetItemCountEffective(Items.OnLevelUpFreeUnlock) < 1)
			{
				orig.Invoke(self, origin, body, amount);
				return;
			}
			ulong num = amount;
			int num2 = TeamManager.LongstandingSolitudesInParty();
			for (int i = 0; i < num2; i++)
			{
				num = ((i > 2) ? (num - num / 4) : (num - amount / 4));
			}
			orig.Invoke(self, origin, body, num);
		}

		public float OnItemCostScale(orig_GetLongstandingSolitudeItemCostScale orig)
		{
			return 1f + (float)TeamManager.LongstandingSolitudesInParty() * 0.25f;
		}
	}
	public class SurvivorChanges : BaseState
	{
		private Hook ampEnterHook;

		private Hook ampEnterHook2;

		private ILHook ampBaseMeleeHook;

		private ILHook ampMeleeHook;

		private Hook ampSlashHook;

		private Hook surgeEnterHook;

		private Hook surgeUpdateHook;

		private Hook surgeExitHook;

		private Hook ferroEnterHook;

		private Hook bombardEnterHook;

		private ILHook ampSkillsHook;

		private ILHook shovelHook;

		private Hook launchHook;

		private Hook sacrificeHook;

		private Hook tombstoneHook;

		private Hook minionHook;

		private Hook ghoulSpawnHook;

		private Hook tombstoneSpawnHook;

		private ILHook bubbleLoadHook;

		public void Initialize()
		{
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Expected O, but got Unknown
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Expected O, but got Unknown
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Expected O, but got Unknown
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Expected O, but got Unknown
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Expected O, but got Unknown
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Expected O, but got Unknown
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Expected O, but got Unknown
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Expected O, but got Unknown
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Expected O, but got Unknown
			//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01db: Expected O, but got Unknown
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Expected O, but got Unknown
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0248: Expected O, but got Unknown
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: Expected O, but got Unknown
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_027e: Expected O, but got Unknown
			//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02af: Expected O, but got Unknown
			//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e0: Expected O, but got Unknown
			//IL_0307: Unknown result type (might be due to invalid IL or missing references)
			//IL_0311: Expected O, but got Unknown
			//IL_0338: Unknown result type (might be due to invalid IL or missing references)
			//IL_0342: Expected O, but got Unknown
			//IL_0369: Unknown result type (might be due to invalid IL or missing references)
			//IL_0373: Expected O, but got Unknown
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ac: Expected O, but got Unknown
			//IL_03a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b1: Expected O, but got Unknown
			if (!BaseChanges.HasAmpMod)
			{
				Log.Warning("Amp Content Disabled");
			}
			if (!BaseChanges.HasMorticianMod)
			{
				Log.Warning("Mortician Content Disabled");
			}
			if (!BaseChanges.HasSkillsmas)
			{
				Log.Warning("Skillsmas Content Disabled");
			}
			if (BaseChanges.HasAmpMod)
			{
				MethodInfo methodInfo = AccessTools.Method(typeof(Ferroshot), "OnEnter", (Type[])null, (Type[])null);
				ferroEnterHook = new Hook((MethodBase)methodInfo, (Delegate)new Action<Action<Ferroshot>, Ferroshot>(OnFerroEnter));
				MethodInfo methodInfo2 = AccessTools.Method(typeof(PlasmaSlash), "OnEnter", (Type[])null, (Type[])null);
				ampSlashHook = new Hook((MethodBase)methodInfo2, (Delegate)new Action<Action<PlasmaSlash>, PlasmaSlash>(OnSlashEnter));
				MethodInfo methodInfo3 = AccessTools.Method(typeof(BaseMeleeAttack), "OnEnter", (Type[])null, (Type[])null);
				ampBaseMeleeHook = new ILHook((MethodBase)methodInfo3, new Manipulator(IL_BaseMeleeEnter));
				MethodInfo methodInfo4 = AccessTools.Method(typeof(SlashCombo), "OnEnter", (Type[])null, (Type[])null);
				ampMeleeHook = new ILHook((MethodBase)methodInfo4, new Manipulator(IL_MeleeEnter));
				MethodInfo methodInfo5 = AccessTools.Method(typeof(Surge), "OnExit", (Type[])null, (Type[])null);
				surgeExitHook = new Hook((MethodBase)methodInfo5, (Delegate)new Action<Action<Surge>, Surge>(OnSurgeExit));
				MethodInfo methodInfo6 = AccessTools.Method(typeof(Surge), "FixedUpdate", (Type[])null, (Type[])null);
				surgeUpdateHook = new Hook((MethodBase)methodInfo6, (Delegate)new Action<Action<Surge>, Surge>(OnSurgeUpdate));
				MethodInfo methodInfo7 = AccessTools.Method(typeof(Surge), "OnEnter", (Type[])null, (Type[])null);
				surgeEnterHook = new Hook((MethodBase)methodInfo7, (Delegate)new Action<Action<Surge>, Surge>(OnSurgeEnter));
				MethodInfo methodInfo8 = AccessTools.Method(typeof(Fulmination), "OnEnter", (Type[])null, (Type[])null);
				ampEnterHook2 = new Hook((MethodBase)methodInfo8, (Delegate)new Action<Action<Fulmination>, Fulmination>(OnAmpEnter2));
				MethodInfo methodInfo9 = AccessTools.Method(typeof(LightningStream), "OnEnter", (Type[])null, (Type[])null);
				ampEnterHook = new Hook((MethodBase)methodInfo9, (Delegate)new Action<Action<LightningStream>, LightningStream>(OnAmpEnter));
			}
			if (BaseChanges.HasMorticianMod)
			{
				MethodInfo methodInfo10 = AccessTools.Method(typeof(SwingShovel), "OnEnter", (Type[])null, (Type[])null);
				shovelHook = new ILHook((MethodBase)methodInfo10, new Manipulator(IL_ShovelEnter));
				MethodInfo methodInfo11 = AccessTools.Method(typeof(BaseLaunchedState), "OnEnter", (Type[])null, (Type[])null);
				launchHook = new Hook((MethodBase)methodInfo11, (Delegate)new Action<Action<BaseLaunchedState>, BaseLaunchedState>(OnLaunchEnter));
				MethodInfo methodInfo12 = AccessTools.Method(typeof(GhoulDeath), "OnEnter", (Type[])null, (Type[])null);
				sacrificeHook = new Hook((MethodBase)methodInfo12, (Delegate)new Action<Action<GhoulDeath>, GhoulDeath>(OnSacrificeEnter));
				MethodInfo methodInfo13 = AccessTools.Method(typeof(TombstoneController), "Start", (Type[])null, (Type[])null);
				tombstoneHook = new Hook((MethodBase)methodInfo13, (Delegate)new Action<Action<TombstoneController>, TombstoneController>(OnTombstoneStart));
				MethodInfo methodInfo14 = AccessTools.Method(typeof(MorrisMinionController), "Start", (Type[])null, (Type[])null);
				minionHook = new Hook((MethodBase)methodInfo14, (Delegate)new Action<Action<MorrisMinionController>, MorrisMinionController>(OnMinionStart));
				MethodInfo methodInfo15 = AccessTools.Method(typeof(SpawnGhoul), "AttemptSpawnGhoul", (Type[])null, (Type[])null);
				ghoulSpawnHook = new Hook((MethodBase)methodInfo15, (Delegate)new Action<Action<SpawnGhoul>, SpawnGhoul>(OnSpawnGhoul));
				MethodInfo methodInfo16 = AccessTools.Method(typeof(TombstoneController), "SpawnGhoulAtClosestNode", (Type[])null, (Type[])null);
				tombstoneSpawnHook = new Hook((MethodBase)methodInfo16, (Delegate)new Action<Action<TombstoneController>, TombstoneController>(OnSpawnGhoulTombstone));
			}
			if (BaseChanges.HasSkillsmas)
			{
				MethodInfo methodInfo17 = AccessTools.Method(typeof(PoisonBubble), "OnLoad", (Type[])null, (Type[])null);
				bubbleLoadHook = new ILHook((MethodBase)methodInfo17, new Manipulator(IL_BubbleLoad));
			}
		}

		public void IL_BubbleLoad(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "RoR2/Base/Croco/CrocoBodyUtilityFamily.asset")
			}))
			{
				val.Next.Operand = "RoR2/Base/Croco/CrocoBodySpecialFamily.asset";
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		public void IL_AmpSkills(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 8f)
			}))
			{
				val.Next.Operand = 11f;
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		public void OnBombardEnter(Action<VoltaicBombardmentFire> orig, VoltaicBombardmentFire self)
		{
			VoltaicBombardmentFire.lightningChargeTimer = 0.05f;
			orig(self);
		}

		public void OnFerroEnter(Action<Ferroshot> orig, Ferroshot self)
		{
			Ferroshot.damageCoefficient = 1.6f;
			orig(self);
		}

		public void OnSlashEnter(Action<PlasmaSlash> orig, PlasmaSlash self)
		{
			self.damageCoefficient = 9.5f;
			self.fireBeamDamage = 7f;
			orig(self);
		}

		public void IL_BaseMeleeEnter(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)2;
			if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(OverlapAttack), "damageType")
			}))
			{
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Action<BaseMeleeAttack>>((Action<BaseMeleeAttack>)delegate(BaseMeleeAttack self)
				{
					//IL_0008: Unknown result type (might be due to invalid IL or missing references)
					//IL_000f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0014: Unknown result type (might be due to invalid IL or missing references)
					self.attack.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)1);
				});
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		public void IL_MeleeEnter(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)2;
			if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(BaseMeleeAttack), "damageType")
			}))
			{
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Action<SlashCombo>>((Action<SlashCombo>)delegate(SlashCombo self)
				{
					//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_0014: Unknown result type (might be due to invalid IL or missing references)
					((BaseMeleeAttack)self).damageType = DamageTypeCombo.op_Implicit(new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)1));
				});
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
			}
			ILCursor val4 = new ILCursor(il);
			ILCursor val5 = val4;
			if (val5.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.1f)
			}))
			{
				val4.Next.Operand = 1f;
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		public void OnSurgeEnter(Action<Surge> orig, Surge self)
		{
			orig(self);
			Object.Destroy((Object)(object)self.boltObject);
			if (Object.op_Implicit((Object)(object)self.utilitySlot) && Object.op_Implicit((Object)(object)Surge.cancelSkillDef))
			{
				self.utilitySlot.UnsetSkillOverride((object)self, Surge.cancelSkillDef, (SkillOverridePriority)4);
			}
			Util.PlaySound("PlayBoltExit", ((EntityState)self).gameObject);
			self.duration = 0.05f;
		}

		public void OnSurgeUpdate(Action<Surge> orig, Surge self)
		{
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: 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_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: 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_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Expected O, but got Unknown
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: 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_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: 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_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: 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_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Expected O, but got Unknown
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)self).fixedAge = ((EntityState)self).fixedAge + ((EntityState)self).GetDeltaTime();
			if (((EntityState)self).isAuthority && ((EntityState)self).age >= self.duration)
			{
				BlastAttack val = new BlastAttack
				{
					attacker = ((EntityState)self).gameObject,
					baseDamage = 8f * ((EntityState)self).characterBody.damage,
					baseForce = 0f,
					attackerFiltering = (AttackerFiltering)2,
					crit = ((EntityState)self).characterBody.RollCrit(),
					damageColorIndex = (DamageColorIndex)16,
					damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)131072), (DamageTypeExtended)8192, (DamageSource)4),
					falloffModel = (FalloffModel)4,
					inflictor = ((EntityState)self).gameObject,
					position = ((EntityState)self).characterBody.transform.position,
					procChainMask = default(ProcChainMask),
					procCoefficient = 1f,
					radius = 18f,
					teamIndex = ((EntityState)self).characterBody.teamComponent.teamIndex
				};
				DamageAPI.AddModdedDamageType(val, DamageTypes.applyCharge);
				val.Fire();
				BlastAttack val2 = new BlastAttack
				{
					attacker = ((EntityState)self).gameObject,
					baseDamage = 0f,
					baseForce = 30f,
					attackerFiltering = (AttackerFiltering)3,
					crit = false,
					damageColorIndex = (DamageColorIndex)0,
					damageType = DamageTypeCombo.op_Implicit((DamageType)0),
					falloffModel = (FalloffModel)1,
					inflictor = ((EntityState)self).gameObject,
					position = ((EntityState)self).characterBody.footPosition,
					procChainMask = default(ProcChainMask),
					procCoefficient = 0f,
					radius = 25f,
					teamIndex = ((EntityState)self).characterBody.teamComponent.teamIndex
				};
				val2.Fire();
				((EntityState)self).outer.SetNextStateToMain();
			}
		}

		public void OnSurgeExit(Action<Surge> orig, Surge self)
		{
		}

		public void IL_ShovelEnter(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: 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)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)2;
			if (val2.TryGotoNext(val3, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchStfld(x, typeof(OverlapAttack), "damageType")
			}))
			{
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Action<SwingShovel>>((Action<SwingShovel>)delegate(SwingShovel self)
				{
					//IL_0008: Unknown result type (might be due to invalid IL or missing references)
					//IL_000f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0014: Unknown result type (might be due to invalid IL or missing references)
					self.attack.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)1);
				});
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Action<SwingShovel>>((Action<SwingShovel>)delegate
				{
					SwingShovel.damageCoefficient = 3.6f;
				});
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		private void OnLaunchEnter(Action<BaseLaunchedState> orig, BaseLaunchedState self)
		{
			BaseLaunchedState.damageCoefficient = 6f;
			orig(self);
		}

		private void OnGhoulEnter(Action<GhoulMelee> orig, GhoulMelee self)
		{
			GhoulMelee.damageCoefficient = 1.2f;
			orig(self);
			self.attack.procCoefficient = 0.5f;
		}

		private void OnSpitEnter(Action<BileSpit> orig, BileSpit self)
		{
			BileSpit.damageCoefficient = 0.8f;
			orig(self);
		}

		private void OnClingEnter(Action<ClingState> orig, ClingState self)
		{
			ClingState.biteInterval = 0.85f;
			orig(self);
		}

		private void OnSacrificeEnter(Action<GhoulDeath> orig, GhoulDeath self)
		{
			GhoulDeath.sacrificedDamageCoefficient = 9.25f;
			GhoulDeath.sacrificedRadius = 20f;
			orig(self);
		}

		private void OnTombstoneStart(Action<TombstoneController> orig, TombstoneController self)
		{
			TombstoneController.soulOrbDamage = 2f;
			orig(self);
		}

		private void OnMinionStart(Action<MorrisMinionController> orig, MorrisMinionController self)
		{
			//IL_000a: Unknown re