Decompiled source of StormboundFalseSon v0.4.1

StormboundFalseSon.dll

Decompiled 2 days 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.Logging;
using EntityStates;
using EntityStates.Destructible;
using EntityStates.FalseSon;
using EntityStates.FalseSonBoss;
using EntityStates.GolemMonster;
using EntityStates.MeridianEvent;
using EntityStates.PrimeMeridian;
using EntityStates.TitanMonster;
using IL.RoR2;
using Microsoft.CodeAnalysis;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.EntityStates;
using On.EntityStates.Destructible;
using On.EntityStates.FalseSon;
using On.EntityStates.FalseSonBoss;
using On.EntityStates.MeridianEvent;
using On.EntityStates.PrimeMeridian;
using On.EntityStates.TitanMonster;
using On.RoR2;
using R2API;
using RoR2;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.Navigation;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2BepInExPack.GameAssetPaths.Version_1_39_0;
using StormboundFalseSon.Main;
using StormboundFalseSon.Modules;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("StormboundFalseSon")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("StormboundFalseSon")]
[assembly: AssemblyTitle("StormboundFalseSon")]
[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 StormboundFalseSon
{
	internal static class Log
	{
		private static ManualLogSource _logSource;

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

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

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

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

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

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

		internal static void Warning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
	[BepInPlugin("com.Bloonjitsu7.StormboundFalseSon", "StormboundFalseSon", "0.4.1")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class StormboundFalseSonPlugin : BaseUnityPlugin
	{
		private FalseSonChanges changes;

		public void Awake()
		{
			Log.Init(((BaseUnityPlugin)this).Logger);
			new ContentPacks().Initialize();
			changes = new FalseSonChanges();
			changes.Initialize();
		}
	}
}
namespace StormboundFalseSon.Modules
{
	public static class States
	{
		internal static List<Type> entityStates = new List<Type>();

		internal static void RegisterStates()
		{
			entityStates.Add(typeof(DelayedState));
			entityStates.Add(typeof(FireGoldLaser));
		}
	}
	public static class DamageTypes
	{
		public static ModdedDamageType stormboundLightning = DamageAPI.ReserveDamageType();

		public static ModdedDamageType stormboundLunarRuin = DamageAPI.ReserveDamageType();

		public static ModdedDamageType stormboundLaser = DamageAPI.ReserveDamageType();

		public static ModdedDamageType aurelioniteLaser = DamageAPI.ReserveDamageType();

		public static ModdedDamageType stormboundLaserTargeting = DamageAPI.ReserveDamageType();

		public static ModdedDamageType stormboundLaserCrystal = DamageAPI.ReserveDamageType();
	}
	public static class Buffs
	{
		internal static List<BuffDef> buffDefs = new List<BuffDef>();

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

		internal static void RegisterEffects()
		{
			FireGoldLaser.tracerEffectPrefab = CreateAurelioniteTracer();
		}

		private static GameObject CreateAurelioniteTracer()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = CloneTracer("RoR2/Base/Huntress/TracerHuntressSnipe.prefab", "TracerStormboundAurelioniteLaser", Color.red, new Color(1f, 0.04f, 0.04f, 1f), 2f);
			Object.Destroy((Object)(object)((Component)val.transform.Find("TracerHead")).gameObject);
			return val;
		}

		private static GameObject CloneTracer(string originalTracerName, string newTracerName, Color color1, Color color2, float widthMult = 1f, float? speed = null, float? length = null)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: 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)
			GameObject val = Addressables.LoadAssetAsync<GameObject>((object)originalTracerName).WaitForCompletion();
			if ((Object)(object)val == (Object)null)
			{
				Log.Warning(originalTracerName + " is null!");
				return null;
			}
			GameObject val2 = PrefabAPI.InstantiateClone(val, newTracerName, false);
			if (!Object.op_Implicit((Object)(object)val2.GetComponent<EffectComponent>()))
			{
				val2.AddComponent<EffectComponent>();
			}
			if (!Object.op_Implicit((Object)(object)val2.GetComponent<VFXAttributes>()))
			{
				val2.AddComponent<VFXAttributes>();
			}
			val2.GetComponent<VFXAttributes>().vfxPriority = (VFXPriority)2;
			val2.GetComponent<VFXAttributes>().DoNotPool = true;
			if (!Object.op_Implicit((Object)(object)val2.GetComponent<NetworkIdentity>()))
			{
				val2.AddComponent<NetworkIdentity>();
			}
			val2.GetComponent<Tracer>().speed = (speed.HasValue ? speed.Value : val2.GetComponent<Tracer>().speed);
			val2.GetComponent<Tracer>().length = (length.HasValue ? length.Value : val2.GetComponent<Tracer>().length);
			val2.Recolor(color1, color2, widthMult);
			CreateAndAddEffectDef(val2);
			return val2;
		}

		private static void Recolor(this GameObject thingToColor, Color color1, Color color2, float widthMult = 1f)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: 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_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Expected O, but got Unknown
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: 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_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
			bool flag = true;
			LineRenderer[] componentsInChildren = thingToColor.GetComponentsInChildren<LineRenderer>();
			foreach (LineRenderer val in componentsInChildren)
			{
				bool flag2 = true;
				val.startColor = color1;
				val.endColor = color2;
				if (widthMult != 1f)
				{
					val.widthMultiplier *= widthMult;
				}
			}
			ParticleSystem[] componentsInChildren2 = thingToColor.GetComponentsInChildren<ParticleSystem>();
			foreach (ParticleSystem val2 in componentsInChildren2)
			{
				MainModule main = val2.main;
				MinMaxCurve startSize = ((MainModule)(ref main)).startSize;
				((MainModule)(ref main)).startSize = new MinMaxCurve(((MinMaxCurve)(ref startSize)).constant * widthMult);
				((MainModule)(ref main)).startColor = new MinMaxGradient(color1);
				TrailModule trails = val2.trails;
				if (((TrailModule)(ref trails)).enabled)
				{
					Gradient val3 = new Gradient();
					GradientColorKey[] array = (GradientColorKey[])(object)new GradientColorKey[2];
					array[0].color = color1;
					array[0].time = 0f;
					array[1].color = color2;
					array[1].time = 1f;
					GradientAlphaKey[] array2 = (GradientAlphaKey[])(object)new GradientAlphaKey[2];
					array2[0].alpha = color1.a;
					array2[0].time = 0f;
					array2[1].alpha = color2.a;
					array2[1].time = 1f;
					val3.SetKeys(array, array2);
					((TrailModule)(ref trails)).colorOverLifetime = new MinMaxGradient(val3);
				}
			}
			bool flag3 = true;
			ParticleSystemRenderer[] componentsInChildren3 = thingToColor.GetComponentsInChildren<ParticleSystemRenderer>();
			foreach (ParticleSystemRenderer val4 in componentsInChildren3)
			{
				((Renderer)val4).material.SetColor("_MainColor", color1);
				((Renderer)val4).material.SetColor("_Color", color1);
				((Renderer)val4).material.SetColor("_TintColor", color2);
			}
		}

		internal static void AddEffectDef(EffectDef effectDef)
		{
			effectDefs.Add(effectDef);
		}

		internal static EffectDef CreateAndAddEffectDef(GameObject effectPrefab, bool donotPool = false)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Expected O, but got Unknown
			if (donotPool)
			{
				VFXAttributes val = effectPrefab.GetComponent<VFXAttributes>();
				if ((Object)(object)val == (Object)null)
				{
					val = effectPrefab.AddComponent<VFXAttributes>();
				}
				val.DoNotPool = true;
			}
			EffectDef val2 = new EffectDef(effectPrefab);
			AddEffectDef(val2);
			return val2;
		}
	}
	public static class EnemiesPlusUtils
	{
		public static void ReorderSkillDrivers(this GameObject master, AISkillDriver targetSkill, int targetIdx)
		{
			AISkillDriver[] components = master.GetComponents<AISkillDriver>();
			master.ReorderSkillDrivers(components, Array.IndexOf(components, targetSkill), targetIdx);
		}

		public static void ReorderSkillDrivers(this GameObject master, AISkillDriver[] skills, int currentIdx, int targetIdx)
		{
			if (currentIdx < 0 || currentIdx >= skills.Length)
			{
				Log.Error($"{currentIdx} index not found or out of range. Must be less than {skills.Length}");
				return;
			}
			string targetName = skills[currentIdx].customName;
			if (targetIdx < 0 || targetIdx >= skills.Length)
			{
				Log.Error($"Unable to reorder skilldriver {targetName} into position {targetIdx}. target must be less than {skills.Length}");
			}
			else
			{
				if (targetIdx == currentIdx)
				{
					return;
				}
				Dictionary<string, string> dictionary = skills.Where((AISkillDriver s) => (Object)(object)s.nextHighPriorityOverride != (Object)null).ToDictionary((AISkillDriver s) => s.customName, (AISkillDriver s) => s.nextHighPriorityOverride.customName);
				if (targetIdx > currentIdx)
				{
					master.AddComponentCopy<AISkillDriver>(skills[currentIdx]);
					Object.DestroyImmediate((Object)(object)skills[currentIdx]);
				}
				for (int i = targetIdx; i < skills.Length; i++)
				{
					if (i != currentIdx)
					{
						master.AddComponentCopy<AISkillDriver>(skills[i]);
						Object.DestroyImmediate((Object)(object)skills[i]);
					}
				}
				skills = master.GetComponents<AISkillDriver>();
				AISkillDriver val = ((IEnumerable<AISkillDriver>)skills).FirstOrDefault((Func<AISkillDriver, bool>)((AISkillDriver s) => s.customName == targetName));
				if (!dictionary.Any())
				{
					return;
				}
				foreach (AISkillDriver val2 in skills)
				{
					string target = "";
					if (val2.customName != null)
					{
						target = val2.customName;
					}
					if (Object.op_Implicit((Object)(object)val2) && dictionary.TryGetValue(val2.customName, out target))
					{
						AISkillDriver val3 = ((IEnumerable<AISkillDriver>)skills).FirstOrDefault((Func<AISkillDriver, bool>)((AISkillDriver s) => s.customName == target));
						if (!((Object)(object)val3 == (Object)null))
						{
							val2.nextHighPriorityOverride = val3;
						}
					}
				}
			}
		}

		public static T GetCopyOf<T>(this Component comp, T other) where T : Component
		{
			Type type = ((object)comp).GetType();
			if (type != ((object)other).GetType())
			{
				return default(T);
			}
			BindingFlags bindingAttr = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
			PropertyInfo[] properties = type.GetProperties(bindingAttr);
			PropertyInfo[] array = properties;
			foreach (PropertyInfo propertyInfo in array)
			{
				if (propertyInfo.CanWrite)
				{
					try
					{
						propertyInfo.SetValue(comp, propertyInfo.GetValue(other, null), null);
					}
					catch
					{
					}
				}
			}
			FieldInfo[] fields = type.GetFields(bindingAttr);
			FieldInfo[] array2 = fields;
			foreach (FieldInfo fieldInfo in array2)
			{
				fieldInfo.SetValue(comp, fieldInfo.GetValue(other));
			}
			return (T)(object)((comp is T) ? comp : null);
		}

		public static T AddComponentCopy<T>(this GameObject go, T toAdd) where T : Component
		{
			return ((Component)(object)go.AddComponent<T>()).GetCopyOf(toAdd);
		}
	}
	public static class Projectiles
	{
		internal static GameObject auriBeam;

		public static GameObject baseBeam = Addressables.LoadAssetAsync<GameObject>((object)RoR2_Base_Titan.TitanRockProjectile_prefab).WaitForCompletion();

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

		internal static void RegisterProjectiles()
		{
			CreateAurelioniteBeam();
			projectilePrefabs.Add(auriBeam);
		}

		private static void CreateAurelioniteBeam()
		{
			auriBeam = PrefabAPI.InstantiateClone(baseBeam, "auriBeam", true);
			Rigidbody val = auriBeam.GetComponent<Rigidbody>();
			if (!Object.op_Implicit((Object)(object)val))
			{
				val = auriBeam.AddComponent<Rigidbody>();
			}
			ProjectileImpactExplosion val2 = default(ProjectileImpactExplosion);
			if (auriBeam.TryGetComponent<ProjectileImpactExplosion>(ref val2))
			{
				((ProjectileExplosion)val2).blastRadius = 1.5f;
				((ProjectileExplosion)val2).explosionEffect = null;
				val2.lifetimeExpiredSound = null;
				val2.lifetime = 3f;
			}
			Component[] components = auriBeam.GetComponents(typeof(Component));
			Component[] array = components;
			foreach (Component data in array)
			{
				Log.Message(data);
			}
			ProjectileDirectionalTargetFinder val3 = default(ProjectileDirectionalTargetFinder);
			if (auriBeam.TryGetComponent<ProjectileDirectionalTargetFinder>(ref val3))
			{
				Object.DestroyImmediate((Object)(object)val3);
			}
			ProjectileSteerTowardTarget val4 = default(ProjectileSteerTowardTarget);
			if (auriBeam.TryGetComponent<ProjectileSteerTowardTarget>(ref val4))
			{
				Object.DestroyImmediate((Object)(object)val4);
			}
			ProjectileController component = auriBeam.GetComponent<ProjectileController>();
			component.rigidbody = val;
			component.rigidbody.useGravity = false;
			component.rigidbody.mass = 1f;
			component.procCoefficient = 0.8f;
			component.startSound = "";
			component.shouldPlaySounds = false;
		}

		private static void InitializeImpactExplosion(ProjectileImpactExplosion projectileImpactExplosion)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			((ProjectileExplosion)projectileImpactExplosion).blastDamageCoefficient = 1f;
			((ProjectileExplosion)projectileImpactExplosion).blastProcCoefficient = 1f;
			((ProjectileExplosion)projectileImpactExplosion).blastRadius = 1f;
			((ProjectileExplosion)projectileImpactExplosion).bonusBlastForce = Vector3.zero;
			((ProjectileExplosion)projectileImpactExplosion).childrenCount = 0;
			((ProjectileExplosion)projectileImpactExplosion).childrenDamageCoefficient = 0f;
			((ProjectileExplosion)projectileImpactExplosion).childrenProjectilePrefab = null;
			projectileImpactExplosion.destroyOnEnemy = true;
			projectileImpactExplosion.destroyOnWorld = true;
			projectileImpactExplosion.detonateOnEnemy = true;
			projectileImpactExplosion.impactOnWorld = true;
			((ProjectileExplosion)projectileImpactExplosion).falloffModel = (FalloffModel)0;
			((ProjectileExplosion)projectileImpactExplosion).fireChildren = false;
			projectileImpactExplosion.lifetime = 0f;
			projectileImpactExplosion.lifetimeAfterImpact = 0f;
			projectileImpactExplosion.lifetimeRandomOffset = 0f;
			projectileImpactExplosion.offsetForLifetimeExpiredSound = 0f;
			projectileImpactExplosion.timerAfterImpact = false;
			((Component)projectileImpactExplosion).GetComponent<ProjectileDamage>().damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)1);
		}
	}
	public class Skills
	{
		public class AISkillDriverData
		{
			public GameObject masterPrefab;

			public string customName;

			public SkillSlot skillSlot;

			public float minDistance = 0f;

			public float maxDistance = float.PositiveInfinity;

			public int desiredIndex = 0;

			public float moveInputScale = 1f;

			public MovementType movementType;

			public AimType aimType;

			public TargetType targetType;

			public bool ignoreNodeGraph = false;

			public float maxHealthFraction = float.PositiveInfinity;

			public float minHealthFraction = float.NegativeInfinity;

			public float maxTargetHealthFraction = float.PositiveInfinity;

			public float minTargetHealthFraction = float.NegativeInfinity;

			public bool requireReady = false;

			public SkillDef requiredSkillDef = null;

			public bool activationRequiresAimTargetLoS = false;

			public bool activationRequiresAimConfirmation = false;

			public bool activationRequiresTargetLoS = false;

			public bool selectionRequiresAimTarget = false;

			public bool selectionRequiresOnGround = false;

			public bool selectionRequiresTargetLoS = false;

			public bool selectionRequiresTargetNonFlier = false;

			public int maxTimesSelected = -1;

			public float driverUpdateTimerOverride = -1f;

			public bool noRepeat = false;

			public AISkillDriver nextHighPriorityOverride = null;

			public bool shouldSprint = false;

			public float aimVectorMaxSpeedOverride = -1f;

			public ButtonPressType buttonPressType = (ButtonPressType)0;
		}

		public static AISkillDriver CreateAISkillDriver(AISkillDriverData data)
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: 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_0090: 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_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)
			if (data == null || (Object)(object)data.masterPrefab == (Object)null)
			{
				Log.Error("Could not create AISkillDriver");
				return null;
			}
			AISkillDriver val = data.masterPrefab.AddComponent<AISkillDriver>();
			val.customName = data.customName;
			val.skillSlot = data.skillSlot;
			val.minDistance = data.minDistance;
			val.maxDistance = data.maxDistance;
			val.moveInputScale = data.moveInputScale;
			val.movementType = data.movementType;
			val.aimType = data.aimType;
			val.moveTargetType = data.targetType;
			val.ignoreNodeGraph = data.ignoreNodeGraph;
			val.maxUserHealthFraction = data.maxHealthFraction;
			val.minUserHealthFraction = data.minHealthFraction;
			val.maxTargetHealthFraction = data.maxTargetHealthFraction;
			val.minTargetHealthFraction = data.minTargetHealthFraction;
			val.requireSkillReady = data.requireReady;
			val.requiredSkill = data.requiredSkillDef;
			val.activationRequiresAimConfirmation = data.activationRequiresAimConfirmation;
			val.activationRequiresAimTargetLoS = data.activationRequiresAimTargetLoS;
			val.activationRequiresTargetLoS = data.activationRequiresTargetLoS;
			val.selectionRequiresAimTarget = data.selectionRequiresAimTarget;
			val.selectionRequiresOnGround = data.selectionRequiresOnGround;
			val.selectionRequiresTargetLoS = data.selectionRequiresTargetLoS;
			val.selectionRequiresTargetNonFlier = data.selectionRequiresTargetNonFlier;
			val.maxTimesSelected = data.maxTimesSelected;
			val.driverUpdateTimerOverride = data.driverUpdateTimerOverride;
			val.noRepeat = data.noRepeat;
			val.nextHighPriorityOverride = data.nextHighPriorityOverride;
			val.shouldSprint = data.shouldSprint;
			val.aimVectorMaxSpeedOverride = data.aimVectorMaxSpeedOverride;
			val.buttonPressType = data.buttonPressType;
			data.masterPrefab.ReorderSkillDrivers(val, data.desiredIndex);
			return val;
		}
	}
	internal class ContentPacks : IContentPackProvider
	{
		internal ContentPack contentPack = new ContentPack();

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

		public void Initialize()
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			Effects.RegisterEffects();
			States.RegisterStates();
			Projectiles.RegisterProjectiles();
			ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders);
		}

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

		public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args)
		{
			contentPack.identifier = identifier;
			contentPack.effectDefs.Add(Effects.effectDefs.ToArray());
			contentPack.entityStateTypes.Add(States.entityStates.ToArray());
			contentPack.projectilePrefabs.Add(Projectiles.projectilePrefabs.ToArray());
			contentPack.buffDefs.Add(Buffs.buffDefs.ToArray());
			args.ReportProgress(1f);
			yield break;
		}

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

		public IEnumerator FinalizeAsync(FinalizeAsyncArgs args)
		{
			args.ReportProgress(1f);
			yield break;
		}
	}
}
namespace StormboundFalseSon.Main
{
	public class FalseSonChanges
	{
		public float phase1StrikeInterval = 3.5f;

		public float phase2StrikeInterval = 5.5f;

		public float phase3StrikeInterval = 6f;

		public float phase1AmbientStrikeSpeed = 2f;

		public float phase2AmbientStrikeSpeed = 1.5f;

		public float phase3AmbientStrikeSpeed = 1.2f;

		public float crystalRadiusMult = 1.3f;

		public float baseStrikeSpeed = 1.2f;

		public float strikeSpeed;

		public int scalingLevel = 0;

		public float scalingMult = 0.25f;

		public int currentPhase = 0;

		private LaserChanges laserChanges;

		private AurelioniteChanges aurelioniteChanges;

		public List<LightningStrikePoint> lightningPoints;

		private BlastAttack _blastInfo = null;

		private Vector3[] testPattern = (Vector3[])(object)new Vector3[9]
		{
			new Vector3(0f, 0f, 0f),
			new Vector3(30f, 0f, -30f),
			new Vector3(30f, 0f, 0f),
			new Vector3(30f, 0f, 30f),
			new Vector3(0f, 0f, 30f),
			new Vector3(-30f, 0f, 30f),
			new Vector3(-30f, 0f, 0f),
			new Vector3(-30f, 0f, -30f),
			new Vector3(0f, 0f, -30f)
		};

		private static Vector3[] tornadoPattern = (Vector3[])(object)new Vector3[8]
		{
			new Vector3(28f, 0f, -28f),
			new Vector3(40f, 0f, 0f),
			new Vector3(28f, 0f, 28f),
			new Vector3(0f, 0f, 40f),
			new Vector3(-28f, 0f, 28f),
			new Vector3(-40f, 0f, 0f),
			new Vector3(-28f, 0f, -28f),
			new Vector3(0f, 0f, -40f)
		};

		private static Vector3[] pattern1a = (Vector3[])(object)new Vector3[12]
		{
			new Vector3(0f, 0f, 30f),
			new Vector3(15f, 0f, 27f),
			new Vector3(27f, 0f, 15f),
			new Vector3(30f, 0f, 0f),
			new Vector3(27f, 0f, -15f),
			new Vector3(15f, 0f, -27f),
			new Vector3(0f, 0f, -30f),
			new Vector3(-15f, 0f, -27f),
			new Vector3(-27f, 0f, -15f),
			new Vector3(-30f, 0f, 0f),
			new Vector3(-27f, 0f, 15f),
			new Vector3(-15f, 0f, 27f)
		};

		private static Vector3[] pattern1b = (Vector3[])(object)new Vector3[12]
		{
			new Vector3(12.5f, 0f, 12.5f),
			new Vector3(12.5f, 0f, -12.5f),
			new Vector3(-12.5f, 0f, 12.5f),
			new Vector3(-12.5f, 0f, -12.5f),
			new Vector3(25f, 0f, 25f),
			new Vector3(25f, 0f, -25f),
			new Vector3(-25f, 0f, 25f),
			new Vector3(-25f, 0f, -25f),
			new Vector3(37.5f, 0f, 37.5f),
			new Vector3(37.5f, 0f, -37.5f),
			new Vector3(-37.5f, 0f, 37.5f),
			new Vector3(-37.5f, 0f, -37.5f)
		};

		private static Vector3[] pattern1c = (Vector3[])(object)new Vector3[36]
		{
			new Vector3(10f, 0f, 10f),
			new Vector3(10f, 0f, -10f),
			new Vector3(-10f, 0f, 10f),
			new Vector3(-10f, 0f, -10f),
			new Vector3(20f, 0f, 20f),
			new Vector3(20f, 0f, -20f),
			new Vector3(-20f, 0f, 20f),
			new Vector3(-20f, 0f, -20f),
			new Vector3(20f, 0f, 0f),
			new Vector3(20f, 0f, -0f),
			new Vector3(-20f, 0f, 0f),
			new Vector3(-20f, 0f, -0f),
			new Vector3(30f, 0f, 30f),
			new Vector3(30f, 0f, -30f),
			new Vector3(-30f, 0f, 30f),
			new Vector3(-30f, 0f, -30f),
			new Vector3(30f, 0f, 10f),
			new Vector3(30f, 0f, -10f),
			new Vector3(-30f, 0f, 10f),
			new Vector3(-30f, 0f, -10f),
			new Vector3(10f, 0f, 30f),
			new Vector3(10f, 0f, -30f),
			new Vector3(-10f, 0f, 30f),
			new Vector3(-10f, 0f, -30f),
			new Vector3(40f, 0f, 20f),
			new Vector3(40f, 0f, -20f),
			new Vector3(40f, 0f, 0f),
			new Vector3(-40f, 0f, 20f),
			new Vector3(-40f, 0f, -20f),
			new Vector3(-40f, 0f, 0f),
			new Vector3(20f, 0f, 40f),
			new Vector3(-20f, 0f, 40f),
			new Vector3(0f, 0f, 40f),
			new Vector3(20f, 0f, -40f),
			new Vector3(-20f, 0f, -40f),
			new Vector3(0f, 0f, -40f)
		};

		private static Vector3[] pattern1d = (Vector3[])(object)new Vector3[12]
		{
			new Vector3(0f, 0f, 15f),
			new Vector3(10f, 0f, 5f),
			new Vector3(-10f, 0f, 5f),
			new Vector3(0f, 0f, 45f),
			new Vector3(10f, 0f, 35f),
			new Vector3(-10f, 0f, 35f),
			new Vector3(30f, 0f, 15f),
			new Vector3(40f, 0f, 5f),
			new Vector3(30f, 0f, -5f),
			new Vector3(-30f, 0f, 15f),
			new Vector3(-40f, 0f, 5f),
			new Vector3(-30f, 0f, -5f)
		};

		private static Vector3[] pattern1e = (Vector3[])(object)new Vector3[12]
		{
			new Vector3(0f, 0f, 35f),
			new Vector3(10f, 0f, 25f),
			new Vector3(-10f, 0f, 25f),
			new Vector3(0f, 0f, -35f),
			new Vector3(10f, 0f, -25f),
			new Vector3(-10f, 0f, -25f),
			new Vector3(25f, 0f, 10f),
			new Vector3(35f, 0f, 0f),
			new Vector3(25f, 0f, -10f),
			new Vector3(-25f, 0f, 10f),
			new Vector3(-35f, 0f, 0f),
			new Vector3(-25f, 0f, -10f)
		};

		public List<Vector3[]> patternList1 = new List<Vector3[]> { pattern1a, pattern1b, pattern1e };

		private static Vector3[] pattern2a = (Vector3[])(object)new Vector3[16]
		{
			new Vector3(0f, 0f, -10f),
			new Vector3(-10f, 0f, -20f),
			new Vector3(0f, 0f, -20f),
			new Vector3(10f, 0f, -20f),
			new Vector3(-12.5f, 0f, -30f),
			new Vector3(0f, 0f, -30f),
			new Vector3(12.5f, 0f, -30f),
			new Vector3(-15f, 0f, -40f),
			new Vector3(0f, 0f, -40f),
			new Vector3(15f, 0f, -40f),
			new Vector3(-17.5f, 0f, -50f),
			new Vector3(0f, 0f, -50f),
			new Vector3(17.5f, 0f, -50f),
			new Vector3(-20f, 0f, -60f),
			new Vector3(0f, 0f, -60f),
			new Vector3(20f, 0f, -60f)
		};

		private static Vector3[] pattern2b = (Vector3[])(object)new Vector3[16]
		{
			new Vector3(0f, 0f, 45f),
			new Vector3(18f, 0f, 42f),
			new Vector3(33f, 0f, 33f),
			new Vector3(42f, 0f, 18f),
			new Vector3(45f, 0f, 0f),
			new Vector3(42f, 0f, -18f),
			new Vector3(33f, 0f, -33f),
			new Vector3(18f, 0f, -42f),
			new Vector3(0f, 0f, -45f),
			new Vector3(-18f, 0f, -42f),
			new Vector3(-33f, 0f, -33f),
			new Vector3(-42f, 0f, -18f),
			new Vector3(-45f, 0f, 0f),
			new Vector3(-42f, 0f, 18f),
			new Vector3(-33f, 0f, 33f),
			new Vector3(-18f, 0f, 42f)
		};

		private static Vector3[] pattern2c = (Vector3[])(object)new Vector3[36]
		{
			new Vector3(10f, 0f, 0f),
			new Vector3(-10f, 0f, 0f),
			new Vector3(0f, 0f, 10f),
			new Vector3(0f, 0f, -10f),
			new Vector3(20f, 0f, 10f),
			new Vector3(20f, 0f, -10f),
			new Vector3(-20f, 0f, 10f),
			new Vector3(-20f, 0f, -10f),
			new Vector3(30f, 0f, 20f),
			new Vector3(30f, 0f, -20f),
			new Vector3(30f, 0f, 0f),
			new Vector3(-30f, 0f, 20f),
			new Vector3(-30f, 0f, -20f),
			new Vector3(-30f, 0f, 0f),
			new Vector3(20f, 0f, 30f),
			new Vector3(-20f, 0f, 30f),
			new Vector3(0f, 0f, 30f),
			new Vector3(20f, 0f, -30f),
			new Vector3(-20f, 0f, -30f),
			new Vector3(0f, 0f, -30f),
			new Vector3(40f, 0f, 30f),
			new Vector3(40f, 0f, -30f),
			new Vector3(40f, 0f, 10f),
			new Vector3(40f, 0f, -10f),
			new Vector3(-40f, 0f, 30f),
			new Vector3(-40f, 0f, -30f),
			new Vector3(-40f, 0f, 10f),
			new Vector3(-40f, 0f, -10f),
			new Vector3(30f, 0f, 40f),
			new Vector3(-30f, 0f, 40f),
			new Vector3(10f, 0f, 40f),
			new Vector3(-10f, 0f, 40f),
			new Vector3(30f, 0f, -40f),
			new Vector3(-30f, 0f, -40f),
			new Vector3(10f, 0f, -40f),
			new Vector3(-10f, 0f, -40f)
		};

		private static Vector3[] pattern2d = (Vector3[])(object)new Vector3[16]
		{
			new Vector3(10f, 0f, -27.5f),
			new Vector3(10f, 0f, -40f),
			new Vector3(10f, 0f, -52.5f),
			new Vector3(10f, 0f, -15f),
			new Vector3(-10f, 0f, -27.5f),
			new Vector3(-10f, 0f, -40f),
			new Vector3(-10f, 0f, -52.5f),
			new Vector3(-10f, 0f, -15f),
			new Vector3(25f, 0f, -10f),
			new Vector3(25f, 0f, -22.5f),
			new Vector3(25f, 0f, -35f),
			new Vector3(25f, 0f, 2.5f),
			new Vector3(-25f, 0f, -10f),
			new Vector3(-25f, 0f, -22.5f),
			new Vector3(-25f, 0f, -35f),
			new Vector3(-25f, 0f, 2.5f)
		};

		public List<Vector3[]> patternList2 = new List<Vector3[]> { pattern2a, pattern2b, pattern2d };

		public BullseyeSearch enemyFinder = new BullseyeSearch();

		public static DotIndex devastatorDotIndex;

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

		private static GameObject stakePrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSon.LunarStake_prefab).WaitForCompletion();

		private static GameObject devastatorEffect = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_Elites_EliteBead.EliteBeadCrystalExplosionVFX_prefab).WaitForCompletion();

		private static GameObject warningPrefab2 = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSon.OmniImpactVFXLunarStakeTerrain_prefab).WaitForCompletion();

		private static GameObject eyeGlowPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_Halcyonite.ExplosionTriLaser_prefab).WaitForCompletion();

		public bool hardMode = false;

		private static GameObject fs1BodyPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossBody_prefab).WaitForCompletion();

		private static GameObject fs2BodyPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossBodyLunarShard_prefab).WaitForCompletion();

		private static GameObject fs3BodyPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossBodyBrokenLunarShard_prefab).WaitForCompletion();

		private static GameObject fs1MasterPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossMaster_prefab).WaitForCompletion();

		private static GameObject fs2MasterPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossLunarShardMaster_prefab).WaitForCompletion();

		private static GameObject fs3MasterPrefab = Addressables.LoadAssetAsync<GameObject>((object)RoR2_DLC2_FalseSonBoss.FalseSonBossLunarShardBrokenMaster_prefab).WaitForCompletion();

		public AISkillDriver fs2pillarDriver;

		public static BuffDef StormboundDevastatorDebuff;

		public static BuffDef LaserTargetDebuff;

		public static BuffDef LaserGoldDebuff;

		public static BuffDef LaserCrystalDebuff;

		private static Sprite crystalIcon = Addressables.LoadAssetAsync<Sprite>((object)RoR2_DLC2_FalseSon.texEnergizedCoreBuffIcon_png).WaitForCompletion();

		private static Sprite targetIcon = Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_Grandparent.texBuffOverheat_tif).WaitForCompletion();

		private static Sprite oldIcon = Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_Merc.texBuffMercExposeIcon_tif).WaitForCompletion();

		private static Sprite devastatorIcon = Addressables.LoadAssetAsync<Sprite>((object)RoR2_Base_ShockNearby.texBuffTeslaIcon_tif).WaitForCompletion();

		public int bonusCrystalCount = 3;

		public int crystalScatters = 5;

		public float dashLightningTimer = 0f;

		public float speedoverride = -1f;

		public bool chargedStake = false;

		public void Initialize()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Expected O, but got Unknown
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Expected O, but got Unknown
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Expected O, but got Unknown
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Expected O, but got Unknown
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Expected O, but got Unknown
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Expected O, but got Unknown
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Expected O, but got Unknown
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Expected O, but got Unknown
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Expected O, but got Unknown
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Expected O, but got Unknown
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Expected O, but got Unknown
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Expected O, but got Unknown
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Expected O, but got Unknown
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Expected O, but got Unknown
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Expected O, but got Unknown
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Expected O, but got Unknown
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Expected O, but got Unknown
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Expected O, but got Unknown
			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: Expected O, but got Unknown
			//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f2: Expected O, but got Unknown
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Expected O, but got Unknown
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0216: Expected O, but got Unknown
			//IL_021e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: Expected O, but got Unknown
			//IL_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Expected O, but got Unknown
			//IL_0242: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: Expected O, but got Unknown
			CreateBuffs();
			SetupAIFixes();
			devastatorDotIndex = DotAPI.RegisterDotDef(0.75f, 0.5f, (DamageColorIndex)16, StormboundDevastatorDebuff, (CustomDotBehaviour)null, (CustomDotVisual)null);
			HealthComponent.TakeDamage += new hook_TakeDamage(OnTakeDamage);
			GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt;
			Run.onRunStartGlobal += Run_onRunStartGlobal;
			Run.onRunDestroyGlobal += Run_onRunDestroyGlobal;
			GlobalEventManager.ProcessHitEnemy += new Manipulator(LunarRuinDotFix);
			FrozenState.OnEnter += new hook_OnEnter(OnFrozenStateEnter);
			CorruptedPathsDash.GetNextStateAuthority += new hook_GetNextStateAuthority(CorruptedPathsDash_GetNextStateAuthority);
			Phase1.FixedUpdate += new hook_FixedUpdate(OnPhase1Update);
			Phase2.OnEnter += new hook_OnEnter(OnPhase2Enter);
			Phase3.OnEnter += new hook_OnEnter(OnPhase3Enter);
			Phase3.OnBossGroupDefeated += new hook_OnBossGroupDefeated(OnPhase3Finish);
			FissureSlam.HasLoSToPlayer += new hook_HasLoSToPlayer(OnFissureSlamLoS);
			FissureSlam.DetonateAuthority += new hook_DetonateAuthority(OnFissureSlamDetonate);
			FissureSlam.OnEnter += new hook_OnEnter(OnFissureSlamEnter);
			SwatAwayPlayersWindup.OnEnter += new hook_OnEnter(OnSwatEnter);
			SwatAwayPlayersWindup.GetNextStateAuthority += new hook_GetNextStateAuthority(OnSwatState);
			LunarRainDeathState.Explode += new hook_Explode(OnLunarSpikeExplode);
			LunarRainDeathState.OnEnter += new hook_OnEnter(OnLunarSpikeEnter);
			LunarRain.OnEnter += new hook_OnEnter(OnLunarRainEnter);
			LunarGazeLeap.OnEnter += new hook_OnEnter(OnLeapEnter);
			laserChanges = new LaserChanges();
			laserChanges.Initialize();
			PrimeDevastator.FixedUpdate += new hook_FixedUpdate(OnDevastatorUpdate);
			PrimeDevastator.CreateOrbChain += new hook_CreateOrbChain(OnDevastatorOrb);
			PrimeDevastator.FireDevastator += new hook_FireDevastator(OnDevastatorFire);
			CorruptedPathsDash.OnEnter += new hook_OnEnter(OnDashEnter);
			CorruptedPathsDash.FixedUpdate += new hook_FixedUpdate(OnDashUpdate);
			LightningStrikeInstance.SetupDefaultBlastInfo += new hook_SetupDefaultBlastInfo(OnSetupLightning);
			TaintedOffering.FireProjectile += new hook_FireProjectile(OnTaintedOfferingFire);
			TaintedOffering.FixedUpdate += new hook_FixedUpdate(OnTaintedOfferingUpdate);
			TaintedOffering.OnEnter += new hook_OnEnter(OnTaintedOfferingEnter);
			aurelioniteChanges = new AurelioniteChanges();
			aurelioniteChanges.Initialize();
		}

		private void SetupAIFixes()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03be: 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_059d: Unknown result type (might be due to invalid IL or missing references)
			//IL_069a: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_04da: Unknown result type (might be due to invalid IL or missing references)
			//IL_0455: Unknown result type (might be due to invalid IL or missing references)
			//IL_045a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0462: Unknown result type (might be due to invalid IL or missing references)
			//IL_0467: Unknown result type (might be due to invalid IL or missing references)
			//IL_046f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0474: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07be: Unknown result type (might be due to invalid IL or missing references)
			//IL_0739: Unknown result type (might be due to invalid IL or missing references)
			//IL_073e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0746: Unknown result type (might be due to invalid IL or missing references)
			//IL_074b: 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_0758: Unknown result type (might be due to invalid IL or missing references)
			Skills.AISkillDriverData data = new Skills.AISkillDriverData
			{
				masterPrefab = fs2MasterPrefab,
				customName = "moveAroundPillars",
				skillSlot = (SkillSlot)0,
				requireReady = false,
				maxDistance = 40f,
				targetType = (TargetType)3,
				movementType = (MovementType)0,
				aimType = (AimType)1,
				shouldSprint = true,
				desiredIndex = 7,
				driverUpdateTimerOverride = -1f
			};
			Skills.CreateAISkillDriver(data);
			Skills.AISkillDriverData data2 = new Skills.AISkillDriverData
			{
				masterPrefab = fs3MasterPrefab,
				customName = "moveAroundPillars",
				skillSlot = (SkillSlot)0,
				requireReady = false,
				maxDistance = 40f,
				targetType = (TargetType)3,
				movementType = (MovementType)0,
				aimType = (AimType)1,
				shouldSprint = true,
				desiredIndex = 7,
				driverUpdateTimerOverride = -1f
			};
			Skills.CreateAISkillDriver(data2);
			AISkillDriver val = null;
			AISkillDriver[] components = fs1MasterPrefab.GetComponents<AISkillDriver>();
			AISkillDriver[] array = components;
			foreach (AISkillDriver val2 in array)
			{
				string customName = val2.customName;
				Log.Debug("False Son p1 " + customName);
				if (customName == "FissureSlam")
				{
					val2.maxDistance = 30f;
					val2.ignoreNodeGraph = true;
					val2.activationRequiresTargetLoS = false;
				}
				if (customName == "Corrupted Paths (Step Brothers)")
				{
					val = val2;
					Log.Debug("maxDistance: " + val2.maxDistance);
					Log.Debug("minDistance: " + val2.minDistance);
					Log.Debug("movementType: " + ((object)(MovementType)(ref val2.movementType)).ToString());
					Log.Debug("aimType: " + ((object)(AimType)(ref val2.aimType)).ToString());
					Log.Debug("moveTargetType: " + ((object)(TargetType)(ref val2.moveTargetType)).ToString());
					Log.Debug("aimVectorMaxSpeedOverride: " + val2.aimVectorMaxSpeedOverride);
					Log.Debug("aimVectorDampTimeOverride: " + val2.aimVectorDampTimeOverride);
				}
			}
			AISkillDriver[] components2 = fs2MasterPrefab.GetComponents<AISkillDriver>();
			AISkillDriver[] array2 = components2;
			foreach (AISkillDriver val3 in array2)
			{
				string customName2 = val3.customName;
				Log.Debug("False Son p2 " + customName2);
				if (customName2 == "FissureSlam")
				{
					val3.maxDistance = 40f;
					val3.ignoreNodeGraph = true;
					val3.activationRequiresTargetLoS = false;
					val3.selectionRequiresTargetLoS = false;
					val3.movementType = (MovementType)1;
					val3.shouldSprint = true;
				}
				if (customName2 == "Follow Last Known Target")
				{
					Log.Debug("maxDistance: " + val3.maxDistance);
					Log.Debug("minDistance: " + val3.minDistance);
					Log.Debug("movementType: " + ((object)(MovementType)(ref val3.movementType)).ToString());
					Log.Debug("aimType: " + ((object)(AimType)(ref val3.aimType)).ToString());
					Log.Debug("moveTargetType: " + ((object)(TargetType)(ref val3.moveTargetType)).ToString());
					Log.Debug("aimVectorMaxSpeedOverride: " + val3.aimVectorMaxSpeedOverride);
					Log.Debug("aimVectorDampTimeOverride: " + val3.aimVectorDampTimeOverride);
					val3.moveTargetType = (TargetType)3;
					val3.aimType = (AimType)1;
					val3.shouldSprint = true;
					val3.movementType = (MovementType)1;
					val3.ignoreNodeGraph = true;
					val3.resetCurrentEnemyOnNextDriverSelection = false;
					val3.activationRequiresTargetLoS = false;
				}
				if (customName2 == "SwatAwayPlayers")
				{
					if ((Object)(object)val != (Object)null && hardMode)
					{
						val3.maxDistance = val.maxDistance;
						val3.minDistance = val.minDistance;
						val3.activationRequiresTargetLoS = val.activationRequiresTargetLoS;
						val3.activationRequiresAimTargetLoS = val.activationRequiresAimTargetLoS;
						val3.aimType = val.aimType;
						val3.movementType = val.movementType;
						val3.moveTargetType = val.moveTargetType;
						val3.aimVectorMaxSpeedOverride = val.aimVectorMaxSpeedOverride;
						val3.aimVectorDampTimeOverride = val.aimVectorDampTimeOverride;
						val3.selectionRequiresTargetLoS = false;
					}
					else
					{
						val3.maxDistance = 120f;
						val3.minDistance = 20f;
						val3.activationRequiresTargetLoS = false;
						val3.activationRequiresAimTargetLoS = false;
						val3.aimType = (AimType)2;
						val3.movementType = (MovementType)0;
						val3.moveTargetType = (TargetType)0;
						val3.selectionRequiresTargetLoS = false;
					}
				}
				if (customName2 == "Corrupted Paths (Step Brothers)")
				{
					val3.maxDistance = 0f;
					val3.minDistance = 0f;
				}
			}
			AISkillDriver[] components3 = fs3MasterPrefab.GetComponents<AISkillDriver>();
			AISkillDriver[] array3 = components3;
			foreach (AISkillDriver val4 in array3)
			{
				string customName3 = val4.customName;
				Log.Debug("False Son p3 " + customName3);
				if (customName3 == "FissureSlam")
				{
					val4.maxDistance = 40f;
					val4.ignoreNodeGraph = true;
					val4.activationRequiresTargetLoS = false;
					val4.selectionRequiresTargetLoS = false;
					val4.movementType = (MovementType)1;
					val4.shouldSprint = true;
				}
				if (customName3 == "Follow Last Known Target")
				{
					Log.Debug("maxDistance: " + val4.maxDistance);
					Log.Debug("minDistance: " + val4.minDistance);
					Log.Debug("movementType: " + ((object)(MovementType)(ref val4.movementType)).ToString());
					Log.Debug("aimType: " + ((object)(AimType)(ref val4.aimType)).ToString());
					Log.Debug("moveTargetType: " + ((object)(TargetType)(ref val4.moveTargetType)).ToString());
					Log.Debug("aimVectorMaxSpeedOverride: " + val4.aimVectorMaxSpeedOverride);
					Log.Debug("aimVectorDampTimeOverride: " + val4.aimVectorDampTimeOverride);
					val4.moveTargetType = (TargetType)3;
					val4.aimType = (AimType)1;
					val4.shouldSprint = true;
					val4.movementType = (MovementType)1;
					val4.ignoreNodeGraph = true;
					val4.resetCurrentEnemyOnNextDriverSelection = false;
					val4.activationRequiresTargetLoS = false;
				}
				if (customName3 == "SwatAwayPlayers")
				{
					if ((Object)(object)val != (Object)null && hardMode)
					{
						val4.maxDistance = val.maxDistance;
						val4.minDistance = val.minDistance;
						val4.activationRequiresTargetLoS = val.activationRequiresTargetLoS;
						val4.activationRequiresAimTargetLoS = val.activationRequiresAimTargetLoS;
						val4.aimType = val.aimType;
						val4.movementType = val.movementType;
						val4.moveTargetType = val.moveTargetType;
						val4.aimVectorMaxSpeedOverride = val.aimVectorMaxSpeedOverride;
						val4.aimVectorDampTimeOverride = val.aimVectorDampTimeOverride;
						val4.selectionRequiresTargetLoS = false;
					}
					else
					{
						val4.maxDistance = 120f;
						val4.minDistance = 20f;
						val4.activationRequiresTargetLoS = false;
						val4.activationRequiresAimTargetLoS = false;
						val4.aimType = (AimType)2;
						val4.movementType = (MovementType)0;
						val4.moveTargetType = (TargetType)0;
						val4.selectionRequiresTargetLoS = false;
					}
				}
			}
		}

		private void CreateBuffs()
		{
			//IL_001a: 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_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			StormboundDevastatorDebuff = Buffs.AddNewBuff("BloonStormboundDevastatorDebuff", devastatorIcon, new Color(1f, 0.5f, 0f), canStack: false, isDebuff: true, isCooldown: false, isHidden: false, ignoreNectar: true);
			LaserTargetDebuff = Buffs.AddNewBuff("BloonLaserTargetDebuff", targetIcon, new Color(1f, 0.5f, 0f), canStack: true, isDebuff: false, isCooldown: false, isHidden: false, ignoreNectar: true);
			LaserCrystalDebuff = Buffs.AddNewBuff("BloonLaserCrystalDebuff", crystalIcon, Color.white, canStack: true, isDebuff: false, isCooldown: false, isHidden: false, ignoreNectar: true);
			LaserGoldDebuff = Buffs.AddNewBuff("BloonLaserGoldDebuff", Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/CritOnUse/texBuffFullCritIcon.tif").WaitForCompletion(), Color.yellow, canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreNectar: true);
		}

		private void OnTakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo info)
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bc: Unknown result type (might be due to invalid IL or missing references)
			bool flag = false;
			if (Object.op_Implicit((Object)(object)self.body) && self.body.baseNameToken.Contains("LUNARRAINSHARD"))
			{
				flag = true;
			}
			if ((DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLightning) || DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLunarRuin)) && Object.op_Implicit((Object)(object)self.body) && !flag)
			{
				self.body.AddTimedBuff(Buffs.lunarruin, 420f);
			}
			if (DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLunarRuin) && Object.op_Implicit((Object)(object)self.body) && flag)
			{
				info.damage = 0f;
			}
			if (DamageAPI.HasModdedDamageType(info, DamageTypes.aurelioniteLaser) && Object.op_Implicit((Object)(object)self.body))
			{
				if (flag)
				{
					info.damage *= 0.1f;
				}
				else if (self.body.HasBuff(LaserGoldDebuff))
				{
					info.damage = 0f;
				}
				else
				{
					self.body.AddTimedBuff(LaserGoldDebuff, 0.5f);
				}
			}
			if (DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLightning) && Object.op_Implicit((Object)(object)self.body))
			{
				float num = 0.125f * (1f + (float)scalingLevel * scalingMult);
				info.damage = self.fullCombinedHealth * num;
			}
			if (DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLaserCrystal))
			{
				if (flag)
				{
					self.body.AddTimedBuff(LaserCrystalDebuff, 15f, 10);
					self.dontShowHealthbar = false;
					if (self.body.GetBuffCount(LaserCrystalDebuff) >= 10)
					{
						info.damage = self.fullCombinedHealth * 2f;
					}
					else
					{
						info.damage = 0f;
					}
				}
				else
				{
					info.damage = 0f;
					info.rejected = true;
				}
			}
			if (DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLaser) && Object.op_Implicit((Object)(object)self.body))
			{
				if (!flag)
				{
					self.body.AddTimedBuff(LaserTargetDebuff, 2.5f, 10);
					self.body.SetTimedBuffDurationIfPresent(LaserTargetDebuff, 0.5f, true);
					self.body.AddTimedBuff(Buffs.lunarruin, 420f);
					if (currentPhase == 3)
					{
						self.body.AddTimedBuff(Buffs.lunarruin, 420f);
					}
				}
				else
				{
					info.damage = 0f;
				}
			}
			if (DamageAPI.HasModdedDamageType(info, DamageTypes.stormboundLaserTargeting) && Object.op_Implicit((Object)(object)self.body))
			{
				if (!flag)
				{
					self.body.AddTimedBuff(LaserTargetDebuff, 2.5f, 10);
					self.body.SetTimedBuffDurationIfPresent(LaserTargetDebuff, 0.5f, true);
				}
				info.damage = 0f;
			}
			orig.Invoke(self, info);
		}

		private void GlobalEventManager_onServerDamageDealt(DamageReport report)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: 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_005e: 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_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Expected O, but got Unknown
			HealthComponent victim = report.victim;
			CharacterBody attackerBody = report.attackerBody;
			if (report.dotType == devastatorDotIndex && (Object)(object)victim != (Object)null)
			{
				victim.body.AddTimedBuff(Buffs.lunarruin, 420f);
				Util.PlaySound("Play_item_use_BFG_zaps", ((Component)victim).gameObject);
				EffectData val = new EffectData
				{
					origin = report.victimBody.footPosition,
					scale = 0.75f,
					rootObject = ((Component)report.victim).gameObject
				};
				EffectManager.SpawnEffect(devastatorEffect, val, true);
			}
		}

		private void Run_onRunStartGlobal(Run obj)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Invalid comparison between Unknown and I4
			Log.Debug($"{obj.selectedDifficulty} {(object)(DifficultyIndex)9}");
			if ((int)obj.selectedDifficulty >= 9)
			{
				SkillDef skillDef = SkillCatalog.GetSkillDef(SkillCatalog.FindSkillIndexByName("PrimeDevastator"));
				SkillDef skillDef2 = SkillCatalog.GetSkillDef(SkillCatalog.FindSkillIndexByName("LunarGazePlus"));
				SkillDef val = SkillCatalog.allSkillDefs.FirstOrDefault((Func<SkillDef, bool>)((SkillDef skill) => skill.skillName == "Laser" && skill.baseRechargeInterval == 35f));
				if ((Object)(object)skillDef == (Object)null || (Object)(object)skillDef2 == (Object)null || (Object)(object)val == (Object)null)
				{
					Log.Error($"One or more SkillDefs could not be found! Check skill names. {skillDef} | {skillDef2} | {val}");
					return;
				}
				skillDef.baseRechargeInterval *= 1.5f;
				skillDef2.baseRechargeInterval *= 1.5f;
				val.baseRechargeInterval *= 1.5f;
				Log.Debug($"Devestator Skill Cooldown: {skillDef.baseRechargeInterval}");
				Log.Debug($"Lunar Gaze Plus Skill Cooldown: {skillDef2.baseRechargeInterval}");
				Log.Debug($"Lunar Gaze Skill Cooldown: {val.baseRechargeInterval}");
			}
		}

		private void Run_onRunDestroyGlobal(Run obj)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Invalid comparison between Unknown and I4
			if ((int)obj.selectedDifficulty >= 9)
			{
				SkillDef skillDef = SkillCatalog.GetSkillDef(SkillCatalog.FindSkillIndexByName("PrimeDevastator"));
				SkillDef skillDef2 = SkillCatalog.GetSkillDef(SkillCatalog.FindSkillIndexByName("LunarGazePlus"));
				SkillDef val = SkillCatalog.allSkillDefs.FirstOrDefault((Func<SkillDef, bool>)((SkillDef skill) => skill.skillName == "Laser" && skill.baseRechargeInterval == 52.5f));
				if ((Object)(object)skillDef == (Object)null || (Object)(object)skillDef2 == (Object)null || (Object)(object)val == (Object)null)
				{
					Log.Error($"One or more SkillDefs could not be found! Check skill names. {skillDef} | {skillDef2} | {val}");
					return;
				}
				skillDef.baseRechargeInterval /= 1.5f;
				skillDef2.baseRechargeInterval /= 1.5f;
				val.baseRechargeInterval /= 1.5f;
				Log.Debug($"Devestator Skill Cooldown: {skillDef.baseRechargeInterval}");
				Log.Debug($"Lunar Gaze Plus Skill Cooldown: {skillDef2.baseRechargeInterval}");
				Log.Debug($"Lunar Gaze Skill Cooldown: {val.baseRechargeInterval}");
			}
		}

		public void OnPhase1Update(orig_FixedUpdate orig, Phase1 self)
		{
			orig.Invoke(self);
			if (currentPhase == 1 || !(((EntityState)self).fixedAge > ((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.additionalEntryVFXDelay + ((FSBFPhaseBaseState)self).durationBeforeEnablingCombatEncounter + 4f))
			{
				return;
			}
			currentPhase = 1;
			((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.frequencyOfLightningStrikes = phase1StrikeInterval;
			((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.delayBeforeExpiringAPreviousStrikePoint = phase1StrikeInterval;
			((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.lightningWarningDuration = phase1AmbientStrikeSpeed;
			LightningStormController.SetStormStrikePattern(((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern);
			LightningStormController.SetStormActive(true);
			if (Object.op_Implicit((Object)(object)Run.instance) && Run.instance.stageClearCount >= 4)
			{
				if (Run.instance.stageClearCount >= 7)
				{
					scalingLevel = 2;
				}
				else
				{
					scalingLevel = 1;
				}
			}
			else
			{
				scalingLevel = 0;
			}
			strikeSpeed = baseStrikeSpeed / (1f + scalingMult * (float)scalingLevel);
		}

		public void OnPhase2Enter(orig_OnEnter orig, Phase2 self)
		{
			orig.Invoke(self);
			((FSBFPhaseBaseState)self).durationBeforeEnablingCombatEncounter = 0f;
			((FSBFPhaseBaseState)self).durationBeforeRingsSpawn = 0.5f;
			currentPhase = 2;
			((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.frequencyOfLightningStrikes = phase2StrikeInterval;
			((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.delayBeforeExpiringAPreviousStrikePoint = phase2StrikeInterval;
			((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.lightningWarningDuration = phase2AmbientStrikeSpeed;
			Component[] components = MeridianEventTriggerInteraction.instance.arenaGeode3.GetComponents(typeof(Component));
			Component[] array = components;
			foreach (Component val in array)
			{
			}
			LightningStormController.SetStormStrikePattern(((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern);
			LightningStormController.SetStormActive(true);
		}

		public void OnPhase3Enter(orig_OnEnter orig, Phase3 self)
		{
			orig.Invoke(self);
			((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.frequencyOfLightningStrikes = phase3StrikeInterval;
			((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.delayBeforeExpiringAPreviousStrikePoint = phase3StrikeInterval;
			((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern.lightningWarningDuration = phase3AmbientStrikeSpeed;
			LightningStormController.SetStormStrikePattern(((FSBFEncounterBaseState)self).meridianEventTriggerInteraction.startingLightningStrikePattern);
			LightningStormController.SetStormActive(true);
			((FSBFPhaseBaseState)self).durationBeforeEnablingCombatEncounter = 0f;
			((FSBFPhaseBaseState)self).durationBeforeRingsSpawn = 0.5f;
			currentPhase = 3;
		}

		public void OnPhase3Finish(orig_OnBossGroupDefeated orig, Phase3 self, BossGroup bossGroup)
		{
			orig.Invoke(self, bossGroup);
			if (!NetworkServer.active)
			{
				return;
			}
			foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances)
			{
				if (!((Object)(object)instance == (Object)null))
				{
					CharacterBody body = instance.master.GetBody();
					if (!((Object)(object)body == (Object)null))
					{
						Util.CleanseBody(body, true, false, false, true, false, false);
					}
				}
			}
		}

		public void OnSwatEnter(orig_OnEnter orig, SwatAwayPlayersWindup self)
		{
			if (currentPhase > 1)
			{
				self.stateAborted = true;
				((EntityState)self).outer.SetNextState(self.GetNextStateAuthority());
			}
			else
			{
				orig.Invoke(self);
			}
		}

		private EntityState OnSwatState(orig_GetNextStateAuthority orig, SwatAwayPlayersWindup self)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			if (currentPhase > 1)
			{
				if (hardMode)
				{
					return (EntityState)new CorruptedPathsDash();
				}
				return (EntityState)new FissureSlamWindup();
			}
			return orig.Invoke(self);
		}

		public void IL_FissureSlamEnter(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILCursor val2 = val;
			MoveType val3 = (MoveType)0;
			MoveType val4 = (MoveType)2;
			ILLabel val7 = default(ILLabel);
			if (val2.TryGotoNext(val4, new Func<Instruction, bool>[5]
			{
				(Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val7),
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, typeof(EntityState), "outer"),
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, typeof(EntityStateMachine), "SetNextStateToMain"),
				(Instruction x) => ILPatternMatchingExt.MatchRet(x)
			}))
			{
				Instruction next = val.Next;
				ILCursor val5 = val;
				ILLabel val6 = default(ILLabel);
				if (val5.TryGotoPrev(val4, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val6)
				}))
				{
					val.Emit(OpCodes.Br, next);
				}
				else
				{
					Log.Error(((MemberReference)il.Method).Name + " Hook 2 failed!");
				}
			}
			else
			{
				Log.Error(((MemberReference)il.Method).Name + " Hook 1 failed!");
			}
		}

		public bool OnFissureSlamLoS(orig_HasLoSToPlayer orig, FissureSlam self)
		{
			return true;
		}

		public void OnFissureSlamWindupEnter(orig_OnEnter orig, FissureSlamWindup self)
		{
			if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody))
			{
				((BaseState)self).attackSpeedStat = ((EntityState)self).characterBody.attackSpeed;
				((BaseState)self).damageStat = ((EntityState)self).characterBody.damage;
				((BaseState)self).critStat = ((EntityState)self).characterBody.crit;
				((BaseState)self).moveSpeedStat = ((EntityState)self).characterBody.moveSpeed;
			}
			self.chargeDuration = 1.4f;
			Util.PlaySound(FissureSlamWindup.enterSFXString, ((EntityState)self).gameObject);
			Util.PlaySound(FissureSlamWindup.startChargeLoopSFXString, ((EntityState)self).gameObject);
			Transform val = ((BaseState)self).FindModelChild(FissureSlamWindup.chargeVfxChildLocatorName);
			self.chargeVfxInstanceTransform = Object.Instantiate<GameObject>(FissureSlamWindup.chargeVfxPrefab, val).transform;
			((Component)self.chargeVfxInstanceTransform).GetComponent<ScaleParticleSystemDuration>().newDuration = (1f - FissureSlamWindup.minChargeForChargedAttack) * self.chargeDuration;
			if (currentPhase > 1)
			{
				Animator modelAnimator = ((EntityState)self).GetModelAnimator();
				if (Object.op_Implicit((Object)(object)modelAnimator))
				{
					modelAnimator.speed = 0.5f;
					EffectManager.SimpleMuzzleFlash(eyeGlowPrefab, ((EntityState)self).gameObject, "MuzzleLazer", true);
				}
			}
		}

		public void OnFissureSlamWindupUpdate(orig_FixedUpdate orig, FissureSlamWindup self)
		{
			((EntityState)self).fixedAge = ((EntityState)self).fixedAge + ((EntityState)self).GetDeltaTime();
			self.charge += Time.deltaTime;
			((EntityState)self).characterBody.SetSpreadBloom(self.charge, true);
			((EntityState)self).characterBody.SetAimTimer(3f);
			if (currentPhase > 1)
			{
				if (self.charge > 3f)
				{
					Animator modelAnimator = ((EntityState)self).GetModelAnimator();
					if (Object.op_Implicit((Object)(object)modelAnimator))
					{
						modelAnimator.speed = 1f;
					}
					((EntityState)self).outer.SetNextState(self.GetNextStateAuthority());
				}
			}
			else if (self.charge > self.baseChargeDuration)
			{
				((EntityState)self).outer.SetNextState(self.GetNextStateAuthority());
			}
			((EntityState)self).characterMotor.walkSpeedPenaltyCoefficient = FissureSlamWindup.walkSpeedCoefficient;
		}

		public void OnFissureSlamEnter(orig_OnEnter orig, FissureSlam self)
		{
			Log.Message(self.baseDuration);
			if (currentPhase > 1)
			{
				self.baseDuration *= 1.5f;
				EffectManager.SimpleMuzzleFlash(eyeGlowPrefab, ((EntityState)self).gameObject, "MuzzleLazer", true);
			}
			self.totalFissures = 0;
			orig.Invoke(self);
		}

		public Result OnFissureSlamDetonate(orig_DetonateAuthority orig, FissureSlam self)
		{
			//IL_02cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: 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_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00ad: 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_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_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: 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_0113: 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_011a: 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_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01de: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_028b: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a9: 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)
			if (((EntityState)self).isAuthority)
			{
				Vector3 position = ((Component)((BaseState)self).FindModelChild("ClubExplosionPoint")).transform.position;
				float x = position.x;
				float y = MeridianEventTriggerInteraction.instance.arenaCenter.position.y;
				float z = position.z;
				Vector3 val = default(Vector3);
				((Vector3)(ref val))..ctor(x, y, z);
				Vector3 origin = default(Vector3);
				((Vector3)(ref origin))..ctor(((EntityState)self).transform.position.x, y, ((EntityState)self).transform.position.z);
				Quaternion val2 = Util.QuaternionSafeLookRotation(((EntityState)self).modelLocator.modelTransform.forward);
				Quaternion val3 = Quaternion.LookRotation(((EntityState)self).transform.position - position);
				float y2 = ((Quaternion)(ref val3)).eulerAngles.y;
				int index = Random.Range(0, patternList1.Count);
				Vector3[] array = patternList1[index];
				float num = strikeSpeed;
				Util.ShuffleArray<Vector3>(array);
				for (int i = 0; i < 12; i++)
				{
					Vector3 val4 = array[i];
					Vector3 val5 = Quaternion.AngleAxis(y2, Vector3.up) * val4;
					Vector3 val6 = val5 + val;
					Object.Instantiate<GameObject>(LunarGazeExitLeap.lightningPrefab, val6, val2).GetComponent<LightningStrikeInstance>().Initialize(val6, _blastInfo, num, true);
					num += 0.025f;
				}
				if (currentPhase > 1)
				{
					int index2 = Random.Range(0, patternList2.Count);
					Vector3[] array2 = patternList2[index2];
					float num2 = strikeSpeed * 1.5f;
					Util.ShuffleArray<Vector3>(array2);
					for (int j = 0; j < 16; j++)
					{
						Vector3 val7 = array2[j];
						Vector3 val8 = Quaternion.AngleAxis(y2, Vector3.up) * val7;
						Vector3 val9 = val + val8;
						Object.Instantiate<GameObject>(LunarGazeExitLeap.lightningPrefab, val9, val2).GetComponent<LightningStrikeInstance>().Initialize(val9, _blastInfo, num2, true);
						num2 += 0.02f;
					}
				}
				BaseAI val10 = default(BaseAI);
				if (((Component)((EntityState)self).characterBody.master).TryGetComponent<BaseAI>(ref val10))
				{
					Target currentEnemy = val10.currentEnemy;
					if (currentEnemy != null && (Object)(object)val10.currentEnemy.gameObject != (Object)null && ((EntityState)self).isAuthority)
					{
						x = currentEnemy.gameObject.transform.position.x;
						z = currentEnemy.gameObject.transform.position.z;
						Vector3 position2 = default(Vector3);
						((Vector3)(ref position2))..ctor(x, y, z);
						((MonoBehaviour)((EntityState)self).characterBody).StartCoroutine(FireFissureColumn(position2, origin, ((EntityState)self).characterBody, strikeSpeed, 3, warningCircle: true));
					}
				}
			}
			return orig.Invoke(self);
		}

		private IEnumerator FireFissureColumn(Vector3 position, Vector3 origin, CharacterBody body, float delay, int amount, bool warningCircle)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			if (warningCircle)
			{
				Vector3 warningPos = position;
				warningPos.y += 0.2f;
				GameObject warningInstance = Object.Instantiate<GameObject>(warningPrefab2, warningPos, Util.QuaternionSafeLookRotation(Vector3.up));
				Object.Destroy((Object)(object)warningInstance, delay);
				GameObject warningInstance2 = Object.Instantiate<GameObject>(warningPrefab, warningPos, Util.QuaternionSafeLookRotation(Vector3.up));
				warningInstance2.transform.localScale = Vector3.one * 5f;
				Object.Destroy((Object)(object)warningInstance2, delay);
				TeamAreaIndicator indicator = warningInstance2.GetComponent<TeamAreaIndicator>();
				if ((Object)(object)indicator != (Object)null)
				{
					indicator.teamComponent = body.teamComponent;
				}
			}
			yield return (object)new WaitForSeconds(delay);
			DamageTypeCombo damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)131072), (DamageTypeExtended)8192, (DamageSource)16);
			DamageAPI.AddModdedDamageType(ref damageType, DamageTypes.stormboundLunarRuin);
			float num = 360f / (float)amount;
			for (int i = 0; i < amount; i++)
			{
				Quaternion quaternion = Quaternion.LookRotation(origin - position);
				quaternion *= Quaternion.Euler(Vector3.up * 180f);
				((Quaternion)(ref quaternion)).Set(0f, quaternion.y, 0f, quaternion.w);
				Quaternion forward = Quaternion.AngleAxis(num * (float)i, Vector3.up) * quaternion;
				ProjectileManager.instance.FireProjectile(FissureSlam.pillarProjectilePrefab, position, forward, ((Component)body).gameObject, body.damage * (FissureSlam.blastDamageCoefficient * 0.2f), 0f, Util.CheckRoll(body.crit, body.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)damageType);
				quaternion = default(Quaternion);
			}
		}

		public void OnLunarSpikeEnter(orig_OnEnter orig, LunarRainDeathState self)
		{
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: 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_015f: Expected O, but got Unknown
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody))
			{
				((BaseState)self).attackSpeedStat = ((EntityState)self).characterBody.attackSpeed;
				((BaseState)self).damageStat = ((EntityState)self).characterBody.damage;
				((BaseState)self).critStat = ((EntityState)self).characterBody.crit;
				((BaseState)self).moveSpeedStat = ((EntityState)self).characterBody.moveSpeed;
			}
			if ((Object)(object)((EntityState)self).teamComponent != (Object)null)
			{
				((EntityState)self).teamComponent.teamIndex = (TeamIndex)2;
			}
			if (Object.op_Implicit((Object)(object)LunarRainDeathState.chargePrefab))
			{
				GameObject val = Object.Instantiate<GameObject>(warningPrefab, ((EntityState)self).transform.position, Util.QuaternionSafeLookRotation(Vector3.up));
				val.transform.localScale = Vector3.one * LunarRainDeathState.explosionRadius * crystalRadiusMult;
				Object.Destroy((Object)(object)val, LunarRainDeathState.chargeDuration);
				TeamAreaIndicator component = val.GetComponent<TeamAreaIndicator>();
				if ((Object)(object)component != (Object)null)
				{
					component.teamComponent = ((EntityState)self).teamComponent;
					Renderer val2 = default(Renderer);
					if (((Component)component).TryGetComponent<Renderer>(ref val2))
					{
						val2.material.color = Color.blue;
						Log.Message("Recolor Success!");
					}
				}
				EffectData val3 = new EffectData
				{
					scale = LunarRainDeathState.explosionRadius * crystalRadiusMult,
					origin = ((EntityState)self).transform.position
				};
				EffectManager.SpawnEffect(LunarRainDeathState.chargePrefab, val3, false);
			}
			FlashEmission component2 = ((Component)((EntityState)self).modelLocator.modelTransform).GetComponent<FlashEmission>();
			if (Object.op_Implicit((Object)(object)component2))
			{
				component2.StartFlash();
			}
			Util.PlaySound(LunarRainDeathState.explosiveIndicatorSoundString, ((EntityState)self).gameObject);
		}

		public void OnLunarSpikeExplode(orig_Explode orig, LunarRainDeathState self)
		{
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Expected O, but got Unknown
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: 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_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Expected O, but got Unknown
			if (Object.op_Implicit((Object)(object)((EntityState)self).modelLocator))
			{
				if (Object.op_Implicit((Object)(object)((EntityState)self).modelLocator.modelBaseTransform))
				{
					EntityState.Destroy((Object)(object)((Component)((EntityState)self).modelLocator.modelBaseTransform).gameObject);
				}
				if (Object.op_Implicit((Object)(object)((EntityState)self).modelLocator.modelTransform))
				{
					EntityState.Destroy((Object)(object)((Component)((EntityState)self).modelLocator.modelTransform).gameObject);
				}
			}
			if (Object.op_Implicit((Object)(object)LunarRainDeathState.explosionEffectPrefab))
			{
				EffectManager.SpawnEffect(LunarRainDeathState.explosionEffectPrefab, new EffectData
				{
					origin = ((EntityState)self).transform.position,
					scale = LunarRainDeathState.vfxScale * (crystalRadiusMult + 0.2f),
					rotation = ((EntityState)self).transform.rotation
				}, true);
			}
			BlastAttack val = new BlastAttack();
			val.attacker = ((EntityState)self).gameObject;
			val.damageColorIndex = (DamageColorIndex)3;
			val.baseDamage = LunarRainDeathState.baseDamage * LunarRainDeathState.explosionDamageCoefficient * Run.instance.teamlessDamageCoefficient * 1.6f;
			val.radius = LunarRainDeathState.explosionRadius * crystalRadiusMult;
			val.falloffModel = (FalloffModel)3;
			val.procCoefficient = LunarRainDeathState.explosionProcCoefficient;
			val.teamIndex = (TeamIndex)2;
			val.damageType = DamageTypeCombo.op_Implicit((DamageType)131072);
			val.damageType.damageTypeExtended = (DamageTypeExtended)8192;
			val.position = ((EntityState)self).transform.position;
			val.baseForce = LunarRainDeathState.explosionForce;
			val.canRejectForce = LunarRainDeathState.canRejectForce;
			val.attackerFiltering = (AttackerFiltering)2;
			DamageAPI.AddModdedDamageType(val, DamageTypes.stormboundLunarRuin);
			val.Fire();
			EntityState.Destroy((Object)(object)((EntityState)self).gameObject);
		}

		public void OnLunarRainEnter(orig_OnEnter orig, LunarRain self)
		{
			//IL_025f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_027b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0287: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: 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_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_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)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
			self.delayBetweenDrops = 0.1f;
			orig.Invoke(self);
			BaseAI val = default(BaseAI);
			if (((Component)((EntityState)self).characterBody.master).TryGetComponent<BaseAI>(ref val))
			{
				Target currentEnemy = val.currentEnemy;
				if (currentEnemy != null && (Object)(object)val.currentEnemy.gameObject != (Object)null)
				{
					List<Vector3> list = new List<Vector3>();
					if (!Object.op_Implicit((Object)(object)SceneInfo.instance) || !Object.op_Implicit((Object)(object)SceneInfo.instance.groundNodes))
					{
						Debug.LogWarning((object)"No ground nodes available");
					}
					else
					{
						NodeGraph groundNodes = SceneInfo.instance.groundNodes;
						float x = currentEnemy.gameObject.transform.position.x;
						float y = MeridianEventTriggerInteraction.instance.arenaCenter.position.y;
						float z = currentEnemy.gameObject.transform.position.z;
						float num = 75f;
						if (currentPhase == 3)
						{
							num = 50f;
						}
						num /= (float)crystalScatters;
						Vector3 val2 = default(Vector3);
						((Vector3)(ref val2))..ctor(x, y, z);
						Vector3 position = MeridianEventTriggerInteraction.instance.arenaCenter.position;
						Util.ShuffleList<Vector3>(self.fissureLocs);
						Vector3 item = default(Vector3);
						for (int i = 0; i < crystalScatters; i++)
						{
							List<NodeIndex> list2 = groundNodes.FindNodesInRange(position, num * (float)i, num * (float)(i + 1), (HullMask)1);
							foreach (NodeIndex item2 in list2)
							{
								if (groundNodes.GetNodePosition(item2, ref item))
								{
									list.Add(item);
								}
							}
							Util.ShuffleList<Vector3>(list);
							if (list.Count > 0)
							{
								if (i + 1 > bonusCrystalCount)
								{
									self.fissureLocs[i] = list[0];
								}
								else
								{
									self.fissureLocs.Add(list[0]);
									self.totalLunarDropsToFire++;
								}
							}
							list.Clear();
						}
						Util.ShuffleList<Vector3>(self.fissureLocs);
					}
				}
			}
			float num2 = self.warningDuration;
			foreach (Vector3 fissureLoc in self.fissureLocs)
			{
				if (((EntityState)self).isAuthority)
				{
					((MonoBehaviour)((EntityState)self).characterBody).StartCoroutine(FireFissureColumn(fissureLoc, MeridianEventTriggerInteraction.instance.arenaCenter.position, ((EntityState)self).characterBody, num2, 1, warningCircle: false));
					num2 += self.delayBetweenDrops;
				}
			}
		}

		public Result OnLunarRainDetonate(orig_DetonateAuthority orig, LunarRain self)
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0122: Unknown result type (might be due to invalid IL or missing references)
			int count = self.fissureLocs.Count;
			Vector3 position = ((EntityState)self).characterBody.transform.position;
			for (int i = 0; i < count; i++)
			{
				Vector3 val = ((EntityState)self).characterBody.transform.position + self.fissureLocs[i];
				val.y = MeridianEventTriggerInteraction.instance.arenaCenter.position.y;
				Quaternion val2 = Quaternion.LookRotation(position - val);
				val2 *= Quaternion.Euler(Vector3.up * 180f);
				((Quaternion)(ref val2)).Set(0f, val2.y, 0f, val2.w);
				ProjectileManager.instance.FireProjectileWithoutDamageType(FissureSlam.pillarProjectilePrefab, val, val2, ((EntityState)self).gameObject, ((EntityState)self).characterBody.damage * (FissureSlam.blastDamageCoefficient * 0.2f), 0f, Util.CheckRoll(((EntityState)self).characterBody.crit, ((EntityState)self).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f);
			}
			return orig.Invoke(self);
		}

		public void OnDashEnter(orig_OnEnter orig, CorruptedPathsDash self)
		{
			//IL_0099: 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_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			CorruptedPathsDash.dashPrepDuration = 0.6f;
			CorruptedPathsDash.smallHopVelocity = 0f;
			orig.Invoke(self);
			if (currentPhase == 1)
			{
				CorruptedPathsDash.dashDuration = Vector3.Distance(((Component)((EntityState)self).characterBody.master).GetComponent<BaseAI>().currentEnemy.characterBody.transform.position, ((EntityState)self).transform.position) * 0.13f / CorruptedPathsDash.speedCoefficient - CorruptedPathsDash.gapToEnemy;
			}
			else
			{
				CorruptedPathsDash.dashDuration = Vector3.Distance(((Component)((EntityState)self).characterBody.master).GetComponent<BaseAI>().currentEnemy.characterBody.transform.position, ((EntityState)self).transform.position) * 0.1f / CorruptedPathsDash.speedCoefficient - CorruptedPathsDash.gapToEnemy;
			}
			((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility.buffIndex);
			((EntityState)self).characterBody.AddTimedBuff(Buffs.ArmorBoost, 1f);
		}

		public void OnDashUpdate(orig_FixedUpdate orig, CorruptedPathsDash self)
		{
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			self.overlapAttack.damage = 0f;
			orig.Invoke(self);
			if (self.isDashing)
			{
				float num = strikeSpeed / 2.5f;
				if (self.stopwatch >= dashLightningTimer + 0.008f && ((EntityState)self).isAuthority)
				{
					dashLightningTimer = self.stopwatch;
					float x = ((EntityState)self).gameObject.transform.position.x;
					float y = MeridianEventTriggerInteraction.instance.arenaCenter.position.y;
					float z = ((EntityState)self).gameObject.transform.position.z;
					Vector3 val = default(Vector3);
					((Vector3)(ref val))..ctor(x, y, z);
					Object.Instantiate<GameObject>(LunarGazeExitLeap.lightningPrefab, val, ((EntityState)self).gameObject.transform.rotation).GetComponent<LightningStrikeInstance>().Initialize(val, _blastInfo, num, true);
				}
			}
			else
			{
				dashLightningTimer = 0f;
			}
		}

		public void OnDashExit(orig_OnExit orig, CorruptedPathsDash self)
		{
			orig.Invoke(self);
		}

		public void OnDevastatorUpdate(orig_FixedUpdate orig, PrimeDevastator self)
		{
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)self).fixedAge = ((EntityState)self).fixedAge + ((EntityState)self).GetDeltaTime();
			if (!self.chargeEffectSpawned && ((EntityState)self).fixedAge > self.duration * 0.3f)
			{
				self.chargeEffectSpawned = true;
			}
			if (!self.slamEffectSpawned && ((EntityState)self).fixedAge > PrimeDevastator.slamEffectDelay)
			{
				self.slamEffectSpawned = true;
				self.DetonateAuthority();
				self.ChainEffectToPlayers();
			}
			if (!self.orbsSpawned && ((EntityState)self).isAuthority && ((EntityState)self).fixedAge > PrimeDevastator.playerLightningDelay)
			{
				self.orbSpawnTimer += Time.deltaTime;
				if (self.orbSpawnTimer > 0.35f)
				{
					self.FireDevastator("MuzzleOrb1");
					self.orbNumber++;
					self.orbSpawnTimer = 0f;
				}
				if (self.orbNumber >= 6)
				{
					self.orbsSpawned = true;
				}
			}
			if (((EntityState)self).fixedAge >= self.duration + 1f && ((EntityState)self).isAuthority)
			{
				((EntityState)self).outer.SetNextStateToMain();
			}
		}

		public void OnDevastatorFire(orig_FireDevastator orig, PrimeDevastator self, string targetMuzzle)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_005a: Unknown result type (might be due to invalid IL or missing references)
			self.projectileRay = ((BaseState)self).GetAimRay();
			if (Object.op_Implicit((Object)(object)self.modelTransform))
			{
				ChildLocator component = ((Component)self.modelTransform).GetComponent<ChildLocator>();
				if (Object.op_Implicit((Object)(object)component))
				{
					Transform val = component.FindChild(targetMuzzle);
					Vector3 position = val.position;
					if (Object.op_Implicit((Object)(object)val))
					{
						((Ray)(ref self.projectileRay)).origin = position;
					}
				}
			}
			float num = 6f + (float)self.orbNumber * 3f;
			if (((EntityState)self).isAuthority)
			{
				FireProjectileInfo val2 = default(FireProjectileInfo);
				val2.projectilePrefab = PrimeDevastator.projectilePrefab;
				val2.position = ((EntityState)self).gameObject.transform.position + new Vector3(num, num, num);
				val2.rotation = Quaternion.identity;
				val2.owner = ((EntityState)self).gameObject;
				val2.damage = ((BaseState)self).damageStat * self.damageCoefficient;
				val2.force = 0f;
				val2.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master);
				ProjectileManager.instance.FireProjectile(val2);
			}
			((EntityState)self).characterBody.AddSpreadBloom(PrimeDevastator.spreadBloomValue);
		}

		public void OnDevastatorOrb(orig_CreateOrbChain orig, PrimeDevastator self, Vector3 sourceOrigin, HurtBox targetHurtbox)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			StormboundPrimeDevastatorOrb stormboundPrimeDevastatorOrb = new StormboundPrimeDevastatorOrb();
			((Orb)stormboundPrimeDevastatorOrb).origin = sourceOrigin;
			((Orb)stormboundPrimeDevastatorOrb).target = targetHurtbox;
			stormboundPrimeDevastatorOrb.lightningEffectPrefab = PrimeDevastator.lightningEffectPrefab;
			stormboundPrimeDevastatorOrb.blastRadius = PrimeDevastator.blastRadius;
			((GenericDamageOrb)stormboundPrimeDevastatorOrb).attacker = ((EntityState)self).gameObject;
			OrbManager.instance.AddOrb((Orb)(object)stormboundPrimeDevastatorOrb);
		}

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

		public void OnLeapEnter(orig_OnEnter orig, LunarGazeLeap self)
		{
			orig.Invoke(self);
			if (((EntityState)self).isAuthority)
			{
				if (self.isPlus)
				{
					((MonoBehaviour)((EntityState)self).characterBody).StartCoroutine(FireLeapLightningPlus());
				}
				else
				{
					((MonoBehaviour)((EntityState)self).characterBody).StartCoroutine(FireLeapLightning());
				}
			}
		}

		private IEnumerator FireLeapLightning()
		{
			new List<NodeIndex>();
			List<Vector3> possibleLightningPositions = new List<Vector3>();
			Transform arenaCenter = MeridianEventTriggerInteraction.instance.arenaCenter;
			if (!Object.op_Implicit((Object)(object)SceneInfo.instance) || !Object.op_Implicit((Object)(object)SceneInfo.instance.groundNodes))
			{
				Debug.LogWarning((object)"No ground nodes available");
				yield break;