Decompiled source of FathomlessVoidling v0.9.11

FathomlessVoidling.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using EntityStates;
using EntityStates.GrandParentBoss;
using EntityStates.VoidRaidCrab;
using EntityStates.VoidRaidCrab.Joint;
using EntityStates.VoidRaidCrab.Weapon;
using Microsoft.CodeAnalysis;
using On.EntityStates;
using On.EntityStates.VoidRaidCrab;
using On.EntityStates.VoidRaidCrab.Joint;
using On.RoR2;
using On.RoR2.VoidRaidCrab;
using R2API;
using RoR2;
using RoR2.Audio;
using RoR2.CharacterAI;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.VoidRaidCrab;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("FathomlessVoidling")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+4a018796025a4313ff418f0c24216913989fb518")]
[assembly: AssemblyProduct("FathomlessVoidling")]
[assembly: AssemblyTitle("FathomlessVoidling")]
[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;
		}
	}
}
public class OrbitAround : MonoBehaviour
{
	public float orbitSpeed = 10f;

	private Vector3 axisOfRotation;

	private void Start()
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		Vector3 val = Vector3.Cross(((Component)this).transform.up, ((Component)this).transform.position - Vector3.zero);
		axisOfRotation = ((Vector3)(ref val)).normalized;
	}

	private void FixedUpdate()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		((Component)this).transform.RotateAround(Vector3.zero, axisOfRotation, orbitSpeed * Time.deltaTime);
	}
}
namespace FathomlessVoidling
{
	public class DelayedProjectileFire : MonoBehaviour
	{
		public float delay = 4f;

		public float speed = 50f;

		public ProjectileSimple projectileSimple;

		private float stopwatch;

		private bool hasChangedSpeed;

		private void Start()
		{
			projectileSimple = ((Component)this).GetComponent<ProjectileSimple>();
		}

		private void FixedUpdate()
		{
			stopwatch += Time.deltaTime;
			if (!(stopwatch < delay) && !hasChangedSpeed)
			{
				hasChangedSpeed = true;
				projectileSimple.desiredForwardSpeed = speed;
			}
		}
	}
	public class AsteroidBelt : BaseState
	{
		private float stopwatch;

		private float missileStopwatch;

		public static float baseDuration = 6f;

		public static string muzzleString = BaseMultiBeamState.muzzleName;

		public static int asteroidCount = 4;

		public float asteroidSpawnTime = 2f;

		public static float damageCoefficient;

		public static float maxSpread = 1f;

		public static GameObject projectilePrefab = FathomlessVoidling.meteor;

		public static GameObject muzzleflashPrefab;

		private Transform muzzleTransform;

		private ChildLocator childLocator;

		private float duration;

		private bool spawnedAsteroids;

		private List<GameObject> asteroids = new List<GameObject>();

		private GameObject chargeEffectInstance;

		public override void OnEnter()
		{
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Expected O, but got Unknown
			//IL_005d: 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_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: 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_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Expected O, but got Unknown
			//IL_0120: 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_0133: Expected O, but got Unknown
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Expected O, but got Unknown
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Expected O, but got Unknown
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_027e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0285: Expected O, but got Unknown
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			duration = baseDuration / base.attackSpeedStat;
			missileStopwatch -= FireVoidRain.missileSpawnDelay;
			muzzleTransform = ((BaseState)this).FindModelChild(BaseMultiBeamState.muzzleName);
			GroundSwipe val = new GroundSwipe();
			Debug.LogWarning((object)val.chargeEffectPrefab);
			Debug.LogWarning((object)val.chargeSoundName);
			Vector3 corePosition = ((EntityState)this).characterBody.corePosition;
			float num = 150f;
			float num2 = 0f;
			float num3 = MathF.PI / 2f;
			float num4 = MathF.PI;
			float num5 = 4.712389f;
			Vector3 position = corePosition + new Vector3(Mathf.Cos(num2) * num, Mathf.Sin(num2) * num, 0f);
			Vector3 position2 = corePosition + new Vector3(Mathf.Cos(num3) * num, Mathf.Sin(num3) * num, 0f);
			Vector3 position3 = corePosition + new Vector3(Mathf.Cos(num4) * num, Mathf.Sin(num4) * num, 0f);
			Vector3 position4 = corePosition + new Vector3(Mathf.Cos(num5) * num, Mathf.Sin(num5) * num, 0f);
			GameObject val2 = new GameObject("Asteroid1");
			val2.transform.position = position;
			GameObject val3 = new GameObject("Asteroid2");
			val3.transform.position = position2;
			GameObject val4 = new GameObject("Asteroid3");
			val4.transform.position = position3;
			GameObject val5 = new GameObject("Asteroid4");
			val5.transform.position = position4;
			asteroids.Add(val2);
			asteroids.Add(val3);
			asteroids.Add(val4);
			asteroids.Add(val5);
			for (int i = 0; i < asteroidCount; i++)
			{
				GameObject val6 = (GameObject)(i switch
				{
					0 => val2, 
					1 => val3, 
					2 => val3, 
					_ => val5, 
				});
				GameObject obj = Object.Instantiate<GameObject>(val.chargeEffectPrefab, val6.transform.position, val6.transform.rotation);
				obj.transform.parent = val6.transform;
				ScaleParticleSystemDuration component = obj.GetComponent<ScaleParticleSystemDuration>();
				ObjectScaleCurve component2 = obj.GetComponent<ObjectScaleCurve>();
				if (Object.op_Implicit((Object)(object)component))
				{
					component.newDuration = duration;
				}
				if (Object.op_Implicit((Object)(object)component2))
				{
					component2.timeMax = duration;
				}
				Util.PlaySound(val.chargeSoundName, val6);
			}
			Transform modelTransform = ((EntityState)this).GetModelTransform();
			if (!Object.op_Implicit((Object)(object)modelTransform))
			{
				return;
			}
			ChargeGravityBump val7 = new ChargeGravityBump();
			childLocator = ((Component)modelTransform).GetComponent<ChildLocator>();
			ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator();
			if (Object.op_Implicit((Object)(object)modelChildLocator) && Object.op_Implicit((Object)(object)val7.chargeEffectPrefab))
			{
				Transform val8 = modelChildLocator.FindChild(val7.muzzleName) ?? ((EntityState)this).characterBody.coreTransform;
				if (Object.op_Implicit((Object)(object)val8))
				{
					chargeEffectInstance = Object.Instantiate<GameObject>(val7.chargeEffectPrefab, val8.position, val8.rotation);
					chargeEffectInstance.transform.parent = val8;
					ScaleParticleSystemDuration component3 = chargeEffectInstance.GetComponent<ScaleParticleSystemDuration>();
					if (Object.op_Implicit((Object)(object)component3))
					{
						component3.newDuration = duration;
					}
				}
			}
			Util.PlaySound(val7.enterSoundString, ((EntityState)this).gameObject);
		}

		public override void FixedUpdate()
		{
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			missileStopwatch += Time.fixedDeltaTime;
			if (stopwatch < asteroidSpawnTime)
			{
				return;
			}
			if (!spawnedAsteroids)
			{
				spawnedAsteroids = true;
				foreach (GameObject asteroid in asteroids)
				{
					ProjectileManager.instance.FireProjectile(projectilePrefab, asteroid.transform.position, Quaternion.identity, ((EntityState)this).gameObject, base.damageStat * damageCoefficient, 0f, Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f);
				}
			}
			if (!((double)stopwatch < (double)duration) && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			EntityState.Destroy((Object)(object)chargeEffectInstance);
			((EntityState)this).OnExit();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
	public class BetterCollapse : BaseState
	{
		public float duration = 6f;

		public string soundString = "Play_voidRaid_runaway";

		public string animationLayerName = "Body";

		public string animationStateName = "Collapse";

		public string animationPlaybackRateParam = "Collapse.playbackRate";

		public override void OnEnter()
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			((BaseState)this).OnEnter();
			Util.PlaySound(soundString, ((EntityState)this).gameObject);
			EffectManager.SpawnEffect(FathomlessVoidling.spawnEffect, new EffectData
			{
				origin = new Vector3(0f, -25f, 0f),
				scale = ((EntityState)this).characterBody.radius,
				rotation = Quaternion.AngleAxis(180f, Vector3.forward)
			}, false);
			((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParam, duration, 0f);
		}

		public override void FixedUpdate()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Expected O, but got Unknown
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Expected O, but got Unknown
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).isAuthority && !((double)((EntityState)this).fixedAge < (double)duration))
			{
				EffectManager.SpawnEffect(FathomlessVoidling.spawnEffect, new EffectData
				{
					origin = new Vector3(0f, -25f, 0f),
					scale = ((EntityState)this).characterBody.radius,
					rotation = Quaternion.AngleAxis(180f, Vector3.forward)
				}, false);
				((EntityState)this).outer.SetNextState((EntityState)new ReEmerge());
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)7;
		}
	}
	public class BetterReEmerge : BaseState
	{
		public float duration = 10f;

		public float delay = 2f;

		public string soundString = "Play_voidRaid_spawn";

		public bool playedAnim;

		public string animationLayerName = "Body";

		public string animationStateName = "Spawn";

		public string animationPlaybackRateParam = "Spawn.playbackRate";

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			if (NetworkServer.active)
			{
				CentralLegController component = ((EntityState)this).GetComponent<CentralLegController>();
				if (Object.op_Implicit((Object)(object)component))
				{
					component.RegenerateAllBrokenServer();
				}
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if ((double)((EntityState)this).fixedAge >= (double)delay && !playedAnim)
			{
				Util.PlaySound(soundString, ((EntityState)this).gameObject);
				((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParam, duration, 0f);
				playedAnim = true;
			}
			if (((EntityState)this).isAuthority && !((double)((EntityState)this).fixedAge < (double)duration))
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)7;
		}
	}
	public class BetterSpawnState : BaseState
	{
		public float duration = 10f;

		public float delay = 2f;

		public string spawnSoundString = "Play_voidRaid_spawn";

		public GameObject spawnEffectPrefab = FathomlessVoidling.spawnEffect;

		public string animationLayerName = "Body";

		public string animationStateName = "Spawn";

		public string animationPlaybackRateParam = "Spawn.playbackRate";

		public bool doLegs = true;

		public bool playedAnim;

		public CharacterSpawnCard jointSpawnCard = FathomlessVoidling.jointCard;

		public string leg1Name = "FrontLegL";

		public string leg2Name = "FrontLegR";

		public string leg3Name = "MidLegL";

		public string leg4Name = "MidLegR";

		public string leg5Name = "BackLegL";

		public string leg6Name = "BackLegR";

		private CharacterModel characterModel;

		public override void OnEnter()
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Expected O, but got Unknown
			//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_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Expected O, but got Unknown
			((BaseState)this).OnEnter();
			Util.PlaySound(spawnSoundString, GameObject.Find("SpawnCamera"));
			characterModel = ((Component)((EntityState)this).GetModelTransform()).GetComponent<CharacterModel>();
			if (Object.op_Implicit((Object)(object)spawnEffectPrefab))
			{
				EffectManager.SpawnEffect(spawnEffectPrefab, new EffectData
				{
					origin = new Vector3(0f, -60f, 0f),
					scale = 2f,
					rotation = Quaternion.identity
				}, false);
			}
			if (!doLegs || !NetworkServer.active)
			{
				return;
			}
			ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator();
			if (Object.op_Implicit((Object)(object)jointSpawnCard) && Object.op_Implicit((Object)(object)modelChildLocator))
			{
				DirectorPlacementRule placementRule = new DirectorPlacementRule
				{
					placementMode = (PlacementMode)0,
					spawnOnTarget = ((EntityState)this).GetModelTransform()
				};
				SpawnJointBodyForLegServer(leg1Name, modelChildLocator, placementRule);
				SpawnJointBodyForLegServer(leg2Name, modelChildLocator, placementRule);
				SpawnJointBodyForLegServer(leg3Name, modelChildLocator, placementRule);
				SpawnJointBodyForLegServer(leg4Name, modelChildLocator, placementRule);
				SpawnJointBodyForLegServer(leg5Name, modelChildLocator, placementRule);
				SpawnJointBodyForLegServer(leg6Name, modelChildLocator, placementRule);
				if (Object.op_Implicit((Object)(object)characterModel))
				{
					CharacterModel obj = characterModel;
					obj.invisibilityCount++;
				}
			}
		}

		private void SpawnJointBodyForLegServer(string legName, ChildLocator childLocator, DirectorPlacementRule placementRule)
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			DirectorCore instance = DirectorCore.instance;
			GameObject val = ((instance != null) ? instance.TrySpawnObject(new DirectorSpawnRequest((SpawnCard)(object)jointSpawnCard, placementRule, Run.instance.stageRng)
			{
				summonerBodyObject = ((EntityState)this).gameObject
			}) : null);
			Transform val2 = childLocator.FindChild(legName);
			if (!Object.op_Implicit((Object)(object)val) && !Object.op_Implicit((Object)(object)val2))
			{
				return;
			}
			CharacterMaster component = val.GetComponent<CharacterMaster>();
			if (Object.op_Implicit((Object)(object)component))
			{
				LegController component2 = ((Component)val2).GetComponent<LegController>();
				if (Object.op_Implicit((Object)(object)component2))
				{
					component2.SetJointMaster(component, ((Component)val2).GetComponent<ChildLocator>());
				}
			}
		}

		public override void FixedUpdate()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			if ((double)((EntityState)this).fixedAge >= (double)delay && !playedAnim)
			{
				FathomlessVoidling.CreateTube();
				TeleportHelper.TeleportGameObject(((EntityState)this).gameObject, new Vector3(0f, -10f, 0f));
				((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParam, duration, 0f);
				playedAnim = true;
				if (Object.op_Implicit((Object)(object)characterModel))
				{
					CharacterModel obj = characterModel;
					obj.invisibilityCount--;
				}
			}
			if (!((double)((EntityState)this).fixedAge < (double)duration) && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			((EntityState)this).characterBody.skillLocator.secondary.RemoveAllStocks();
			((EntityState)this).characterBody.skillLocator.utility.RemoveAllStocks();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)7;
		}
	}
	public class ChargeVoidRain : BaseState
	{
		public float baseDuration = 1f;

		private string animationLayerName = "Gesture";

		private string animationStateName = "ChargeMultiBeam";

		private string animationPlaybackRateParam = "MultiBeam.playbackRate";

		private GameObject chargeEffectPrefab = FathomlessVoidling.chargeVoidRain;

		private string enterSoundString = "Play_voidRaid_snipe_chargeUp";

		private bool isSoundScaledByAttackSpeed;

		private string muzzleName = "EyeProjectileCenter";

		private GameObject chargeEffectInstance;

		protected float duration { get; private set; }

		public override void OnEnter()
		{
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			duration = baseDuration / base.attackSpeedStat;
			((EntityState)this).PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParam, duration, 0f);
			ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator();
			if (Object.op_Implicit((Object)(object)modelChildLocator) && Object.op_Implicit((Object)(object)chargeEffectPrefab))
			{
				Transform val = modelChildLocator.FindChild(muzzleName) ?? ((EntityState)this).characterBody.coreTransform;
				if (Object.op_Implicit((Object)(object)val))
				{
					chargeEffectInstance = Object.Instantiate<GameObject>(chargeEffectPrefab, val.position, val.rotation);
					chargeEffectInstance.transform.parent = val;
					ScaleParticleSystemDuration component = chargeEffectInstance.GetComponent<ScaleParticleSystemDuration>();
					if (Object.op_Implicit((Object)(object)component))
					{
						component.newDuration = duration;
					}
				}
			}
			if (!string.IsNullOrEmpty(enterSoundString))
			{
				if (isSoundScaledByAttackSpeed)
				{
					Util.PlayAttackSpeedSound(enterSoundString, ((EntityState)this).gameObject, base.attackSpeedStat);
				}
				else
				{
					Util.PlaySound(enterSoundString, ((EntityState)this).gameObject);
				}
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).isAuthority && !((double)((EntityState)this).fixedAge < (double)duration))
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new FireVoidRain());
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
	public class FireVoidRain : BaseState
	{
		private float stopwatch;

		private float missileStopwatch;

		public static float baseDuration = 6f;

		public static string muzzleString = BaseMultiBeamState.muzzleName;

		public static float missileSpawnFrequency = 6f;

		public static float missileSpawnDelay = 0f;

		public static float damageCoefficient;

		public static float maxSpread = 1f;

		public static GameObject projectilePrefab;

		public static GameObject muzzleflashPrefab;

		private Transform muzzleTransform;

		private ChildLocator childLocator;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			PhasedInventorySetter component = ((EntityState)this).GetComponent<PhasedInventorySetter>();
			if (Object.op_Implicit((Object)(object)component) && NetworkServer.active)
			{
				switch (component.phaseIndex)
				{
				case 0:
					missileSpawnFrequency = 3f;
					break;
				case 1:
					missileSpawnFrequency = 5f;
					break;
				case 2:
					missileSpawnFrequency = 7f;
					break;
				}
			}
			missileStopwatch -= missileSpawnDelay;
			muzzleTransform = ((BaseState)this).FindModelChild(BaseMultiBeamState.muzzleName);
			Transform modelTransform = ((EntityState)this).GetModelTransform();
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				childLocator = ((Component)modelTransform).GetComponent<ChildLocator>();
			}
		}

		private void FireBlob(Ray projectileRay, Vector3 beamEnd)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_002f: Expected O, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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_0070: 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_0082: 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)
			EffectManager.SpawnEffect(FathomlessVoidling.voidRainPortalEffect, new EffectData
			{
				origin = ((Ray)(ref projectileRay)).origin,
				rotation = Util.QuaternionSafeLookRotation(((Ray)(ref projectileRay)).direction)
			}, false);
			GameObject val = new GameObject("VoidRainProjectile");
			val.AddComponent<NetworkIdentity>();
			val.transform.position = ((Ray)(ref projectileRay)).origin;
			val.transform.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref projectileRay)).direction);
			VoidRainInfo voidRainInfo = val.AddComponent<VoidRainInfo>();
			voidRainInfo.aimRay = projectileRay;
			voidRainInfo.damageStat = base.damageStat;
			voidRainInfo.endPos = beamEnd;
			val.AddComponent<VoidRainComponent>();
		}

		public override void FixedUpdate()
		{
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: 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_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: 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_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: 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_0104: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			missileStopwatch += Time.fixedDeltaTime;
			if ((double)missileStopwatch < 1.0 / (double)missileSpawnFrequency)
			{
				return;
			}
			missileStopwatch -= 1f / missileSpawnFrequency;
			Transform val = childLocator.FindChild(muzzleString);
			if (Object.op_Implicit((Object)(object)val))
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
				Ray val2 = default(Ray);
				((Ray)(ref val2)).direction = ((Ray)(ref aimRay)).direction;
				Vector3 val3 = default(Vector3);
				((Vector3)(ref val3))..ctor(Random.Range(-200f, 200f), Random.Range(75f, 100f), Random.Range(-200f, 200f));
				Vector3 origin = val.position + val3;
				((Ray)(ref val2)).origin = origin;
				CalcBeamPathPredictive(val2, out var direction, out var beamEndPoint);
				if (direction != Vector3.zero)
				{
					((Ray)(ref val2)).direction = direction;
					FireBlob(val2, beamEndPoint);
				}
				else
				{
					CalcBeamPath(out var _, out var beamEndPos);
					((Ray)(ref val2)).direction = beamEndPos - ((Ray)(ref val2)).origin;
					FireBlob(val2, beamEndPos);
				}
			}
			if (!((double)stopwatch < (double)baseDuration) && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}

		protected void CalcBeamPathPredictive(Ray aimRay, out Vector3 direction, out Vector3 beamEndPoint)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: 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)
			//IL_001d: 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: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: 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_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: 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_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: 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_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: 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_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_016c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: 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_0179: Unknown result type (might be due to invalid IL or missing references)
			BullseyeSearch val = new BullseyeSearch
			{
				teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()),
				filterByDistinctEntity = true,
				viewer = null,
				filterByLoS = true,
				searchOrigin = ((Ray)(ref aimRay)).origin,
				sortMode = (SortMode)3,
				maxDistanceFilter = 1000f,
				minAngleFilter = 0f,
				maxAngleFilter = 180f
			};
			val.RefreshCandidates();
			HurtBox val2 = val.GetResults().FirstOrDefault();
			if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)val2.healthComponent) && Object.op_Implicit((Object)(object)val2.healthComponent.body) && Object.op_Implicit((Object)(object)val2.healthComponent.body.characterMotor))
			{
				CharacterBody body = val2.healthComponent.body;
				Vector3 position = ((Component)val2).transform.position;
				Vector3 velocity = body.characterMotor.velocity;
				Vector3 val6;
				if (((Vector3)(ref velocity)).sqrMagnitude > 0f && (!Object.op_Implicit((Object)(object)body) || !body.hasCloakBuff))
				{
					Vector3 val3 = default(Vector3);
					((Vector3)(ref val3))..ctor(velocity.x, 0f, velocity.z);
					Vector3 val4 = position + val3;
					if (Object.op_Implicit((Object)(object)body.characterMotor) && !body.characterMotor.isGrounded && velocity.y > 0f)
					{
						Vector3 val5 = position + velocity * 0.5f;
						val6 = val5 - ((Ray)(ref aimRay)).origin;
						direction = ((Vector3)(ref val6)).normalized;
						beamEndPoint = val5;
					}
					else
					{
						val6 = val4 - ((Ray)(ref aimRay)).origin;
						direction = ((Vector3)(ref val6)).normalized;
						beamEndPoint = val4;
					}
				}
				else
				{
					val6 = position - ((Ray)(ref aimRay)).origin;
					direction = ((Vector3)(ref val6)).normalized;
					beamEndPoint = position;
				}
			}
			else
			{
				direction = Vector3.zero;
				beamEndPoint = Vector3.zero;
			}
		}

		protected void CalcBeamPath(out Ray beamRay, out Vector3 beamEndPos)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			Ray aimRay = ((BaseState)this).GetAimRay();
			float num = float.PositiveInfinity;
			RaycastHit[] array = Physics.RaycastAll(aimRay, 1000f, LayerMask.op_Implicit(CommonMasks.bullet), (QueryTriggerInteraction)1);
			Transform root = ((EntityState)this).GetModelTransform().root;
			for (int i = 0; i < array.Length; i++)
			{
				ref RaycastHit reference = ref array[i];
				float distance = ((RaycastHit)(ref reference)).distance;
				if ((double)distance < (double)num && (Object)(object)((Component)((RaycastHit)(ref reference)).collider).transform.root != (Object)(object)root)
				{
					num = distance;
				}
			}
			float num2 = Mathf.Min(num, BaseMultiBeamState.beamMaxDistance);
			beamEndPos = ((Ray)(ref aimRay)).GetPoint(num2);
			Vector3 position = muzzleTransform.position;
			beamRay = new Ray(position, beamEndPos - position);
		}
	}
	public class LaserBlast : BaseState
	{
		public static LoopSoundDef loopSoundDef;

		public float baseDuration = 4f;

		public float duration;

		public float windUpDuration = 2f;

		public bool woundUp;

		public bool woundDown;

		public GameObject beamVfxInstance;

		public DirectionOverrideRequest animatorDirectionOverrideRequest;

		public SoundLoopPtr loopPtr;

		public float beamTickTimer;

		public float beamDpsCoefficient = 4f;

		private float stopwatch;

		private Transform muzzleTransform;

		private Transform portalTransform;

		private Ray portalRay;

		private Ray initialRay;

		private CentralLegController centralLegController;

		private SuppressBreaksRequest suppressBreaksRequest;

		private GameObject warningLaserVfxPrefab = FathomlessVoidling.bigLaserWarning;

		private GameObject warningLaserVfxInstance;

		private RayAttackIndicator warningLaserVfxInstanceRayAttackIndicator;

		public override void OnEnter()
		{
			//IL_0008: 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_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Invalid comparison between Unknown and I4
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: 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_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: 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_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: 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_01ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			initialRay = ((BaseState)this).GetAimRay();
			muzzleTransform = ((BaseState)this).FindModelChild(BaseMultiBeamState.muzzleName);
			centralLegController = ((EntityState)this).GetComponent<CentralLegController>();
			if (Object.op_Implicit((Object)(object)centralLegController))
			{
				suppressBreaksRequest = centralLegController.SuppressBreaks();
			}
			duration = baseDuration + windUpDuration;
			List<CharacterBody> list = new List<CharacterBody>();
			CharacterMaster[] array = Object.FindObjectsOfType<CharacterMaster>();
			foreach (CharacterMaster val in array)
			{
				if ((int)val.teamIndex == 1)
				{
					CharacterBody body = val.GetBody();
					if (Object.op_Implicit((Object)(object)body) && body.isPlayerControlled)
					{
						list.Add(body);
					}
				}
			}
			CharacterBody val2 = list[Random.Range(0, list.Count)];
			Vector3 corePosition = val2.corePosition;
			Vector3 val3 = Vector3.zero;
			Vector3 val4 = Vector3.zero;
			Vector3 val5;
			if (Object.op_Implicit((Object)(object)val2.characterMotor))
			{
				val3 = corePosition + val2.characterMotor.velocity * 1f;
				val5 = val3 - muzzleTransform.position;
				val4 = ((Vector3)(ref val5)).normalized;
			}
			val5 = corePosition - muzzleTransform.position;
			Vector3 normalized = ((Vector3)(ref val5)).normalized;
			Ray val6 = ((val3 == Vector3.zero) ? new Ray(muzzleTransform.position, normalized) : new Ray(muzzleTransform.position, val4));
			initialRay = val6;
			((EntityState)this).inputBank.aimDirection = ((Ray)(ref initialRay)).direction;
			warningLaserVfxInstance = Object.Instantiate<GameObject>(warningLaserVfxPrefab);
			warningLaserVfxInstanceRayAttackIndicator = warningLaserVfxInstance.GetComponent<RayAttackIndicator>();
			if (Object.op_Implicit((Object)(object)warningLaserVfxInstanceRayAttackIndicator))
			{
				warningLaserVfxInstanceRayAttackIndicator.layerMask = ((LayerIndex)(ref LayerIndex.playerBody)).mask;
				warningLaserVfxInstanceRayAttackIndicator.attackRange = 1000f;
				warningLaserVfxInstanceRayAttackIndicator.attackRay = initialRay;
				warningLaserVfxInstanceRayAttackIndicator.attackRadius = 22f;
			}
			CreateBeamVFXInstance(SpinBeamWindUp.warningLaserPrefab);
			Util.PlaySound(SpinBeamWindUp.enterSoundString, ((EntityState)this).gameObject);
		}

		public override void FixedUpdate()
		{
			//IL_0024: 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)
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			((EntityState)this).inputBank.aimDirection = ((Ray)(ref initialRay)).direction;
			if (!((EntityState)this).isAuthority)
			{
				return;
			}
			if (!woundUp && stopwatch >= windUpDuration)
			{
				woundUp = true;
				if (Object.op_Implicit((Object)(object)warningLaserVfxInstance))
				{
					EntityState.Destroy((Object)(object)warningLaserVfxInstance);
				}
				if (Object.op_Implicit((Object)(object)warningLaserVfxInstanceRayAttackIndicator))
				{
					warningLaserVfxInstanceRayAttackIndicator = null;
				}
				DestroyBeamVFXInstance();
				CreateBeamVFXInstance(SpinBeamAttack.beamVfxPrefab);
				loopPtr = LoopSoundManager.PlaySoundLoopLocal(((EntityState)this).gameObject, SpinBeamAttack.loopSound);
				Util.PlaySound(SpinBeamAttack.enterSoundString, ((EntityState)this).gameObject);
			}
			if (beamTickTimer <= 0f && woundUp)
			{
				beamTickTimer += 1f / SpinBeamAttack.beamTickFrequency;
				FireBeamBulletAuthority();
			}
			beamTickTimer -= Time.fixedDeltaTime;
			if (((EntityState)this).fixedAge >= duration)
			{
				BeginWindDown();
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			SuppressBreaksRequest obj = suppressBreaksRequest;
			if (obj != null)
			{
				obj.Dispose();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)5;
		}

		public void FireBeamBulletAuthority()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: 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_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: 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_0078: 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_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			_ = initialRay;
			new BulletAttack
			{
				origin = ((Ray)(ref initialRay)).origin,
				aimVector = ((Ray)(ref initialRay)).direction,
				minSpread = 0f,
				maxSpread = 0f,
				maxDistance = 400f,
				hitMask = CommonMasks.bullet,
				stopperMask = LayerMask.op_Implicit(0),
				bulletCount = 1u,
				radius = 22f,
				smartCollision = false,
				queryTriggerInteraction = (QueryTriggerInteraction)1,
				procCoefficient = 1f,
				owner = ((EntityState)this).gameObject,
				weapon = ((EntityState)this).gameObject,
				damage = beamDpsCoefficient * base.damageStat / SpinBeamAttack.beamTickFrequency,
				damageColorIndex = (DamageColorIndex)0,
				damageType = DamageTypeCombo.op_Implicit((DamageType)0),
				falloffModel = (FalloffModel)0,
				force = 0f,
				hitEffectPrefab = SpinBeamAttack.beamImpactEffectPrefab,
				tracerEffectPrefab = null,
				isCrit = false,
				HitEffectNormal = false
			}.Fire();
		}

		public void CreateBeamVFXInstance(GameObject beamVfxPrefab)
		{
			if ((Object)(object)beamVfxInstance == (Object)null)
			{
				beamVfxInstance = Object.Instantiate<GameObject>(beamVfxPrefab);
				beamVfxInstance.transform.SetParent(muzzleTransform, true);
				UpdateBeamTransforms();
			}
		}

		public void DestroyBeamVFXInstance()
		{
			if ((Object)(object)beamVfxInstance != (Object)null)
			{
				VfxKillBehavior.KillVfxObject(beamVfxInstance);
				beamVfxInstance = null;
			}
		}

		private void UpdateBeamTransforms()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			beamVfxInstance.transform.SetPositionAndRotation(((Ray)(ref initialRay)).origin, Quaternion.LookRotation(((Ray)(ref initialRay)).direction));
		}

		public void BeginWindDown()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			if (animatorDirectionOverrideRequest != null)
			{
				animatorDirectionOverrideRequest.Dispose();
			}
			LoopSoundManager.StopSoundLoopLocal(loopPtr);
			Util.PlaySound(SpinBeamWindDown.enterSoundString, ((EntityState)this).gameObject);
			DestroyBeamVFXInstance();
		}
	}
	public class OrbitalPortalBlast : BaseState
	{
		public static LoopSoundDef loopSoundDef;

		public int portalCount = 3;

		public float baseDuration = 6f;

		public float duration;

		public float windUpDuration = 2f;

		public bool woundUp;

		public bool woundDown;

		public DirectionOverrideRequest animatorDirectionOverrideRequest;

		public SoundLoopPtr loopPtr;

		public float beamTickTimer;

		public float beamDpsCoefficient = 4f;

		private float stopwatch;

		private string animLayerName = "Body";

		private string animEnterStateName = "SuckEnter";

		private string animLoopStateName = "SuckLoop";

		private string animExitStateName = "SuckExit";

		private string animPlaybackRateParamName = "Suck.playbackRate";

		private Transform muzzleTransform;

		private Dictionary<GameObject, GameObject> beamVfxInstancesDict;

		public override void OnEnter()
		{
			//IL_0074: 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_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0105: 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_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: 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_012f: 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_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: 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_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e4: Expected O, but got Unknown
			//IL_02eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0312: Unknown result type (might be due to invalid IL or missing references)
			//IL_0317: Unknown result type (might be due to invalid IL or missing references)
			//IL_031f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0329: Unknown result type (might be due to invalid IL or missing references)
			//IL_0331: Unknown result type (might be due to invalid IL or missing references)
			//IL_0336: Unknown result type (might be due to invalid IL or missing references)
			//IL_0341: Expected O, but got Unknown
			//IL_02bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_023d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a7: 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_02ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0270: Unknown result type (might be due to invalid IL or missing references)
			//IL_027e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0280: 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_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0291: Unknown result type (might be due to invalid IL or missing references)
			//IL_0293: Unknown result type (might be due to invalid IL or missing references)
			//IL_0298: Unknown result type (might be due to invalid IL or missing references)
			//IL_029c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			muzzleTransform = ((BaseState)this).FindModelChild(BaseMultiBeamState.muzzleName);
			duration = baseDuration + windUpDuration;
			if (!string.IsNullOrEmpty(animLayerName) && !string.IsNullOrEmpty(animEnterStateName) && !string.IsNullOrEmpty(animPlaybackRateParamName))
			{
				((EntityState)this).PlayAnimation(animLayerName, animEnterStateName, animPlaybackRateParamName, windUpDuration, 0f);
			}
			Vector3 zero = Vector3.zero;
			float num = 90f;
			float num2 = 0f;
			float num3 = MathF.PI * 2f / 3f;
			float num4 = 4.1887903f;
			Vector3 val = zero + new Vector3(Mathf.Cos(num2) * num, Mathf.Sin(num2) * num, 0f);
			Vector3 val2 = zero + new Vector3(Mathf.Cos(num3) * num, Mathf.Sin(num3) * num, 0f);
			Vector3 val3 = zero + new Vector3(Mathf.Cos(num4) * num, Mathf.Sin(num4) * num, 0f);
			Vector3 val7 = default(Vector3);
			for (int i = 0; i < portalCount; i++)
			{
				BullseyeSearch val4 = new BullseyeSearch
				{
					teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()),
					filterByDistinctEntity = true,
					viewer = null,
					searchOrigin = Vector3.zero,
					sortMode = (SortMode)3,
					maxDistanceFilter = 2000f,
					minAngleFilter = 0f,
					maxAngleFilter = 360f
				};
				val4.RefreshCandidates();
				HurtBox val5 = val4.GetResults().FirstOrDefault();
				bool flag = Object.op_Implicit((Object)(object)val5) && Object.op_Implicit((Object)(object)val5.healthComponent) && Object.op_Implicit((Object)(object)val5.healthComponent.body) && Object.op_Implicit((Object)(object)val5.healthComponent.body.characterMotor);
				Vector3 val6 = Vector3.zero;
				switch (i)
				{
				case 0:
					val6 = val;
					break;
				case 1:
					val6 = val2;
					break;
				case 2:
					val6 = val3;
					break;
				}
				Vector3 val10;
				if (flag)
				{
					CharacterBody body = val5.healthComponent.body;
					Vector3 position = ((Component)val5).transform.position;
					Vector3 velocity = body.characterMotor.velocity;
					Vector3 val9;
					if (((Vector3)(ref velocity)).sqrMagnitude > 0f && (!Object.op_Implicit((Object)(object)body) || !body.hasCloakBuff))
					{
						((Vector3)(ref val7))..ctor(velocity.x, 0f, velocity.z);
						Vector3 val8 = position + val7;
						if (Object.op_Implicit((Object)(object)body.characterMotor) && !body.characterMotor.isGrounded && velocity.y > 0f)
						{
							val9 = position + velocity * 0.5f - val6;
							val10 = ((Vector3)(ref val9)).normalized;
						}
						else
						{
							val9 = val8 - val6;
							val10 = ((Vector3)(ref val9)).normalized;
						}
					}
					else
					{
						val9 = position - val6;
						val10 = ((Vector3)(ref val9)).normalized;
					}
				}
				else
				{
					val10 = Vector3.zero;
				}
				GameObject val11 = new GameObject("LaserPortalBase");
				val11.transform.position = val6;
				val11.transform.rotation = Util.QuaternionSafeLookRotation(val10);
				val11.AddComponent<OrbitAround>();
				EffectManager.SpawnEffect(FathomlessVoidling.laserPortalEffect, new EffectData
				{
					origin = val11.transform.position,
					rotation = val11.transform.rotation
				}, false);
				CreateBeamVFXInstance(SpinBeamWindUp.warningLaserPrefab, val11);
				Util.PlaySound(SpinBeamWindUp.enterSoundString, ((EntityState)this).gameObject);
			}
		}

		public override void FixedUpdate()
		{
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			if (!((EntityState)this).isAuthority)
			{
				return;
			}
			if (!woundUp && stopwatch >= windUpDuration)
			{
				woundUp = true;
				DestroyBeamVFXInstance();
				if (!string.IsNullOrEmpty(animLayerName) && !string.IsNullOrEmpty(animExitStateName))
				{
					((EntityState)this).PlayAnimation(animLayerName, animExitStateName, animPlaybackRateParamName, windUpDuration, 0f);
				}
				foreach (GameObject key in beamVfxInstancesDict.Keys)
				{
					CreateBeamVFXInstance(SpinBeamAttack.beamVfxPrefab, key);
				}
				loopPtr = LoopSoundManager.PlaySoundLoopLocal(((EntityState)this).gameObject, SpinBeamAttack.loopSound);
				Util.PlaySound(SpinBeamAttack.enterSoundString, ((EntityState)this).gameObject);
			}
			if (beamTickTimer <= 0f && woundUp)
			{
				beamTickTimer += 1f / SpinBeamAttack.beamTickFrequency;
				FireBeamBulletAuthority();
			}
			beamTickTimer -= Time.fixedDeltaTime;
			if (((EntityState)this).fixedAge >= duration)
			{
				BeginWindDown();
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public void FireBeamBulletAuthority()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: 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_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_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: 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)
			foreach (GameObject key in beamVfxInstancesDict.Keys)
			{
				new BulletAttack
				{
					origin = key.transform.position,
					aimVector = key.transform.forward,
					minSpread = 0f,
					maxSpread = 0f,
					maxDistance = 400f,
					hitMask = CommonMasks.bullet,
					stopperMask = LayerMask.op_Implicit(0),
					bulletCount = 1u,
					radius = 28f,
					smartCollision = false,
					queryTriggerInteraction = (QueryTriggerInteraction)1,
					procCoefficient = 1f,
					owner = ((EntityState)this).gameObject,
					weapon = ((EntityState)this).gameObject,
					damage = beamDpsCoefficient * base.damageStat / SpinBeamAttack.beamTickFrequency,
					damageColorIndex = (DamageColorIndex)0,
					damageType = DamageTypeCombo.op_Implicit((DamageType)0),
					falloffModel = (FalloffModel)0,
					force = 0f,
					hitEffectPrefab = SpinBeamAttack.beamImpactEffectPrefab,
					tracerEffectPrefab = null,
					isCrit = false,
					HitEffectNormal = false
				}.Fire();
			}
		}

		public void CreateBeamVFXInstance(GameObject beamVfxPrefab, GameObject projectile)
		{
			GameObject val = Object.Instantiate<GameObject>(beamVfxPrefab);
			val.transform.SetParent(projectile.transform, true);
			beamVfxInstancesDict.Add(projectile, val);
			UpdateBeamTransforms(projectile, val);
		}

		public void DestroyBeamVFXInstance()
		{
			if (beamVfxInstancesDict.Values.Count <= 0)
			{
				return;
			}
			foreach (GameObject value in beamVfxInstancesDict.Values)
			{
				Object.Destroy((Object)(object)value);
			}
			beamVfxInstancesDict.Clear();
		}

		private void UpdateBeamTransforms(GameObject projectile, GameObject beamVfxInstance)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			beamVfxInstance.transform.SetPositionAndRotation(projectile.transform.position, Quaternion.LookRotation(projectile.transform.forward));
		}

		public void BeginWindDown()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			if (animatorDirectionOverrideRequest != null)
			{
				animatorDirectionOverrideRequest.Dispose();
			}
			LoopSoundManager.StopSoundLoopLocal(loopPtr);
			Util.PlaySound(SpinBeamWindDown.enterSoundString, ((EntityState)this).gameObject);
			DestroyBeamVFXInstance();
		}
	}
	public class PortalBlast : BaseState
	{
		public static LoopSoundDef loopSoundDef;

		public float baseDuration = 3f;

		public float duration;

		public float windUpDuration = 2f;

		public bool woundUp;

		public bool woundDown;

		public GameObject beamVfxInstance;

		public DirectionOverrideRequest animatorDirectionOverrideRequest;

		public SoundLoopPtr loopPtr;

		public float beamTickTimer;

		public float beamDpsCoefficient = 4f;

		private float stopwatch;

		private Transform muzzleTransform;

		private Transform portalTransform;

		private Ray portalRay;

		private Ray initialRay;

		private CentralLegController centralLegController;

		private SuppressBreaksRequest suppressBreaksRequest;

		private GameObject warningLaserVfxPrefab = FathomlessVoidling.bigLaserWarning;

		private GameObject warningLaserVfxInstance;

		private RayAttackIndicator warningLaserVfxInstanceRayAttackIndicator;

		public override void OnEnter()
		{
			//IL_0008: 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_0060: 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_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Invalid comparison between Unknown and I4
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_01d4: 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_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e5: 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_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_0212: Expected O, but got Unknown
			//IL_0217: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Expected O, but got Unknown
			//IL_0227: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0253: Unknown result type (might be due to invalid IL or missing references)
			//IL_025b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0265: Unknown result type (might be due to invalid IL or missing references)
			//IL_026d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0272: Unknown result type (might be due to invalid IL or missing references)
			//IL_027d: Expected O, but got Unknown
			//IL_028b: Unknown result type (might be due to invalid IL or missing references)
			//IL_028d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			initialRay = ((BaseState)this).GetAimRay();
			muzzleTransform = ((BaseState)this).FindModelChild(BaseMultiBeamState.muzzleName);
			centralLegController = ((EntityState)this).GetComponent<CentralLegController>();
			if (Object.op_Implicit((Object)(object)centralLegController))
			{
				suppressBreaksRequest = centralLegController.SuppressBreaks();
			}
			duration = baseDuration + windUpDuration;
			new BullseyeSearch
			{
				teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()),
				filterByDistinctEntity = true,
				viewer = null,
				searchOrigin = Vector3.zero,
				sortMode = (SortMode)3,
				maxDistanceFilter = 2000f,
				minAngleFilter = 0f,
				maxAngleFilter = 360f
			}.RefreshCandidates();
			List<CharacterBody> list = new List<CharacterBody>();
			CharacterMaster[] array = Object.FindObjectsOfType<CharacterMaster>();
			foreach (CharacterMaster val in array)
			{
				if ((int)val.teamIndex == 1)
				{
					CharacterBody body = val.GetBody();
					if (Object.op_Implicit((Object)(object)body) && body.isPlayerControlled)
					{
						list.Add(body);
					}
				}
			}
			CharacterBody val2 = list[Random.Range(0, list.Count)];
			Vector3 corePosition = val2.corePosition;
			Vector3 val3 = corePosition - ((EntityState)this).transform.position;
			float num = 30f;
			Vector3 val4 = val3 + Vector2.op_Implicit(num * Random.insideUnitCircle);
			Vector3 val5 = Vector3.zero;
			Vector3 val6 = Vector3.zero;
			Vector3 val7;
			if (Object.op_Implicit((Object)(object)val2.characterMotor))
			{
				val5 = corePosition + val2.characterMotor.velocity * 1f;
				val7 = val5 - val4;
				val6 = ((Vector3)(ref val7)).normalized;
			}
			val7 = corePosition - val4;
			Vector3 normalized = ((Vector3)(ref val7)).normalized;
			Ray attackRay = ((val5 == Vector3.zero) ? new Ray(val4, normalized) : new Ray(val4, val6));
			EffectManager.SpawnEffect(FathomlessVoidling.laserPortalEffect, new EffectData
			{
				origin = muzzleTransform.position,
				rotation = Util.QuaternionSafeLookRotation(muzzleTransform.forward)
			}, false);
			GameObject val8 = new GameObject("LaserPortalBase");
			val8.transform.position = ((Ray)(ref attackRay)).origin;
			val8.transform.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref attackRay)).direction);
			EffectManager.SpawnEffect(FathomlessVoidling.laserPortalEffect, new EffectData
			{
				origin = val8.transform.position,
				rotation = val8.transform.rotation
			}, false);
			portalTransform = val8.transform;
			portalRay = attackRay;
			warningLaserVfxInstance = Object.Instantiate<GameObject>(warningLaserVfxPrefab);
			warningLaserVfxInstanceRayAttackIndicator = warningLaserVfxInstance.GetComponent<RayAttackIndicator>();
			if (Object.op_Implicit((Object)(object)warningLaserVfxInstanceRayAttackIndicator))
			{
				warningLaserVfxInstanceRayAttackIndicator.layerMask = ((LayerIndex)(ref LayerIndex.playerBody)).mask;
				warningLaserVfxInstanceRayAttackIndicator.attackRange = 1000f;
				warningLaserVfxInstanceRayAttackIndicator.attackRay = attackRay;
				warningLaserVfxInstanceRayAttackIndicator.attackRadius = 22f;
			}
			CreateBeamVFXInstance(SpinBeamWindUp.warningLaserPrefab);
			Util.PlaySound(SpinBeamWindUp.enterSoundString, ((EntityState)this).gameObject);
		}

		public override void FixedUpdate()
		{
			//IL_0024: 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)
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			((EntityState)this).inputBank.aimDirection = ((Ray)(ref portalRay)).direction;
			if (!((EntityState)this).isAuthority)
			{
				return;
			}
			if (!woundUp && stopwatch >= windUpDuration)
			{
				woundUp = true;
				if (Object.op_Implicit((Object)(object)warningLaserVfxInstance))
				{
					EntityState.Destroy((Object)(object)warningLaserVfxInstance);
				}
				if (Object.op_Implicit((Object)(object)warningLaserVfxInstanceRayAttackIndicator))
				{
					warningLaserVfxInstanceRayAttackIndicator = null;
				}
				DestroyBeamVFXInstance();
				CreateBeamVFXInstance(SpinBeamAttack.beamVfxPrefab);
				loopPtr = LoopSoundManager.PlaySoundLoopLocal(((EntityState)this).gameObject, SpinBeamAttack.loopSound);
				Util.PlaySound(SpinBeamAttack.enterSoundString, ((EntityState)this).gameObject);
			}
			if (beamTickTimer <= 0f && woundUp)
			{
				beamTickTimer += 1f / SpinBeamAttack.beamTickFrequency;
				FireBeamBulletAuthority();
			}
			beamTickTimer -= Time.fixedDeltaTime;
			if (((EntityState)this).fixedAge >= duration)
			{
				BeginWindDown();
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			SuppressBreaksRequest obj = suppressBreaksRequest;
			if (obj != null)
			{
				obj.Dispose();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)5;
		}

		public void FireBeamBulletAuthority()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: 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_0070: 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_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: 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_00ba: 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_00c1: 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_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: 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)
			Ray val = portalRay;
			new BulletAttack
			{
				origin = ((Ray)(ref val)).origin,
				aimVector = ((Ray)(ref val)).direction,
				minSpread = 0f,
				maxSpread = 0f,
				maxDistance = 400f,
				hitMask = CommonMasks.bullet,
				stopperMask = LayerMask.op_Implicit(0),
				bulletCount = 1u,
				radius = 22f,
				smartCollision = false,
				queryTriggerInteraction = (QueryTriggerInteraction)1,
				procCoefficient = 1f,
				owner = ((EntityState)this).gameObject,
				weapon = ((EntityState)this).gameObject,
				damage = beamDpsCoefficient * base.damageStat / SpinBeamAttack.beamTickFrequency,
				damageColorIndex = (DamageColorIndex)0,
				damageType = DamageTypeCombo.op_Implicit((DamageType)0),
				falloffModel = (FalloffModel)0,
				force = 0f,
				hitEffectPrefab = SpinBeamAttack.beamImpactEffectPrefab,
				tracerEffectPrefab = null,
				isCrit = false,
				HitEffectNormal = false
			}.Fire();
		}

		public void CreateBeamVFXInstance(GameObject beamVfxPrefab)
		{
			if ((Object)(object)beamVfxInstance == (Object)null)
			{
				beamVfxInstance = Object.Instantiate<GameObject>(beamVfxPrefab);
				beamVfxInstance.transform.SetParent(portalTransform, true);
				UpdateBeamTransforms();
			}
		}

		public void DestroyBeamVFXInstance()
		{
			if ((Object)(object)beamVfxInstance != (Object)null)
			{
				VfxKillBehavior.KillVfxObject(beamVfxInstance);
				beamVfxInstance = null;
			}
		}

		private void UpdateBeamTransforms()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			beamVfxInstance.transform.SetPositionAndRotation(((Ray)(ref portalRay)).origin, Quaternion.LookRotation(((Ray)(ref portalRay)).direction));
		}

		public void BeginWindDown()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			if (animatorDirectionOverrideRequest != null)
			{
				animatorDirectionOverrideRequest.Dispose();
			}
			LoopSoundManager.StopSoundLoopLocal(loopPtr);
			Util.PlaySound(SpinBeamWindDown.enterSoundString, ((EntityState)this).gameObject);
			DestroyBeamVFXInstance();
		}
	}
	public class WanderingSingularity : BaseState
	{
		private float duration;

		private float baseDuration = 4f;

		private float windDuration = 2f;

		private string animLayerName = "Body";

		private string animEnterStateName = "SuckEnter";

		private string animLoopStateName = "SuckLoop";

		private string animExitStateName = "SuckExit";

		private string animPlaybackRateParamName = "Suck.playbackRate";

		private Transform vacuumOrigin;

		private bool hasFired;

		private CentralLegController centralLegController;

		private SuppressBreaksRequest suppressBreaksRequest;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			duration = baseDuration / base.attackSpeedStat;
			centralLegController = ((EntityState)this).GetComponent<CentralLegController>();
			if (Object.op_Implicit((Object)(object)centralLegController))
			{
				suppressBreaksRequest = centralLegController.SuppressBreaks();
			}
			if (!string.IsNullOrEmpty(animLayerName) && !string.IsNullOrEmpty(animEnterStateName) && !string.IsNullOrEmpty(animPlaybackRateParamName))
			{
				((EntityState)this).PlayAnimation(animLayerName, animEnterStateName, animPlaybackRateParamName, windDuration, 0f);
			}
			if (!string.IsNullOrEmpty(BaseVacuumAttackState.vacuumOriginChildLocatorName))
			{
				vacuumOrigin = ((BaseState)this).FindModelChild(BaseVacuumAttackState.vacuumOriginChildLocatorName);
			}
			else
			{
				vacuumOrigin = ((EntityState)this).transform;
			}
		}

		public override void FixedUpdate()
		{
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: 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_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge < windDuration)
			{
				return;
			}
			if (!hasFired)
			{
				((EntityState)this).PlayAnimation(animLayerName, animLoopStateName, animPlaybackRateParamName, windDuration, 0f);
				hasFired = true;
				if (((EntityState)this).isAuthority)
				{
					ProjectileManager.instance.FireProjectile(new FireProjectileInfo
					{
						projectilePrefab = FathomlessVoidling.wSingularityProjectile,
						position = vacuumOrigin.position,
						rotation = vacuumOrigin.rotation,
						owner = ((EntityState)this).gameObject,
						damage = 1f,
						force = 0f,
						crit = false,
						damageColorIndex = (DamageColorIndex)9,
						target = null,
						damageTypeOverride = DamageTypeCombo.op_Implicit((DamageType)65600)
					});
				}
			}
			if (((EntityState)this).isAuthority && !((double)((EntityState)this).fixedAge < (double)duration))
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			if (!string.IsNullOrEmpty(animLayerName) && !string.IsNullOrEmpty(animExitStateName))
			{
				((EntityState)this).PlayAnimation(animLayerName, animExitStateName, animPlaybackRateParamName, windDuration, 0f);
			}
			((EntityState)this).OnExit();
			SuppressBreaksRequest obj = suppressBreaksRequest;
			if (obj != null)
			{
				obj.Dispose();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)5;
		}
	}
	[BepInPlugin("com.Nuxlar.FathomlessVoidling", "FathomlessVoidling", "0.9.11")]
	public class FathomlessVoidling : BaseUnityPlugin
	{
		public static GameObject spawnEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabSpawnEffect.prefab").WaitForCompletion();

		public static CharacterSpawnCard jointCard = Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/DLC1/VoidRaidCrab/cscVoidRaidCrabJoint.asset").WaitForCompletion();

		public static GameObject voidRainPortalEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabSpawnEffect.prefab").WaitForCompletion(), "VoidRainPortalEffect");

		public static GameObject laserPortalEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabSpawnEffect.prefab").WaitForCompletion(), "LaserPortalEffect");

		private GameEndingDef voidEnding = Addressables.LoadAssetAsync<GameEndingDef>((object)"RoR2/Base/WeeklyRun/PrismaticTrialEnding.asset").WaitForCompletion();

		private GameObject voidling = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabBody.prefab").WaitForCompletion();

		private GameObject miniVoidling = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabBodyPhase1.prefab").WaitForCompletion();

		private SpawnCard voidlingCard = Addressables.LoadAssetAsync<SpawnCard>((object)"RoR2/DLC1/VoidRaidCrab/cscVoidRaidCrab.asset").WaitForCompletion();

		private GameObject missileProjectile = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabMissileProjectile.prefab").WaitForCompletion();

		private GameObject missileProjectileGhost = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabMissileGhost.prefab").WaitForCompletion();

		private GameObject missileImpact = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabImpact1.prefab").WaitForCompletion();

		private GameObject spinBeamVFX = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabSpinBeamVFX.prefab").WaitForCompletion();

		private GameObject joint = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabJointBody.prefab").WaitForCompletion();

		private static Material voidCylinderMat = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/matITSafeWardAreaIndicator1.mat").WaitForCompletion();

		public static GameObject chargeVoidRain = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabTripleBeamChargeUp.prefab").WaitForCompletion();

		public static GameObject voidRainWarning = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MultiBeamRayIndicator.prefab").WaitForCompletion();

		public static GameObject bigLaserWarning = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MultiBeamRayIndicator.prefab").WaitForCompletion(), "BigLaserIndicatorNux");

		public static GameObject voidRainTracer = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/TracerVoidRaidCrabTripleBeamSmall.prefab").WaitForCompletion();

		public static GameObject voidRainExplosion = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabTripleBeamExplosion.prefab").WaitForCompletion();

		private static GameObject voidlingMaster = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabMaster.prefab").WaitForCompletion();

		private static SkillDef primaryDef = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC1/VoidRaidCrab/RaidCrabEyeMissiles.asset").WaitForCompletion();

		private static SkillDef secondaryDef = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC1/VoidRaidCrab/RaidCrabMultiBeam.asset").WaitForCompletion();

		private static SkillDef utilityDef = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC1/VoidRaidCrab/RaidCrabSpinBeam.asset").WaitForCompletion();

		private static SkillDef specialDef = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC1/VoidRaidCrab/RaidCrabVacuumAttack.asset").WaitForCompletion();

		private static SkillDef gauntletDef = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/DLC1/VoidRaidCrab/RaidCrabChannelGauntlet.asset").WaitForCompletion();

		public static GameObject suckSphereEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/KillSphereVfxPlaceholder.prefab").WaitForCompletion(), "WSingularitySphere");

		public static GameObject suckCenterEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabSuckLoopFX.prefab").WaitForCompletion(), "WSingularityCenter");

		public static GameObject wSingularityProjectile = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabMissileProjectile.prefab").WaitForCompletion(), "WSingularityProjectile");

		public static GameObject wSingularityGhost = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/LunarWisp/LunarWispTrackingBombGhost.prefab").WaitForCompletion(), "WSingularityGhost");

		public static LoopSoundDef singularityLSD = Addressables.LoadAssetAsync<LoopSoundDef>((object)"RoR2/DLC1/VoidRaidCrab/lsdVoidRaidCrabVacuumAttack.asset").WaitForCompletion();

		public static GameObject voidEyeModel = PrefabAPI.InstantiateClone(((Component)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/VoidRaidCrabBody.prefab").WaitForCompletion().GetComponent<ModelLocator>()
			.modelTransform.GetChild(4)).gameObject, "mdlVoidEye");

		public static GameObject voidEye = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ArtifactShell/ArtifactShellBody.prefab").WaitForCompletion(), "VoidEyeBody");

		public static GameObject voidEyeMaster = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ArtifactShell/ArtifactShellMaster.prefab").WaitForCompletion(), "VoidEyeMaster");

		public static Material voidEyeMat = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/VoidRaidCrab/matVoidRaidCrabEye.mat").WaitForCompletion();

		public static Material voidEyeMat2 = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/VoidRaidCrab/matVoidRaidCrabEyeOverlay1.mat").WaitForCompletion();

		public static Material voidEyeMat3 = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/VoidRaidCrab/matVoidRaidCrabEyeOverlay2.mat").WaitForCompletion();

		public static Material voidEyeMat4 = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/VoidRaidCrab/matVoidRaidCrabEyeOverlay3.mat").WaitForCompletion();

		public static GameObject meteor = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Grandparent/GrandparentBoulder.prefab").Wai