Decompiled source of Regigigas v1.4.10

RegigigasMod.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using EntityStates.BeetleGuardMonster;
using EntityStates.BrotherMonster;
using EntityStates.Croco;
using EntityStates.GrandParentBoss;
using EntityStates.ImpBossMonster;
using EntityStates.LemurianBruiserMonster;
using EntityStates.ParentMonster;
using EntityStates.VagrantMonster;
using HG;
using HG.BlendableTypes;
using KinematicCharacterController;
using On.RoR2;
using R2API;
using R2API.Networking;
using R2API.Networking.Interfaces;
using R2API.Utils;
using RegigigasMod.Modules;
using RegigigasMod.Modules.Achievements;
using RegigigasMod.Modules.Components;
using RegigigasMod.Modules.Enemies;
using RegigigasMod.Modules.Misc;
using RegigigasMod.SkillStates.BaseStates;
using RegigigasMod.SkillStates.Regigigas;
using RegigigasMod.SkillStates.Regigigas.GigaImpact;
using Rewired.ComponentControls.Effects;
using Risky_Artifacts.Artifacts;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.Navigation;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using ThreeEyedGames;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.SceneManagement;

[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("RegigigasMod")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyProduct("RegigigasMod")]
[assembly: AssemblyTitle("RegigigasMod")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
internal static class Log
{
	internal static ManualLogSource _logSource;

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

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

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

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

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

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

	internal static void Warning(object data)
	{
		_logSource.LogWarning(data);
	}
}
internal enum RegigigasCameraParams
{
	DEFAULT,
	AIM,
	CHARGE,
	EMOTE
}
internal class BodyInfo
{
	internal string bodyName = "";

	internal string bodyNameToken = "";

	internal string subtitleNameToken = "";

	internal Color bodyColor = Color.white;

	internal Texture characterPortrait = null;

	internal GameObject crosshair = null;

	internal GameObject podPrefab = null;

	internal float maxHealth = 100f;

	internal float healthGrowth = 2f;

	internal float healthRegen = 0f;

	internal float shield = 0f;

	internal float shieldGrowth = 0f;

	internal float moveSpeed = 7f;

	internal float moveSpeedGrowth = 0f;

	internal float acceleration = 80f;

	internal float jumpPower = 15f;

	internal float jumpPowerGrowth = 0f;

	internal float damage = 12f;

	internal float attackSpeed = 1f;

	internal float attackSpeedGrowth = 0f;

	internal float armor = 0f;

	internal float armorGrowth = 0f;

	internal float crit = 1f;

	internal float critGrowth = 0f;

	internal int jumpCount = 1;
}
internal class CustomRendererInfo
{
	internal string childName;

	internal Material material;

	internal bool ignoreOverlays;
}
internal class SkillDefInfo
{
	public string skillName;

	public string skillNameToken;

	public string skillDescriptionToken;

	public string[] keywordTokens = new string[0];

	public Sprite skillIcon;

	public SerializableEntityStateType activationState;

	public InterruptPriority interruptPriority;

	public string activationStateMachineName;

	public float baseRechargeInterval;

	public int baseMaxStock = 1;

	public int rechargeStock = 1;

	public int requiredStock = 1;

	public int stockToConsume = 1;

	public bool isCombatSkill = true;

	public bool canceledFromSprinting;

	public bool forceSprintDuringState;

	public bool cancelSprintingOnActivation = true;

	public bool beginSkillCooldownOnSkillEnd;

	public bool fullRestockOnAssign = true;

	public bool resetCooldownTimerOnUse;

	public bool mustKeyPress;

	public SkillDefInfo()
	{
	}

	public SkillDefInfo(string skillName, string skillNameToken, string skillDescriptionToken, Sprite skillIcon, SerializableEntityStateType activationState, string activationStateMachineName, InterruptPriority interruptPriority, bool isCombatSkill, float baseRechargeInterval)
	{
		//IL_0063: 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_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_0075: Unknown result type (might be due to invalid IL or missing references)
		this.skillName = skillName;
		this.skillNameToken = skillNameToken;
		this.skillDescriptionToken = skillDescriptionToken;
		this.skillIcon = skillIcon;
		this.activationState = activationState;
		this.activationStateMachineName = activationStateMachineName;
		this.interruptPriority = interruptPriority;
		this.isCombatSkill = isCombatSkill;
		this.baseRechargeInterval = baseRechargeInterval;
	}

	public SkillDefInfo(string skillName, string skillNameToken, string skillDescriptionToken, Sprite skillIcon, SerializableEntityStateType activationState, string activationStateMachineName = "Weapon", bool agile = false)
	{
		//IL_0063: 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_0074: Unknown result type (might be due to invalid IL or missing references)
		this.skillName = skillName;
		this.skillNameToken = skillNameToken;
		this.skillDescriptionToken = skillDescriptionToken;
		this.skillIcon = skillIcon;
		this.activationState = activationState;
		this.activationStateMachineName = activationStateMachineName;
		interruptPriority = (InterruptPriority)0;
		isCombatSkill = true;
		baseRechargeInterval = 0f;
		requiredStock = 0;
		stockToConsume = 0;
		cancelSprintingOnActivation = !agile;
		if (agile)
		{
			keywordTokens = new string[1] { "KEYWORD_AGILE" };
		}
	}
}
namespace RegigigasMod
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[R2APISubmoduleDependency(new string[] { "PrefabAPI", "LanguageAPI", "SoundAPI", "DirectorAPI", "LoadoutAPI", "UnlockableAPI", "NetworkingAPI", "RecalculateStatsAPI" })]
	[BepInPlugin("com.rob.RegigigasMod", "RegigigasMod", "1.4.10")]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	public class RegigigasPlugin : BaseUnityPlugin
	{
		public const string MODUID = "com.rob.RegigigasMod";

		public const string MODNAME = "RegigigasMod";

		public const string MODVERSION = "1.4.10";

		public const string developerPrefix = "ROB";

		public static RegigigasPlugin instance;

		public static bool riskyArtifactsInstalled;

		private void Awake()
		{
			instance = this;
			riskyArtifactsInstalled = Chainloader.PluginInfos.ContainsKey("com.Moffein.RiskyArtifacts");
			Log.Init(((BaseUnityPlugin)this).Logger);
			Config.ReadConfig();
			Assets.PopulateAssets();
			CameraParams.InitializeParams();
			States.RegisterStates();
			Buffs.RegisterBuffs();
			Projectiles.RegisterProjectiles();
			Tokens.AddTokens();
			ItemDisplays.PopulateDisplays();
			NetMessages.RegisterNetworkMessages();
			new Regigigas().CreateCharacter();
			Hook();
			new ContentPacks().Initialize();
			ContentManager.onContentPacksAssigned += LateSetup;
		}

		private void LateSetup(ReadOnlyArray<ReadOnlyContentPack> obj)
		{
			Regigigas.SetItemDisplays();
			Buffs.armorBuff.iconSprite = Buffs.ArmorBoost.iconSprite;
		}

		private void Hook()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
		}

		private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
		{
			if (sender.HasBuff(Buffs.armorBuff))
			{
				args.armorAdd += 500f;
			}
			if (sender.HasBuff(Buffs.slowStartBuff))
			{
				args.armorAdd += 20f;
				args.moveSpeedReductionMultAdd += 1f;
				args.attackSpeedMultAdd -= 0.5f;
				args.damageMultAdd -= 0.5f;
			}
		}
	}
}
namespace RegigigasMod.SkillStates.Regigigas
{
	public class BaseRegiSkillState : BaseSkillState
	{
		protected RegigigasController regigigasController;

		protected RegigigasFlashController flashController;

		protected Animator anim;

		public override void OnEnter()
		{
			regigigasController = ((EntityState)this).GetComponent<RegigigasController>();
			flashController = ((EntityState)this).GetComponent<RegigigasFlashController>();
			anim = ((EntityState)this).GetModelAnimator();
			if (Object.op_Implicit((Object)(object)anim))
			{
				anim.SetBool("isSprinting", false);
			}
			((BaseState)this).OnEnter();
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (Object.op_Implicit((Object)(object)anim))
			{
				anim.SetBool("isGrounded", ((BaseState)this).isGrounded);
			}
		}
	}
	public class Bounce : BaseSkillState
	{
		public static float minDamageCoefficient = 8f;

		public static float maxDamageCoefficient = 36f;

		public static float leapDuration = 0.6f;

		private float duration;

		private bool hasLanded;

		private float stopwatch;

		private float previousAirControl;

		private GameObject chargeEffectInstanceL;

		private GameObject chargeEffectInstanceR;

		private bool isFalling;

		private bool setCamOverride;

		private float maxYSpeed;

		private CameraParamsOverrideHandle camParamsOverrideHandle;

		public override void OnEnter()
		{
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: Unknown result type (might be due to invalid IL or missing references)
			//IL_021a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			//IL_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_029a: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Expected O, but got Unknown
			//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: 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_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			duration = leapDuration / (0.75f + 0.25f * ((BaseState)this).attackSpeedStat);
			hasLanded = false;
			((EntityState)this).characterMotor.jumpCount = ((EntityState)this).characterBody.maxJumpCount;
			previousAirControl = ((EntityState)this).characterMotor.airControl;
			((EntityState)this).characterMotor.airControl = BaseLeap.airControl;
			Ray aimRay = ((BaseState)this).GetAimRay();
			Vector3 direction = ((Ray)(ref aimRay)).direction;
			if (((EntityState)this).isAuthority)
			{
				((EntityState)this).characterBody.isSprinting = true;
				direction.y = Mathf.Max(direction.y, 1.25f * BaseLeap.minimumY);
				Vector3 val = ((Vector3)(ref direction)).normalized * (1.15f * BaseLeap.aimVelocity) * (3f + 0.5f * ((BaseState)this).moveSpeedStat);
				Vector3 val2 = Vector3.up * 5f * BaseLeap.upwardVelocity;
				Vector3 val3 = new Vector3(direction.x, 0f, direction.z);
				Vector3 val4 = ((Vector3)(ref val3)).normalized * (0.75f * BaseLeap.forwardVelocity);
				((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground();
				((EntityState)this).characterMotor.velocity = val + val2 + val4;
			}
			((EntityState)this).characterDirection.moveVector = direction;
			CharacterBody characterBody = ((EntityState)this).characterBody;
			characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1);
			Util.PlaySound("sfx_regigigas_leap", ((EntityState)this).gameObject);
			chargeEffectInstanceL = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Grandparent/ChargeGrandParentSunHands.prefab").WaitForCompletion());
			chargeEffectInstanceL.transform.parent = ((BaseState)this).FindModelChild("FootL");
			chargeEffectInstanceL.transform.localPosition = new Vector3(0f, 0f, 0f);
			chargeEffectInstanceL.transform.localRotation = Quaternion.identity;
			chargeEffectInstanceL.transform.localScale = Vector3.one;
			chargeEffectInstanceR = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Grandparent/ChargeGrandParentSunHands.prefab").WaitForCompletion());
			chargeEffectInstanceR.transform.parent = ((BaseState)this).FindModelChild("FootR");
			chargeEffectInstanceR.transform.localPosition = new Vector3(0f, 0f, 0f);
			chargeEffectInstanceR.transform.localRotation = Quaternion.identity;
			chargeEffectInstanceR.transform.localScale = Vector3.one;
			EffectData val5 = new EffectData();
			val5.origin = ((EntityState)this).characterBody.footPosition;
			val5.scale = 5f;
			EffectManager.SpawnEffect(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Parent/ParentSlamEffect.prefab").WaitForCompletion(), val5, true);
		}

		public override void OnExit()
		{
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).OnExit();
			if (Object.op_Implicit((Object)(object)chargeEffectInstanceL))
			{
				EntityState.Destroy((Object)(object)chargeEffectInstanceL);
			}
			if (Object.op_Implicit((Object)(object)chargeEffectInstanceR))
			{
				EntityState.Destroy((Object)(object)chargeEffectInstanceR);
			}
			CharacterBody characterBody = ((EntityState)this).characterBody;
			characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2);
			((EntityState)this).characterMotor.airControl = previousAirControl;
			if (setCamOverride)
			{
				((EntityState)this).cameraTargetParams.RemoveParamsOverride(camParamsOverrideHandle, 1.5f);
			}
		}

		public override void FixedUpdate()
		{
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			((BaseState)this).StartAimMode(0.5f, false);
			((EntityState)this).characterBody.isSprinting = true;
			stopwatch += Time.fixedDeltaTime;
			if (!isFalling && ((EntityState)this).characterMotor.velocity.y <= 0f && ((EntityState)this).fixedAge >= 0.1f)
			{
				isFalling = true;
				setCamOverride = true;
				camParamsOverrideHandle = CameraParams.OverrideCameraParams(((EntityState)this).cameraTargetParams, RegigigasCameraParams.CHARGE, 2f);
			}
			if (((EntityState)this).characterMotor.velocity.y <= maxYSpeed)
			{
				maxYSpeed = ((EntityState)this).characterMotor.velocity.y;
			}
			if (isFalling)
			{
				((EntityState)this).characterMotor.velocity.y += -24f * Time.fixedDeltaTime;
			}
			if (stopwatch >= duration && ((EntityState)this).isAuthority && ((EntityState)this).characterMotor.isGrounded)
			{
				GroundImpact();
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private void GroundImpact()
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: 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_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_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: 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_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			if (!hasLanded)
			{
				hasLanded = true;
				Util.PlaySound("sfx_regigigas_slam", ((EntityState)this).gameObject);
				float num = 24f;
				EffectData val = new EffectData();
				val.origin = ((EntityState)this).characterBody.footPosition;
				val.scale = num;
				EffectManager.SpawnEffect(Assets.slamImpactEffect, val, true);
				float num2 = Util.Remap(maxYSpeed, 0f, -500f, minDamageCoefficient, maxDamageCoefficient);
				new BlastAttack
				{
					attacker = ((EntityState)this).gameObject,
					attackerFiltering = (AttackerFiltering)2,
					baseDamage = num2 * ((BaseState)this).damageStat,
					baseForce = 800f,
					bonusForce = Vector3.up * 2000f,
					crit = ((BaseState)this).RollCrit(),
					damageColorIndex = (DamageColorIndex)0,
					damageType = (DamageType)131072,
					falloffModel = (FalloffModel)0,
					inflictor = ((EntityState)this).gameObject,
					losType = (LoSType)0,
					position = ((EntityState)this).characterBody.footPosition,
					procChainMask = default(ProcChainMask),
					procCoefficient = 1f,
					radius = num,
					teamIndex = ((BaseState)this).GetTeam()
				}.Fire();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)3;
		}
	}
	public class BounceStart : BaseState
	{
		private float duration;

		private Animator animator;

		public override void OnEnter()
		{
			//IL_00a0: 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_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			animator = ((EntityState)this).GetModelAnimator();
			if (Object.op_Implicit((Object)(object)animator))
			{
				int layerIndex = animator.GetLayerIndex("Body");
				animator.CrossFadeInFixedTime("AnimatedJump", 0.1f);
				animator.Update(0f);
				AnimatorStateInfo nextAnimatorStateInfo;
				if (!((EntityState)this).characterBody.HasBuff(Buffs.slowStartBuff))
				{
					nextAnimatorStateInfo = animator.GetNextAnimatorStateInfo(layerIndex);
					duration = ((AnimatorStateInfo)(ref nextAnimatorStateInfo)).length * 0.25f;
				}
				else
				{
					nextAnimatorStateInfo = animator.GetNextAnimatorStateInfo(layerIndex);
					duration = ((AnimatorStateInfo)(ref nextAnimatorStateInfo)).length;
				}
			}
			if (!((EntityState)this).characterBody.HasBuff(Buffs.slowStartBuff))
			{
				animator.speed = 4f;
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			if (!((EntityState)this).characterBody.HasBuff(Buffs.slowStartBuff))
			{
				animator.speed = 1f;
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (Object.op_Implicit((Object)(object)animator))
			{
				animator.SetBool("isGrounded", false);
			}
			((EntityState)this).characterMotor.velocity.y = 0f;
			if (((EntityState)this).fixedAge >= duration / 2f && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new Bounce());
			}
			else if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new Bounce());
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)3;
		}
	}
	public class ChargeAncientPower : BaseRegiSkillState
	{
		public static float baseStartDuration = 0.5f;

		public static float baseRockTimer = 0.3f;

		public static float healthCostFraction = 0.1f;

		private int rockCount;

		private float rockTimer;

		private float rockStopwatch;

		private float startDuration;

		private uint playID;

		private CameraParamsOverrideHandle camParamsOverrideHandle;

		public override void OnEnter()
		{
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			base.OnEnter();
			startDuration = baseStartDuration;
			rockTimer = baseRockTimer;
			rockCount = 0;
			rockStopwatch = startDuration + rockTimer;
			camParamsOverrideHandle = CameraParams.OverrideCameraParams(((EntityState)this).cameraTargetParams, RegigigasCameraParams.AIM);
			((EntityState)this).PlayAnimation("Gesture, Override", "ChargeAncientPower", "AncientPower.playbackRate", startDuration);
			((EntityState)this).characterBody.hideCrosshair = false;
			playID = Util.PlaySound("sfx_regigigas_rocks_loop", ((EntityState)this).gameObject);
		}

		public override void OnExit()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).OnExit();
			AkSoundEngine.StopPlayingID(playID);
			((EntityState)this).cameraTargetParams.RemoveParamsOverride(camParamsOverrideHandle, 0.5f);
		}

		public override void FixedUpdate()
		{
			base.FixedUpdate();
			((BaseState)this).StartAimMode(0.5f, false);
			rockStopwatch -= Time.fixedDeltaTime;
			regigigasController.rockCount = rockCount;
			if (rockStopwatch <= 0f)
			{
				ChargeRock();
			}
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= startDuration && !((EntityState)this).inputBank.skill2.down)
			{
				if (rockCount > 0)
				{
					FireAncientPower nextState = new FireAncientPower
					{
						rockCount = rockCount
					};
					((EntityState)this).outer.SetNextState((EntityState)(object)nextState);
				}
				else
				{
					((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty");
					((EntityState)this).outer.SetNextStateToMain();
				}
			}
		}

		private bool SpendStockOrHealth()
		{
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: 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_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: 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_00f9: Unknown result type (might be due to invalid IL or missing references)
			bool result = false;
			if (((EntityState)this).skillLocator.secondary.stock > 0)
			{
				((EntityState)this).skillLocator.secondary.DeductStock(1);
				result = true;
			}
			else if (Object.op_Implicit((Object)(object)((EntityState)this).healthComponent) && ((EntityState)this).healthComponent.combinedHealth >= healthCostFraction * ((EntityState)this).healthComponent.fullCombinedHealth)
			{
				if (NetworkServer.active)
				{
					DamageInfo val = new DamageInfo();
					val.damage = ((EntityState)this).healthComponent.fullCombinedHealth * healthCostFraction;
					val.position = ((EntityState)this).characterBody.corePosition;
					val.force = Vector3.zero;
					val.damageColorIndex = (DamageColorIndex)0;
					val.crit = false;
					val.attacker = null;
					val.inflictor = null;
					val.damageType = (DamageType)3;
					val.procCoefficient = 0f;
					val.procChainMask = default(ProcChainMask);
					((EntityState)this).healthComponent.TakeDamage(val);
				}
				result = true;
			}
			return result;
		}

		private void ChargeRock()
		{
			if (SpendStockOrHealth())
			{
				rockCount++;
				flashController.Flash(playSound: false);
				Util.PlaySound("sfx_regigigas_rock_spawn", ((EntityState)this).gameObject);
			}
			rockStopwatch = rockTimer;
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}
	}
	public class DeathState : GenericCharacterDeath
	{
		public override void OnEnter()
		{
			Animator modelAnimator = ((EntityState)this).GetModelAnimator();
			modelAnimator.SetLayerWeight(modelAnimator.GetLayerIndex("Body, Smooth"), 0f);
			((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
			((GenericCharacterDeath)this).OnEnter();
		}
	}
	public class DrainPunch : PunchCombo
	{
		internal new static float damageCoefficientOverride = 2.8f;

		private GameObject chargeEffectInstance;

		public override void OnEnter()
		{
			//IL_003e: 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_0087: 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_00b3: Unknown result type (might be due to invalid IL or missing references)
			base.OnEnter();
			attack.damage = damageCoefficientOverride * ((BaseState)this).damageStat;
			string text = "HandL";
			if (swingIndex == 1)
			{
				text = "HandR";
			}
			chargeEffectInstance = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Grandparent/ChargeGrandParentSunHands.prefab").WaitForCompletion());
			chargeEffectInstance.transform.parent = ((BaseState)this).FindModelChild(text);
			chargeEffectInstance.transform.localPosition = new Vector3(0f, 0f, 0f);
			chargeEffectInstance.transform.localRotation = Quaternion.identity;
			chargeEffectInstance.transform.localScale = Vector3.one;
			chargeEffectInstance.GetComponentInChildren<ObjectScaleCurve>().timeMax = 0.75f * (duration * attackStartTime);
		}

		public override void OnExit()
		{
			base.OnExit();
			if (Object.op_Implicit((Object)(object)chargeEffectInstance))
			{
				EntityState.Destroy((Object)(object)chargeEffectInstance);
			}
		}

		protected override void SetNextState()
		{
			int num = swingIndex + 1;
			if (num == 3)
			{
				num = 1;
			}
			((EntityState)this).outer.SetNextState((EntityState)(object)new DrainPunch
			{
				swingIndex = num
			});
		}

		protected override void PlaySwingEffect()
		{
			if (Object.op_Implicit((Object)(object)chargeEffectInstance))
			{
				EntityState.Destroy((Object)(object)chargeEffectInstance);
			}
		}

		protected override void OnHitEnemyAuthority()
		{
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			base.OnHitEnemyAuthority();
			GameObject punchImpactEffect = Assets.punchImpactEffect;
			HurtBox[] array = hitResults.ToArray();
			for (int i = 0; i < hitResults.Count; i++)
			{
				handleLifeSteal(((EntityState)this).healthComponent, damageCoefficientOverride * ((BaseState)this).damageStat * 0.5f);
				EffectData val = new EffectData();
				val.scale = 4f;
				if (Object.op_Implicit((Object)(object)array[i]) && Object.op_Implicit((Object)(object)array[i].healthComponent))
				{
					val.origin = ((Component)array[i]).transform.position;
					val.rotation = ((Component)array[i]).transform.rotation;
					EffectManager.SpawnEffect(punchImpactEffect, val, true);
				}
			}
		}

		private void handleLifeSteal(HealthComponent healthComponent, float healAmount)
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			if (NetworkServer.active)
			{
				healthComponent.Heal(healAmount, default(ProcChainMask), true);
			}
			else
			{
				NetMessageExtensions.Send((INetMessage)(object)new NetMessages.SyncLifeSteal(((EntityState)this).characterBody.networkIdentity.netId, healAmount), (NetworkDestination)1);
			}
		}
	}
	public class FireAncientPower : BaseRegiSkillState
	{
		public int rockCount;

		public static float baseDuration = 0.6f;

		public static float baseTimeBetweenRocks = 0.15f;

		public static float damageCoefficient = 3f;

		public static float throwForce = 140f;

		public static float projectileForce = 5f;

		private float throwStopwatch;

		private float timeBetweenRocks;

		private float duration;

		private GameObject projectilePrefab;

		private CameraParamsOverrideHandle camParamsOverrideHandle;

		public override void OnEnter()
		{
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			base.OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			timeBetweenRocks = baseTimeBetweenRocks / ((BaseState)this).attackSpeedStat;
			throwStopwatch = timeBetweenRocks;
			camParamsOverrideHandle = CameraParams.OverrideCameraParams(((EntityState)this).cameraTargetParams, RegigigasCameraParams.AIM);
			((EntityState)this).characterBody.aimOriginTransform.localPosition = new Vector3(0f, 12f, 0f);
			projectilePrefab = Projectiles.rockProjectile;
			((EntityState)this).PlayAnimation("Gesture, Override", "FireAncientPower", "AncientPower.playbackRate", baseDuration);
			Util.PlaySound("sfx_regigigas_rocks_release", ((EntityState)this).gameObject);
		}

		public override void FixedUpdate()
		{
			base.FixedUpdate();
			((BaseState)this).StartAimMode(0.5f, false);
			throwStopwatch -= Time.fixedDeltaTime;
			regigigasController.rockCount = rockCount;
			if (throwStopwatch <= 0f)
			{
				ThrowRock();
			}
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration && rockCount <= 0)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			//IL_0022: 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_003e: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).OnExit();
			((EntityState)this).characterBody.aimOriginTransform.localPosition = new Vector3(0f, 0.5f, 0f);
			((EntityState)this).cameraTargetParams.RemoveParamsOverride(camParamsOverrideHandle, 0.2f);
			((EntityState)this).characterBody.hideCrosshair = true;
			regigigasController.rockCount = 0;
		}

		private void ThrowRock()
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: 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)
			if (rockCount > 0)
			{
				rockCount--;
				throwStopwatch = timeBetweenRocks;
				if (((EntityState)this).isAuthority)
				{
					Ray aimRay = ((BaseState)this).GetAimRay();
					ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * damageCoefficient, projectileForce, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, throwForce);
				}
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}
	}
	public class GigaImpactOld : BaseRegiSkillState
	{
		public static float baseDuration = 6f;

		public static float impactAttackRadius = 12f;

		public static float impactAttackForce = 500f;

		public static float impactAttackBonusForce = -1000f;

		public static float impactAttackDamageCoefficient = 32f;

		public static float blastAttackRadius = 32f;

		public static float blastAttackForce = 2000f;

		public static float blastAttackBonusForce = 1000f;

		public static float blastAttackDamageCoefficient = 12f;

		private float impactTime;

		private float duration;

		private bool hasFired;

		private bool hasFiredShockwave;

		public override void OnEnter()
		{
			base.OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			impactTime = duration * 0.55f;
			hasFired = false;
			((EntityState)this).PlayAnimation("FullBody, Override", "GigaImpact", "GigaImpact.playbackRate", duration);
		}

		public override void FixedUpdate()
		{
			base.FixedUpdate();
			if (((EntityState)this).fixedAge >= impactTime)
			{
				Fire();
			}
			if (((EntityState)this).fixedAge >= 0.75f * duration)
			{
				FireShockwave();
			}
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

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

		private void Fire()
		{
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Expected O, but got Unknown
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00d1: 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_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)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			if (!hasFired)
			{
				hasFired = true;
				Util.PlaySound(GroundSlam.attackSoundString, ((EntityState)this).gameObject);
				if (Object.op_Implicit((Object)(object)GroundSlam.slamEffectPrefab))
				{
					EffectManager.SimpleMuzzleFlash(GroundSlam.slamEffectPrefab, ((EntityState)this).gameObject, "HandR", false);
				}
				flashController.Flash();
				if (((EntityState)this).isAuthority)
				{
					BlastAttack val = new BlastAttack();
					val.attacker = ((EntityState)this).gameObject;
					val.inflictor = ((EntityState)this).gameObject;
					val.teamIndex = TeamComponent.GetObjectTeam(val.attacker);
					val.position = ((BaseState)this).FindModelChild("HandR").position;
					val.procCoefficient = 0f;
					val.radius = impactAttackRadius;
					val.baseForce = impactAttackForce;
					val.bonusForce = Vector3.up * impactAttackBonusForce;
					val.baseDamage = impactAttackDamageCoefficient * ((BaseState)this).damageStat;
					val.falloffModel = (FalloffModel)2;
					val.damageColorIndex = (DamageColorIndex)3;
					val.attackerFiltering = (AttackerFiltering)2;
					val.Fire();
				}
			}
		}

		private void FireShockwave()
		{
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Expected O, but got Unknown
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: 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_00e9: 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)
			if (!hasFiredShockwave)
			{
				hasFiredShockwave = true;
				if (Object.op_Implicit((Object)(object)SpawnState.spawnEffect))
				{
					EffectManager.SimpleMuzzleFlash(Resources.Load<GameObject>("prefabs/effects/impacteffects/GrandparentDeathEffect"), ((EntityState)this).gameObject, "HandR", false);
				}
				if (((EntityState)this).isAuthority)
				{
					BlastAttack val = new BlastAttack();
					val.attacker = ((EntityState)this).gameObject;
					val.inflictor = ((EntityState)this).gameObject;
					val.teamIndex = TeamComponent.GetObjectTeam(val.attacker);
					val.position = ((EntityState)this).characterBody.corePosition;
					val.procCoefficient = 0f;
					val.radius = blastAttackRadius;
					val.baseForce = blastAttackForce;
					val.bonusForce = Vector3.up * blastAttackBonusForce;
					val.baseDamage = blastAttackDamageCoefficient * ((BaseState)this).damageStat;
					val.falloffModel = (FalloffModel)1;
					val.damageColorIndex = (DamageColorIndex)3;
					val.attackerFiltering = (AttackerFiltering)2;
					val.Fire();
				}
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)4;
		}
	}
	public class GrabAttempt : BaseRegiSkillState
	{
		public static float baseDuration = 2f;

		public static string grabTransformString = "HandR";

		public static float grabRadius = 10f;

		private float grabStartTime;

		private Transform grabTransform;

		private HurtBox grabTarget;

		private float duration;

		private RegigigasGrabController grabController;

		public override void OnEnter()
		{
			base.OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			grabStartTime = 0.7f * duration;
			grabTransform = ((BaseState)this).FindModelChild(grabTransformString);
			((EntityState)this).PlayAnimation("FullBody, Override", "GrabAttempt", "Grab.playbackRate", duration);
			flashController.Flash();
		}

		public override void FixedUpdate()
		{
			base.FixedUpdate();
			if (((EntityState)this).fixedAge >= grabStartTime)
			{
				AttemptGrab(grabRadius);
			}
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration)
			{
				if (Object.op_Implicit((Object)(object)grabController))
				{
					((EntityState)this).outer.SetNextState((EntityState)(object)new GrabSuccess
					{
						target = grabTarget,
						grabController = grabController
					});
				}
				else
				{
					((EntityState)this).outer.SetNextState((EntityState)(object)new GrabFail());
				}
			}
		}

		private void AttemptGrab(float grabRadius)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Expected O, but got Unknown
			if (!Object.op_Implicit((Object)(object)grabController))
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
				BullseyeSearch val = new BullseyeSearch
				{
					teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()),
					filterByLoS = false,
					searchOrigin = grabTransform.position,
					searchDirection = Random.onUnitSphere,
					sortMode = (SortMode)1,
					maxDistanceFilter = grabRadius,
					maxAngleFilter = 360f
				};
				val.RefreshCandidates();
				val.FilterOutGameObject(((EntityState)this).gameObject);
				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) && BodyMeetsGrabConditions(val2.healthComponent.body))
				{
					grabController = ((Component)val2.healthComponent.body).gameObject.AddComponent<RegigigasGrabController>();
					grabController.pivotTransform = grabTransform;
					grabController.grabberHealthComponent = ((EntityState)this).healthComponent;
					grabTarget = val2;
					Util.PlaySound("sfx_regigigas_grab", ((EntityState)this).gameObject);
				}
			}
		}

		private bool BodyMeetsGrabConditions(CharacterBody targetBody)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Invalid comparison between Unknown and I4
			bool result = true;
			if ((int)targetBody.hullClassification == 2)
			{
				result = false;
			}
			return result;
		}

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}
	}
	public class GrabFail : BaseSkillState
	{
		public static float baseDuration = 1.5f;

		private float duration;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			((EntityState)this).PlayAnimation("FullBody, Override", "GrabFail", "Grab.playbackRate", duration);
		}

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

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

		public RegigigasGrabController grabController;

		public static float baseDuration = 6f;

		public static string grabTransformString = "HandR";

		public static float throwForce = 120f;

		public static float damagePercentage = 0.55f;

		private bool hasSqueezed;

		private float grabSqueezeTime;

		private float grabThrowTime;

		private Transform grabTransform;

		private float duration;

		private GameObject crushEffectPrefab;

		public override void OnEnter()
		{
			base.OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			grabThrowTime = 0.7f * duration;
			grabSqueezeTime = 0.3f * duration;
			hasSqueezed = false;
			grabTransform = ((BaseState)this).FindModelChild(grabTransformString);
			crushEffectPrefab = Assets.punchImpactEffect;
			((EntityState)this).PlayAnimation("FullBody, Override", "GrabSuccess", "Grab.playbackRate", duration);
		}

		public override void FixedUpdate()
		{
			base.FixedUpdate();
			if (((EntityState)this).fixedAge >= grabSqueezeTime)
			{
				SqueezeTarget();
				((BaseState)this).StartAimMode(0.5f, false);
			}
			if (((EntityState)this).fixedAge >= grabThrowTime)
			{
				Throw();
			}
			if (((EntityState)this).fixedAge >= duration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private void SqueezeTarget()
		{
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: 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_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Expected O, but got Unknown
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Expected O, but got Unknown
			if (!hasSqueezed)
			{
				hasSqueezed = true;
				flashController.Flash(playSound: false);
				if (NetworkServer.active && Object.op_Implicit((Object)(object)target))
				{
					DamageInfo val = new DamageInfo
					{
						attacker = ((EntityState)this).gameObject,
						crit = false,
						damage = damagePercentage * target.healthComponent.fullCombinedHealth,
						damageColorIndex = (DamageColorIndex)5,
						damageType = (DamageType)2,
						force = Vector3.zero,
						inflictor = ((EntityState)this).gameObject,
						position = ((Component)target).transform.position,
						procChainMask = default(ProcChainMask),
						procCoefficient = 1f
					};
					target.healthComponent.TakeDamage(val);
					EffectManager.SpawnEffect(crushEffectPrefab, new EffectData
					{
						origin = ((Component)target).transform.position,
						scale = 2f
					}, true);
				}
				if (Object.op_Implicit((Object)(object)target))
				{
					Util.PlaySound("sfx_regigigas_crush", ((EntityState)this).gameObject);
				}
			}
		}

		private void Throw()
		{
			//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_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)grabController))
			{
				RegigigasGrabController regigigasGrabController = grabController;
				Ray aimRay = ((BaseState)this).GetAimRay();
				regigigasGrabController.Throw(((Ray)(ref aimRay)).direction * throwForce);
				EntityState.Destroy((Object)(object)grabController);
				grabController = null;
				target = null;
				Util.PlaySound("sfx_regigigas_throw", ((EntityState)this).gameObject);
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			if (Object.op_Implicit((Object)(object)grabController))
			{
				grabController.Release();
				EntityState.Destroy((Object)(object)grabController);
				grabController = null;
				target = null;
			}
		}

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

		public override void OnSerialize(NetworkWriter writer)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			NetworkExtensions.Write(writer, HurtBoxReference.FromHurtBox(target));
			writer.Write(((Component)grabController).gameObject);
		}

		public override void OnDeserialize(NetworkReader reader)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			HurtBoxReference val = NetworkExtensions.ReadHurtBoxReference(reader);
			target = ((HurtBoxReference)(ref val)).ResolveHurtBox();
			grabController = reader.ReadGameObject().GetComponent<RegigigasGrabController>();
		}
	}
	public class IcePunch : PunchCombo
	{
		internal new static float damageCoefficientOverride = 1.4f;

		private GameObject chargeEffectInstance;

		public override void OnEnter()
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: 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_0097: 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_00c3: Unknown result type (might be due to invalid IL or missing references)
			base.OnEnter();
			attack.damage = damageCoefficientOverride * ((BaseState)this).damageStat;
			attack.damageType = (DamageType)256;
			string text = "HandL";
			if (swingIndex == 1)
			{
				text = "HandR";
			}
			chargeEffectInstance = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mage/ChargeMageIceBomb.prefab").WaitForCompletion());
			chargeEffectInstance.transform.parent = ((BaseState)this).FindModelChild(text);
			chargeEffectInstance.transform.localPosition = new Vector3(0f, 0f, 0f);
			chargeEffectInstance.transform.localRotation = Quaternion.identity;
			chargeEffectInstance.transform.localScale = Vector3.one;
		}

		public override void OnExit()
		{
			base.OnExit();
			if (Object.op_Implicit((Object)(object)chargeEffectInstance))
			{
				EntityState.Destroy((Object)(object)chargeEffectInstance);
			}
		}

		protected override void SetNextState()
		{
			int num = swingIndex + 1;
			if (num == 3)
			{
				num = 1;
			}
			((EntityState)this).outer.SetNextState((EntityState)(object)new IcePunch
			{
				swingIndex = num
			});
		}

		protected override void PlaySwingEffect()
		{
			if (Object.op_Implicit((Object)(object)chargeEffectInstance))
			{
				EntityState.Destroy((Object)(object)chargeEffectInstance);
			}
		}

		protected override void OnHitEnemyAuthority()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			base.OnHitEnemyAuthority();
			GameObject punchImpactEffect = Assets.punchImpactEffect;
			HurtBox[] array = hitResults.ToArray();
			for (int i = 0; i < hitResults.Count; i++)
			{
				EffectData val = new EffectData();
				val.scale = 4f;
				if (Object.op_Implicit((Object)(object)array[i]) && Object.op_Implicit((Object)(object)array[i].healthComponent))
				{
					val.origin = ((Component)array[i]).transform.position;
					val.rotation = ((Component)array[i]).transform.rotation;
					EffectManager.SpawnEffect(punchImpactEffect, val, true);
				}
			}
		}
	}
	public class JumpState : BaseState
	{
		private float duration;

		private bool hasInputJump;

		private Animator animator;

		public override void OnEnter()
		{
			//IL_00a0: 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_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			animator = ((EntityState)this).GetModelAnimator();
			if (Object.op_Implicit((Object)(object)animator))
			{
				int layerIndex = animator.GetLayerIndex("Body");
				animator.CrossFadeInFixedTime("AnimatedJump", 0.25f);
				animator.Update(0f);
				AnimatorStateInfo nextAnimatorStateInfo;
				if (!((EntityState)this).characterBody.HasBuff(Buffs.slowStartBuff))
				{
					nextAnimatorStateInfo = animator.GetNextAnimatorStateInfo(layerIndex);
					duration = ((AnimatorStateInfo)(ref nextAnimatorStateInfo)).length * 0.25f;
				}
				else
				{
					nextAnimatorStateInfo = animator.GetNextAnimatorStateInfo(layerIndex);
					duration = ((AnimatorStateInfo)(ref nextAnimatorStateInfo)).length;
				}
			}
			if (!((EntityState)this).characterBody.HasBuff(Buffs.slowStartBuff))
			{
				animator.speed = 4f;
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			if (!((EntityState)this).characterBody.HasBuff(Buffs.slowStartBuff))
			{
				animator.speed = 1f;
			}
		}

		public override void FixedUpdate()
		{
			//IL_006c: 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_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Expected O, but got Unknown
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: 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_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Expected O, but got Unknown
			((EntityState)this).FixedUpdate();
			if (Object.op_Implicit((Object)(object)animator))
			{
				animator.SetBool("isGrounded", false);
			}
			if (((EntityState)this).fixedAge >= duration / 2f && ((EntityState)this).isAuthority && !hasInputJump)
			{
				hasInputJump = true;
				((EntityState)this).characterMotor.moveDirection = ((EntityState)this).inputBank.moveVector;
				int itemCount = ((EntityState)this).characterBody.inventory.GetItemCount(Items.JumpBoost);
				float num = 1f;
				float num2 = 1f;
				bool flag = false;
				if (itemCount > 0 && ((EntityState)this).characterBody.isSprinting)
				{
					float num3 = ((EntityState)this).characterBody.acceleration * ((EntityState)this).characterMotor.airControl;
					if (((EntityState)this).characterBody.moveSpeed > 0f && num3 > 0f)
					{
						flag = true;
						float num4 = Mathf.Sqrt(10f * (float)itemCount / num3);
						float num5 = ((EntityState)this).characterBody.moveSpeed / num3;
						num = (num4 + num5) / num5;
					}
				}
				Util.PlaySound("sfx_regigigas_leap", ((EntityState)this).gameObject);
				EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/ImpactEffects/CharacterLandImpact"), new EffectData
				{
					origin = ((EntityState)this).characterBody.footPosition,
					scale = ((EntityState)this).characterBody.radius
				}, true);
				GenericCharacterMain.ApplyJumpVelocity(((EntityState)this).characterMotor, ((EntityState)this).characterBody, num, num2, false);
				if (flag)
				{
					EffectManager.SpawnEffect(Resources.Load<GameObject>("Prefabs/Effects/BoostJumpEffect"), new EffectData
					{
						origin = ((EntityState)this).characterBody.footPosition,
						rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterMotor.velocity)
					}, true);
				}
				if (!((EntityState)this).characterBody.HasBuff(Buffs.slowStartBuff))
				{
					animator.speed = 1f;
				}
			}
			else if (!hasInputJump)
			{
				((EntityState)this).characterMotor.velocity.y = 0f;
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}
	}
	public class MachPunch : PunchCombo
	{
		internal new static float damageCoefficientOverride = 0.4f;

		private GameObject chargeEffectInstance;

		public override void OnEnter()
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			baseDuration = 0.6f;
			base.OnEnter();
			earlyExitTime = 0.3f / ((BaseState)this).attackSpeedStat;
			attack.damage = damageCoefficientOverride * ((BaseState)this).damageStat;
			attack.damageType = (DamageType)0;
			attack.pushAwayForce = -100f;
		}

		public override void OnExit()
		{
			base.OnExit();
			if (Object.op_Implicit((Object)(object)chargeEffectInstance))
			{
				EntityState.Destroy((Object)(object)chargeEffectInstance);
			}
		}

		protected override void SetNextState()
		{
			int num = swingIndex + 1;
			if (num == 3)
			{
				num = 1;
			}
			((EntityState)this).outer.SetNextState((EntityState)(object)new MachPunch
			{
				swingIndex = num
			});
		}

		protected override void PlaySwingEffect()
		{
			if (Object.op_Implicit((Object)(object)chargeEffectInstance))
			{
				EntityState.Destroy((Object)(object)chargeEffectInstance);
			}
		}

		protected override void OnHitEnemyAuthority()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			base.OnHitEnemyAuthority();
			GameObject punchImpactEffect = Assets.punchImpactEffect;
			HurtBox[] array = hitResults.ToArray();
			for (int i = 0; i < hitResults.Count; i++)
			{
				EffectData val = new EffectData();
				val.scale = 3f;
				if (Object.op_Implicit((Object)(object)array[i]) && Object.op_Implicit((Object)(object)array[i].healthComponent))
				{
					val.origin = ((Component)array[i]).transform.position;
					val.rotation = ((Component)array[i]).transform.rotation;
					EffectManager.SpawnEffect(punchImpactEffect, val, true);
				}
			}
		}
	}
	public class MainState : GenericCharacterMain
	{
		public override void ProcessJump()
		{
			if (base.jumpInputReceived && ((EntityState)this).characterMotor.jumpCount < ((EntityState)this).characterBody.maxJumpCount)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new JumpState());
				CharacterMotor characterMotor = ((EntityState)this).characterMotor;
				characterMotor.jumpCount++;
			}
		}
	}
	public class PunchCombo : BaseMeleeAttack
	{
		internal static float damageCoefficientOverride = 4.2f;

		private bool sprintBuffered;

		public override void OnEnter()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: 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)
			hitboxName = "Punch";
			damageType = (DamageType)32;
			damageCoefficient = damageCoefficientOverride;
			procCoefficient = 1f;
			pushForce = 3500f;
			bonusForce = Vector3.zero;
			attackStartTime = 0.37f;
			attackEndTime = 0.5f;
			baseEarlyExitTime = 0.58f;
			hitStopDuration = 0.18f;
			attackRecoil = 1.5f;
			hitHopVelocity = 8f;
			swingSoundString = "RegigigasPunchSwing";
			hitSoundString = "";
			muzzleString = ((swingIndex % 2 == 0) ? "SwingLeft" : "SwingRight");
			hitEffectPrefab = Resources.Load<GameObject>("Prefabs/Effects/ImpactEffects/PodGroundImpact");
			impactSound = Assets.punchSoundDef.index;
			base.OnEnter();
			PrimarySkillShurikenBehavior component = ((EntityState)this).GetComponent<PrimarySkillShurikenBehavior>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.OnSkillActivated(((EntityState)this).skillLocator.primary);
			}
		}

		protected override void PlayAttackAnimation()
		{
			((EntityState)this).PlayAnimation("Gesture, Override", "Punch" + (1 + swingIndex), "Punch.playbackRate", duration);
		}

		protected override void PlaySwingEffect()
		{
		}

		protected override void SetNextState()
		{
			int num = swingIndex + 1;
			if (num == 3)
			{
				num = 1;
			}
			((EntityState)this).outer.SetNextState((EntityState)(object)new PunchCombo
			{
				swingIndex = num
			});
		}

		public override void FixedUpdate()
		{
			base.FixedUpdate();
			((EntityState)this).characterBody.isSprinting = false;
			if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && ((EntityState)this).inputBank.sprint.down)
			{
				sprintBuffered = true;
			}
		}

		public override void OnExit()
		{
			base.OnExit();
			if ((Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && ((EntityState)this).inputBank.sprint.down) || sprintBuffered)
			{
				((EntityState)this).characterBody.isSprinting = true;
			}
		}
	}
	public class Revenge : BaseRegiSkillState
	{
		public static float baseDuration = 8f;

		private float lastHealth;

		private float storedDamage;

		private float duration;

		private Animator modelAnimator;

		private GameObject chargeEffectInstance;

		private Transform areaIndicator;

		private CameraParamsOverrideHandle camParamsOverrideHandle;

		public override void OnEnter()
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			base.OnEnter();
			duration = baseDuration;
			lastHealth = ((EntityState)this).healthComponent.combinedHealth;
			modelAnimator = ((EntityState)this).GetModelAnimator();
			camParamsOverrideHandle = CameraParams.OverrideCameraParams(((EntityState)this).cameraTargetParams, RegigigasCameraParams.CHARGE);
			((EntityState)this).PlayAnimation("FullBody, Override", "RevengeEntry", "Revenge.playbackRate", duration * 0.1f);
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddBuff(Buffs.armorBuff);
			}
			Transform modelTransform = ((EntityState)this).GetModelTransform();
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				TemporaryOverlay val = ((Component)modelTransform).gameObject.AddComponent<TemporaryOverlay>();
				val.duration = duration;
				val.animateShaderAlpha = true;
				val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
				val.destroyComponentOnEnd = true;
				val.originalMaterial = Resources.Load<Material>("Materials/matDoppelganger");
				val.AddToCharacerModel(((Component)modelTransform).GetComponent<CharacterModel>());
			}
			if (Object.op_Implicit((Object)(object)modelAnimator))
			{
				modelAnimator.SetFloat(AnimationParameters.aimWeight, 0f);
			}
			chargeEffectInstance = Object.Instantiate<GameObject>(new BlinkState().blinkDestinationPrefab, ((EntityState)this).gameObject.transform);
			chargeEffectInstance.transform.position = ((EntityState)this).characterBody.corePosition;
			chargeEffectInstance.GetComponent<ScaleParticleSystemDuration>().newDuration = duration;
			areaIndicator = chargeEffectInstance.transform.Find("Particles").Find("AreaIndicator");
			chargeEffectInstance.GetComponentInChildren<PostProcessDuration>().maxDuration = duration;
		}

		private void UpdateRadius()
		{
			//IL_0035: 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)
			float num = storedDamage / ((EntityState)this).healthComponent.fullCombinedHealth;
			float num2 = Util.Remap(num, 0f, 1f, RevengeEnd.minRadius, RevengeEnd.maxRadius);
			areaIndicator.localScale = Vector3.one * num2;
		}

		public override void FixedUpdate()
		{
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Invalid comparison between Unknown and I4
			base.FixedUpdate();
			float num = lastHealth - ((EntityState)this).healthComponent.combinedHealth;
			if (num > 0f)
			{
				storedDamage += num;
			}
			lastHealth = ((EntityState)this).healthComponent.combinedHealth;
			if (Object.op_Implicit((Object)(object)areaIndicator))
			{
				UpdateRadius();
			}
			if (((EntityState)this).isAuthority)
			{
				if (((EntityState)this).fixedAge >= duration)
				{
					NextState();
				}
				if ((int)((BaseState)this).GetTeam() == 1 && ((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge >= 0.5f)
				{
					NextState();
				}
			}
		}

		private void NextState()
		{
			((EntityState)this).outer.SetNextState((EntityState)(object)new RevengeEnd
			{
				storedDamage = 3f * storedDamage
			});
		}

		public override void OnExit()
		{
			//IL_000f: 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)
			((EntityState)this).OnExit();
			((EntityState)this).cameraTargetParams.RemoveParamsOverride(camParamsOverrideHandle, 0.5f);
			if (Object.op_Implicit((Object)(object)chargeEffectInstance))
			{
				EntityState.Destroy((Object)(object)chargeEffectInstance);
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)4;
		}
	}
	public class RevengeEnd : BaseRegiSkillState
	{
		public static float baseDuration = 5f;

		public float storedDamage;

		public static float maxDamagePercentage = 0.3f;

		public static float minDamagePercentage = 0f;

		public static float maxRadius = 120f;

		public static float minRadius = 32f;

		private float shockwaveRadius;

		private float shockwaveTime;

		private bool hasFired;

		private float duration;

		private GameObject chargeEffectInstance;

		private uint soundID;

		private Animator modelAnimator;

		private CameraParamsOverrideHandle camParamsOverrideHandle;

		public override void OnEnter()
		{
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: 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_0137: Unknown result type (might be due to invalid IL or missing references)
			base.OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			shockwaveTime = 0.3f * duration;
			hasFired = false;
			modelAnimator = ((EntityState)this).GetModelAnimator();
			camParamsOverrideHandle = CameraParams.OverrideCameraParams(((EntityState)this).cameraTargetParams, RegigigasCameraParams.CHARGE);
			float num = storedDamage / ((EntityState)this).healthComponent.fullCombinedHealth;
			shockwaveRadius = Util.Remap(num, 0f, 1f, minRadius, maxRadius);
			((EntityState)this).PlayAnimation("FullBody, Override", "RevengeEnd", "Revenge.playbackRate", duration);
			soundID = Util.PlayAttackSpeedSound("sfx_regigigas_burst_pre", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat);
			ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator();
			if (Object.op_Implicit((Object)(object)modelChildLocator))
			{
				Transform val = modelChildLocator.FindChild("Chest");
				if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)ChargeMegaNova.chargingEffectPrefab))
				{
					chargeEffectInstance = Object.Instantiate<GameObject>(ChargeMegaNova.chargingEffectPrefab, val.position, val.rotation);
					chargeEffectInstance.transform.localScale = new Vector3(shockwaveRadius, shockwaveRadius, shockwaveRadius);
					chargeEffectInstance.transform.parent = val;
					chargeEffectInstance.GetComponent<ScaleParticleSystemDuration>().newDuration = 0.3f * duration;
				}
			}
			flashController.Flash();
		}

		public override void FixedUpdate()
		{
			base.FixedUpdate();
			if (((EntityState)this).fixedAge >= shockwaveTime)
			{
				FireShockwave();
			}
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private void FireShockwave()
		{
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: 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_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_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: 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_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: 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_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: 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_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			if (!hasFired)
			{
				hasFired = true;
				if (NetworkServer.active)
				{
					((EntityState)this).characterBody.RemoveBuff(Buffs.armorBuff);
				}
				AkSoundEngine.StopPlayingID(soundID);
				Vector3 position = ((EntityState)this).transform.position;
				Util.PlaySound("sfx_regigigas_burst", ((EntityState)this).gameObject);
				Util.PlaySound("UNUNUN", ((EntityState)this).gameObject);
				if (Object.op_Implicit((Object)(object)FireMegaNova.novaEffectPrefab))
				{
					EffectManager.SimpleMuzzleFlash(FireMegaNova.novaEffectPrefab, ((EntityState)this).gameObject, "Chest", false);
				}
				Transform modelTransform = ((EntityState)this).GetModelTransform();
				if (Object.op_Implicit((Object)(object)modelTransform))
				{
					TemporaryOverlay val = ((Component)modelTransform).gameObject.AddComponent<TemporaryOverlay>();
					val.duration = 3f;
					val.animateShaderAlpha = true;
					val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
					val.destroyComponentOnEnd = true;
					val.originalMaterial = Resources.Load<Material>("Materials/matVagrantEnergized");
					val.AddToCharacerModel(((Component)modelTransform).GetComponent<CharacterModel>());
				}
				if (((EntityState)this).isAuthority)
				{
					new BlastAttack
					{
						attacker = ((EntityState)this).gameObject,
						baseDamage = storedDamage,
						baseForce = FireMegaNova.novaForce,
						bonusForce = Vector3.zero,
						attackerFiltering = (AttackerFiltering)2,
						crit = ((BaseState)this).RollCrit(),
						damageColorIndex = (DamageColorIndex)0,
						damageType = (DamageType)0,
						falloffModel = (FalloffModel)0,
						inflictor = ((EntityState)this).gameObject,
						position = position,
						procChainMask = default(ProcChainMask),
						procCoefficient = 1f,
						radius = shockwaveRadius,
						losType = (LoSType)1,
						teamIndex = ((EntityState)this).teamComponent.teamIndex,
						impactEffect = EffectCatalog.FindEffectIndexFromPrefab(FireMegaNova.novaImpactEffectPrefab)
					}.Fire();
				}
			}
		}

		public override void OnExit()
		{
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).OnExit();
			if (Object.op_Implicit((Object)(object)modelAnimator))
			{
				modelAnimator.SetFloat(AnimationParameters.aimWeight, 1f);
			}
			if (Object.op_Implicit((Object)(object)chargeEffectInstance))
			{
				EntityState.Destroy((Object)(object)chargeEffectInstance);
			}
			((EntityState)this).cameraTargetParams.RemoveParamsOverride(camParamsOverrideHandle, 0.2f);
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)4;
		}
	}
	public class SpawnState : BaseState
	{
		public static float minimumSleepDuration = 0.5f;

		private Animator modelAnimator;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			modelAnimator = ((EntityState)this).GetModelAnimator();
			if (Object.op_Implicit((Object)(object)modelAnimator))
			{
				modelAnimator.SetFloat(AnimationParameters.aimWeight, 0f);
			}
			((EntityState)this).PlayAnimation("Body", "Inactive");
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= minimumSleepDuration && (((Vector3)(ref ((EntityState)this).inputBank.moveVector)).sqrMagnitude >= Mathf.Epsilon || ((EntityState)this).inputBank.CheckAnyButtonDown()))
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new WakeUp());
			}
		}

		public override void OnExit()
		{
			if (Object.op_Implicit((Object)(object)modelAnimator))
			{
				modelAnimator.SetFloat(AnimationParameters.aimWeight, 1f);
			}
			((EntityState)this).OnExit();
		}
	}
	public class Stomp : BaseRegiSkillState
	{
		public static float baseDuration = 4f;

		public static float damageCoefficient = 4f;

		private float stompTime;

		private bool hasStomped;

		private float duration;

		private float flashTime;

		private bool hasFlashed;

		public override void OnEnter()
		{
			base.OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			stompTime = 0.55f * duration;
			flashTime = 0.4f * duration;
			hasStomped = false;
			hasFlashed = false;
			((EntityState)this).PlayAnimation("FullBody, Override", "Stomp", "Stomp.playbackRate", duration);
		}

		public override void FixedUpdate()
		{
			base.FixedUpdate();
			if (((EntityState)this).fixedAge >= flashTime && !hasFlashed)
			{
				hasFlashed = true;
				flashController.Flash();
			}
			if (((EntityState)this).fixedAge >= stompTime && !hasStomped)
			{
				PerformStomp();
			}
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private void PerformStomp()
		{
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00d1: 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_00d5: Unknown result type (might be due to invalid IL or missing references)
			hasStomped = true;
			Util.PlaySound("RegigigasStomp", ((EntityState)this).gameObject);
			Util.PlaySound("Play_parent_attack1_slam", ((EntityState)this).gameObject);
			EffectManager.SimpleMuzzleFlash(Resources.Load<GameObject>("Prefabs/Effects/ImpactEffects/PodGroundImpact"), ((EntityState)this).gameObject, "FootR", false);
			if (((EntityState)this).isAuthority)
			{
				float num = 1.5f * (float)UltChannelState.waveProjectileCount;
				if (Config.nerfedEarthPower)
				{
					num = 5f;
				}
				float num2 = 360f / num;
				Vector3 val = Vector3.ProjectOnPlane(Random.onUnitSphere, Vector3.up);
				Vector3 normalized = ((Vector3)(ref val)).normalized;
				Vector3 position = ((BaseState)this).FindModelChild("FootR").position;
				GameObject earthPowerWave = Projectiles.earthPowerWave;
				for (int i = 0; (float)i < num; i++)
				{
					Vector3 val2 = Quaternion.AngleAxis(num2 * (float)i, Vector3.up) * normalized;
					ProjectileManager.instance.FireProjectile(earthPowerWave, position, Util.QuaternionSafeLookRotation(val2), ((EntityState)this).gameObject, ((EntityState)this).characterBody.damage * damageCoefficient, UltChannelState.waveProjectileForce, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f);
				}
			}
		}

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}
	}
	internal class WakeUp : BaseRegiSkillState
	{
		public static float duration = 8f;

		public static float delayBeforeAimAnimatorWeight = 6.5f;

		private float cryTime;

		private bool hasCried;

		private Animator modelAnimator;

		public override void OnEnter()
		{
			base.OnEnter();
			modelAnimator = ((EntityState)this).GetModelAnimator();
			cryTime = duration * 0.65f;
			hasCried = false;
			if (Object.op_Implicit((Object)(object)modelAnimator))
			{
				modelAnimator.SetFloat(AnimationParameters.aimWeight, 0f);
			}
			((EntityState)this).PlayAnimation("Body", "Spawn");
			Util.PlaySound("RegigigasSpawn", ((EntityState)this).gameObject);
			flashController.Flash();
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddTimedBuff(Buffs.armorBuff, duration);
			}
		}

		public override void Update()
		{
			((EntityState)this).Update();
			if (Object.op_Implicit((Object)(object)modelAnimator))
			{
				modelAnimator.SetFloat(AnimationParameters.aimWeight, Mathf.Clamp01((((EntityState)this).age - delayBeforeAimAnimatorWeight) / duration));
			}
		}

		public override void FixedUpdate()
		{
			base.FixedUpdate();
			if (((EntityState)this).fixedAge >= cryTime && !hasCried)
			{
				hasCried = true;
				string text = "RegigigasCry";
				if (Config.loreFriendly || ((EntityState)this).characterBody.skinIndex > 1)
				{
					text = "sfx_regigigas_altcry";
				}
				Util.PlaySound(text, ((EntityState)this).gameObject);
			}
			if (((EntityState)this).fixedAge >= duration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			if (Object.op_Implicit((Object)(object)modelAnimator))
			{
				modelAnimator.SetFloat(AnimationParameters.aimWeight, 1f);
			}
			((EntityState)this).OnExit();
		}
	}
}
namespace RegigigasMod.SkillStates.Regigigas.HyperBeam
{
	public class ChargeBeam : BaseState
	{
		public static float baseDuration = 4f;

		private float duration;

		private GameObject chargeInstance;

		public override void OnEnter()
		{
			//IL_007f: 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)
			((BaseState)this).OnEnter();
			duration = baseDuration / base.attackSpeedStat;
			Animator modelAnimator = ((EntityState)this).GetModelAnimator();
			Transform modelTransform = ((EntityState)this).GetModelTransform();
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				ChildLocator component = ((Component)modelTransform).GetComponent<ChildLocator>();
				if (Object.op_Implicit((Object)(object)component))
				{
					Transform val = component.FindChild("Head");
					if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)ChargeMegaFireball.chargeEffectPrefab))
					{
						chargeInstance = Object.Instantiate<GameObject>(ChargeMegaFireball.chargeEffectPrefab, val.position, val.rotation);
						chargeInstance.transform.parent = val;
						ScaleParticleSystemDuration component2 = chargeInstance.GetComponent<ScaleParticleSystemDuration>();
						if (Object.op_Implicit((Object)(object)component2))
						{
							component2.newDuration = duration;
						}
					}
				}
			}
			if (Object.op_Implicit((Object)(object)modelAnimator))
			{
				((EntityState)this).PlayCrossfade("Gesture, Additive", "ChargeMegaFireball", "ChargeMegaFireball.playbackRate", duration, 0.1f);
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			if (Object.op_Implicit((Object)(object)chargeInstance))
			{
				EntityState.Destroy((Object)(object)chargeInstance);
			}
		}

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

		public override void FixedUpdate()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Expected O, but got Unknown
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				FireMegaFireball nextState = new FireMegaFireball();
				((EntityState)this).outer.SetNextState((EntityState)(object)nextState);
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)1;
		}
	}
	public class FireBeam : BaseState
	{
		public static float baseDuration = 1f;

		private float duration;

		private GameObject chargeInstance;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			duration = baseDuration / base.attackSpeedStat;
		}

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

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

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)1;
		}
	}
}
namespace RegigigasMod.SkillStates.Regigigas.GigaImpact
{
	public class Channel : BaseSkillState
	{
		public float baseDuration = 1.9f;

		private float duration;

		private GameObject chargeEffectInstance;

		private uint prepPlayId;

		public override void OnEnter()
		{
			//IL_00d2: 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_0120: 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_014c: 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)
			((BaseState)this).OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			((EntityState)this).PlayAnimation("FullBody, Override", "RevengeEntry", "Revenge.playbackRate", duration);
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddBuff(Buffs.armorBuff);
			}
			Transform modelTransform = ((EntityState)this).GetModelTransform();
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				TemporaryOverlay val = ((Component)modelTransform).gameObject.AddComponent<TemporaryOverlay>();
				val.duration = duration * 0.5f;
				val.animateShaderAlpha = true;
				val.alphaCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f);
				val.destroyComponentOnEnd = true;
				val.originalMaterial = Resources.Load<Material>("Materials/matOnFire");
				val.AddToCharacerModel(((Component)modelTransform).GetComponent<CharacterModel>());
			}
			chargeEffectInstance = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Grandparent/ChargeGrandParentSunHands.prefab").WaitForCompletion());
			chargeEffectInstance.transform.parent = ((BaseState)this).FindModelChild("Chest");
			chargeEffectInstance.transform.localPosition = new Vector3(0f, 0f, 0f);
			chargeEffectInstance.transform.localRotation = Quaternion.identity;
			chargeEffectInstance.transform.localScale = Vector3.one * 2f;
			chargeEffectInstance.GetComponentInChildren<ObjectScaleCurve>().timeMax = duration * 0.5f;
			prepPlayId = Util.PlaySound("sfx_regigigas_flame_prep", ((EntityState)this).gameObject);
		}

		public override void FixedUpdate()
		{
			//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_002b: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			((EntityState)this).characterBody.isSprinting = false;
			CharacterMotor characterMotor = ((EntityState)this).characterMotor;
			characterMotor.velocity *= 0.25f;
			if (((EntityState)this).characterMotor.velocity.y <= 0f)
			{
				((EntityState)this).characterMotor.velocity.y = 0f;
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new Fire());
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			AkSoundEngine.StopPlayingID(prepPlayId);
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.RemoveBuff(Buffs.armorBuff);
			}
			if (Object.op_Implicit((Object)(object)chargeEffectInstance))
			{
				EntityState.Destroy((Object)(object)chargeEffectInstance);
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)6;
		}
	}
	public class Fire : BaseRegiSkillState
	{
		public float duration = 1.75f;

		private float speedCoefficient = 0.25f;

		private float baseSpeed = 38f;

		private CharacterModel characterModel;

		private Transform modelTransform;

		private float originalHeight;

		private float originalRadius;

		private GameObject effectInstance;

		private BlastAttack rushBlastAttack;

		private CapsuleCollider capsuleCollider;

		private uint rushPlayID;

		private CameraParamsOverrideHandle camParamsOverrideHandle;

		public override void OnEnter()
		{
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: 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_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Expected O, but got Unknown
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0210: Unknown result type (might be due to invalid IL or missing references)
			//IL_021c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: Unknown result type (might be due to invalid IL or missing references)
			//IL_022d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0233: Expected O, but got Unknown
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0251: Unknown result type (might be due to invalid IL or missing references)
			//IL_0256: Unknown result type (might be due to invalid IL or missing references)
			//IL_026b: 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)
			base.OnEnter();
			modelTransform = ((EntityState)this).GetModelTransform();
			capsuleCollider = ((EntityState)this).characterMotor.capsuleCollider;
			characterModel = ((Component)((EntityState)this).modelLocator.modelTransform).GetComponent<CharacterModel>();
			CharacterModel obj = characterModel;
			obj.invisibilityCount++;
			camParamsOverrideHandle = CameraParams.OverrideCameraParams(((EntityState)this).cameraTargetParams, RegigigasCameraParams.EMOTE);
			Util.PlaySound("sfx_regigigas_flame_rush", ((EntityState)this).gameObject);
			rushPlayID = Util.PlaySound("sfx_regigigas_flame_loop", ((EntityState)this).gameObject);
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility);
			}
			originalHeight = capsuleCollider.height;
			originalRadius = capsuleCollider.radius;
			capsuleCollider.height = 0.1f;
			capsuleCollider.radius = 0.1f;
			((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal;
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground();
			((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
			effectInstance = Object.Instantiate<GameObject>(Assets.gigaImpactRushEffect);
			effectInstance.transform.parent = ((BaseState)this).FindModelChild("Chest");
			effectInstance.transform.localPosition = Vector3.zero;
			effectInstance.transform.localRotation = Quaternion.identity;
			rushBlastAttack = new BlastAttack();
			rushBlastAttack.attacker = ((EntityState)this).gameObject;
			rushBlastAttack.inflictor = ((EntityState)this).gameObject;
			rushBlastAttack.teamIndex = ((BaseState)this).GetTeam();
			rushBlastAttack.procCoefficient = 0f;
			rushBlastAttack.radius = 48f;
			rushBlastAttack.baseForce = -200f;
			rushBlastAttack.baseDamage = 0f;
			rushBlastAttack.falloffModel = (FalloffModel)0;
			rushBlastAttack.damageColorIndex = (DamageColorIndex)0;
			rushBlastAttack.attackerFiltering = (AttackerFiltering)2;
			EffectData val = new EffectData();
			val.origin = ((EntityState)this).characterBody.footPosition;
			val.rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterDirection.forward);
			val.scale = 8f;
			EffectManager.SpawnEffect(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Grandparent/GrandparentSpawnImpact.prefab").WaitForCompletion(), val, false);
		}

		public override void FixedUpdate()
		{
			//IL_0036: Unknown result type (might be du