Decompiled source of BloonModpackBaseMod v1.7.0

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 ArsonistMod;
using ArsonistMod.Content.Controllers;
using ArsonistMod.Modules;
using ArsonistMod.Modules.Characters;
using ArsonistMod.Modules.Networking;
using ArsonistMod.Modules.Survivors;
using ArsonistMod.SkillStates;
using ArsonistMod.SkillStates.Arsonist.Secondary;
using ArsonistMod.SkillStates.ZeroPointBlast;
using BaseMod.Changes;
using BaseMod.Modules;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Logging;
using EclipseRevamped;
using EnemyAbilities.Abilities.Nullifier;
using EntityStates;
using EntityStates.BrotherMonster;
using FathomlessVoidling.VoidlingEntityStates;
using FathomlessVoidling.VoidlingEntityStates.Phase3;
using GrooveSaladSpikestripContent.Content;
using HarmonyLib;
using IL.RoR2;
using Meltdown;
using Meltdown.Utils;
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 R2API.Networking;
using R2API.Networking.Interfaces;
using RA2Mod.Survivors.Desolator;
using RoR2;
using RoR2.ContentManagement;
using RoR2.Navigation;
using RoR2.Projectile;
using RoR2BepInExPack.GameAssetPaths.Version_1_39_0;
using SkillStates.Ghoul;
using SkillStates.Morris;
using SkillStates.SharedStates;
using Skillsmas.Skills.Croco;
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("ArsonistMod")]
[assembly: IgnoresAccessChecksTo("BubbetsItems")]
[assembly: IgnoresAccessChecksTo("EclipseRevamped")]
[assembly: IgnoresAccessChecksTo("EnemyAbilities")]
[assembly: IgnoresAccessChecksTo("FathomlessVoidling")]
[assembly: IgnoresAccessChecksTo("GrooveSaladSpikestripContent")]
[assembly: IgnoresAccessChecksTo("Meltdown")]
[assembly: IgnoresAccessChecksTo("Morris")]
[assembly: IgnoresAccessChecksTo("RA2Mod")]
[assembly: IgnoresAccessChecksTo("SkillsmasPlugin")]
[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.7.0")]
	[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.7.0";

		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 DamageTypes
	{
		public static ModdedDamageType arsonistLifesteal = DamageAPI.ReserveDamageType();
	}
	public static class States
	{
		internal static List<Type> entityStates = new List<Type>();

		internal static void RegisterStates()
		{
			entityStates.Add(typeof(MasochismFire));
		}
	}
	public static class Projectiles
	{
		internal static GameObject masoFireBall;

		public static GameObject baseFireBall = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_LemurianBruiser.LemurianBigFireball_prefab).WaitForCompletion();

		internal static List<GameObject> projectilePrefabs = new List<GameObject>();

		internal static bool HasArsonistMod => Chainloader.PluginInfos.ContainsKey("com.PopcornFactory.Arsonist");

		internal static void RegisterProjectiles()
		{
			if (HasArsonistMod)
			{
				CreateMasochismFireBall();
				projectilePrefabs.Add(masoFireBall);
			}
			else
			{
				Log.Warning("Arsonist Not Found!");
			}
		}

		private static void CreateMasochismFireBall()
		{
			//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_00ab: 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_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)
			masoFireBall = PrefabAPI.InstantiateClone(baseFireBall, "masoFireBall", true);
			Rigidbody val = masoFireBall.GetComponent<Rigidbody>();
			if (!Object.op_Implicit((Object)(object)val))
			{
				val = masoFireBall.AddComponent<Rigidbody>();
			}
			Object.DestroyImmediate((Object)(object)masoFireBall.GetComponent<ProjectileImpactExplosion>());
			ProjectileImpactExplosion val2 = masoFireBall.AddComponent<ProjectileImpactExplosion>();
			InitializeImpactExplosion(val2);
			((ProjectileExplosion)val2).blastRadius = 5f;
			((ProjectileExplosion)val2).blastProcCoefficient = 0.8f;
			val2.destroyOnEnemy = true;
			val2.destroyOnWorld = true;
			val2.lifetime = 4f;
			val2.impactEffect = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_LemurianBruiser.OmniExplosionVFXLemurianBruiserFireballImpact_prefab).WaitForCompletion();
			((ProjectileExplosion)val2).falloffModel = (FalloffModel)3;
			((ProjectileExplosion)val2).blastDamageCoefficient = 1f;
			val2.timerAfterImpact = false;
			val2.lifetimeAfterImpact = 0f;
			((Component)val2).GetComponent<ProjectileDamage>().damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)1);
			ProjectileController component = masoFireBall.GetComponent<ProjectileController>();
			component.rigidbody = val;
			component.rigidbody.useGravity = false;
			component.rigidbody.mass = 1f;
			component.procCoefficient = 0.8f;
			component.ghostPrefab = AssetsArsonist.fireballWeakGhost;
			component.startSound = "";
		}

		private static void InitializeImpactExplosion(ProjectileImpactExplosion projectileImpactExplosion)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: 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_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			((ProjectileExplosion)projectileImpactExplosion).blastDamageCoefficient = 1f;
			((ProjectileExplosion)projectileImpactExplosion).blastProcCoefficient = 1f;
			((ProjectileExplosion)projectileImpactExplosion).blastRadius = 1f;
			((ProjectileExplosion)projectileImpactExplosion).bonusBlastForce = Vector3.zero;
			((ProjectileExplosion)projectileImpactExplosion).childrenCount = 0;
			((ProjectileExplosion)projectileImpactExplosion).childrenDamageCoefficient = 0f;
			((ProjectileExplosion)projectileImpactExplosion).childrenProjectilePrefab = null;
			projectileImpactExplosion.destroyOnEnemy = true;
			projectileImpactExplosion.destroyOnWorld = true;
			projectileImpactExplosion.detonateOnEnemy = true;
			projectileImpactExplosion.impactOnWorld = true;
			((ProjectileExplosion)projectileImpactExplosion).falloffModel = (FalloffModel)0;
			((ProjectileExplosion)projectileImpactExplosion).fireChildren = false;
			projectileImpactExplosion.lifetime = 0f;
			projectileImpactExplosion.lifetimeAfterImpact = 0f;
			projectileImpactExplosion.lifetimeRandomOffset = 0f;
			projectileImpactExplosion.offsetForLifetimeExpiredSound = 0f;
			projectileImpactExplosion.timerAfterImpact = false;
			((Component)projectileImpactExplosion).GetComponent<ProjectileDamage>().damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)1);
		}
	}
	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_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Expected O, but got Unknown
			States.RegisterStates();
			Projectiles.RegisterProjectiles();
			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());
			contentPack.entityStateTypes.Add(States.entityStates.ToArray());
			contentPack.projectilePrefabs.Add(Projectiles.projectilePrefabs.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 float e6creditMult = 0.2f;

		private Hook e1Hook;

		private Hook platedHook;

		internal static bool HasMeltdown => Chainloader.PluginInfos.ContainsKey("com.pittabread.Meltdown");

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

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

		internal static bool HasArsonistMod => Chainloader.PluginInfos.ContainsKey("com.PopcornFactory.Arsonist");

		internal static bool HasRedAlert => Chainloader.PluginInfos.ContainsKey("com.TheTimesweeper.RedAlert");

		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");

		internal static bool HasSpikestrip => Chainloader.PluginInfos.ContainsKey("com.groovesalad.GrooveSaladSpikestripContent");

		public void Initialize()
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Expected O, but got Unknown
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Expected O, but got Unknown
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Expected O, but got Unknown
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Expected O, but got Unknown
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Expected O, but got Unknown
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Expected O, but got Unknown
			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)
			{
				if (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);
				}
				SceneDirector.onPrePopulateSceneServer += AddNewE6;
				if (!Main.shouldChangeE6.Value)
				{
					Log.Message("Removed Vanilla E6");
					DeathRewards.OnKilledServer += new Manipulator(IL_RemoveE6);
				}
				ChangeDescriptions();
			}
			if (HasSpikestrip)
			{
				MethodInfo methodInfo2 = AccessTools.Method(typeof(PlatedElite), "OnHitEnemyServer", (Type[])null, (Type[])null);
				platedHook = new Hook((MethodBase)methodInfo2, (Delegate)new Action<Action<PlatedElite, DamageInfo, GameObject>, PlatedElite, DamageInfo, GameObject>(OnPlatedHit));
			}
			DotController.AddDot_GameObject_float_HurtBox_DotIndex_float_Nullable1_Nullable1_Nullable1 += new Manipulator(IL_DotBypassArmor);
		}

		private void OnPlatedHit(Action<PlatedElite, DamageInfo, GameObject> orig, PlatedElite self, DamageInfo damageInfo, GameObject victim)
		{
		}

		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!");
			}
		}

		private void AddNewE6(SceneDirector obj)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Invalid comparison between Unknown and I4
			DifficultyIndex selectedDifficulty = Run.instance.selectedDifficulty;
			if ((int)selectedDifficulty >= 8)
			{
				Log.Message("E6 Success!");
				Log.Message(obj.interactableCredit);
				obj.interactableCredit = (int)((float)obj.interactableCredit * (1f - e6creditMult));
				Log.Message(obj.interactableCredit);
			}
		}

		private void IL_RemoveE6(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, 0.8f)
			}))
			{
				val.Next.Operand = 1f;
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 Failed");
			}
		}

		private void ChangeDescriptions()
		{
			string text = "Starts at baseline Monsoon difficulty.\n";
			string text2 = (Main.shouldChangeE1.Value ? "\n<mspace=0.5em>(1)</mspace> Teleporter Enemies: <style=cIsHealth>+50%</style></style>" : "\n<mspace=0.5em>(1)</mspace> Ally Starting Health: <style=cIsHealth>-50%</style></style>");
			string text3 = (Main.shouldChangeE2.Value ? "\n<mspace=0.5em>(2)</mspace> Difficulty Scaling <style=cIsHealth>+25%</style></style>" : "\n<mspace=0.5em>(2)</mspace> Teleporter Radius: <style=cIsHealth>-50%</style></style>");
			string text4 = (Main.shouldChangeE3.Value ? "\n<mspace=0.5em>(3)</mspace> Enemy Elites: <style=cIsHealth>+20%</style></style>" : "\n<mspace=0.5em>(3)</mspace> Ally Fall Damage: <style=cIsHealth>+100% and lethal</style></style>");
			string text5 = "\n<mspace=0.5em>(4)</mspace> Enemy Speed: <style=cIsHealth>+40%</style></style>";
			string text6 = (Main.shouldChangeE5.Value ? "\n<mspace=0.5em>(5)</mspace> Ally Healing: <style=cIsHealth>-25%</style></style>" : "\n<mspace=0.5em>(5)</mspace> Ally Healing: <style=cIsHealth>-50%</style></style>");
			string text7 = "\n<mspace=0.5em>(6)</mspace> Interactables Spawned: <style=cIsHealth>-20%</style></style>";
			string text8 = "\n<mspace=0.5em>(7)</mspace> Enemy Cooldowns: <style=cIsHealth>-50%</style></style>";
			string text9 = "\n<mspace=0.5em>(8)</mspace> Allies recieve <style=cIsHealth>permanent damage</style></style>";
			string text10 = "\"You only celebrate in the light... because I allow it.\" \n\n";
			LanguageAPI.AddOverlay("ECLIPSE_1_DESCRIPTION", text + text2);
			LanguageAPI.AddOverlay("ECLIPSE_2_DESCRIPTION", text + text2 + text3);
			LanguageAPI.AddOverlay("ECLIPSE_3_DESCRIPTION", text + text2 + text3 + text4);
			LanguageAPI.AddOverlay("ECLIPSE_4_DESCRIPTION", text + text2 + text3 + text4 + text5);
			LanguageAPI.AddOverlay("ECLIPSE_5_DESCRIPTION", text + text2 + text3 + text4 + text5 + text6);
			LanguageAPI.AddOverlay("ECLIPSE_6_DESCRIPTION", text + text2 + text3 + text4 + text5 + text6 + text7);
			LanguageAPI.AddOverlay("ECLIPSE_7_DESCRIPTION", text + text2 + text3 + text4 + text5 + text6 + text7 + text8);
			LanguageAPI.AddOverlay("ECLIPSE_8_DESCRIPTION", text10 + text + text2 + text3 + text4 + text5 + text6 + text7 + text8 + text9);
		}

		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 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 Hook fireSprayHook;

		private Hook flamethrowerHook;

		private Hook zeroPointHook;

		private ILHook zeroPointHookIL;

		private Hook flareSalvoHook;

		private Hook flareUpdateHook;

		private Hook flareUpdateHook2;

		private Hook flareEnterHook;

		private Hook masochismConHook;

		private Hook masochismConHook2;

		private Hook spiteConHook;

		private Hook spiteStartHook;

		private Hook addHeatHook;

		private Hook energyHook;

		private Hook arsonistHook;

		private Hook desolatorDebuffHook;

		private ILHook bubbleLoadHook;

		private static GameObject fireExplosionPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Common.TeamAreaIndicator__GroundOnly_prefab).WaitForCompletion();

		public static GameObject lemfireBall = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Lemurian/Fireball.prefab").WaitForCompletion();

		public static float zeroPointJump = 0f;

		public static float zeroPointLongJump = 0f;

		public void Initialize()
		{
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Expected O, but got Unknown
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Expected O, but got Unknown
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Expected O, but got Unknown
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Expected O, but got Unknown
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Expected O, but got Unknown
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Expected O, but got Unknown
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Expected O, but got Unknown
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Expected O, but got Unknown
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: Expected O, but got Unknown
			//IL_0203: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Expected O, but got Unknown
			//IL_0234: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Expected O, but got Unknown
			//IL_0270: Unknown result type (might be due to invalid IL or missing references)
			//IL_027a: Expected O, but got Unknown
			//IL_0275: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Expected O, but got Unknown
			//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b0: Expected O, but got Unknown
			//IL_02d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e1: Expected O, but got Unknown
			//IL_0308: Unknown result type (might be due to invalid IL or missing references)
			//IL_0312: Expected O, but got Unknown
			//IL_0339: Unknown result type (might be due to invalid IL or missing references)
			//IL_0343: Expected O, but got Unknown
			//IL_036a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0374: Expected O, but got Unknown
			//IL_039b: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a5: Expected O, but got Unknown
			//IL_03ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f4: Expected O, but got Unknown
			//IL_041b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0425: 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_0478: Unknown result type (might be due to invalid IL or missing references)
			//IL_0482: Expected O, but got Unknown
			//IL_047d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0487: Expected O, but got Unknown
			//IL_04ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b8: Expected O, but got Unknown
			//IL_04df: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e9: Expected O, but got Unknown
			//IL_0510: Unknown result type (might be due to invalid IL or missing references)
			//IL_051a: Expected O, but got Unknown
			//IL_0541: Unknown result type (might be due to invalid IL or missing references)
			//IL_054b: Expected O, but got Unknown
			//IL_0572: Unknown result type (might be due to invalid IL or missing references)
			//IL_057c: Expected O, but got Unknown
			//IL_05a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ad: Expected O, but got Unknown
			//IL_05d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_05de: Expected O, but got Unknown
			//IL_0605: Unknown result type (might be due to invalid IL or missing references)
			//IL_060f: Expected O, but got Unknown
			//IL_0655: Unknown result type (might be due to invalid IL or missing references)
			//IL_065f: Expected O, but got Unknown
			//IL_0686: Unknown result type (might be due to invalid IL or missing references)
			//IL_0690: Expected O, but got Unknown
			//IL_0697: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a1: Expected O, but got Unknown
			//IL_06a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b3: Expected O, but got Unknown
			//IL_06bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c5: Expected O, but got Unknown
			//IL_074a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0754: Expected O, but got Unknown
			//IL_074f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0759: Expected O, but got Unknown
			//IL_0710: Unknown result type (might be due to invalid IL or missing references)
			//IL_071a: Expected O, but got Unknown
			if (!BaseChanges.HasAmpMod)
			{
				Log.Warning("Amp Content Disabled");
			}
			if (!BaseChanges.HasMorticianMod)
			{
				Log.Warning("Mortician Content Disabled");
			}
			if (!BaseChanges.HasArsonistMod)
			{
				Log.Warning("Arsonist Content Disabled");
			}
			if (!BaseChanges.HasRedAlert)
			{
				Log.Warning("RedAlert 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.HasArsonistMod)
			{
				UpdateText();
				SetupArsonist();
				MethodInfo methodInfo17 = AccessTools.Method(typeof(FireSpray), "FireBall", (Type[])null, (Type[])null);
				fireSprayHook = new Hook((MethodBase)methodInfo17, (Delegate)new Action<Action<FireSpray>, FireSpray>(OnFireBall));
				MethodInfo methodInfo18 = AccessTools.Method(typeof(Flamethrower), "FixedUpdate", (Type[])null, (Type[])null);
				flamethrowerHook = new Hook((MethodBase)methodInfo18, (Delegate)new Action<Action<Flamethrower>, Flamethrower>(OnFlamethrowerUpdate));
				MethodInfo methodInfo19 = AccessTools.Method(typeof(ZeroPointBlastStart), "OnEnter", (Type[])null, (Type[])null);
				zeroPointHook = new Hook((MethodBase)methodInfo19, (Delegate)new Action<Action<ZeroPointBlastStart>, ZeroPointBlastStart>(OnZeroPointEnter));
				MethodInfo methodInfo20 = AccessTools.Method(typeof(ZeroPointBlastStart), "OnEnter", (Type[])null, (Type[])null);
				zeroPointHookIL = new ILHook((MethodBase)methodInfo20, new Manipulator(IL_ZeroPointEnter));
				MethodInfo methodInfo21 = AccessTools.Method(typeof(Flare), "OnEnter", (Type[])null, (Type[])null);
				flareEnterHook = new Hook((MethodBase)methodInfo21, (Delegate)new Action<Action<Flare>, Flare>(OnFlareEnter));
				MethodInfo methodInfo22 = AccessTools.Method(typeof(FlareEffectControllerStrong), "FireSalvos", (Type[])null, (Type[])null);
				flareSalvoHook = new Hook((MethodBase)methodInfo22, (Delegate)new Action<Action<FlareEffectControllerStrong>, FlareEffectControllerStrong>(OnFlareSalvo));
				MethodInfo methodInfo23 = AccessTools.Method(typeof(FlareEffectControllerStrong), "FixedUpdate", (Type[])null, (Type[])null);
				flareUpdateHook = new Hook((MethodBase)methodInfo23, (Delegate)new Action<Action<FlareEffectControllerStrong>, FlareEffectControllerStrong>(OnFlareUpdateStrong));
				MethodInfo methodInfo24 = AccessTools.Method(typeof(FlareEffectControllerStrongChild), "FixedUpdate", (Type[])null, (Type[])null);
				flareUpdateHook2 = new Hook((MethodBase)methodInfo24, (Delegate)new Action<Action<FlareEffectControllerStrongChild>, FlareEffectControllerStrongChild>(OnFlareUpdateChild));
				MethodInfo methodInfo25 = AccessTools.Method(typeof(MasochismController), "Start", (Type[])null, (Type[])null);
				masochismConHook = new Hook((MethodBase)methodInfo25, (Delegate)new Action<Action<MasochismController>, MasochismController>(OnMasochismControllerStart));
				MethodInfo methodInfo26 = AccessTools.Method(typeof(MasochismController), "DetermineMasoActivateable", (Type[])null, (Type[])null);
				masochismConHook2 = new Hook((MethodBase)methodInfo26, (Delegate)new Action<Action<MasochismController>, MasochismController>(OnMasoActivatable));
				MethodInfo methodInfo27 = AccessTools.Method(typeof(SpiteController), "ActivateMaso", (Type[])null, (Type[])null);
				spiteConHook = new Hook((MethodBase)methodInfo27, (Delegate)new Action<Action<SpiteController>, SpiteController>(OnSpiteActivated));
				MethodInfo methodInfo28 = AccessTools.Method(typeof(SpiteController), "Start", (Type[])null, (Type[])null);
				spiteStartHook = new Hook((MethodBase)methodInfo28, (Delegate)new Action<Action<SpiteController>, SpiteController>(OnSpiteStart));
				MethodInfo methodInfo29 = AccessTools.Method(typeof(EnergySystem), "AddHeat", new Type[2]
				{
					typeof(float),
					typeof(bool)
				}, (Type[])null);
				addHeatHook = new Hook((MethodBase)methodInfo29, (Delegate)new Action<Action<EnergySystem, float, bool>, EnergySystem, float, bool>(OnAddHeat));
				MethodInfo methodInfo30 = AccessTools.Method(typeof(EnergySystem), "CalculateEnergyStats", (Type[])null, (Type[])null);
				energyHook = new Hook((MethodBase)methodInfo30, (Delegate)new Action<Action<EnergySystem>, EnergySystem>(OnCalculateEnergy));
				HealthComponent.TakeDamage += new hook_TakeDamage(OnTakeDamageMasochism);
				DotController.InflictDot_refInflictDotInfo += new hook_InflictDot_refInflictDotInfo(OnInflictDot);
				RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(OnArsonistStats);
			}
			if (BaseChanges.HasRedAlert)
			{
				DesolatorSurvivor.DotSpecialProcCoefficient = 0.2f;
				if (BaseChanges.HasMeltdown)
				{
					MethodInfo methodInfo31 = AccessTools.Method(typeof(DesolatorSurvivor), "inflictRadiation", (Type[])null, (Type[])null);
					desolatorDebuffHook = new Hook((MethodBase)methodInfo31, (Delegate)new Action<Action<DesolatorSurvivor, GameObject, GameObject, float, bool>, DesolatorSurvivor, GameObject, GameObject, float, bool>(OnDesolatorDebuff));
				}
			}
			if (BaseChanges.HasSkillsmas)
			{
				MethodInfo methodInfo32 = AccessTools.Method(typeof(PoisonBubble), "OnLoad", (Type[])null, (Type[])null);
				bubbleLoadHook = new ILHook((MethodBase)methodInfo32, new Manipulator(IL_BubbleLoad));
			}
		}

		public void SetupArsonist()
		{
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			StaticValues.overheatAttackSpeedDebuff = 1f;
			StaticValues.flamethrowerWeakDamageCoefficient = 0.75f;
			StaticValues.flamethrowerStrongDamageCoefficient = 0.75f;
			StaticValues.altFlamethrowerWeakDamageCoefficient = 0.9f;
			StaticValues.altFlamethrowerStrongDamageCoefficient = 0.9f;
			StaticValues.flamethrowerBaseTickRate = 3;
			StaticValues.flamethrowerEnergyCost = 20f;
			StaticValues.zeropointpounchDamageCoefficient = 3.5f;
			StaticValues.flareSalvoRadius = 15f;
			StaticValues.flareStrongDamageCoefficient = 3f;
			StaticValues.flareStrongChildDamageCoefficient = 3f;
			Config.masochismSurgeHealOnHitPercentage.Value = 0f;
			StaticValues.masochismSurgeMoveSpeedMultiplier = 1f;
			StaticValues.masochismBasePulseSelfDamageTimer = 9999f;
			StaticValues.masochismSurgeSelfDamage = 0f;
			StaticValues.masochismEnergyIncreaseOverTimePercentage = 0.05f;
			StaticValues.masochismSurgeMultiplierPerStack = 1f;
			StaticValues.masochismSurgeFinalBlastCoefficient = 3f;
			StaticValues.cleanseDamageCoefficient = 1.5f;
			StaticValues.SegmentedValuesOnGaugeAlt = new Vector3(0.625f, 0.275f, 0.1f);
			StaticValues.levelEnergy = 0f;
			StaticValues.backupEnergyGain = 0f;
			StaticValues.lysateEnergyGain = 0f;
			StaticValues.hardlightEnergyGain = 0f;
			StaticValues.levelBlueEnergy = 0f;
			StaticValues.backupBlueGain = 0f;
			StaticValues.lysateBlueGain = 0f;
			StaticValues.hardlightBlueGain = 0f;
			Config.masochismMinimumRequiredToActivate.Value = 1;
			Arsonist.neoMasochismSkillDef.activationState = new SerializableEntityStateType(typeof(MasochismFire));
		}

		private void UpdateText()
		{
			string text = "<style=cKeywordName>Heat Gauge</style> <style=cSub>Your skills can build up or vent <color=#ff5e00>Heat</color>. <color=#ff5e00>Heat</color> automatically cools over time, scaling with <style=cIsDamage>attack speed</style>. If <color=#ff5e00>Heat</color> builds up past <color=#ff5e00>100</color>, you <style=cIsHealth>Overheat</style>.";
			LanguageAPI.Add("KEYWORD_MODDED_GAUGE", text);
			string text2 = "<style=cKeywordName>Heat</style> <style=cSub>Builds up <color=#ff5e00>Heat</color> when used. If used in <style=cIsHealth>Overheat</style>, you <style=cIsHealth>take damage</style> instead.";
			LanguageAPI.Add("KEYWORD_MODDED_HEAT", text2);
			string text3 = "<style=cKeywordName>Overheat</style> <style=cSub>While in <style=cIsHealth>Overheat</style>, you <style=cIsUtility>move 25% faster</style> and some skills have <style=cIsHealth>longer cooldowns</style>. All skills that build up additional <color=#ff5e00>Heat</color> cause you to <style=cIsHealth>take damage</style> proporational to the <color=#ff5e00>Heat</color>.";
			LanguageAPI.Add("KEYWORD_MODDED_OVERHEAT", text3);
			string text4 = "<style=cKeywordName>Anticipation</style> <style=cSub>For every <color=#ff5e00>100 Heat</color> lost and/or gained, recieve 1 stack of <color=#ff5e00>Anticipation</color>, up to maximum of 10. Your special skills require <color=#ff5e00>Anticipation</color> to use.";
			LanguageAPI.Add("KEYWORD_MODDED_ANTICIPATION", text4);
			string text5 = "<color=#ff5e00>Heat Gauge.</color> Your skills deal standard damage in all portions of the gauge.";
			LanguageAPI.Add("MODDED_ARSONIST_BODY_PASSIVE_NORMAL_GAUGE_DESCRIPTION", text5);
			string text6 = "<color=#ff5e00>Heat Gauge.</color> Your skills deal <style=cIsDamage>0.7x</style> damage while in the <color=#ffffff>white portion</color> of the gauge, and <style=cIsDamage>2.5x</style> damage in the <color=#006eff>blue portion</color>.";
			LanguageAPI.Add("MODDED_ARSONIST_BODY_PASSIVE_BLUE_GAUGE_DESCRIPTION", text6);
			ArsonistPassive component = CharacterBase.instance.bodyPrefab.GetComponent<ArsonistPassive>();
			component.normalGaugePassive.skillDescriptionToken = "MODDED_ARSONIST_BODY_PASSIVE_NORMAL_GAUGE_DESCRIPTION";
			component.normalGaugePassive.keywordTokens = new string[2] { "KEYWORD_MODDED_GAUGE", "KEYWORD_MODDED_OVERHEAT" };
			component.blueGaugePassive.skillDescriptionToken = "MODDED_ARSONIST_BODY_PASSIVE_BLUE_GAUGE_DESCRIPTION";
			component.blueGaugePassive.keywordTokens = new string[2] { "KEYWORD_MODDED_GAUGE", "KEYWORD_MODDED_OVERHEAT" };
			string text7 = "<color=#ff5e00>Heat.</color> <style=cIsDamage>Ignite.</style> Fire a ball of fire that deals <style=cIsDamage>225% damage</style> in an area on impact.";
			LanguageAPI.Add("MODDED_ARSONIST_BODY_PRIMARY_FIREBALL_DESCRIPTION", text7);
			Arsonist.primarySkillDef.skillDescriptionToken = "MODDED_ARSONIST_BODY_PRIMARY_FIREBALL_DESCRIPTION";
			Arsonist.primarySkillDef.keywordTokens = new string[2] { "KEYWORD_MODDED_HEAT", "KEYWORD_IGNITE" };
			string text8 = "<color=#ff5e00>Heat.</color> <style=cIsDamage>Ignite.</style> Fire a beam of fire that deals <style=cIsDamage>450% damage</style> per second. Has increased <style=cIsDamage>ignite</style> chance the closer you are to the target.";
			LanguageAPI.Add("MODDED_ARSONIST_BODY_PRIMARY_FLAMETHROWER_DESCRIPTION", text8);
			Arsonist.flamethrowerSkillDef.skillDescriptionToken = "MODDED_ARSONIST_BODY_PRIMARY_FLAMETHROWER_DESCRIPTION";
			Arsonist.flamethrowerSkillDef.keywordTokens = new string[2] { "KEYWORD_MODDED_HEAT", "KEYWORD_IGNITE" };
			string text9 = "Vents <style=cIsUtility>30%</style> of your <color=#ff5e00>Current Heat</color>. Fire a flare that can stick to enemies, dealing <style=cIsDamage>500% damage</style> over <style=cIsUtility>5s</style> before exploding into <style=cIsDamage>5 additional flares</style>. Deals <style=cIsDamage>20% more damage</style> per stack of <style=cIsDamage>ignite</style> on the enemy if not in <style=cIsHealth>Overheat</style>.";
			LanguageAPI.Add("MODDED_ARSONIST_BODY_SECONDARY_FLARE_DESCRIPTION", text9);
			Arsonist.flareSkillDef.skillDescriptionToken = "MODDED_ARSONIST_BODY_SECONDARY_FLARE_DESCRIPTION";
			Arsonist.flareSkillDef.keywordTokens = new string[1] { "KEYWORD_MODDED_OVERHEAT" };
			string text10 = "<style=cIsUtility>Agile.</style> Vents <style=cIsUtility>50%</style> of your <color=#ff5e00>Current Heat</color> to launch yourself forwards, blasting enemies for <style=cIsDamage>350% damage</style>. Launch distance increases with the amount of <color=#ff5e00>Heat</color> vented, and it deals no damage in <style=cIsHealth>Overheat</style>.";
			LanguageAPI.Add("MODDED_ARSONIST_BODY_SECONDARY_PUNCH_DESCRIPTION", text10);
			Arsonist.punchSkillDef.skillDescriptionToken = "MODDED_ARSONIST_BODY_SECONDARY_PUNCH_DESCRIPTION";
			Arsonist.punchSkillDef.keywordTokens = new string[2] { "KEYWORD_AGILE", "KEYWORD_MODDED_OVERHEAT" };
			string text11 = "<style=cIsUtility>Agile.</style> Vents <style=cIsUtility>50%</style> <color=#ff5e00>TOTAL Heat</color>. While not in <style=cIsHealth>Overheat</style>, briefly increases your <style=cIsUtility>movement speed</style> and <style=cIsHealing>health regeneration</style>, and ignites nearby foes for <style=cIsDamage>150% damage</style>. Accelerates cooling in <style=cIsHealth>Overheat</style>, at the cost of a much longer recharge time.";
			LanguageAPI.Add("MODDED_ARSONIST_BODY_UTILITY_CLEANSE_DESCRIPTION", text11);
			Arsonist.cleanseSkillDef.skillDescriptionToken = "MODDED_ARSONIST_BODY_UTILITY_CLEANSE_DESCRIPTION";
			Arsonist.cleanseSkillDef.keywordTokens = new string[2] { "KEYWORD_AGILE", "KEYWORD_MODDED_OVERHEAT" };
			string text12 = "<style=cIsDamage>Ignite.</style> Cannot be used in <style=cIsHealth>Overheat</style>. Consumes all <color=#ff5e00>Anticipation</color> to launch a spread of <style=cIsDamage>5 fireballs</style> with <style=cIsHealing>20% lifesteal</style>, each dealing <style=cIsDamage>60% damage</style> per <color=#ff5e00>Anticipation</color> stack. <style=cIsHealth>Overheat</style> immediately after.";
			LanguageAPI.Add("MODDED_ARSONIST_BODY_SPECIAL_MASOCHISM_DESCRIPTION", text12);
			Arsonist.neoMasochismSkillDef.skillDescriptionToken = "MODDED_ARSONIST_BODY_SPECIAL_MASOCHISM_DESCRIPTION";
			Arsonist.neoMasochismSkillDef.keywordTokens = new string[3] { "KEYWORD_MODDED_ANTICIPATION", "KEYWORD_IGNITE", "KEYWORD_MODDED_OVERHEAT" };
			string text13 = "Resets your <color=#ff5e00>Heat Gauge</color>. For <style=cIsUtility>1s</style> per <color=#ff5e00>Anticipation</color> stack, gain <style=cIsUtility>Double Tap</style> and convert <style=cIsDamage>100%</style> of incoming damage into fire damage over time. Once this effect ends, <style=cIsHealth>Overheat</style> and <style=cIsDamage>detonate</style> in an area around you for <style=cIsDamage>300% damage</style> per <color=#ff5e00>Anticipation</color> stack used.";
			LanguageAPI.Add("MODDED_ARSONIST_BODY_SPECIAL_SPITE_DESCRIPTION", text13);
			Arsonist.masochismSurgeSkillDef.skillDescriptionToken = "MODDED_ARSONIST_BODY_SPECIAL_SPITE_DESCRIPTION";
			Arsonist.masochismSurgeSkillDef.keywordTokens = new string[3] { "KEYWORD_MODDED_ANTICIPATION", "POPCORN_ARSONIST_BODY_KEYWORD_MASO_DOUBLE_TAP", "KEYWORD_MODDED_OVERHEAT" };
		}

		public void OnDesolatorDebuff(Action<DesolatorSurvivor, GameObject, GameObject, float, bool> orig, DesolatorSurvivor self, GameObject victim, GameObject attacker, float proc, bool crit)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			InflictDotInfo val = default(InflictDotInfo);
			val.victimObject = victim;
			val.attackerObject = attacker;
			val.dotIndex = Meltdown.irradiated.index;
			val.damageMultiplier = (crit ? 0.6f : 0.3f);
			val.duration = DesolatorSurvivor.DotDuration;
			val.maxStacksFromAttacker = uint.MaxValue;
			InflictDotInfo val2 = val;
			CharacterBody component = attacker.GetComponent<CharacterBody>();
			if ((Object)(object)component != (Object)null && (Object)(object)component.inventory != (Object)null)
			{
				IrradiatedUtils.CheckDotForUpgrade(component.inventory, ref val2);
			}
			DotController.InflictDot(ref val2);
		}

		public void OnArsonistHook(Action<ArsonistPlugin> orig, ArsonistPlugin self)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Expected O, but got Unknown
			orig(self);
			DotController.InflictDot_refInflictDotInfo -= new hook_InflictDot_refInflictDotInfo(self.DotController_InflictDot_refInflictDotInfo);
		}

		private void OnTakeDamageMasochism(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
		{
			//IL_0085: 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_009a: Invalid comparison between Unknown and I4
			//IL_0048: 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_00a3: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Invalid comparison between Unknown and I4
			//IL_0071: 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_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.body))
			{
				if ((Object)(object)damageInfo.attacker != (Object)null)
				{
					CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
					if ((Object)(object)component != (Object)null && DamageAPI.HasModdedDamageType(damageInfo, DamageTypes.arsonistLifesteal))
					{
						component.healthComponent.Heal(damageInfo.damage * 0.2f, default(ProcChainMask), true);
					}
				}
				bool flag = false;
				_ = damageInfo.dotIndex;
				if (true)
				{
					flag = (int)damageInfo.dotIndex == 1 || (int)damageInfo.dotIndex == 2 || (int)damageInfo.dotIndex == 7;
				}
				BuffDef masochismSurgeActiveBuff = Buffs.masochismSurgeActiveBuff;
				if (self.body.HasBuff(Buffs.masochismSurgeActiveBuff) && !flag)
				{
					float damage = damageInfo.damage;
					InflictDotInfo val = default(InflictDotInfo);
					val.totalDamage = damage;
					val.damageMultiplier = 1f;
					val.attackerObject = ((Component)self.body).gameObject;
					val.victimObject = ((Component)self.body).gameObject;
					val.duration = 5f;
					val.dotIndex = (DotIndex)1;
					InflictDotInfo val2 = val;
					DotController.InflictDot(ref val2);
					damageInfo.damage = 0f;
				}
			}
			orig.Invoke(self, damageInfo);
		}

		private void OnInflictDot(orig_InflictDot_refInflictDotInfo orig, ref InflictDotInfo inflictDotInfo)
		{
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Invalid comparison between Unknown and I4
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Invalid comparison between Unknown and I4
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Invalid comparison between Unknown and I4
			if ((Object)(object)inflictDotInfo.victimObject != (Object)null && (Object)(object)inflictDotInfo.attackerObject != (Object)null && (Object)(object)inflictDotInfo.victimObject == (Object)(object)inflictDotInfo.attackerObject)
			{
				CharacterBody component = inflictDotInfo.victimObject.GetComponent<CharacterBody>();
				if ((Object)(object)component != (Object)null && component.baseNameToken == "POPCORN_ARSONIST_BODY_NAME" && ((int)inflictDotInfo.dotIndex == 1 || (int)inflictDotInfo.dotIndex == 2 || (int)inflictDotInfo.dotIndex == 7) && inflictDotInfo.damageMultiplier == 0f)
				{
					Log.Message("Success!");
					inflictDotInfo.damageMultiplier = 1f;
				}
			}
			orig.Invoke(ref inflictDotInfo);
		}

		public void OnCalculateEnergy(Action<EnergySystem> orig, EnergySystem self)
		{
			orig(self);
			self.costmultiplierOverheat = 1f;
			self.costflatOverheat = 0f;
		}

		private void OnArsonistStats(CharacterBody sender, StatHookEventArgs args)
		{
			EnergySystem component = ((Component)sender).GetComponent<EnergySystem>();
			if ((Object)(object)component != (Object)null && component.currentOverheat >= component.maxOverheat)
			{
				args.moveSpeedMultAdd += 0.25f;
			}
			BuffDef cleanseSpeedBoost = Buffs.cleanseSpeedBoost;
			if (sender.HasBuff(cleanseSpeedBoost))
			{
				args.baseRegenAdd += 5f;
				args.levelRegenAdd += 1f;
			}
		}

		public void OnAddHeat(Action<EnergySystem, float, bool> orig, EnergySystem self, float Energy, bool isNatural)
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: 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_00a5: 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_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Expected O, but got Unknown
			if (Energy > 0f && self.currentOverheat >= self.maxOverheat && (Object)(object)self.characterBody.healthComponent != (Object)null)
			{
				DamageInfo val = new DamageInfo
				{
					attacker = null,
					crit = false,
					damage = self.characterBody.healthComponent.fullCombinedHealth * (Energy / 200f),
					damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)64), (DamageTypeExtended)262144, (DamageSource)0),
					damageColorIndex = (DamageColorIndex)3,
					inflictor = ((Component)self.characterBody).gameObject,
					position = ((Component)self.characterBody).gameObject.transform.position,
					procCoefficient = 0f
				};
				self.characterBody.healthComponent.TakeDamage(val);
				self.currentOverheat += Energy;
			}
			else
			{
				orig(self, Energy, isNatural);
			}
		}

		public void OnSpiteActivated(Action<SpiteController> orig, SpiteController self)
		{
			orig(self);
			self.masoStacks++;
		}

		public void OnSpiteStart(Action<SpiteController> orig, SpiteController self)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			orig(self);
			self.finalBlastAttack.attackerFiltering = (AttackerFiltering)2;
		}

		public void OnMasochismControllerStart(Action<MasochismController> orig, MasochismController self)
		{
			Config.masochismMinimumRequiredToActivate.Value = 1;
			orig(self);
		}

		public void OnMasoActivatable(Action<MasochismController> orig, MasochismController self)
		{
			if (self.energySystem.currentOverheat < self.energySystem.maxOverheat)
			{
				orig(self);
			}
			else
			{
				self.skillLoc.special.stock = 0;
			}
		}

		public void OnFlareSalvo(Action<FlareEffectControllerStrong> orig, FlareEffectControllerStrong self)
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: 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_00cd: Unknown result type (might be due to invalid IL or missing references)
			if (NetworkServer.active)
			{
				int num = 5;
				Vector3 position = self.charbody.transform.position;
				float num2 = MathF.PI * 2f / (float)num;
				float num3 = 0f;
				Log.Message(self.charbody.radius);
				for (int i = 0; i < num; i++)
				{
					float num4 = StaticValues.flareSalvoRadius * Mathf.Cos(num3);
					float num5 = StaticValues.flareSalvoRadius * Mathf.Sin(num3);
					float flareSalvoRadius = StaticValues.flareSalvoRadius;
					Vector3 val = new Vector3(num4, flareSalvoRadius, num5);
					Vector3 normalized = ((Vector3)(ref val)).normalized;
					self.FireProjectileSalvo(normalized, new Vector3(position.x + num4 / 9f * self.charbody.radius, position.y, position.z + num5 / 9f * self.charbody.radius));
					num3 += num2;
				}
			}
		}

		public void OnFlareUpdateStrong(Action<FlareEffectControllerStrong> orig, FlareEffectControllerStrong self)
		{
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			//IL_021f: Unknown result type (might be due to invalid IL or missing references)
			//IL_022a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: Unknown result type (might be due to invalid IL or missing references)
			//IL_025a: Expected O, but got Unknown
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Expected O, but got Unknown
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Expected O, but got Unknown
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Expected O, but got Unknown
			if (Object.op_Implicit((Object)(object)self.charbody))
			{
				if (NetworkServer.active)
				{
					if (self.timer > StaticValues.flareInterval)
					{
						if (self.timesFired < StaticValues.flareTickNum)
						{
							EnergySystem component = ((Component)self.arsonistBody).GetComponent<EnergySystem>();
							float num = self.arsonistBody.damage * StaticValues.flareStrongDamageCoefficient / (float)StaticValues.flareTickNum;
							if ((self.charbody.HasBuff(Buffs.OnFire) || self.charbody.HasBuff(Buffs.StrongerBurn)) && component.currentOverheat < component.maxOverheat)
							{
								num *= 1f + (float)(self.charbody.GetBuffCount(Buffs.OnFire) + self.charbody.GetBuffCount(Buffs.StrongerBurn)) * 0.2f;
							}
							self.timesFired++;
							self.timer = 0f;
							NetMessageExtensions.Send((INetMessage)new TakeDamageNetworkRequest(self.charbody.masterObjectId, self.arsonistBody.masterObjectId, num, true), (NetworkDestination)1);
							NetMessageExtensions.Send((INetMessage)new PlaySoundNetworkRequest(((NetworkBehaviour)self.charbody).netId, 3747272580u), (NetworkDestination)1);
						}
						else
						{
							self.hasFired = true;
							self.FireExplosion();
							EffectManager.SpawnEffect(AssetsArsonist.elderlemurianexplosionEffect, new EffectData
							{
								origin = self.charbody.transform.position,
								scale = StaticValues.flareBlastRadius,
								rotation = new Quaternion(0f, 0f, 0f, 0f)
							}, true);
							Object.Destroy((Object)(object)self);
							Object.Destroy((Object)(object)self.effectObj);
						}
					}
					else
					{
						self.timer += Time.fixedDeltaTime;
					}
				}
				else if (self.timer > StaticValues.flareInterval * (float)StaticValues.flareTickNum)
				{
					self.timer += Time.fixedDeltaTime;
				}
				else
				{
					EffectManager.SpawnEffect(AssetsArsonist.elderlemurianexplosionEffect, new EffectData
					{
						origin = self.charbody.transform.position,
						scale = StaticValues.flareBlastRadius,
						rotation = new Quaternion(0f, 0f, 0f, 0f)
					}, true);
					Object.Destroy((Object)(object)self);
					Object.Destroy((Object)(object)self.effectObj);
				}
			}
			else
			{
				Object.Destroy((Object)(object)self.effectObj);
			}
		}

		public void OnFlareUpdateChild(Action<FlareEffectControllerStrongChild> orig, FlareEffectControllerStrongChild self)
		{
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_022d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0232: Unknown result type (might be due to invalid IL or missing references)
			//IL_023d: Expected O, but got Unknown
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Expected O, but got Unknown
			//IL_010d: 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_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Expected O, but got Unknown
			if (Object.op_Implicit((Object)(object)self.charbody))
			{
				if (((NetworkBehaviour)self.arsonistBody).hasAuthority)
				{
					if (self.timer > StaticValues.flareInterval)
					{
						if (self.timesFired < StaticValues.flareTickNum)
						{
							EnergySystem component = ((Component)self.arsonistBody).GetComponent<EnergySystem>();
							float num = self.arsonistBody.damage * StaticValues.flareStrongDamageCoefficient / (float)StaticValues.flareTickNum;
							if ((self.charbody.HasBuff(Buffs.OnFire) || self.charbody.HasBuff(Buffs.StrongerBurn)) && component.currentOverheat < component.maxOverheat)
							{
								num *= 1f + (float)(self.charbody.GetBuffCount(Buffs.OnFire) + self.charbody.GetBuffCount(Buffs.StrongerBurn)) * 0.2f;
							}
							self.timesFired++;
							self.timer = 0f;
							NetMessageExtensions.Send((INetMessage)new TakeDamageNetworkRequest(self.charbody.masterObjectId, self.arsonistBody.masterObjectId, num, true), (NetworkDestination)1);
						}
						else
						{
							self.FireExplosion();
							EffectManager.SpawnEffect(AssetsArsonist.elderlemurianexplosionEffect, new EffectData
							{
								origin = self.charbody.transform.position,
								scale = StaticValues.flareBlastRadius,
								rotation = new Quaternion(0f, 0f, 0f, 0f)
							}, true);
							Object.Destroy((Object)(object)self);
							Object.Destroy((Object)(object)self.effectObj);
						}
					}
					else
					{
						self.timer += Time.fixedDeltaTime;
					}
				}
				else if (self.timer > StaticValues.flareInterval * (float)StaticValues.flareTickNum)
				{
					self.timer += Time.fixedDeltaTime;
				}
				else
				{
					EffectManager.SpawnEffect(AssetsArsonist.elderlemurianexplosionEffect, new EffectData
					{
						origin = self.charbody.transform.position,
						scale = StaticValues.flareBlastRadius,
						rotation = new Quaternion(0f, 0f, 0f, 0f)
					}, true);
					Object.Destroy((Object)(object)self);
					Object.Destroy((Object)(object)self.effectObj);
				}
			}
			else
			{
				Object.Destroy((Object)(object)self);
				Object.Destroy((Object)(object)self.effectObj);
			}
		}

		public void OnFlareEnter(Action<Flare> orig, Flare self)
		{
			orig(self);
			self.isStrong = true;
		}

		public void OnZeroPointEnter(Action<ZeroPointBlastStart> orig, ZeroPointBlastStart self)
		{
			self.energySystem = ((Component)((EntityState)self).characterBody).gameObject.GetComponent<EnergySystem>();
			bool flag = self.energySystem.currentOverheat < self.energySystem.maxOverheat && ((EntityState)self).isAuthority;
			if (flag)
			{
				zeroPointJump = 4f * (1f + self.energySystem.currentOverheat * StaticValues.zeropointHeatReductionMultiplier * 0.02f);
				ZeroPointBlastStart.initialSpeedCoefficient = 7f * (1f + self.energySystem.currentOverheat * StaticValues.zeropointHeatReductionMultiplier * 0.012f);
				ZeroPointBlastStart.finalSpeedCoefficient = 4f * (1f + self.energySystem.currentOverheat * StaticValues.zeropointHeatReductionMultiplier * 0.012f);
			}
			else
			{
				zeroPointJump = 8f;
				ZeroPointBlastStart.initialSpeedCoefficient = 11.2f;
				ZeroPointBlastStart.finalSpeedCoefficient = 6.4f;
			}
			zeroPointLongJump = zeroPointJump * 1.5f;
			orig(self);
			if (!flag)
			{
				self.blastAttack.baseDamage = 0f;
				self.damageCoefficient = 0f;
			}
		}

		public void IL_ZeroPointEnter(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_008d: 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, 6f)
			}))
			{
				val.Next.Operand = zeroPointLongJump;
				ILCursor val4 = val;
				if (val4.TryGotoNext(val3, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 4f)
				}))
				{
					val.Next.Operand = zeroPointJump;
				}
				else
				{
					Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
				}
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		public void OnFlamethrowerUpdate(Action<Flamethrower> orig, Flamethrower self)
		{
			self.interval = self.duration / 3f;
			self.energyCost = self.Energy * ((EntityState)self).characterBody.attackSpeed;
			orig(self);
		}

		public void OnFireBall(Action<FireSpray> orig, FireSpray self)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: 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)
			self.energySystem.AddHeat(self.energyCost);
			Ray aimRay = ((BaseState)self).GetAimRay();
			float num = (self.isBlue ? self.altStrongDamageCoefficient : self.strongdamageCoefficient);
			Vector3 displacedOrigin = self.GetDisplacedOrigin(aimRay);
			if (((EntityState)self).isAuthority)
			{
				ProjectileManager.instance.FireProjectile(Projectiles.artificerFirebolt, displacedOrigin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)self).gameObject, ((BaseState)self).damageStat * num, self.strongforce, Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, self.strongspeedOverride, (DamageTypeCombo?)new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)128), (DamageTypeExtended)0, (DamageSource)1));
			}
		}

		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 result type (might be due to invalid IL or missing references)
			//IL_0010: Invalid comparison between Unknown and I4
			orig(self);
			if ((int)self.minionType == 1)
			{
				self.characterBody.baseDamage = 8f;
				self.characterBody.levelDamage = 1.6f;
			}
		}

		private void OnSpawnGhoul(Action<SpawnGhoul> orig, SpawnGhoul self)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			MasterSummon val = new MasterSummon();
			val.masterPrefab = GhoulMinion.ghoulMasterPrefab;
			val.ignoreTeamMemberLimit = true;
			val.teamIndexOverride = (TeamIndex)1;
			val.summonerBodyObject = ((EntityState)self).gameObject;
			val.position = self.GetBestSpawnPosition(((BaseState)self).GetAimRay());
			val.rotation = Util.QuaternionSafeLookRotation(((EntityState)self).characterDirection.forward);
			if (NetworkServer.active)
			{
				CharacterMaster val2 = val.Perform();
			}
		}

		private void OnSpawnGhoulTombstone(Action<TombstoneController> orig, TombstoneController self)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: 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_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: 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_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			if (!NetworkServer.active)
			{
				Debug.LogWarning((object)"[Server] function 'System.Void Morris.Components.TombstoneController::SpawnGhoulAtClosestNode()' called on client");
				return;
			}
			NodeIndex val = self.nodeGraph.FindClosestNodeWithFlagConditions(((Component)self).transform.position, (HullClassification)0, (NodeFlags)0, (NodeFlags)4, false);
			Vector3 position = default(Vector3);
			self.nodeGraph.GetNodePosition(val, ref position);
			CharacterMaster val2 = new MasterSummon
			{
				masterPrefab = GhoulMinion.ghoulMasterPrefab,
				ignoreTeamMemberLimit = true,
				teamIndexOverride = (TeamIndex)1,
				summonerBodyObject = self.minionController.owner,
				position = position,
				rotation = ((Component)self).transform.rotation
			}.Perform();
		}

		private void OnAmpEnter2(Action<Fulmination> orig, Fulmination self)
		{
			self.entryDuration = 0f;
			orig(self);
			((EntityState)self).characterBody.SetAimTimer(self.entryDuration + self.fulminationDuration);
			self.tickDamageCoefficient = 1.25f;
		}

		private void OnAmpEnter(Action<LightningStream> orig, LightningStream self)
		{
			orig(self);
			self.procCoefficient = 1f;
			self.baseTickTime = 0.4f;
			self.lightningTickDamage = 1.2f;
		}
	}
	public class MasochismFire : BaseSkillState
	{
		private Animator animator;

		public MasochismController maso;

		public ArsonistController arsonistCon;

		public float stopwatch;

		public static float baseActivationTime = 0.16f;

		public static float baseDuration = 0.75f;

		public float duration;

		public EnergySystem energySystem;

		public override void OnEnter()
		{
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: 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_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0247: Unknown result type (might be due to invalid IL or missing references)
			//IL_0255: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Unknown result type (might be due to invalid IL or missing references)
			//IL_0273: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			energySystem = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<EnergySystem>();
			maso = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<MasochismController>();
			((EntityState)this).characterBody.isSprinting = false;
			Ray aimRay = ((BaseState)this).GetAimRay();
			duration = 0.75f / ((EntityState)this).characterBody.attackSpeed;
			((EntityState)this).characterBody.SetAimTimer(duration);
			animator = ((EntityState)this).GetModelAnimator();
			animator.SetBool("attacking", true);
			((EntityState)this).GetModelAnimator().SetFloat("Attack.playbackRate", ((BaseState)this).attackSpeedStat);
			((EntityState)this).PlayCrossfade("Gesture, Override", "FireSpray", "Attack.playbackRate", duration, 0.1f);
			ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator();
			Transform val = modelChildLocator.FindChild("GunMuzzle");
			Vector3 displacedOrigin = GetDisplacedOrigin(aimRay);
			float num = (float)maso.masoStacks * 0.6f;
			float num2 = 0f;
			float num3 = 0f;
			bool crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master);
			if (((EntityState)this).isAuthority)
			{
				DamageTypeCombo value = default(DamageTypeCombo);
				for (int num4 = 5; num4 > 0; num4--)
				{
					switch (num4)
					{
					case 1:
						num2 = 0f;
						num3 = -3f;
						break;
					case 2:
						num2 = 3f;
						num3 = -0.75f;
						break;
					case 3:
						num2 = -3f;
						num3 = -0.75f;
						break;
					case 4:
						num2 = 1.75f;
						num3 = 2.5f;
						break;
					case 5:
						num2 = -1.75f;
						num3 = 2.5f;
						break;
					}
					Vector3 val2 = Util.ApplySpread(((Ray)(ref aimRay)).direction, 0f, 0f, 1f, 1f, num2, num3);
					FireProjectileInfo val3 = default(FireProjectileInfo);
					val3.projectilePrefab = Projectiles.masoFireBall;
					val3.position = displacedOrigin;
					val3.rotation = Util.QuaternionSafeLookRotation(val2);
					val3.owner = ((EntityState)this).gameObject;
					val3.damage = ((BaseState)this).damageStat * num;
					val3.force = 500f;
					val3.crit = crit;
					((FireProjectileInfo)(ref val3)).speedOverride = 80f;
					((DamageTypeCombo)(ref value))..ctor(DamageTypeCombo.op_Implicit((DamageType)128), (DamageTypeExtended)0, (DamageSource)8);
					DamageAPI.AddModdedDamageType(ref value, DamageTypes.arsonistLifesteal);
					val3.damageTypeOverride = value;
					ProjectileManager.instance.FireProjectile(val3);
				}
			}
			Util.PlaySound("Play_lunar_wisp_attack2_launch", ((EntityState)this).gameObject);
			float num5 = 3200f;
			if (((BaseState)this).isGrounded)
			{
				num5 *= 0.25f;
			}
			((EntityState)this).characterMotor.ApplyForce(((Ray)(ref aimRay)).direction * (0f - num5), false, false);
			energySystem.AddHeat(energySystem.maxOverheat * 2f);
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			maso.masoStacks = 0;
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}

		public Vector3 GetDisplacedOrigin(Ray aimRay)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//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_005a: 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)
			float num = 2.5f;
			float num2 = 1.25f;
			Vector3 direction;
			Vector3 result;
			if (!CheckLookingDown(aimRay))
			{
				Vector3 origin = ((Ray)(ref aimRay)).origin;
				direction = ((Ray)(ref aimRay)).direction;
				result = origin + num2 * ((Vector3)(ref direction)).normalized;
			}
			else
			{
				Vector3 origin2 = ((Ray)(ref aimRay)).origin;
				direction = ((Ray)(ref aimRay)).direction;
				result = origin2 + num * ((Vector3)(ref direction)).normalized;
			}
			return result;
		}

		private bool CheckLookingDown(Ray aimRay)
		{
			//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)
			return Vector3.Dot(((Ray)(ref aimRay)).direction, Vector3.down) > 0.6f;
		}
	}
	public class BossChanges : EntityState
	{
		private Hook crushHook;

		private Hook transposeHook;

		private SpawnCard minionSpawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/LunarWisp/cscLunarWisp.asset").WaitForCompletion();

		private SpawnCard constructSpawnCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/Base/LunarExploder/cscLunarExploder.asset").WaitForCompletion();

		public void Initialize()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Expected O, but got Unknown
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Expected O, but got Unknown
			FistSlam.OnEnter += new hook_OnEnter(OnFistSlamEnter);
			FistSlam.FixedUpdate += new hook_FixedUpdate(OnFistSlamUpdate);
			SpellChannelExitState.OnExit += new hook_OnExit(OnSpellExit);
			UltChannelState.FireWave += new hook_FireWave(OnFireWave);
			if (!BaseChanges.HasFathomlessVoidling)
			{
				Log.Warning("FathomlessVoidling Content Disabled");
			}
			if (!BaseChanges.HasEnemyAbilities)
			{
				Log.Warning("EnemyAbilities Content Disabled");
			}
			if (BaseChanges.HasFathomlessVoidling)
			{
				MethodInfo methodInfo = AccessTools.Method(typeof(Crush), "OnEnter", (Type[])null, (Type[])null);
				crushHook = new Hook((MethodBase)methodInfo, (Delegate)new Action<Action<Crush>, Crush>(OnCrushEnter));
				if (BaseChanges.HasEnemyAbilities)
				{
					MethodInfo methodInfo2 = AccessTools.Method(typeof(Transpose), "OnEnter", (Type[])null, (Type[])null);
					transposeHook = new Hook((MethodBase)methodInfo2, (Delegate)new Action<Action<Transpose>, Transpose>(OnTransposeEnter));
				}
			}
		}

		private void OnCrushEnter(Action<Crush> orig, Crush self)
		{
			Crush.missileSpawnFrequency = 3f;
			Crush.damageCoefficient = 4f;
			orig(self);
		}

		private void OnTransposeEnter(Action<Transpose> orig, Transpose self)
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Expected O, but got Unknown
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = default(Vector3);
			for (int i = 0; i < 3; i++)
			{
				float num = Random.Range(-50f, 50f);
				float