Decompiled source of UmbralMithrix v2.5.1

UmbralMithrix.dll

Decompiled a month ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using EntityStates;
using EntityStates.BrotherMonster;
using EntityStates.BrotherMonster.Weapon;
using EntityStates.Destructible;
using EntityStates.LunarWisp;
using EntityStates.Missions.BrotherEncounter;
using IL.RoR2;
using IL.RoR2.CharacterAI;
using KinematicCharacterController;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.EntityStates;
using On.EntityStates.BrotherMonster;
using On.EntityStates.BrotherMonster.Weapon;
using On.EntityStates.Destructible;
using On.EntityStates.Missions.BrotherEncounter;
using On.RoR2;
using On.RoR2.CharacterAI;
using R2API;
using Rewired.ComponentControls.Effects;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.CharacterAI;
using RoR2.Projectile;
using RoR2.Skills;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("UmbralMithrix")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+1127fbc817142ae48e8e479cba4bbe04b115b707")]
[assembly: AssemblyProduct("UmbralMithrix")]
[assembly: AssemblyTitle("UmbralMithrix")]
[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 UmbralMithrix
{
	public class ArbitraryCrystalComponent : MonoBehaviour
	{
	}
	public class CloneController : MonoBehaviour
	{
		private List<CharacterBody> playerBodies = new List<CharacterBody>();

		private SpawnCard cloneCard = UmbralMithrix.mithrixGlassCard;

		private float stopwatch;

		private float interval = 8f;

		private void Start()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Invalid comparison between Unknown and I4
			CharacterMaster[] array = Object.FindObjectsOfType<CharacterMaster>();
			foreach (CharacterMaster val in array)
			{
				if ((int)val.teamIndex == 1)
				{
					CharacterBody body = val.GetBody();
					if (Object.op_Implicit((Object)(object)body) && body.isPlayerControlled)
					{
						playerBodies.Add(body);
					}
				}
			}
		}

		private void FixedUpdate()
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Invalid comparison between Unknown and I4
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Expected O, but got Unknown
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Expected O, but got Unknown
			stopwatch += Time.deltaTime;
			if ((double)stopwatch < (double)interval)
			{
				return;
			}
			CharacterMaster[] array = Object.FindObjectsOfType<CharacterMaster>();
			foreach (CharacterMaster val in array)
			{
				if ((int)val.teamIndex == 1)
				{
					CharacterBody body = val.GetBody();
					if (Object.op_Implicit((Object)(object)body) && body.isPlayerControlled)
					{
						playerBodies.Add(body);
					}
				}
			}
			stopwatch %= interval;
			DirectorPlacementRule val2 = new DirectorPlacementRule();
			val2.placementMode = (PlacementMode)3;
			val2.minDistance = 8f;
			val2.maxDistance = 16f;
			val2.position = playerBodies[Random.Range(0, playerBodies.Count)].corePosition;
			Xoroshiro128Plus rng = RoR2Application.rng;
			DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(cloneCard, val2, rng)
			{
				summonerBodyObject = ((Component)this).gameObject,
				onSpawnedServer = delegate(SpawnResult spawnResult)
				{
					//IL_0000: Unknown result type (might be due to invalid IL or missing references)
					spawnResult.spawnedInstance.GetComponent<Inventory>().GiveItem(Items.HealthDecay, 6);
				}
			});
		}
	}
	public class DeathZoneController : MonoBehaviour
	{
		private SphereZone zone;

		private float stopwatch;

		private float interval = 1f;

		private float zoneRadius = 100f;

		private void Start()
		{
			zone = ((Component)this).gameObject.GetComponent<SphereZone>();
		}

		private void FixedUpdate()
		{
			stopwatch += Time.deltaTime;
			if (!((double)stopwatch < (double)interval))
			{
				stopwatch %= interval;
				if ((double)zone.Networkradius > (double)zoneRadius)
				{
					SphereZone obj = zone;
					obj.Networkradius -= 10f;
				}
			}
		}
	}
	public class P4Controller : MonoBehaviour
	{
		public bool finishedItemSteal;

		private CharacterBody body;

		private bool isServer;

		public List<CharacterBody> playerBodies = new List<CharacterBody>();

		private float shockwaveStopwatch;

		private float pizzaStopwatch;

		private float missileStopwatch;

		private float shockwaveInterval = 3.75f;

		private float pizzaInterval = 1.5f;

		private float missileInterval = 1.25f;

		private void Start()
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Invalid comparison between Unknown and I4
			body = ((Component)this).gameObject.GetComponent<CharacterBody>();
			isServer = ((Component)this).gameObject.GetComponent<NetworkIdentity>().isServer;
			CharacterMaster[] array = Object.FindObjectsOfType<CharacterMaster>();
			foreach (CharacterMaster val in array)
			{
				if ((int)val.teamIndex == 1)
				{
					CharacterBody val2 = val.GetBody();
					if (Object.op_Implicit((Object)(object)val2) && val2.isPlayerControlled)
					{
						playerBodies.Add(val2);
					}
				}
			}
		}

		private void FixedUpdate()
		{
			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0203: Unknown result type (might be due to invalid IL or missing references)
			//IL_0208: Unknown result type (might be due to invalid IL or missing references)
			//IL_0398: Unknown result type (might be due to invalid IL or missing references)
			//IL_039d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03af: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_029d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02db: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: 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_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: 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_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: 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_016c: 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_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			if (finishedItemSteal && Object.op_Implicit((Object)(object)body.healthComponent) && body.healthComponent.alive && isServer)
			{
				missileStopwatch += Time.deltaTime;
				pizzaStopwatch += Time.deltaTime;
				shockwaveStopwatch += Time.deltaTime;
				if (missileStopwatch >= missileInterval)
				{
					missileStopwatch %= 1f;
					int num = 8;
					int num2 = 8;
					Vector3 val = (Object.op_Implicit((Object)(object)body.inputBank) ? body.inputBank.aimDirection : body.transform.forward);
					float num3 = 180f / (float)num;
					float num4 = (float)(3.0 + (double)(int)body.radius * 1.0);
					float damage = body.damage * 0.5f;
					Quaternion rotation = Util.QuaternionSafeLookRotation(val);
					for (int i = 0; i < num; i++)
					{
						Vector3 position = body.aimOrigin + Quaternion.AngleAxis((float)((double)(num2 - 1) * (double)num3 - (double)num3 * (double)(num - 1) / 2.0), val) * Vector3.up * num4;
						ProjectileManager.instance.FireProjectile(new FireProjectileInfo
						{
							projectilePrefab = UmbralMithrix.lunarMissile,
							position = position,
							rotation = rotation,
							owner = ((Component)this).gameObject,
							damage = damage,
							force = 100f
						});
						num2--;
					}
				}
			}
			if (pizzaStopwatch >= pizzaInterval)
			{
				pizzaStopwatch %= 1f;
				Vector3 val2 = Vector3.ProjectOnPlane(body.inputBank.aimDirection, Vector3.up);
				float num5 = 40f;
				Vector3 val3 = default(Vector3);
				((Vector3)(ref val3))..ctor((float)Random.Range(-45, -25), 0f, (float)Random.Range(-45, -25));
				if ((double)Random.value <= 0.5)
				{
					((Vector3)(ref val3))..ctor((float)Random.Range(25, 45), 0f, (float)Random.Range(25, 45));
				}
				GameObject val4 = UmbralMithrix.leftP4Line;
				if ((double)Random.value <= 0.5)
				{
					val4 = UmbralMithrix.rightP4Line;
				}
				Vector3 footPosition = playerBodies[Random.Range(0, playerBodies.Count)].footPosition;
				footPosition.y = 491f;
				Vector3 val5 = footPosition;
				val5 += val3;
				for (int j = 0; j < 9; j++)
				{
					Vector3 val6 = Quaternion.AngleAxis(num5 * (float)j, Vector3.up) * val2;
					ProjectileManager.instance.FireProjectile(val4, val5, Util.QuaternionSafeLookRotation(val6), ((Component)this).gameObject, body.damage * (UltChannelState.waveProjectileDamageCoefficient * 0.5f), UltChannelState.waveProjectileForce / 8f, Util.CheckRoll(body.crit, body.master), (DamageColorIndex)0, (GameObject)null, -1f);
				}
			}
			if (shockwaveStopwatch >= shockwaveInterval)
			{
				shockwaveStopwatch %= 1f;
				Util.PlaySound(ExitSkyLeap.soundString, ((Component)this).gameObject);
				float num6 = 360f / (float)ExitSkyLeap.waveProjectileCount;
				Vector3 val7 = Vector3.ProjectOnPlane(body.inputBank.aimDirection, Vector3.up);
				Vector3 footPosition2 = body.footPosition;
				for (int k = 0; k < ExitSkyLeap.waveProjectileCount; k++)
				{
					Vector3 val8 = Quaternion.AngleAxis(num6 * (float)k, Vector3.up) * val7;
					ProjectileManager.instance.FireProjectile(ExitSkyLeap.waveProjectilePrefab, footPosition2, Util.QuaternionSafeLookRotation(val8), ((Component)this).gameObject, body.damage * (ExitSkyLeap.waveProjectileDamageCoefficient * 0.75f), ExitSkyLeap.waveProjectileForce / 4f, Util.CheckRoll(body.crit, body.master), (DamageColorIndex)0, (GameObject)null, -1f);
				}
			}
		}
	}
	public class SelfDestructController : MonoBehaviour
	{
		private void Start()
		{
			((MonoBehaviour)this).StartCoroutine(SelfDestruct());
		}

		private IEnumerator SelfDestruct()
		{
			yield return (object)new WaitForSeconds(ModConfig.CrushingLeap.Value);
			Object.Destroy((Object)(object)((Component)this).gameObject);
		}
	}
	public class GlassSpawnState : BaseState
	{
		public static float duration;

		public static string spawnSoundString;

		public static float spawnEffectsDelay;

		private bool spawnEffectsTriggered;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			Util.PlaySound(SpawnState.spawnSoundString, ((EntityState)this).gameObject);
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if ((double)((EntityState)this).fixedAge >= (double)SpawnState.spawnEffectsDelay && !spawnEffectsTriggered)
			{
				spawnEffectsTriggered = true;
				EffectManager.SimpleMuzzleFlash(SpawnState.spawnEffectPrefab, ((EntityState)this).gameObject, "MuzzleCenter", false);
			}
			if (!((double)((EntityState)this).fixedAge < (double)SpawnState.duration) && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)7;
		}
	}
	public class MiscHooks
	{
		public MiscHooks()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Expected O, but got Unknown
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Expected O, but got Unknown
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Expected O, but got Unknown
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Expected O, but got Unknown
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Expected O, but got Unknown
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Expected O, but got Unknown
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Expected O, but got Unknown
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Expected O, but got Unknown
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Expected O, but got Unknown
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Expected O, but got Unknown
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Expected O, but got Unknown
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Expected O, but got Unknown
			BaseAI.FindEnemyHurtBox += new Manipulator(TargetOnlyPlayers);
			CharacterBody.UpdateAllTemporaryVisualEffects += new Manipulator(AddUmbralParticles);
			CharacterModel.UpdateOverlays += new Manipulator(AddUmbralOverlay);
			CharacterModel.UpdateOverlays += new Manipulator(AddUmbralOverlayCrystal);
			BaseAI.FindEnemyHurtBox += new hook_FindEnemyHurtBox(ChangeP3CloneTargeting);
			CharacterMaster.OnBodyDeath += new hook_OnBodyDeath(CharacterMaster_OnBodyDeath);
			PurchaseInteraction.OnInteractionBegin += new hook_OnInteractionBegin(PurchaseInteraction_OnInteractionBegin);
			CombatDirector.OnEnable += new hook_OnEnable(CombatDirector_OnEnable);
			HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
			Stage.Start += new hook_Start(Stage_Start);
			Run.Start += new hook_Start(Run_Start);
			CharacterMaster.OnBodyStart += new hook_OnBodyStart(CharacterMaster_OnBodyStart);
			FrozenState.OnEnter += new hook_OnEnter(FrozenState_OnEnter);
			CharacterBody.AddTimedBuff_BuffDef_float += new hook_AddTimedBuff_BuffDef_float(AddTimedBuff_BuffDef_float);
			TimeCrystalDeath.OnEnter += new hook_OnEnter(RemoveUmbralImmune);
			ItemStealController.BrotherItemFilter += new hook_BrotherItemFilter(ItemStealController_BrotherItemFilter);
		}

		private bool ItemStealController_BrotherItemFilter(orig_BrotherItemFilter orig, ItemIndex itemIndex)
		{
			return false;
		}

		private void RemoveUmbralImmune(orig_OnEnter orig, TimeCrystalDeath self)
		{
			if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && (PhaseCounter.instance.phase == 2 || PhaseCounter.instance.phase == 3))
			{
				Debug.LogWarning((object)TimeCrystalDeath.explosionForce);
				TimeCrystalDeath.explosionDamageCoefficient = 0f;
				TimeCrystalDeath.explosionForce = 0f;
				GameObject val = ((PhaseCounter.instance.phase == 2) ? GameObject.Find("BrotherBody(Clone)") : GameObject.Find("BrotherHurtBodyP3(Clone)"));
				if (Object.op_Implicit((Object)(object)val) && val.GetComponent<CharacterBody>().HasBuff(Buffs.Immune) && UmbralMithrix.timeCrystals.Count == 1)
				{
					UmbralMithrix.timeCrystals.RemoveAt(0);
					val.GetComponent<CharacterBody>().RemoveBuff(Buffs.Immune);
				}
				else if (UmbralMithrix.timeCrystals.Count > 0)
				{
					UmbralMithrix.timeCrystals.RemoveAt(0);
				}
			}
			else
			{
				TimeCrystalDeath.explosionForce = 4000f;
				TimeCrystalDeath.explosionDamageCoefficient = 2f;
			}
			orig.Invoke(self);
		}

		private void TargetOnlyPlayers(ILContext il)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<BullseyeSearch>(x, "GetResults")
			}))
			{
				return;
			}
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<Func<IEnumerable<HurtBox>, BaseAI, IEnumerable<HurtBox>>>((Func<IEnumerable<HurtBox>, BaseAI, IEnumerable<HurtBox>>)delegate(IEnumerable<HurtBox> results, BaseAI instance)
			{
				if (Object.op_Implicit((Object)(object)instance) && (((Object)instance.body).name == "BrotherBody(Clone)" || ((Object)instance.body).name == "BrotherGlassBody(Clone)" || ((Object)instance.body).name == "BrotherHurtBody(Clone)"))
				{
					IEnumerable<HurtBox> enumerable = results.Where(delegate(HurtBox hurtBox)
					{
						GameObject val2 = HurtBox.FindEntityObject(hurtBox);
						CharacterBody val3 = default(CharacterBody);
						return Object.op_Implicit((Object)(object)val2) && val2.TryGetComponent<CharacterBody>(ref val3) && val3.isPlayerControlled;
					});
					if (!enumerable.Any())
					{
						return results;
					}
					return enumerable;
				}
				return results;
			});
		}

		private HurtBox ChangeP3CloneTargeting(orig_FindEnemyHurtBox orig, BaseAI self, float maxDistance, bool full360Vision, bool filterByLoS)
		{
			if (Object.op_Implicit((Object)(object)self) && (((Object)self.body).name == "BrotherBody(Clone)" || ((Object)self.body).name == "BrotherGlassBody(Clone)" || ((Object)self.body).name == "BrotherHurtBody(Clone)") && Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 3)
			{
				maxDistance = float.PositiveInfinity;
				filterByLoS = false;
				full360Vision = true;
			}
			return orig.Invoke(self, maxDistance, full360Vision, filterByLoS);
		}

		private void AddUmbralParticles(ILContext il)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext(new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "InvadingDoppelganger")
			});
			val.Index += 2;
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<Func<int, CharacterBody, int>>((Func<int, CharacterBody, int>)delegate(int vengeanceCount, CharacterBody self)
			{
				if (((Object)self).name.Contains("Brother") && Object.op_Implicit((Object)(object)self.inventory) && self.inventory.GetItemCount(UmbralMithrix.UmbralItem) > 0 && ModConfig.purpleMithrix.Value)
				{
					vengeanceCount++;
				}
				return vengeanceCount;
			});
		}

		private void AddUmbralOverlay(ILContext il)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext(new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "InvadingDoppelganger")
			});
			val.Index += 2;
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<Func<int, CharacterModel, int>>((Func<int, CharacterModel, int>)delegate(int vengeanceCount, CharacterModel self)
			{
				if (((Object)self.body).name.Contains("Brother") && Object.op_Implicit((Object)(object)self.body.inventory) && self.body.inventory.GetItemCount(UmbralMithrix.UmbralItem) > 0 && ModConfig.purpleMithrix.Value)
				{
					vengeanceCount++;
				}
				return vengeanceCount;
			});
		}

		private void AddUmbralOverlayCrystal(ILContext il)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.GotoNext(new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, typeof(Items), "InvadingDoppelganger")
			});
			val.Index -= 1;
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<Func<bool, CharacterModel, bool>>((Func<bool, CharacterModel, bool>)((bool hasInventory, CharacterModel self) => (((Object)self.body).name.Contains("Crystal") && Object.op_Implicit((Object)(object)((Component)self.body).gameObject.GetComponent<ArbitraryCrystalComponent>())) || hasInventory));
		}

		private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
		{
			CharacterBody body = self.body;
			if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)self) && ((Object)body).name == "BrotherBody(Clone)" && PhaseCounter.instance.phase == 2 && !UmbralMithrix.p2ThresholdReached && self.health - damageInfo.damage <= self.fullHealth * 0.75f)
			{
				UmbralMithrix.p2ThresholdReached = true;
				P2ThresholdEvent(((Component)body).gameObject);
				self.health = self.fullHealth * 0.75f;
				damageInfo.rejected = true;
				GameObject.Find("BrotherBody(Clone)").GetComponent<CharacterBody>().AddBuff(Buffs.Immune);
			}
			if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)self) && ((Object)body).name == "BrotherHurtBodyP3(Clone)" && PhaseCounter.instance.phase == 3 && !UmbralMithrix.p3ThresholdReached && self.health - damageInfo.damage <= self.fullHealth * 0.75f)
			{
				UmbralMithrix.p3ThresholdReached = true;
				GameObject.Find("BrotherBody(Clone)").GetComponent<HealthComponent>().health = 1f;
				P3ThresholdEvent(((Component)body).gameObject);
				self.health = self.fullHealth * 0.75f;
				damageInfo.rejected = true;
				GameObject.Find("BrotherHurtBodyP3(Clone)").GetComponent<CharacterBody>().AddBuff(Buffs.Immune);
			}
			orig.Invoke(self, damageInfo);
		}

		private void CharacterMaster_OnBodyStart(orig_OnBodyStart orig, CharacterMaster self, CharacterBody body)
		{
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, body);
			if (!Object.op_Implicit((Object)(object)PhaseCounter.instance))
			{
				return;
			}
			if (((Object)body).name == "BrotherHurtBodyP3(Clone)")
			{
				if (ModConfig.purpleMithrix.Value)
				{
					self.inventory.GiveItemString(((Object)UmbralMithrix.UmbralItem).name);
				}
				self.inventory.GiveItemString(((Object)Items.AdaptiveArmor).name);
			}
			if ((((Object)body).name == "BrotherBody(Clone)" || ((Object)body).name == "BrotherGlassBody(Clone)") && ModConfig.purpleMithrix.Value)
			{
				self.inventory.GiveItemString(((Object)UmbralMithrix.UmbralItem).name);
			}
			if (((Object)body).name == "BrotherBody(Clone)")
			{
				if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase != 3)
				{
					((Component)body).gameObject.AddComponent<CloneController>();
				}
				if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 1)
				{
					ChildLocator component = ((Component)SceneInfo.instance).GetComponent<ChildLocator>();
					if (!Object.op_Implicit((Object)(object)component))
					{
						return;
					}
					Transform val = component.FindChild("CenterOfArena");
					if (Object.op_Implicit((Object)(object)val))
					{
						Object.Destroy((Object)(object)((Component)val).gameObject);
					}
				}
			}
			if (((Object)body).name == "BrotherHurtBody(Clone)" && PhaseCounter.instance.phase == 4)
			{
				if (ModConfig.skipPhase4.Value)
				{
					body.healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo));
					return;
				}
				body.levelMoveSpeed = 0f;
				body.baseMoveSpeed = 0f;
				body.inventory.GiveItem(UmbralMithrix.UmbralItem, 1);
				body.AddBuff(Buffs.Immune);
				body.inventory.GiveItem(Items.HealthDecay, 40);
			}
		}

		private void CharacterMaster_OnBodyDeath(orig_OnBodyDeath orig, CharacterMaster self, CharacterBody body)
		{
			orig.Invoke(self, body);
			if (NetworkServer.active && body.isPlayerControlled && UmbralMithrix.practiceModeEnabled && !self.IsExtraLifePendingServer() && Object.op_Implicit((Object)(object)PhaseCounter.instance))
			{
				self.RespawnExtraLife();
			}
		}

		private void CombatDirector_OnEnable(orig_OnEnable orig, CombatDirector self)
		{
			if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && (PhaseCounter.instance.phase == 2 || PhaseCounter.instance.phase == 3))
			{
				((Component)self).gameObject.SetActive(false);
			}
			else
			{
				orig.Invoke(self);
			}
		}

		private void P2ThresholdEvent(GameObject summoner)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Expected O, but got Unknown
			//IL_0028: 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_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Expected O, but got Unknown
			UmbralMithrix.timeCrystals.Clear();
			int num = 4;
			for (int i = 0; i < num; i++)
			{
				DirectorPlacementRule val = new DirectorPlacementRule();
				val.placementMode = (PlacementMode)3;
				val.minDistance = 3f;
				val.maxDistance = 10f;
				val.position = UmbralMithrix.p23PizzaPoints[i];
				Xoroshiro128Plus rng = RoR2Application.rng;
				DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(UmbralMithrix.timeCrystalCard, val, rng)
				{
					summonerBodyObject = summoner,
					onSpawnedServer = delegate(SpawnResult spawnResult)
					{
						//IL_0000: 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_001d: Unknown result type (might be due to invalid IL or missing references)
						spawnResult.spawnedInstance.AddComponent<ArbitraryCrystalComponent>();
						spawnResult.spawnedInstance.GetComponent<TeamComponent>().teamIndex = (TeamIndex)2;
						TetherVfxOrigin obj = spawnResult.spawnedInstance.gameObject.AddComponent<TetherVfxOrigin>();
						obj.tetherPrefab = UmbralMithrix.tether;
						obj.AddTether(summoner.transform);
					}
				});
				UmbralMithrix.timeCrystals.Add(summoner);
			}
		}

		private void P3ThresholdEvent(GameObject summoner)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Expected O, but got Unknown
			//IL_0028: 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_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Expected O, but got Unknown
			UmbralMithrix.timeCrystals.Clear();
			int num = 4;
			for (int i = 0; i < num; i++)
			{
				DirectorPlacementRule val = new DirectorPlacementRule();
				val.placementMode = (PlacementMode)3;
				val.minDistance = 3f;
				val.maxDistance = 10f;
				val.position = UmbralMithrix.p23PizzaPoints[i];
				Xoroshiro128Plus rng = RoR2Application.rng;
				DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(UmbralMithrix.timeCrystalCard, val, rng)
				{
					summonerBodyObject = summoner,
					onSpawnedServer = delegate(SpawnResult spawnResult)
					{
						//IL_0000: 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_001d: Unknown result type (might be due to invalid IL or missing references)
						spawnResult.spawnedInstance.AddComponent<ArbitraryCrystalComponent>();
						spawnResult.spawnedInstance.GetComponent<TeamComponent>().teamIndex = (TeamIndex)2;
						TetherVfxOrigin obj = spawnResult.spawnedInstance.gameObject.AddComponent<TetherVfxOrigin>();
						obj.tetherPrefab = UmbralMithrix.tether;
						obj.AddTether(summoner.transform);
					}
				});
				UmbralMithrix.timeCrystals.Add(summoner);
			}
		}

		private void Run_Start(orig_Start orig, Run self)
		{
			UmbralMithrix.practiceModeEnabled = false;
			orig.Invoke(self);
		}

		private IEnumerator Stage_Start(orig_Start orig, Stage self)
		{
			yield return orig.Invoke(self);
			if (self.sceneDef.cachedName == "moon2")
			{
				UmbralMithrix.ArenaSetup();
				UmbralMithrix.SpawnPracticeModeShrine();
				UmbralMithrix.mithrix.GetComponent<EntityStateMachine>().initialStateType = new SerializableEntityStateType(typeof(ThroneSpawnState));
			}
		}

		private void PurchaseInteraction_OnInteractionBegin(orig_OnInteractionBegin orig, PurchaseInteraction self, Interactor activator)
		{
			if (((Object)self).name == "PracticeModeShrine")
			{
				UmbralMithrix.practiceModeEnabled = true;
			}
			orig.Invoke(self, activator);
		}

		private void FrozenState_OnEnter(orig_OnEnter orig, FrozenState self)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			if (((Object)((EntityState)self).characterBody).name == "BrotherBody(Clone)" && Random.value > 0.5f)
			{
				Ray aimRay = ((BaseState)self).GetAimRay();
				for (int i = 0; i < 6; i++)
				{
					Util.PlaySound(FireLunarShards.fireSound, ((EntityState)self).gameObject);
					ProjectileManager.instance.FireProjectile(FireLunarShards.projectilePrefab, ((Ray)(ref aimRay)).origin, Quaternion.LookRotation(((Ray)(ref aimRay)).direction), ((EntityState)self).gameObject, (float)((double)((EntityState)self).characterBody.damage * 0.100000001490116 / 12.0), 0f, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f);
				}
			}
			orig.Invoke(self);
		}

		private void AddTimedBuff_BuffDef_float(orig_AddTimedBuff_BuffDef_float orig, CharacterBody self, BuffDef buffDef, float duration)
		{
			//IL_006e: 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_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: 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_00ac: 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)
			if (((Object)self).name == "BrotherBody(Clone)" && (Object)(object)buffDef == (Object)(object)Buffs.Nullified && Random.value < 0.25f)
			{
				duration /= 2f;
				Ray val = (Object.op_Implicit((Object)(object)self.inputBank) ? new Ray(self.inputBank.aimOrigin, self.inputBank.aimDirection) : new Ray(self.transform.position, self.transform.forward));
				for (int i = 0; i < 6; i++)
				{
					Util.PlaySound(FireLunarShards.fireSound, ((Component)self).gameObject);
					ProjectileManager.instance.FireProjectile(FireLunarShards.projectilePrefab, ((Ray)(ref val)).origin, Quaternion.LookRotation(((Ray)(ref val)).direction), ((Component)self).gameObject, (float)((double)self.damage * 0.100000001490116 / 12.0), 0f, Util.CheckRoll(self.crit, self.master), (DamageColorIndex)0, (GameObject)null, -1f);
				}
			}
			orig.Invoke(self, buffDef, duration);
		}

		private void SetPosition(Vector3 newPosition, CharacterBody body)
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)body.characterMotor))
			{
				((BaseCharacterController)body.characterMotor).Motor.SetPositionAndRotation(newPosition, Quaternion.identity, true);
			}
		}
	}
	public class MissionHooks
	{
		public MissionHooks()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Expected O, but got Unknown
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Expected O, but got Unknown
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			BrotherEncounterPhaseBaseState.OnEnter += new hook_OnEnter(BrotherEncounterPhaseBaseStateOnEnter);
			Phase1.OnEnter += new hook_OnEnter(Phase1OnEnter);
			Phase2.OnEnter += new hook_OnEnter(Phase2OnEnter);
			Phase3.OnEnter += new hook_OnEnter(Phase3OnEnter);
			Phase4.OnEnter += new hook_OnEnter(Phase4OnEnter);
			BossDeath.OnEnter += new hook_OnEnter(BossDeathOnEnter);
		}

		private void Phase1OnEnter(orig_OnEnter orig, Phase1 self)
		{
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			UmbralMithrix.spawnedClone = false;
			UmbralMithrix.p2ThresholdReached = false;
			UmbralMithrix.p3ThresholdReached = false;
			UmbralMithrix.finishedItemSteal = false;
			UmbralMithrix.AdjustBaseSkills();
			UmbralMithrix.AdjustBaseStats();
			GameObject val = GameObject.Find("EscapeSequenceController");
			if (Object.op_Implicit((Object)(object)val))
			{
				GameObject obj = Object.Instantiate<GameObject>(((Component)val.transform.GetChild(0).GetChild(8)).gameObject, new Vector3(-88.5f, 491.5f, -0.3f), Quaternion.identity);
				obj.transform.eulerAngles = new Vector3(270f, 0f, 0f);
				obj.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
				obj.AddComponent<NetworkIdentity>();
				NetworkServer.Spawn(obj);
			}
			orig.Invoke(self);
		}

		private void Phase2OnEnter(orig_OnEnter orig, Phase2 self)
		{
			((BrotherEncounterBaseState)self).KillAllMonsters();
			UmbralMithrix.AdjustPhase2Stats();
			orig.Invoke(self);
		}

		private void Phase3OnEnter(orig_OnEnter orig, Phase3 self)
		{
			((BrotherEncounterBaseState)self).KillAllMonsters();
			UmbralMithrix.AdjustPhase3Stats();
			orig.Invoke(self);
		}

		private void Phase4OnEnter(orig_OnEnter orig, Phase4 self)
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: 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_0051: Expected O, but got Unknown
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Expected O, but got Unknown
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Expected O, but got Unknown
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Expected O, but got Unknown
			UmbralMithrix.AdjustPhase4Stats();
			GameObject obj = Object.Instantiate<GameObject>(UmbralMithrix.voidling, new Vector3(-88.5f, 520f, -0.3f), Quaternion.identity);
			obj.AddComponent<DeathZoneController>();
			obj.GetComponent<TeamComponent>().teamIndex = (TeamIndex)2;
			SkillLocator skillLocator = obj.GetComponent<CharacterBody>().skillLocator;
			skillLocator.primary = new GenericSkill();
			skillLocator.secondary = new GenericSkill();
			skillLocator.utility = new GenericSkill();
			skillLocator.special = new GenericSkill();
			NetworkServer.Spawn(obj);
			orig.Invoke(self);
		}

		private void BossDeathOnEnter(orig_OnEnter orig, BossDeath self)
		{
			//IL_001a: 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_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Invalid comparison between Unknown and I4
			orig.Invoke(self);
			GameObject.Find("InactiveVoidling(Clone)").GetComponent<HealthComponent>().Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo));
			TeamComponent[] array = Object.FindObjectsOfType<TeamComponent>();
			for (int i = 0; i < array.Length; i++)
			{
				if ((int)array[i].teamIndex == 1)
				{
					((Component)array[i]).GetComponent<CharacterBody>().RemoveBuff(Buffs.TeamWarCry);
				}
			}
		}

		private void BrotherEncounterPhaseBaseStateOnEnter(orig_OnEnter orig, BrotherEncounterPhaseBaseState self)
		{
			//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_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: 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_01ab: 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_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01be: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0212: 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_022e: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if (!NetworkServer.active || (Object)(object)self.phaseScriptedCombatEncounter == (Object)null || !Object.op_Implicit((Object)(object)PhaseCounter.instance))
			{
				return;
			}
			((BrotherEncounterBaseState)self).childLocator = ((EntityState)self).GetComponent<ChildLocator>();
			Transform val = ((BrotherEncounterBaseState)self).childLocator.FindChild("ArenaWalls");
			Material material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/InvadingDoppelganger/matDoppelganger.mat").WaitForCompletion();
			if (Object.op_Implicit((Object)(object)val))
			{
				((Component)val).gameObject.SetActive(((BrotherEncounterBaseState)self).shouldEnableArenaWalls);
				if (ModConfig.purpleArena.Value)
				{
					Renderer[] componentsInChildren = ((Component)val).GetComponentsInChildren<Renderer>();
					for (int i = 0; i < componentsInChildren.Length; i++)
					{
						componentsInChildren[i].material = material;
					}
				}
			}
			self.phaseBossGroup.bestObservedName = "Umbral Mithrix";
			self.phaseBossGroup.bestObservedSubtitle = "<sprite name=\"CloudLeft\"> The Collective <sprite name=\"CloudRight\">";
			if (PhaseCounter.instance.phase == 2)
			{
				GameObject val2 = new GameObject();
				val2.transform.position = new Vector3(-88.5f, 491.5f, -0.3f);
				val2.transform.rotation = Quaternion.identity;
				Transform transform = val2.transform;
				SpawnInfo val3 = default(SpawnInfo);
				val3.explicitSpawnPosition = transform;
				val3.spawnCard = UmbralMithrix.mithrixCard;
				SpawnInfo val4 = val3;
				self.phaseScriptedCombatEncounter.spawns = (SpawnInfo[])(object)new SpawnInfo[1] { val4 };
			}
			if (PhaseCounter.instance.phase == 3)
			{
				GameObject val5 = new GameObject();
				val5.transform.position = new Vector3(-88.5f, 491.5f, -0.3f);
				val5.transform.rotation = Quaternion.identity;
				Transform transform2 = val5.transform;
				SpawnInfo val3 = default(SpawnInfo);
				val3.explicitSpawnPosition = transform2;
				val3.spawnCard = UmbralMithrix.mithrixHurtP3Card;
				SpawnInfo val6 = val3;
				self.phaseScriptedCombatEncounter.spawns = (SpawnInfo[])(object)new SpawnInfo[1] { val6 };
			}
			if (PhaseCounter.instance.phase == 4)
			{
				GameObject val7 = new GameObject();
				val7.transform.position = new Vector3(-88.5f, 491.5f, -0.3f);
				val7.transform.rotation = Quaternion.identity;
				Transform transform3 = val7.transform;
				SpawnInfo val3 = default(SpawnInfo);
				val3.explicitSpawnPosition = transform3;
				val3.spawnCard = UmbralMithrix.mithrixHurtCard;
				SpawnInfo val8 = val3;
				self.phaseScriptedCombatEncounter.spawns = (SpawnInfo[])(object)new SpawnInfo[1] { val8 };
			}
		}
	}
	public class MithrixMiscHooks
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static hook_OnEnter <0>__SpellChannelState_OnEnter;
		}

		public MithrixMiscHooks()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Expected O, but got Unknown
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Expected O, but got Unknown
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Expected O, but got Unknown
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Expected O, but got Unknown
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Expected O, but got Unknown
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Expected O, but got Unknown
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Expected O, but got Unknown
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Expected O, but got Unknown
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Expected O, but got Unknown
			EnterSkyLeap.OnEnter += new hook_OnEnter(EnterSkyLeap_OnEnter);
			HoldSkyLeap.OnEnter += new hook_OnEnter(HoldSkyLeap_OnEnter);
			ExitSkyLeap.OnEnter += new hook_OnEnter(ExitSkyLeap_OnEnter);
			SprintBash.OnEnter += new hook_OnEnter(SprintBash_OnEnter);
			SprintBash.OnExit += new hook_OnExit(SprintBash_OnExit);
			FistSlam.OnEnter += new hook_OnEnter(FistSlam_OnEnter);
			UltChannelState.FireWave += new hook_FireWave(UltChannelState_FireWave);
			SkyLeapDeathState.OnEnter += new hook_OnEnter(SkyLeapDeathState_OnEnter);
			SpellChannelEnterState.OnEnter += new hook_OnEnter(SpellChannelEnterState_OnEnter);
			object obj = <>O.<0>__SpellChannelState_OnEnter;
			if (obj == null)
			{
				hook_OnEnter val = SpellChannelState_OnEnter;
				<>O.<0>__SpellChannelState_OnEnter = val;
				obj = (object)val;
			}
			SpellChannelState.OnEnter += (hook_OnEnter)obj;
			SpellChannelExitState.OnEnter += new hook_OnEnter(SpellChannelExitState_OnEnter);
			StaggerEnter.OnEnter += new hook_OnEnter(StaggerEnter_OnEnter);
			TrueDeathState.OnEnter += new hook_OnEnter(TrueDeathState_OnEnter);
		}

		private void EnterSkyLeap_OnEnter(orig_OnEnter orig, EnterSkyLeap self)
		{
			EnterSkyLeap.baseDuration = 0.25f;
			Util.PlaySound("Play_voidRaid_snipe_shoot_final", ((Component)((EntityState)self).characterBody).gameObject);
			orig.Invoke(self);
		}

		private void HoldSkyLeap_OnEnter(orig_OnEnter orig, HoldSkyLeap self)
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Invalid comparison between Unknown and I4
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: 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_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: 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)
			HoldSkyLeap.duration = ModConfig.CrushingLeap.Value;
			if (((EntityState)self).isAuthority)
			{
				List<CharacterBody> list = new List<CharacterBody>();
				CharacterMaster[] array = Object.FindObjectsOfType<CharacterMaster>();
				foreach (CharacterMaster val in array)
				{
					if ((int)val.teamIndex == 1)
					{
						CharacterBody body = val.GetBody();
						if (Object.op_Implicit((Object)(object)body) && body.isPlayerControlled)
						{
							list.Add(body);
						}
					}
				}
				if (list.Count > 0)
				{
					Vector3 footPosition = list[Random.Range(0, list.Count)].footPosition;
					RaycastHit val2 = default(RaycastHit);
					if (Physics.Raycast(new Ray(footPosition, Vector3.down), ref val2, 200f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1))
					{
						((BaseCharacterController)((EntityState)self).characterMotor).Motor.SetPositionAndRotation(((RaycastHit)(ref val2)).point + new Vector3(0f, 10f, 0f), Quaternion.identity, true);
					}
					else
					{
						((BaseCharacterController)((EntityState)self).characterMotor).Motor.SetPositionAndRotation(footPosition, Quaternion.identity, true);
					}
				}
				GameObject obj = Object.Instantiate<GameObject>(UmbralMithrix.leapIndicatorPrefab, ((EntityState)self).characterBody.footPosition, Quaternion.identity);
				float num = ((EntityState)self).characterBody.radius / 2f;
				obj.transform.localScale = new Vector3(num, num, num);
				obj.AddComponent<SelfDestructController>();
				UmbralMithrix.leapIndicator = obj;
				NetworkServer.Spawn(obj);
			}
			orig.Invoke(self);
		}

		private void ExitSkyLeap_OnEnter(orig_OnEnter orig, ExitSkyLeap self)
		{
			//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)
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 2)
			{
				GenericSkill val = (Object.op_Implicit((Object)(object)((EntityState)self).skillLocator) ? ((EntityState)self).skillLocator.special : null);
				if (Object.op_Implicit((Object)(object)val))
				{
					UltChannelState.replacementSkillDef.activationState = new SerializableEntityStateType(typeof(UltEnterState));
					val.SetSkillOverride((object)((EntityState)self).outer, UltChannelState.replacementSkillDef, (SkillOverridePriority)4);
				}
			}
		}

		private void FistSlam_OnEnter(orig_OnEnter orig, FistSlam self)
		{
			FistSlam.healthCostFraction = 0f;
			orig.Invoke(self);
		}

		private void UltChannelState_FireWave(orig_FireWave orig, UltChannelState self)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Invalid comparison between Unknown and I4
			//IL_0248: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_025b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0260: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: 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_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0303: Unknown result type (might be due to invalid IL or missing references)
			//IL_0308: Unknown result type (might be due to invalid IL or missing references)
			//IL_0316: Unknown result type (might be due to invalid IL or missing references)
			//IL_0326: Unknown result type (might be due to invalid IL or missing references)
			//IL_0337: Unknown result type (might be due to invalid IL or missing references)
			//IL_0341: Unknown result type (might be due to invalid IL or missing references)
			//IL_0369: Unknown result type (might be due to invalid IL or missing references)
			//IL_036e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0373: 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_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: 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_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_038d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0392: Unknown result type (might be due to invalid IL or missing references)
			//IL_0397: Unknown result type (might be due to invalid IL or missing references)
			//IL_0399: Unknown result type (might be due to invalid IL or missing references)
			//IL_039e: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b2: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)PhaseCounter.instance))
			{
				UltChannelState.waveProjectileCount = 0;
				List<CharacterBody> list = new List<CharacterBody>();
				CharacterMaster[] array = Object.FindObjectsOfType<CharacterMaster>();
				foreach (CharacterMaster val in array)
				{
					if ((int)val.teamIndex == 1)
					{
						CharacterBody body = val.GetBody();
						if (Object.op_Implicit((Object)(object)body) && body.isPlayerControlled)
						{
							list.Add(body);
						}
					}
				}
				Vector3 val3;
				if (PhaseCounter.instance.phase == 2 && list.Count > 0)
				{
					float num = 50f;
					float num2 = 360f / (float)ModConfig.UltimateWaves.Value;
					Vector3 val2 = Vector3.ProjectOnPlane(((EntityState)self).inputBank.aimDirection, Vector3.up);
					val3 = list[Random.Range(0, list.Count)].footPosition;
					val3.y = 491f;
					Vector3 val4 = val3;
					Vector3 val5 = val4 + new Vector3(0f - num, 0f, 0f - num);
					Vector3 val6 = val4 + new Vector3(num, 0f, 0f - num);
					Vector3 val7 = val4 + new Vector3(0f - num, 0f, num);
					Vector3 val8 = val4 + new Vector3(num, 0f, num);
					Vector3[] array2 = (Vector3[])(object)new Vector3[4] { val5, val6, val7, val8 };
					for (int j = 0; j < 4; j++)
					{
						float num3 = Random.Range(-10f, 10f);
						for (int k = 0; k < ModConfig.UltimateWaves.Value; k++)
						{
							Vector3 val9 = Quaternion.AngleAxis((num2 + num3) * (float)k, Vector3.up) * val2;
							ProjectileManager.instance.FireProjectile(UmbralMithrix.staticUltLine, array2[j], Util.QuaternionSafeLookRotation(val9), ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * UltChannelState.waveProjectileDamageCoefficient, UltChannelState.waveProjectileForce, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f);
						}
					}
				}
				if (PhaseCounter.instance.phase == 3)
				{
					int count = PlayerCharacterMasterController.instances.Count;
					int value = ModConfig.UltimateWaves.Value;
					float num4 = 360f / (float)value;
					val3 = Vector3.ProjectOnPlane(Random.onUnitSphere, Vector3.up);
					Vector3 normalized = ((Vector3)(ref val3)).normalized;
					GameObject val10 = UmbralMithrix.leftUltLine;
					if ((double)Random.value <= 0.5)
					{
						val10 = UmbralMithrix.rightUltLine;
					}
					PlayerCharacterMasterController val11 = PlayerCharacterMasterController.instances[new Random().Next(0, count - 1)];
					Vector3[] array3 = (Vector3[])(object)new Vector3[2]
					{
						new Vector3(val11.body.footPosition.x, ((EntityState)self).characterBody.footPosition.y, val11.body.footPosition.z) + new Vector3(Random.Range(-45f, -15f), 0f, Random.Range(-45f, -15f)),
						new Vector3(val11.body.footPosition.x, ((EntityState)self).characterBody.footPosition.y, val11.body.footPosition.z) + new Vector3(Random.Range(15f, 45f), 0f, Random.Range(15f, 45f))
					};
					for (int l = 0; l < 2; l++)
					{
						for (int m = 0; m < value; m++)
						{
							Vector3 val12 = Quaternion.AngleAxis(num4 * (float)m, Vector3.up) * normalized;
							ProjectileManager.instance.FireProjectile(val10, array3[l], Util.QuaternionSafeLookRotation(val12), ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * UltChannelState.waveProjectileDamageCoefficient, UltChannelState.waveProjectileForce, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f);
						}
					}
				}
			}
			orig.Invoke(self);
		}

		private void SkyLeapDeathState_OnEnter(orig_OnEnter orig, SkyLeapDeathState self)
		{
			if (((Object)((EntityState)self).characterBody).name == "BrotherGlassBody(Clone)" && Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 2)
			{
				((GenericCharacterDeath)self).DestroyModel();
				if (NetworkServer.active)
				{
					((GenericCharacterDeath)self).DestroyBodyAsapServer();
				}
			}
			else
			{
				orig.Invoke(self);
			}
		}

		private void SprintBash_OnEnter(orig_OnEnter orig, SprintBash self)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: 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_0195: 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_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: 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)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			if (((EntityState)self).isAuthority)
			{
				Ray aimRay = ((BaseState)self).GetAimRay();
				if (((Object)((EntityState)self).characterBody).name == "BrotherBody(Clone)")
				{
					for (int i = 0; i < 6; i++)
					{
						Util.PlaySound(FireLunarShards.fireSound, ((EntityState)self).gameObject);
						ProjectileManager.instance.FireProjectile(FireLunarShards.projectilePrefab, ((Ray)(ref aimRay)).origin, Quaternion.LookRotation(((Ray)(ref aimRay)).direction), ((EntityState)self).gameObject, (float)((double)((EntityState)self).characterBody.damage * 0.100000001490116 / 12.0), 0f, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f);
					}
					if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase != 1 && ModConfig.addShockwave.Value)
					{
						Vector3 val = Vector3.ProjectOnPlane(((EntityState)self).inputBank.aimDirection, Vector3.up);
						Vector3 footPosition = ((EntityState)self).characterBody.footPosition;
						Vector3 val2 = Quaternion.AngleAxis(0f, Vector3.up) * val;
						ProjectileManager.instance.FireProjectile(WeaponSlam.waveProjectilePrefab, footPosition, Util.QuaternionSafeLookRotation(val2), ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * WeaponSlam.waveProjectileDamageCoefficient, WeaponSlam.waveProjectileForce, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f);
					}
				}
				else
				{
					ProjectileManager.instance.FireProjectile(SeekingBomb.projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * (SeekingBomb.bombDamageCoefficient * 0.75f), SeekingBomb.bombForce, Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, 0f);
				}
			}
			orig.Invoke(self);
		}

		private void SprintBash_OnExit(orig_OnExit orig, SprintBash self)
		{
			orig.Invoke(self);
			ProjectileSimple[] array = Object.FindObjectsOfType<ProjectileSimple>();
			if (array.Length == 0)
			{
				return;
			}
			ProjectileSimple[] array2 = array;
			foreach (ProjectileSimple val in array2)
			{
				if (((Object)val).name == "LunarWispTrackingBomb(Clone)")
				{
					val.desiredForwardSpeed = 50f;
				}
			}
		}

		private void SpellChannelEnterState_OnEnter(orig_OnEnter orig, SpellChannelEnterState self)
		{
			SpellChannelEnterState.duration = 3f;
			orig.Invoke(self);
		}

		private static void SpellChannelState_OnEnter(orig_OnEnter orig, SpellChannelState self)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Invalid comparison between Unknown and I4
			SpellChannelState.maxDuration = 5f;
			TeamComponent[] array = Object.FindObjectsOfType<TeamComponent>();
			for (int i = 0; i < array.Length; i++)
			{
				if ((int)array[i].teamIndex == 1)
				{
					((Component)array[i]).GetComponent<CharacterBody>().AddBuff(Buffs.TeamWarCry);
				}
			}
			orig.Invoke(self);
		}

		private void SpellChannelExitState_OnEnter(orig_OnEnter orig, SpellChannelExitState self)
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Invalid comparison between Unknown and I4
			//IL_0082: 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_0097: Expected O, but got Unknown
			//IL_0068: 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)
			UmbralMithrix.finishedItemSteal = true;
			((Component)((EntityState)self).characterBody).gameObject.GetComponent<P4Controller>().finishedItemSteal = true;
			bool flag = false;
			CharacterMaster[] array = Object.FindObjectsOfType<CharacterMaster>();
			foreach (CharacterMaster val in array)
			{
				if ((int)val.teamIndex == 1)
				{
					CharacterBody body = val.GetBody();
					if (Object.op_Implicit((Object)(object)body) && !body.isPlayerControlled && Object.op_Implicit((Object)(object)body.healthComponent))
					{
						body.healthComponent.Suicide((GameObject)null, (GameObject)null, default(DamageTypeCombo));
					}
				}
			}
			if (flag)
			{
				Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage
				{
					baseToken = "<color=#c6d5ff><size=120%>Mithrix: Perish.</color></size>"
				});
			}
			orig.Invoke(self);
		}

		private void StaggerEnter_OnEnter(orig_OnEnter orig, StaggerEnter self)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Expected O, but got Unknown
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Expected O, but got Unknown
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Expected O, but got Unknown
			((StaggerBaseState)self).duration = 0f;
			if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 4)
			{
				((EntityState)self).outer.SetNextState((EntityState)new SpellChannelEnterState());
			}
			if (Object.op_Implicit((Object)(object)PhaseCounter.instance) && PhaseCounter.instance.phase == 3 && !UmbralMithrix.spawnedClone)
			{
				UmbralMithrix.spawnedClone = true;
				DirectorPlacementRule val = new DirectorPlacementRule();
				val.placementMode = (PlacementMode)3;
				val.minDistance = 3f;
				val.maxDistance = 20f;
				val.position = new Vector3(-88.5f, 491.5f, -0.3f);
				Xoroshiro128Plus rng = RoR2Application.rng;
				DirectorSpawnRequest val2 = new DirectorSpawnRequest(UmbralMithrix.mithrixCard, val, rng);
				val2.summonerBodyObject = ((EntityState)self).gameObject;
				val2.onSpawnedServer = (Action<SpawnResult>)Delegate.Combine(val2.onSpawnedServer, (Action<SpawnResult>)delegate(SpawnResult spawnResult)
				{
					//IL_0000: Unknown result type (might be due to invalid IL or missing references)
					CharacterMaster component = spawnResult.spawnedInstance.GetComponent<CharacterMaster>();
					component.GetBody().AddBuff(Buffs.Immune);
					BaseAI[] components = ((Component)component).GetComponents<BaseAI>();
					foreach (BaseAI val3 in components)
					{
						if (Object.op_Implicit((Object)(object)val3))
						{
							val3.fullVision = true;
							val3.neverRetaliateFriendlies = true;
						}
					}
				});
				DirectorCore.instance.TrySpawnObject(val2);
			}
			orig.Invoke(self);
		}

		private void TrueDeathState_OnEnter(orig_OnEnter orig, TrueDeathState self)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: 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_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: 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_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			TrueDeathState.dissolveDuration = 3f;
			if (!UmbralMithrix.practiceModeEnabled)
			{
				Vector3 val = Vector3.up * 40f + Vector3.forward * 2f;
				PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(UmbralMithrix.UmbralItem.itemIndex), ((EntityState)self).characterBody.footPosition + Vector3.up * 1.5f, val);
			}
			UmbralMithrix.practiceModeEnabled = false;
			orig.Invoke(self);
		}
	}
	public class PrimaryHooks
	{
		public PrimaryHooks()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Expected O, but got Unknown
			WeaponSlam.OnEnter += new hook_OnEnter(WeaponSlamOnEnter);
			WeaponSlam.FixedUpdate += new hook_FixedUpdate(WeaponSlamFixedUpdate);
			FireLunarShards.OnEnter += new hook_OnEnter(FireLunarShardsOnEnter);
		}

		private void WeaponSlamOnEnter(orig_OnEnter orig, WeaponSlam self)
		{
			UmbralMithrix.hasfired = false;
			orig.Invoke(self);
		}

		private void WeaponSlamFixedUpdate(orig_FixedUpdate orig, WeaponSlam self)
		{
			//IL_005f: 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_0069: 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_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: 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_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			if (((EntityState)self).isAuthority && self.hasDoneBlastAttack && Object.op_Implicit((Object)(object)self.modelTransform) && !UmbralMithrix.hasfired)
			{
				UmbralMithrix.hasfired = true;
				if (Object.op_Implicit((Object)(object)PhaseCounter.instance))
				{
					int value = ModConfig.SlamOrbProjectileCount.Value;
					float num = 360f / (float)value;
					Vector3 val = Vector3.ProjectOnPlane(((EntityState)self).characterDirection.forward, Vector3.up);
					Vector3 position = ((BaseState)self).FindModelChild(WeaponSlam.muzzleString).position;
					for (int i = 0; i < value; i++)
					{
						Vector3 val2 = Quaternion.AngleAxis(num * (float)i, Vector3.up) * val;
						ProjectileManager.instance.FireProjectile(FistSlam.waveProjectilePrefab, position, Util.QuaternionSafeLookRotation(val2), ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * (FistSlam.waveProjectileDamageCoefficient * 0.75f), FistSlam.waveProjectileForce, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f);
					}
				}
			}
			orig.Invoke(self);
		}

		private void FireLunarShardsOnEnter(orig_OnEnter orig, FireLunarShards self)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: 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_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			if (!(self is FireLunarShardsHurt))
			{
				Ray aimRay = ((BaseState)self).GetAimRay();
				Transform val = ((BaseState)self).FindModelChild(FireLunarShards.muzzleString);
				if (Object.op_Implicit((Object)(object)val))
				{
					((Ray)(ref aimRay)).origin = val.position;
				}
				FireProjectileInfo val2 = default(FireProjectileInfo);
				val2.position = ((Ray)(ref aimRay)).origin;
				val2.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction);
				val2.crit = ((EntityState)self).characterBody.RollCrit();
				val2.damage = ((EntityState)self).characterBody.damage * self.damageCoefficient;
				val2.damageColorIndex = (DamageColorIndex)0;
				val2.owner = ((EntityState)self).gameObject;
				val2.procChainMask = default(ProcChainMask);
				val2.force = 0f;
				val2.useFuseOverride = false;
				val2.useSpeedOverride = false;
				val2.target = null;
				val2.projectilePrefab = FireLunarShards.projectilePrefab;
				for (int i = 0; i < ModConfig.LunarShardAdd.Value; i++)
				{
					ProjectileManager.instance.FireProjectile(val2);
					((Ray)(ref aimRay)).direction = Util.ApplySpread(((Ray)(ref aimRay)).direction, 0f, self.maxSpread * (float)(1.0 + 0.449999988079071 * (double)i), self.spreadYawScale * (float)(1.0 + 0.449999988079071 * (double)i), self.spreadPitchScale * (float)(1.0 + 0.449999988079071 * (double)i), 0f, 0f);
					val2.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction);
				}
			}
			orig.Invoke(self);
		}
	}
	internal class ModConfig
	{
		public static ConfigEntry<bool> purpleArena;

		public static ConfigEntry<bool> skipPhase4;

		public static ConfigEntry<bool> addShockwave;

		public static ConfigEntry<bool> purpleMithrix;

		public static ConfigEntry<float> basehealth;

		public static ConfigEntry<float> levelhealth;

		public static ConfigEntry<float> basedamage;

		public static ConfigEntry<float> leveldamage;

		public static ConfigEntry<float> basearmor;

		public static ConfigEntry<float> baseattackspeed;

		public static ConfigEntry<float> basespeed;

		public static ConfigEntry<float> mass;

		public static ConfigEntry<float> turningspeed;

		public static ConfigEntry<float> jumpingpower;

		public static ConfigEntry<float> acceleration;

		public static ConfigEntry<float> aircontrol;

		public static ConfigEntry<int> PrimStocks;

		public static ConfigEntry<int> SecStocks;

		public static ConfigEntry<int> UtilStocks;

		public static ConfigEntry<float> PrimCD;

		public static ConfigEntry<float> SecCD;

		public static ConfigEntry<float> UtilCD;

		public static ConfigEntry<float> SpecialCD;

		public static ConfigEntry<float> CrushingLeap;

		public static ConfigEntry<int> SlamOrbProjectileCount;

		public static ConfigEntry<int> LunarShardAdd;

		public static ConfigEntry<int> UltimateWaves;

		public static ConfigEntry<int> UltimateCount;

		public static ConfigEntry<float> UltimateDuration;

		public static ConfigEntry<int> JumpWaveCount;

		public static ConfigEntry<float> ShardHoming;

		public static ConfigEntry<float> ShardRange;

		public static ConfigEntry<float> ShardCone;

		public static void InitConfig(ConfigFile config)
		{
			//IL_03d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03df: Expected O, but got Unknown
			//IL_03e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ee: Expected O, but got Unknown
			//IL_03f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fd: Expected O, but got Unknown
			//IL_0402: Unknown result type (might be due to invalid IL or missing references)
			//IL_0407: Unknown result type (might be due to invalid IL or missing references)
			//IL_0412: Unknown result type (might be due to invalid IL or missing references)
			//IL_041d: Unknown result type (might be due to invalid IL or missing references)
			//IL_042d: Expected O, but got Unknown
			//IL_0428: Unknown result type (might be due to invalid IL or missing references)
			//IL_0432: Expected O, but got Unknown
			//IL_0437: Unknown result type (might be due to invalid IL or missing references)
			//IL_043c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0447: Unknown result type (might be due to invalid IL or missing references)
			//IL_0452: Unknown result type (might be due to invalid IL or missing references)
			//IL_0462: Expected O, but got Unknown
			//IL_045d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0467: Expected O, but got Unknown
			//IL_046c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0471: Unknown result type (might be due to invalid IL or missing references)
			//IL_047c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0487: Unknown result type (might be due to invalid IL or missing references)
			//IL_0497: Expected O, but got Unknown
			//IL_0492: Unknown result type (might be due to invalid IL or missing references)
			//IL_049c: Expected O, but got Unknown
			//IL_04a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cc: Expected O, but got Unknown
			//IL_04c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d1: Expected O, but got Unknown
			//IL_04d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04db: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0501: Expected O, but got Unknown
			//IL_04fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0506: Expected O, but got Unknown
			//IL_050b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0510: Unknown result type (might be due to invalid IL or missing references)
			//IL_051b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0526: Unknown result type (might be due to invalid IL or missing references)
			//IL_0536: Expected O, but got Unknown
			//IL_0531: Unknown result type (might be due to invalid IL or missing references)
			//IL_053b: Expected O, but got Unknown
			//IL_0540: Unknown result type (might be due to invalid IL or missing references)
			//IL_0545: Unknown result type (might be due to invalid IL or missing references)
			//IL_0550: Unknown result type (might be due to invalid IL or missing references)
			//IL_055b: Unknown result type (might be due to invalid IL or missing references)
			//IL_056b: Expected O, but got Unknown
			//IL_0566: Unknown result type (might be due to invalid IL or missing references)
			//IL_0570: Expected O, but got Unknown
			//IL_0575: Unknown result type (might be due to invalid IL or missing references)
			//IL_057a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0585: Unknown result type (might be due to invalid IL or missing references)
			//IL_0590: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a0: Expected O, but got Unknown
			//IL_059b: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a5: Expected O, but got Unknown
			//IL_05aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_05af: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d5: Expected O, but got Unknown
			//IL_05d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_05da: Expected O, but got Unknown
			//IL_05df: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_05fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_060a: 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_0614: Unknown result type (might be due to invalid IL or missing references)
			//IL_0619: Unknown result type (might be due to invalid IL or missing references)
			//IL_0624: Unknown result type (might be due to invalid IL or missing references)
			//IL_062f: Unknown result type (might be due to invalid IL or missing references)
			//IL_063f: Expected O, but got Unknown
			//IL_063a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0644: Expected O, but got Unknown
			//IL_0649: Unknown result type (might be due to invalid IL or missing references)
			//IL_064e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0659: Unknown result type (might be due to invalid IL or missing references)
			//IL_0664: Unknown result type (might be due to invalid IL or missing references)
			//IL_0674: Expected O, but got Unknown
			//IL_066f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0679: Expected O, but got Unknown
			//IL_067e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0683: Unknown result type (might be due to invalid IL or missing references)
			//IL_068a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0696: Expected O, but got Unknown
			//IL_0691: Unknown result type (might be due to invalid IL or missing references)
			//IL_069b: Expected O, but got Unknown
			//IL_06a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b8: Expected O, but got Unknown
			//IL_06b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_06bd: Expected O, but got Unknown
			//IL_06c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_06da: Expected O, but got Unknown
			//IL_06d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06df: Expected O, but got Unknown
			//IL_06e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_070f: Expected O, but got Unknown
			//IL_070a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0714: Expected O, but got Unknown
			//IL_0719: Unknown result type (might be due to invalid IL or missing references)
			//IL_071e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0729: Unknown result type (might be due to invalid IL or missing references)
			//IL_0734: Unknown result type (might be due to invalid IL or missing references)
			//IL_0744: Expected O, but got Unknown
			//IL_073f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0749: Expected O, but got Unknown
			//IL_074e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0753: Unknown result type (might be due to invalid IL or missing references)
			//IL_075e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0769: Unknown result type (might be due to invalid IL or missing references)
			//IL_0779: Expected O, but got Unknown
			//IL_0774: Unknown result type (might be due to invalid IL or missing references)
			//IL_077e: Expected O, but got Unknown
			//IL_0783: Unknown result type (might be due to invalid IL or missing references)
			//IL_0788: Unknown result type (might be due to invalid IL or missing references)
			//IL_0793: Unknown result type (might be due to invalid IL or missing references)
			//IL_079e: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ae: Expected O, but got Unknown
			//IL_07a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b3: Expected O, but got Unknown
			//IL_07b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e3: Expected O, but got Unknown
			//IL_07de: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e8: Expected O, but got Unknown
			//IL_07ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0806: Expected O, but got Unknown
			//IL_0801: Unknown result type (might be due to invalid IL or missing references)
			//IL_080b: Expected O, but got Unknown
			//IL_0810: Unknown result type (might be due to invalid IL or missing references)
			//IL_0815: Unknown result type (might be due to invalid IL or missing references)
			//IL_081c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0828: Expected O, but got Unknown
			//IL_0823: Unknown result type (might be due to invalid IL or missing references)
			//IL_082d: Expected O, but got Unknown
			//IL_0832: Unknown result type (might be due to invalid IL or missing references)
			//IL_0837: Unknown result type (might be due to invalid IL or missing references)
			//IL_083e: Unknown result type (might be due to invalid IL or missing references)
			//IL_084b: Expected O, but got Unknown
			//IL_0846: Unknown result type (might be due to invalid IL or missing references)
			//IL_0850: Expected O, but got Unknown
			//IL_0855: Unknown result type (might be due to invalid IL or missing references)
			//IL_085a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0865: Unknown result type (might be due to invalid IL or missing references)
			//IL_0870: Unknown result type (might be due to invalid IL or missing references)
			//IL_0880: Expected O, but got Unknown
			//IL_087b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0885: Expected O, but got Unknown
			//IL_088a: Unknown result type (might be due to invalid IL or missing references)
			//IL_088f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0897: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a4: Expected O, but got Unknown
			//IL_089f: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a9: Expected O, but got Unknown
			//IL_08ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_08be: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d9: Expected O, but got Unknown
			//IL_08d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_08de: Expected O, but got Unknown
			//IL_08e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_08fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_090e: Expected O, but got Unknown
			//IL_0909: Unknown result type (might be due to invalid IL or missing references)
			//IL_0913: Expected O, but got Unknown
			//IL_0918: Unknown result type (might be due to invalid IL or missing references)
			//IL_091d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0928: Unknown result type (might be due to invalid IL or missing references)
			//IL_0933: Unknown result type (might be due to invalid IL or missing references)
			//IL_0943: Expected O, but got Unknown
			//IL_093e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0948: Expected O, but got Unknown
			purpleMithrix = config.Bind<bool>("General", "Purple Mithrix", true, "Adds umbral effects to Mithrix (purple when spawning in).");
			purpleArena = config.Bind<bool>("General", "Purple Arena", false, "Adds swirling purple walls/ceiling to the arena. Applies at the start of the fight.");
			skipPhase4 = config.Bind<bool>("General", "Skip Phase 4", false, "Skips Phase 4. Applies at the start of the fight.");
			addShockwave = config.Bind<bool>("General", "Add shockwave to Hammer Swipe", false, "Adds a 1 shockwave when Mithrix swipes. Applies at the start of the fight.");
			basehealth = config.Bind<float>("Stats", "Base Health", 1000f, "Vanilla: 1000");
			levelhealth = config.Bind<float>("Stats", "Level Health", 325f, "Health gained per level. Vanilla: 300");
			basedamage = config.Bind<float>("Stats", "Base Damage", 15f, "Vanilla: 16");
			leveldamage = config.Bind<float>("Stats", "Level Damage", 3f, "Damage gained per level. Vanilla: 3.2");
			basearmor = config.Bind<float>("Stats", "Base Armor", 30f, "Vanilla: 20");
			baseattackspeed = config.Bind<float>("Stats", "Base Attack Speed", 1.25f, "Vanilla: 1");
			basespeed = config.Bind<float>("Stats", "Base Move Speed", 15f, "Vanilla: 15");
			mass = config.Bind<float>("Stats", "Mass", 5000f, "Recommended to increase if you increase his movement speed. Vanilla: 900");
			turningspeed = config.Bind<float>("Stats", "Turn Speed", 300f, "Vanilla: 270");
			jumpingpower = config.Bind<float>("Stats", "Moon Shoes", 50f, "How high Mithrix jumps. Vanilla: 25");
			acceleration = config.Bind<float>("Stats", "Acceleration", 100f, "Vanilla: 45");
			aircontrol = config.Bind<float>("Stats", "Air Control", 0.5f, "Vanilla: 0.25");
			PrimStocks = config.Bind<int>("Skills", "Primary Stocks", 1, "Max Stocks for Mithrix's Weapon Slam. Vanilla: 1");
			SecStocks = config.Bind<int>("Skills", "Secondary Stocks", 1, "Max Stocks for Mithrix's Dash Attack. Vanilla: 1");
			UtilStocks = config.Bind<int>("Skills", "Util Stocks", 3, "Max Stocks for Mithrix's Dash. Vanilla: 2");
			PrimCD = config.Bind<float>("Skills", "Primary Cooldown", 4f, "Cooldown for Mithrix's Weapon Slam. Vanilla: 4");
			SecCD = config.Bind<float>("Skills", "Secondary Cooldown", 4.5f, "Cooldown for Mithrix's Dash Attack. Vanilla: 5");
			UtilCD = config.Bind<float>("Skills", "Util Cooldown", 2.5f, "Cooldown for Mithrix's Dash. Vanilla: 3");
			SpecialCD = config.Bind<float>("Skills", "Special Cooldown", 30f, "Cooldown for Mithrix's Jump Attack. Vanilla: 30");
			CrushingLeap = config.Bind<float>("Skill Mods", "Crushing Leap", 3f, "How long Mithrix stays in the air during the crushing leap. Vanilla: 3");
			SlamOrbProjectileCount = config.Bind<int>("Skill Mods", "Orb Projectile Count", 3, "Orbs fired by weapon slam in a circle. Vanilla: N/A");
			LunarShardAdd = config.Bind<int>("Skill Mods", "Shard Add Count", 1, "Bonus shards added to each shot of lunar shards. Vanilla: N/A");
			UltimateWaves = config.Bind<int>("Skill Mods", "P3 Ult Lines", 8, "Total lines in ultimate per burst. Vanilla: 4");
			UltimateCount = config.Bind<int>("Skill Mods", "P3 Ult Bursts", 6, "Total times the ultimate fires. Vanilla: 4");
			UltimateDuration = config.Bind<float>("Skill Mods", "P3 Ult Duration", 8f, "How long ultimate lasts. Vanilla: 8");
			JumpWaveCount = config.Bind<int>("Skill Mods", "Jump Wave Count", 16, "Shockwave count when Mithrix lands after a jump. Vanilla: 12");
			ShardHoming = config.Bind<float>("Skill Mods", "Shard Homing", 25f, "How strongly lunar shards home in to targets. Vanilla: 20");
			ShardRange = config.Bind<float>("Skill Mods", "Shard Range", 100f, "Range (distance) in which shards look for targets. Vanilla: 80");
			ShardCone = config.Bind<float>("Skill Mods", "Shard Cone", 120f, "Cone (Angle) in which shards look for targets. Vanilla: 90");
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(purpleArena));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(skipPhase4));
			ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(addShockwave));
			ModSettingsManager.AddOption((BaseOption)new StepSliderOption(basehealth, new StepSliderConfig
			{
				min = 500f,
				max = 2500f,
				increment = 50f
			}));
			ModSett