Decompiled source of Ganondorf Mod v3.1.6

GanondorfMod.dll

Decompiled a month 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.Versioning;
using System.Security;
using System.Security.Permissions;
using AncientScepter;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using EmotesAPI;
using EntityStates;
using EntityStates.Commando;
using EntityStates.Huntress;
using EntityStates.LemurianBruiserMonster;
using GanondorfMod.Modules;
using GanondorfMod.Modules.Achievements;
using GanondorfMod.Modules.Networking;
using GanondorfMod.Modules.Survivors;
using GanondorfMod.SkillStates;
using GanondorfMod.SkillStates.BaseStates;
using GanondorfMod.SkillStates.Ganondorf;
using KinematicCharacterController;
using On.RoR2;
using R2API;
using R2API.Networking;
using R2API.Networking.Interfaces;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.ContentManagement;
using RoR2.Projectile;
using RoR2.Skills;
using TILER2;
using ThinkInvisible.ClassicItems;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("GanondorfMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+613ff59419d4a7d677118812d9e35d6be4b111f9")]
[assembly: AssemblyProduct("GanondorfMod")]
[assembly: AssemblyTitle("GanondorfMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
internal class BodyInfo
{
	internal string bodyName = "";

	internal string bodyNameToken = "";

	internal string subtitleNameToken = "";

	internal string bodyNameToClone = "Commando";

	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 damageGrowth = 2.4f;

	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 Color bodyColor = Color.grey;

	internal Vector3 aimOriginPosition = new Vector3(0f, 1.8f, 0f);

	internal Vector3 modelBasePosition = new Vector3(0f, -0.92f, 0f);

	internal Vector3 cameraPivotPosition = new Vector3(0f, 1.6f, 0f);
}
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 Sprite skillIcon;

	public SerializableEntityStateType activationState;

	public string activationStateMachineName;

	public int baseMaxStock;

	public float baseRechargeInterval;

	public bool beginSkillCooldownOnSkillEnd;

	public bool canceledFromSprinting;

	public bool forceSprintDuringState;

	public bool fullRestockOnAssign;

	public InterruptPriority interruptPriority;

	public bool resetCooldownTimerOnUse;

	public bool isCombatSkill;

	public bool mustKeyPress;

	public bool cancelSprintingOnActivation;

	public int rechargeStock;

	public int requiredStock;

	public int stockToConsume;

	public string[] keywordTokens;
}
namespace GanondorfMod
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.Ethanol10.Ganondorf", "Ganondorf", "3.1.4")]
	public class GanondorfPlugin : BaseUnityPlugin
	{
		public const string MODUID = "com.Ethanol10.Ganondorf";

		public const string MODNAME = "Ganondorf";

		public const string MODVERSION = "3.1.4";

		public static TriforceBuffComponent triforceBuff;

		public static GanondorfController ganondorfController;

		public static bool fallbackScepter;

		public static bool scepterInstalled;

		public const string developerPrefix = "ETHA10";

		internal List<SurvivorBase> Survivors = new List<SurvivorBase>();

		public static GanondorfPlugin instance;

		private void Awake()
		{
			instance = this;
			instance = this;
			triforceBuff = null;
			if (Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"))
			{
				scepterInstalled = true;
			}
			else if (Chainloader.PluginInfos.ContainsKey("com.ThinkInvisible.ClassicItems"))
			{
				fallbackScepter = true;
			}
			Config.ReadConfig();
			Assets.Initialize();
			if (Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"))
			{
				Config.SetupRiskOfOptions();
			}
			States.RegisterStates();
			Buffs.RegisterBuffs();
			Projectiles.RegisterProjectiles();
			Tokens.AddTokens();
			ItemDisplays.PopulateDisplays();
			new Ganondorf().Initialize();
			new ContentPacks().Initialize();
			RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(LateSetup));
			Hook();
			SetupNetworkMessages();
		}

		private void LateSetup()
		{
			SurvivorBase.instance.SetItemDisplays();
		}

		private void SetupNetworkMessages()
		{
			NetworkingAPI.RegisterMessageType<FullyChargedSwordNetworkRequest>();
			NetworkingAPI.RegisterMessageType<ChargingSwordNetworkRequest>();
			NetworkingAPI.RegisterMessageType<SwordBeamRegenerateStocksNetworkRequest>();
		}

		private void Hook()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Expected O, but got Unknown
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Expected O, but got Unknown
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Expected O, but got Unknown
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Expected O, but got Unknown
			CharacterModel.Awake += new hook_Awake(CharacterModel_Awake);
			CharacterModel.Start += new hook_Start(CharacterModel_Start);
			CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats);
			CharacterBody.OnDeathStart += new hook_OnDeathStart(CharacterBody_OnDeathStart);
			CharacterBody.FixedUpdate += new hook_FixedUpdate(CharacterBody_FixedUpdate);
			GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(GlobalEventManager_OnCharacterDeath);
			GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy);
			CharacterModel.UpdateOverlays += new hook_UpdateOverlays(CharacterModel_UpdateOverlays);
			HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
			if (Chainloader.PluginInfos.ContainsKey("com.weliveinasociety.CustomEmotesAPI"))
			{
				SurvivorCatalog.Init += new hook_Init(SurvivorCatalog_Init);
			}
		}

		private void SurvivorCatalog_Init(orig_Init orig)
		{
			orig.Invoke();
			foreach (SurvivorDef allSurvivorDef in SurvivorCatalog.allSurvivorDefs)
			{
				if (((Object)allSurvivorDef.bodyPrefab).name == "GanondorfBody")
				{
					CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, Assets.mainAssetBundle.LoadAsset<GameObject>("humanoidGanondorf"), 0, true);
				}
			}
		}

		private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo info)
		{
			orig.Invoke(self, info);
			if (Object.op_Implicit((Object)(object)info.attacker) && Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.body) && self.body.HasBuff(Buffs.damageAbsorberBuff))
			{
				self.body.AddBuff(Buffs.damageAbsorberBuff);
			}
		}

		private void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim)
		{
			orig.Invoke(self, damageInfo, victim);
			if ((Object)(object)damageInfo.attacker != (Object)null && damageInfo != null && ((Object)damageInfo.attacker).name.Contains("GanondorfBody"))
			{
				GanondorfController component = damageInfo.attacker.GetComponent<GanondorfController>();
				if (Object.op_Implicit((Object)(object)component))
				{
					component.SetMaxDamage(damageInfo.damage);
				}
			}
		}

		private void GlobalEventManager_OnCharacterDeath(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport)
		{
			orig.Invoke(self, damageReport);
			if ((Object)(object)damageReport.attackerBody != (Object)null && (Object)(object)damageReport.attacker != (Object)null && damageReport != null && damageReport.attackerBody.baseNameToken == "ETHA10_GANONDORF_BODY_NAME")
			{
				int num = 0;
				if (damageReport.victimIsBoss)
				{
					num += 10;
				}
				if (damageReport.victimIsChampion)
				{
					num += 15;
				}
				if (damageReport.victimIsElite)
				{
					num += 5;
				}
				if (!damageReport.victimIsBoss && !damageReport.victimIsElite && !damageReport.victimIsChampion)
				{
					num++;
				}
				damageReport.attacker.GetComponent<TriforceBuffComponent>().AddToBuffCount(num);
			}
		}

		private void CharacterBody_FixedUpdate(orig_FixedUpdate orig, CharacterBody self)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if (self.baseNameToken == "ETHA10_GANONDORF_BODY_NAME")
			{
				self.SetBuffCount(Buffs.triforceBuff.buffIndex, ((Component)self).GetComponent<TriforceBuffComponent>().GetTrueBuffCount());
			}
		}

		private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)self))
			{
				if (self.HasBuff(Buffs.armorBuff))
				{
					self.armor += 300f;
				}
				if (self.HasBuff(Buffs.triforceBuff))
				{
					TriforceBuffComponent component = ((Component)self).GetComponent<TriforceBuffComponent>();
					self.armor += (float)component.GetBuffCount() * 0.4f;
					self.damage += (float)component.GetBuffCount() * 0.45f;
				}
				if (self.HasBuff(Buffs.damageAbsorberBuff))
				{
					self.armor += (float)self.GetBuffCount(Buffs.damageAbsorberBuff) * 4f;
				}
			}
		}

		private void CharacterBody_OnDeathStart(orig_OnDeathStart orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (self.baseNameToken == "ETHA10_GANONDORF_BODY_NAME")
			{
				Util.PlaySound("ganonDying", ((Component)self).gameObject);
			}
		}

		private void CharacterModel_Awake(orig_Awake orig, CharacterModel self)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Expected O, but got Unknown
			orig.Invoke(self);
			if (((Object)((Component)self).gameObject).name.Contains("GanondorfDisplay"))
			{
				GameObject val = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/NullifierSpawnEffect");
				Vector3 position = ((Component)self).gameObject.transform.position;
				Quaternion rotation = ((Component)self).gameObject.transform.rotation;
				rotation = Quaternion.Euler(0f, 90f, 0f);
				position.x += 1.5f;
				position.z -= 1.5f;
				EffectData val2 = new EffectData
				{
					origin = position,
					rotation = rotation
				};
				EffectManager.SpawnEffect(val, val2, false);
				Util.PlaySound("spawnVoice", ((Component)self).gameObject);
				Util.PlaySound("Spawning", ((Component)self).gameObject);
			}
		}

		private void CharacterModel_Start(orig_Start orig, CharacterModel self)
		{
			orig.Invoke(self);
			if (!((Object)((Component)self).gameObject).name.Contains("GanondorfDisplay"))
			{
				return;
			}
			GanondorfDisplaySwordController component = ((Component)self).gameObject.GetComponent<GanondorfDisplaySwordController>();
			if (!Object.op_Implicit((Object)(object)component))
			{
				ChildLocator component2 = ((Component)self).gameObject.GetComponent<ChildLocator>();
				if (Object.op_Implicit((Object)(object)component2))
				{
					Transform meshLoc = component2.FindChild("SwordMeshContainer");
					Transform handLoc = component2.FindChild("SwordHandLLoc");
					Transform val = component2.FindChild("SwordBustLoc");
					component = ((Component)self).gameObject.AddComponent<GanondorfDisplaySwordController>();
					component.handLoc = handLoc;
					component.meshLoc = meshLoc;
					component.bustLoc = val;
					component.targetTrans = val;
				}
			}
		}

		private void CharacterModel_UpdateOverlays(orig_UpdateOverlays orig, CharacterModel self)
		{
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.body))
			{
				GanondorfController component = ((Component)self.body).GetComponent<GanondorfController>();
				if (Object.op_Implicit((Object)(object)component))
				{
					LiterallyGarbageOverlayFunction(Assets.chargingMat, component.chargingSword, self);
					LiterallyGarbageOverlayFunction(Assets.fullyChargedMat, component.swordFullyCharged, self);
				}
			}
		}

		private void LiterallyGarbageOverlayFunction(Material overlayMaterial, bool condition, CharacterModel model)
		{
			if (model.activeOverlayCount < CharacterModel.maxOverlays && condition)
			{
				Material[] currentOverlays = model.currentOverlays;
				int activeOverlayCount = model.activeOverlayCount;
				model.activeOverlayCount = activeOverlayCount + 1;
				currentOverlays[activeOverlayCount] = overlayMaterial;
			}
		}
	}
}
namespace GanondorfMod.SkillStates
{
	public class DarkDive : BaseSkillState
	{
		private enum DarkDiveState : ushort
		{
			START = 1,
			JUMP,
			EXPLODE,
			FORCEBACK,
			FASTFALL,
			END
		}

		private float stopwatch;

		private Animator anim;

		private DarkDiveState state;

		private bool fastFalltrigger;

		private float waitVal = 0.375f;

		private float jumpDuration = 1f;

		private float forcebackDuration = 1f;

		private float grabDuration = 0.3f;

		private Vector3 jumpVector;

		public static float initialSpeedCoefficient = 4f;

		public static float finalSpeedCoefficient = 0.2f;

		private List<GrabController> grabController;

		private GanondorfController ganonController;

		private float blastInterval;

		private float damperVal = 0.7f;

		private int noOfBlasts;

		private int blastsDone;

		private bool isExploded;

		private bool isBoosted;

		private bool isSecondary;

		private float damage;

		private float miniDamage;

		private TriforceBuffComponent triforceComponent;

		private bool grabFailed;

		private float buttonHeldDownTimer;

		private Vector3 aimRayDir;

		private float grabSpeed;

		private float dropForce = 50f;

		private float aerialAttackStart = 0.4f;

		private float aerialAttackEnd = 0.5f;

		private float aerialLetGo = 0.5f;

		private float groundedAttackStart = 0.4f;

		private float groundedAttackEnd = 0.5f;

		private float groundedLetGo = 0.6f;

		private BlastAttack attack;

		private BlastAttack miniBlast;

		private float grabRadius;

		private float invincibilityWindow = 1.5f;

		private bool playedGrabSound = false;

		private bool hasFired = false;

		public static float dodgeFOV = DodgeState.dodgeFOV;

		public static float grabEndExplosionRadius = 10f;

		public static float slamForce = 5000f;

		public override void OnEnter()
		{
			//IL_007f: 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_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_020a: Expected O, but got Unknown
			//IL_0212: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_0245: Unknown result type (might be due to invalid IL or missing references)
			//IL_029d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a7: Expected O, but got Unknown
			//IL_02af: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_030e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0313: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			initialSpeedCoefficient = 3.2f;
			grabRadius = 8f;
			buttonHeldDownTimer = 0f;
			state = DarkDiveState.START;
			anim = ((EntityState)this).GetModelAnimator();
			stopwatch = 0f;
			blastsDone = 0;
			grabController = new List<GrabController>();
			hasFired = false;
			isExploded = false;
			ganonController = ((EntityState)this).GetComponent<GanondorfController>();
			triforceComponent = ((EntityState)this).GetComponent<TriforceBuffComponent>();
			jumpVector = Vector3.up;
			anim.SetBool("enemyCaught", false);
			grabFailed = false;
			fastFalltrigger = false;
			blastInterval = 0.1f;
			noOfBlasts = 5 + (int)(((BaseState)this).attackSpeedStat / 2f);
			((EntityState)this).PlayAnimation("FullBody, Override", "UpBStart", "flameChoke.playbackRate", jumpDuration);
			grabSpeed = ((BaseState)this).moveSpeedStat * LerpSpeedCoefficient();
			Util.PlaySound("darkDive1", ((EntityState)this).gameObject);
			Util.PlaySound("grabStartSFX", ((EntityState)this).gameObject);
			if (((EntityState)this).inputBank.skill2.down)
			{
				isBoosted = false;
				isSecondary = true;
				damage = 4.5f * ((BaseState)this).damageStat;
				miniDamage = 6.5f * ((BaseState)this).damageStat * 0.1f;
				initialSpeedCoefficient = 3f;
			}
			else if (((EntityState)this).inputBank.skill3.down)
			{
				float num = 1f;
				if (triforceComponent.GetBuffCount() >= 30)
				{
					num = 3f;
					isBoosted = true;
					ganonController.BodyLightning.Play();
				}
				damage = 6.5f * ((BaseState)this).damageStat * num;
				miniDamage = 6.5f * ((BaseState)this).damageStat * 0.2f;
				initialSpeedCoefficient = 4f;
			}
			miniBlast = new BlastAttack();
			miniBlast.damageType = (DamageType)32;
			miniBlast.attacker = ((EntityState)this).gameObject;
			miniBlast.inflictor = ((EntityState)this).gameObject;
			miniBlast.teamIndex = ((BaseState)this).GetTeam();
			miniBlast.baseDamage = miniDamage;
			miniBlast.procCoefficient = 1f;
			miniBlast.baseForce = 500f;
			miniBlast.radius = grabEndExplosionRadius;
			miniBlast.crit = ((BaseState)this).RollCrit();
			attack = new BlastAttack();
			attack.damageType = (DamageType)32;
			attack.attacker = ((EntityState)this).gameObject;
			attack.inflictor = ((EntityState)this).gameObject;
			attack.teamIndex = ((BaseState)this).GetTeam();
			attack.baseDamage = damage;
			attack.procCoefficient = 1f;
			attack.bonusForce = Vector3.up;
			attack.baseForce = 500f;
			attack.radius = grabEndExplosionRadius;
			attack.crit = ((BaseState)this).RollCrit();
			ganonController.HandRSpeedLines.Play();
			ganonController.SwapToFist();
		}

		public override void FixedUpdate()
		{
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0414: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02da: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0261: Unknown result type (might be due to invalid IL or missing references)
			//IL_027d: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0505: Unknown result type (might be due to invalid IL or missing references)
			//IL_050a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0515: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			if ((((EntityState)this).inputBank.skill2.down && isSecondary) || (!isSecondary && ((EntityState)this).inputBank.skill3.down))
			{
				buttonHeldDownTimer += Time.fixedDeltaTime;
			}
			else
			{
				buttonHeldDownTimer = 0f;
			}
			if (buttonHeldDownTimer >= 0.5f)
			{
				fastFalltrigger = true;
			}
			if (state == DarkDiveState.START && stopwatch >= waitVal)
			{
				stopwatch = 0f;
				state = DarkDiveState.JUMP;
			}
			if (state == DarkDiveState.JUMP)
			{
				MoveUpwards();
				if (!grabFailed)
				{
					AttemptGrab(grabRadius);
				}
				if (stopwatch >= 0.1f)
				{
					grabRadius = 10f;
				}
				if (stopwatch >= grabDuration)
				{
					if (grabController.Count == 0)
					{
						grabFailed = true;
					}
					if (grabController.Count > 0 && !grabFailed)
					{
						state = DarkDiveState.EXPLODE;
						stopwatch = 0f;
						((EntityState)this).PlayAnimation("FullBody, Override", "UpBGrabbed", "flameChoke.playbackRate", 0.3f);
					}
				}
				if (stopwatch >= jumpDuration && grabFailed)
				{
					if (fastFalltrigger)
					{
						state = DarkDiveState.FASTFALL;
					}
					else
					{
						state = DarkDiveState.END;
					}
				}
			}
			if (state == DarkDiveState.EXPLODE)
			{
				((EntityState)this).characterMotor.velocity = Vector3.zero;
				isExploded = true;
				if (blastsDone < noOfBlasts && stopwatch > blastInterval)
				{
					stopwatch = 0f;
					miniBlast.position = ((EntityState)this).transform.position;
					Util.PlaySound("thunderPunch", ((EntityState)this).gameObject);
					int hitCount = miniBlast.Fire().hitCount;
					if (hitCount > 0)
					{
						OnMiniBlastHitEnemyAuthority(hitCount);
					}
					blastsDone++;
				}
				if (blastsDone >= noOfBlasts)
				{
					Vector3 up = Vector3.up;
					Ray aimRay = ((BaseState)this).GetAimRay();
					Vector3 val = up + ((Ray)(ref aimRay)).direction * -1f;
					jumpVector = ((Vector3)(ref val)).normalized;
					anim.SetBool("enemyCaught", false);
					state = DarkDiveState.FORCEBACK;
					((EntityState)this).PlayAnimation("FullBody, Override", "UpBFinishGrab", "flameChoke.playbackRate", forcebackDuration);
					stopwatch = 0f;
					if (grabController.Count > 0)
					{
						foreach (GrabController item in grabController)
						{
							if (Object.op_Implicit((Object)(object)item))
							{
								item.Release();
							}
						}
					}
				}
			}
			if (state == DarkDiveState.FORCEBACK)
			{
				((EntityState)this).characterMotor.disableAirControlUntilCollision = true;
				initialSpeedCoefficient = 2.5f;
				MoveUpwards();
				if (!hasFired)
				{
					hasFired = true;
					attack.position = ((EntityState)this).transform.position;
					Util.PlaySound("darkDive2", ((EntityState)this).gameObject);
					int hitCount2 = attack.Fire().hitCount;
					if (hitCount2 > 0)
					{
						OnHitEnemyAuthority(hitCount2);
					}
				}
				if (stopwatch >= forcebackDuration && fastFalltrigger)
				{
					state = DarkDiveState.FASTFALL;
				}
				else if (stopwatch >= forcebackDuration)
				{
					state = DarkDiveState.END;
				}
			}
			if (state == DarkDiveState.FASTFALL)
			{
				((EntityState)this).characterMotor.velocity.y = 0f - dropForce;
				if (((BaseState)this).isGrounded)
				{
					((EntityState)this).characterMotor.velocity = Vector3.zero;
					state = DarkDiveState.END;
				}
			}
			if (state != DarkDiveState.END)
			{
				return;
			}
			((EntityState)this).characterMotor.disableAirControlUntilCollision = false;
			if (!isExploded)
			{
				attack.position = ((EntityState)this).transform.position;
				int hitCount3 = attack.Fire().hitCount;
				if (hitCount3 > 0)
				{
					OnHitEnemyAuthority(hitCount3);
				}
			}
			((EntityState)this).outer.SetNextStateToMain();
		}

		private void MoveUpwards()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			CharacterMotor characterMotor = ((EntityState)this).characterMotor;
			characterMotor.rootMotion += jumpVector * (LerpSpeedCoefficient() * damperVal);
			((EntityState)this).characterMotor.velocity.y = 0f;
		}

		private float LerpTime()
		{
			float num = stopwatch / jumpDuration;
			return (num >= 1f) ? 1f : (1f - (float)Math.Pow(2.0, -10f * num));
		}

		private float LerpSpeedCoefficient()
		{
			return Mathf.Lerp(initialSpeedCoefficient, finalSpeedCoefficient, LerpTime());
		}

		protected void OnHitEnemyAuthority(int hitCount)
		{
			if (isSecondary || !isBoosted)
			{
				triforceComponent.AddToBuffCount(hitCount);
			}
			if (isBoosted)
			{
				triforceComponent.RemoveAmountOfBuff(30);
			}
		}

		protected void OnMiniBlastHitEnemyAuthority(int hitCount)
		{
			triforceComponent.AddToBuffCount(hitCount);
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams))
			{
				((EntityState)this).cameraTargetParams.fovOverride = -1f;
			}
			ganonController.HandRSpeedLines.Stop();
			ganonController.BodyLightning.Stop();
			if (grabController.Count <= 0)
			{
				return;
			}
			foreach (GrabController item in grabController)
			{
				if (Object.op_Implicit((Object)(object)item))
				{
					item.Release();
				}
			}
		}

		public void AttemptGrab(float grabRadius)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Expected O, but got Unknown
			BullseyeSearch val = new BullseyeSearch
			{
				teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()),
				filterByLoS = false,
				searchOrigin = ((EntityState)this).transform.position,
				searchDirection = Random.onUnitSphere,
				sortMode = (SortMode)1,
				maxDistanceFilter = grabRadius,
				maxAngleFilter = 360f
			};
			val.RefreshCandidates();
			val.FilterOutGameObject(((EntityState)this).gameObject);
			List<HurtBox> list = val.GetResults().ToList();
			foreach (HurtBox item in list)
			{
				if (!Object.op_Implicit((Object)(object)item) || !Object.op_Implicit((Object)(object)item.healthComponent) || !Object.op_Implicit((Object)(object)item.healthComponent.body) || !BodyMeetsGrabConditions(item.healthComponent.body))
				{
					continue;
				}
				if (!playedGrabSound)
				{
					Util.PlaySound("GrabSounds", ((EntityState)this).gameObject);
					playedGrabSound = true;
					if (NetworkServer.active)
					{
						((EntityState)this).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, invincibilityWindow);
					}
				}
				bool flag = false;
				for (int i = 0; i < this.grabController.Count; i++)
				{
					if (((Object)((Component)this.grabController[i]).gameObject).GetInstanceID() == ((Object)((Component)item.healthComponent.body).gameObject).GetInstanceID())
					{
						flag = true;
						break;
					}
				}
				if (!flag)
				{
					GrabController grabController = ((Component)item.healthComponent.body).gameObject.AddComponent<GrabController>();
					grabController.pivotTransform = ((BaseState)this).FindModelChild("HandL");
					this.grabController.Add(grabController);
				}
			}
		}

		private bool BodyMeetsGrabConditions(CharacterBody targetBody)
		{
			return true;
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			if (state == DarkDiveState.FORCEBACK || state == DarkDiveState.END || state == DarkDiveState.JUMP || state == DarkDiveState.FASTFALL)
			{
				return (InterruptPriority)0;
			}
			return (InterruptPriority)4;
		}
	}
	public class FlameChoke : BaseSkillState
	{
		private float grabDuration = 0.4f;

		private float windupDuration = 0.3f;

		public static float initialSpeedCoefficient = 3.2f;

		public static float finalSpeedCoefficient = 0f;

		private Vector3 aimRayDir;

		private float grabSpeed;

		private float dropForce = 50f;

		private List<GrabController> grabController;

		private float stopwatch;

		private Animator anim;

		private Vector3 previousPosition;

		private bool finishMove;

		private bool doGroundedFinisher;

		private bool doAerialFinisher;

		private bool stateFixed;

		private float aerialAttackStart = 0.4f;

		private float aerialAttackEnd = 0.5f;

		private float aerialLetGo = 0.5f;

		private float groundedAttackStart = 0.4f;

		private float groundedAttackEnd = 0.5f;

		private float groundedLetGo = 0.6f;

		private BlastAttack attack;

		private float grabRadius = 8f;

		private float invincibilityWindow = 1.5f;

		private bool playedGrabSound = false;

		private bool hasFired = false;

		private GanondorfController ganonController;

		private TriforceBuffComponent triforceBuffComponent;

		public static float dodgeFOV = DodgeState.dodgeFOV;

		public static float grabEndExplosionRadius = 10f;

		public static float flameChokeDamageCoefficient = 7f;

		public static float flameChokeProcCoefficient = 1f;

		public static float slamForce = 5000f;

		private bool isSecondary;

		private bool isBoosted;

		public override void OnEnter()
		{
			//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_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0255: Unknown result type (might be due to invalid IL or missing references)
			//IL_025f: Expected O, but got Unknown
			//IL_0267: Unknown result type (might be due to invalid IL or missing references)
			//IL_0295: 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)
			((BaseState)this).OnEnter();
			anim = ((EntityState)this).GetModelAnimator();
			Ray aimRay = ((BaseState)this).GetAimRay();
			aimRayDir = ((Ray)(ref aimRay)).direction;
			stopwatch = 0f;
			grabController = new List<GrabController>();
			finishMove = false;
			doGroundedFinisher = false;
			doAerialFinisher = false;
			stateFixed = false;
			isSecondary = false;
			isBoosted = false;
			ganonController = ((EntityState)this).GetComponent<GanondorfController>();
			triforceBuffComponent = ((EntityState)this).GetComponent<TriforceBuffComponent>();
			anim.SetFloat("flameChoke.playbackrate", 2.5f);
			anim.SetBool("enemyCaught", false);
			anim.SetBool("continueGrabbing", true);
			anim.SetBool("performAerialSlam", false);
			((EntityState)this).PlayAnimation("FullBody, Override", "GrabStart", "flameChoke.playbackRate", grabDuration);
			grabSpeed = ((BaseState)this).moveSpeedStat * LerpSpeedCoefficient();
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterMotor.velocity = aimRayDir * grabSpeed;
			}
			Util.PlaySound("grabStartSFX", ((EntityState)this).gameObject);
			Vector3 val = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero);
			previousPosition = ((EntityState)this).transform.position - val;
			float baseDamage = 0f;
			if (((EntityState)this).inputBank.skill2.down)
			{
				isBoosted = false;
				isSecondary = true;
				baseDamage = 5.5f * ((BaseState)this).damageStat + ((BaseState)this).damageStat * ((BaseState)this).attackSpeedStat * 0.2f;
			}
			else if (((EntityState)this).inputBank.skill3.down)
			{
				float num = 1f;
				if (triforceBuffComponent.GetBuffCount() >= 30)
				{
					num = 3f;
					isBoosted = true;
					ganonController.BodyLightning.Play();
				}
				baseDamage = 7f * ((BaseState)this).damageStat * num + ((BaseState)this).damageStat * ((BaseState)this).attackSpeedStat * 0.2f * 1.5f;
			}
			attack = new BlastAttack();
			attack.damageType = (DamageType)32;
			attack.attacker = ((EntityState)this).gameObject;
			attack.inflictor = ((EntityState)this).gameObject;
			attack.teamIndex = ((BaseState)this).GetTeam();
			attack.baseDamage = baseDamage;
			attack.procCoefficient = 1f;
			attack.baseForce = 1500f;
			attack.radius = grabEndExplosionRadius;
			attack.crit = ((BaseState)this).RollCrit();
			ganonController.HandLSpeedLines.Play();
			ganonController.SwapToFist();
		}

		public override void FixedUpdate()
		{
			//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)
			((EntityState)this).FixedUpdate();
			if (!doGroundedFinisher || !doAerialFinisher)
			{
				stopwatch += Time.fixedDeltaTime;
			}
			if (stopwatch > windupDuration && stopwatch < grabDuration + windupDuration)
			{
				SpeedBoostOnGrabDuration();
				AttemptGrab(grabRadius);
			}
			if (stopwatch > windupDuration + grabDuration && !stateFixed)
			{
				if (grabController.Count > 0)
				{
					if (((BaseState)this).isGrounded)
					{
						doGroundedFinisher = true;
						anim.SetBool("performAerialSlam", false);
					}
					else
					{
						((EntityState)this).characterMotor.velocity = Vector3.zero;
						anim.SetBool("performAerialSlam", true);
						doAerialFinisher = true;
					}
					anim.SetBool("enemyCaught", true);
					anim.SetBool("continueGrabbing", false);
				}
				else
				{
					finishMove = true;
					anim.SetBool("continueGrabbing", false);
				}
				stateFixed = true;
				stopwatch = 0f;
			}
			if (doGroundedFinisher)
			{
				GroundedFinisher();
			}
			if (doAerialFinisher)
			{
				StartDrop();
			}
			if (finishMove && ((EntityState)this).isAuthority)
			{
				SpeedBoostOnGrabDuration();
				anim.SetBool("continueGrabbing", false);
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private void SpeedBoostOnGrabDuration()
		{
			//IL_002b: 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_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00af: 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_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: 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_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			grabSpeed = ((BaseState)this).moveSpeedStat * LerpSpeedCoefficient();
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterDirection.forward = aimRayDir;
			}
			if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams))
			{
				((EntityState)this).cameraTargetParams.fovOverride = Mathf.Lerp(WizardFoot.dodgeFOV, 60f, stopwatch - windupDuration / grabDuration);
			}
			Vector3 val = ((EntityState)this).transform.position - previousPosition;
			Vector3 normalized = ((Vector3)(ref val)).normalized;
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && normalized != Vector3.zero)
			{
				Vector3 val2 = normalized * grabSpeed;
				float num = Mathf.Max(Vector3.Dot(val2, aimRayDir), 0f);
				val2 = aimRayDir * num;
				((EntityState)this).characterMotor.velocity = val2;
			}
			previousPosition = ((EntityState)this).transform.position;
		}

		private float LerpSpeedCoefficient()
		{
			float num = ((!((double)(stopwatch - windupDuration / grabDuration) < 0.9)) ? (stopwatch - windupDuration / grabDuration) : 0f);
			return Mathf.Lerp(isSecondary ? (initialSpeedCoefficient * 0.7f) : initialSpeedCoefficient, finalSpeedCoefficient, num);
		}

		protected virtual void OnHitEnemyAuthority(int hitCount)
		{
			Util.PlaySound("flameChokeSFXend", ((EntityState)this).gameObject);
			if (isSecondary || !isBoosted)
			{
				triforceBuffComponent.AddToBuffCount(hitCount);
			}
			if (isBoosted)
			{
				triforceBuffComponent.RemoveAmountOfBuff(30);
			}
		}

		public override void OnExit()
		{
			ganonController.BodyLightning.Stop();
			ganonController.HandLSpeedLines.Stop();
			((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
			if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams))
			{
				((EntityState)this).cameraTargetParams.fovOverride = -1f;
			}
			((EntityState)this).characterMotor.disableAirControlUntilCollision = false;
			ganonController.SetMaxVal(grabController.Count);
			if (grabController.Count > 0)
			{
				foreach (GrabController item in grabController)
				{
					if (Object.op_Implicit((Object)(object)item))
					{
						item.Release();
					}
				}
			}
			((EntityState)this).OnExit();
		}

		public void AttemptGrab(float grabRadius)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Expected O, but got Unknown
			BullseyeSearch val = new BullseyeSearch
			{
				teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()),
				filterByLoS = false,
				searchOrigin = ((EntityState)this).transform.position,
				searchDirection = Random.onUnitSphere,
				sortMode = (SortMode)1,
				maxDistanceFilter = grabRadius,
				maxAngleFilter = 360f
			};
			val.RefreshCandidates();
			val.FilterOutGameObject(((EntityState)this).gameObject);
			List<HurtBox> list = val.GetResults().ToList();
			foreach (HurtBox item in list)
			{
				if (!Object.op_Implicit((Object)(object)item) || !Object.op_Implicit((Object)(object)item.healthComponent) || !Object.op_Implicit((Object)(object)item.healthComponent.body) || !BodyMeetsGrabConditions(item.healthComponent.body))
				{
					continue;
				}
				if (!playedGrabSound)
				{
					Util.PlaySound("GrabSounds", ((EntityState)this).gameObject);
					playedGrabSound = true;
					if (NetworkServer.active)
					{
						((EntityState)this).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, invincibilityWindow);
					}
				}
				bool flag = false;
				for (int i = 0; i < this.grabController.Count; i++)
				{
					if (((Object)((Component)this.grabController[i]).gameObject).GetInstanceID() == ((Object)((Component)item.healthComponent.body).gameObject).GetInstanceID())
					{
						flag = true;
						break;
					}
				}
				if (!flag)
				{
					GrabController grabController = ((Component)item.healthComponent.body).gameObject.AddComponent<GrabController>();
					grabController.pivotTransform = ((BaseState)this).FindModelChild("HandL");
					this.grabController.Add(grabController);
				}
			}
		}

		private bool BodyMeetsGrabConditions(CharacterBody targetBody)
		{
			return true;
		}

		public void StartDrop()
		{
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: 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_0149: 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)
			((EntityState)this).characterMotor.disableAirControlUntilCollision = true;
			((EntityState)this).characterMotor.velocity.y = 0f - dropForce;
			AttemptGrab(grabRadius);
			if (!((BaseState)this).isGrounded)
			{
				return;
			}
			ganonController.HandLSpeedLines.Stop();
			((EntityState)this).characterMotor.velocity = Vector3.zero;
			stopwatch += Time.fixedDeltaTime;
			if (stopwatch > aerialAttackStart && stopwatch < aerialAttackEnd)
			{
				if (!hasFired && ((EntityState)this).isAuthority)
				{
					hasFired = true;
					attack.position = ((BaseState)this).FindModelChild("HandL").position;
					int hitCount = attack.Fire().hitCount;
					if (hitCount > 0)
					{
						OnHitEnemyAuthority(hitCount);
					}
				}
				Util.PlaySound("flameChokeSFXEnd", ((EntityState)this).gameObject);
			}
			if (!(stopwatch > aerialLetGo))
			{
				return;
			}
			if (!hasFired && ((EntityState)this).isAuthority)
			{
				attack.position = ((BaseState)this).FindModelChild("HandL").position;
				int hitCount2 = attack.Fire().hitCount;
				if (hitCount2 > 0)
				{
					OnHitEnemyAuthority(hitCount2);
				}
			}
			finishMove = true;
		}

		public void GroundedFinisher()
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			if (stopwatch > groundedAttackStart && stopwatch < groundedAttackEnd)
			{
				((EntityState)this).characterMotor.velocity = Vector3.zero;
				if (!hasFired && ((EntityState)this).isAuthority)
				{
					hasFired = true;
					attack.position = ((BaseState)this).FindModelChild("HandL").position;
					int hitCount = attack.Fire().hitCount;
					if (hitCount > 0)
					{
						OnHitEnemyAuthority(hitCount);
					}
				}
				Util.PlaySound("flameChokeSFXEnd", ((EntityState)this).gameObject);
			}
			if (!(stopwatch >= groundedLetGo))
			{
				return;
			}
			if (!hasFired && ((EntityState)this).isAuthority)
			{
				attack.position = ((BaseState)this).FindModelChild("HandL").position;
				int hitCount2 = attack.Fire().hitCount;
				if (hitCount2 > 0)
				{
					OnHitEnemyAuthority(hitCount2);
				}
			}
			finishMove = true;
		}

		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 GrabController : MonoBehaviour
	{
		public Transform pivotTransform;

		private CharacterBody body;

		private CharacterMotor motor;

		private CharacterDirection direction;

		private Rigidbody rigidbody;

		private RigidbodyMotor rigidMotor;

		private ModelLocator modelLocator;

		private Transform modelTransform;

		private Quaternion originalRotation;

		private Collider collider;

		private SphereCollider sphCollider;

		private CapsuleCollider capCollider;

		private Vector3 oldMoveVec;

		private void Awake()
		{
			//IL_00f7: 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_0164: 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)
			body = ((Component)this).GetComponent<CharacterBody>();
			motor = ((Component)this).GetComponent<CharacterMotor>();
			direction = ((Component)this).GetComponent<CharacterDirection>();
			rigidMotor = ((Component)this).gameObject.GetComponent<RigidbodyMotor>();
			modelLocator = ((Component)this).GetComponent<ModelLocator>();
			collider = ((Component)this).gameObject.GetComponent<Collider>();
			sphCollider = ((Component)this).gameObject.GetComponent<SphereCollider>();
			capCollider = ((Component)this).gameObject.GetComponent<CapsuleCollider>();
			rigidbody = ((Component)this).gameObject.GetComponent<Rigidbody>();
			if (Object.op_Implicit((Object)(object)collider))
			{
				collider.enabled = false;
			}
			if (Object.op_Implicit((Object)(object)sphCollider))
			{
				((Collider)sphCollider).enabled = false;
			}
			if (Object.op_Implicit((Object)(object)capCollider))
			{
				((Collider)capCollider).enabled = false;
			}
			if (Object.op_Implicit((Object)(object)rigidMotor))
			{
				oldMoveVec = rigidMotor.moveVector;
			}
			if (Object.op_Implicit((Object)(object)direction))
			{
				((Behaviour)direction).enabled = false;
			}
			if (Object.op_Implicit((Object)(object)modelLocator) && Object.op_Implicit((Object)(object)modelLocator.modelTransform))
			{
				modelTransform = modelLocator.modelTransform;
				originalRotation = modelTransform.rotation;
				if (((Object)((Component)modelLocator).gameObject).name == "GreaterWispBody(Clone)")
				{
					modelLocator.dontDetatchFromParent = true;
					modelLocator.dontReleaseModelOnDeath = true;
				}
				((Behaviour)modelLocator).enabled = false;
			}
		}

		private void Update()
		{
			SetToPivotPosition();
		}

		private void SetToPivotPosition()
		{
			//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_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)motor))
			{
				motor.disableAirControlUntilCollision = true;
				motor.velocity = Vector3.zero;
				motor.rootMotion = Vector3.zero;
				((BaseCharacterController)motor).Motor.SetPosition(pivotTransform.position, true);
			}
			if (Object.op_Implicit((Object)(object)rigidMotor))
			{
				rigidMotor.moveVector = Vector3.zero;
				rigidMotor.rootMotion = Vector3.zero;
				if (Object.op_Implicit((Object)(object)rigidbody))
				{
					rigidbody.position = pivotTransform.position;
					rigidbody.velocity = Vector3.zero;
				}
			}
			if (Object.op_Implicit((Object)(object)pivotTransform))
			{
				((Component)this).transform.position = pivotTransform.position;
			}
			else
			{
				Release();
			}
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				modelTransform.position = pivotTransform.position;
				modelTransform.rotation = pivotTransform.rotation;
			}
		}

		public void Release()
		{
			//IL_0033: 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)
			if (Object.op_Implicit((Object)(object)modelLocator))
			{
				((Behaviour)modelLocator).enabled = true;
			}
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				modelTransform.rotation = originalRotation;
			}
			if (Object.op_Implicit((Object)(object)direction))
			{
				((Behaviour)direction).enabled = true;
			}
			if (Object.op_Implicit((Object)(object)collider))
			{
				collider.enabled = true;
			}
			if (Object.op_Implicit((Object)(object)sphCollider))
			{
				((Collider)sphCollider).enabled = true;
			}
			if (Object.op_Implicit((Object)(object)capCollider))
			{
				((Collider)capCollider).enabled = true;
			}
			if (Object.op_Implicit((Object)(object)rigidMotor))
			{
				rigidMotor.moveVector = oldMoveVec;
			}
			Object.Destroy((Object)(object)this);
		}
	}
	public class InfernoGuillotine : BaseMeleeAttack
	{
		private enum KickState : ushort
		{
			CHARGE,
			DROP,
			EXPLODE
		}

		private bool checkedWeight;

		private float maxWeight;

		private bool isAttacking;

		private string voiceLine = "";

		private float dmgMultiplier = 1f;

		private bool hitEnemy = false;

		private GanondorfController ganonController;

		private BlastAttack blastAttack;

		private float windupTimer = 1.2f;

		private new float stopwatch = 0f;

		private float dropForce = 100f;

		private KickState state;

		private float initialSmallhop = 20f;

		private float pullRadius = 30f;

		private bool isExplosion;

		private float explosionRadius = 20f;

		private bool alreadyPulled;

		private float pullMultiplier = 1.5f;

		private Transform slamIndicatorInstance;

		private Transform slamCenterIndicatorInstance;

		private Ray downRay;

		private bool halfBoosted;

		private bool fullBoosted;

		public override void OnEnter()
		{
			//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)
			((BaseState)this).OnEnter();
			maxWeight = 12f;
			swingSoundString = "tauntSpin";
			hasFired = false;
			isExplosion = false;
			alreadyPulled = false;
			checkedWeight = false;
			animator = ((EntityState)this).GetModelAnimator();
			((BaseState)this).StartAimMode(0.5f + duration, false);
			ganonController = ((EntityState)this).GetComponent<GanondorfController>();
			animator.SetBool("attacking", true);
			isAttacking = true;
			halfBoosted = false;
			fullBoosted = false;
			int buffCount = ((EntityState)this).characterBody.GetBuffCount(Buffs.triforceBuff);
			if (buffCount < 50)
			{
				dmgMultiplier = 1f;
			}
			else if (buffCount >= 50 && buffCount < 100)
			{
				dmgMultiplier = 3.3333333f;
				halfBoosted = true;
			}
			else if (buffCount >= 100)
			{
				dmgMultiplier = 10f;
				fullBoosted = true;
			}
			setupInfernoGuillotineAttack();
			state = KickState.CHARGE;
			if (!((BaseState)this).isGrounded)
			{
				((EntityState)this).characterMotor.velocity = Vector3.zero;
				((BaseState)this).SmallHop(((EntityState)this).characterMotor, initialSmallhop);
			}
			ganonController.FootRInfernoFire.Play();
			ganonController.PullShockwave.Play();
			ganonController.SwapToFist();
			Util.PlaySound(voiceLine, ((EntityState)this).gameObject);
			CreateIndicator();
			PlayAttackAnimation();
		}

		protected override void PlayAttackAnimation()
		{
			((EntityState)this).PlayAnimation("FullBody, Override", "InfernoKickStart", "warlockPunch.playbackRate", duration);
		}

		protected override void PlaySwingEffect()
		{
			base.PlaySwingEffect();
		}

		protected void OnHitEnemyAuthority(int hitcount)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			if (!inHitPause && hitStopDuration > 0f)
			{
				storedVelocity = ((EntityState)this).characterMotor.velocity;
				hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, "warlockPunch.playbackRate");
				hitPauseTimer = hitStopDuration / ((BaseState)this).attackSpeedStat;
				inHitPause = true;
			}
			if (isExplosion)
			{
				if (!halfBoosted && !fullBoosted)
				{
					((EntityState)this).GetComponent<TriforceBuffComponent>().AddToBuffCount(10 * hitcount);
				}
				else if (halfBoosted)
				{
					((EntityState)this).GetComponent<TriforceBuffComponent>().RemoveAmountOfBuff(50);
				}
				else if (fullBoosted)
				{
					((EntityState)this).GetComponent<TriforceBuffComponent>().RemoveAmountOfBuff(100);
				}
			}
		}

		public override void FixedUpdate()
		{
			//IL_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0261: Unknown result type (might be due to invalid IL or missing references)
			//IL_026c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_029b: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_02af: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02be: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f1: Expected O, but got Unknown
			//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_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
			if (state == KickState.CHARGE)
			{
				stopwatch += Time.fixedDeltaTime;
				SearchToPull();
				UpdateSlamIndicator();
				if (stopwatch > windupTimer)
				{
					state = KickState.DROP;
					ganonController.PullShockwave.Stop();
					ganonController.InfernoKickFalling.Play();
					((EntityState)this).PlayAnimation("FullBody, Override", "InfernoKickAirtime", "warlockPunch.playbackRate", duration);
				}
			}
			if (state == KickState.DROP)
			{
				if (hitPauseTimer <= 0f && inHitPause)
				{
					((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator);
					inHitPause = false;
					((EntityState)this).characterMotor.velocity = storedVelocity;
				}
				if (!inHitPause)
				{
					if (attack.Fire((List<HurtBox>)null))
					{
						OnHitEnemyAuthority();
					}
					((EntityState)this).characterMotor.velocity.y = 0f - dropForce;
				}
				else
				{
					hitPauseTimer -= Time.fixedDeltaTime;
					if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
					{
						((EntityState)this).characterMotor.velocity = Vector3.zero;
					}
					if (Object.op_Implicit((Object)(object)animator))
					{
						animator.SetFloat("warlockPunch.playbackRate", 0f);
					}
				}
				if (((BaseState)this).isGrounded)
				{
					ganonController.InfernoKickFalling.Stop();
					((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator);
					inHitPause = false;
					((EntityState)this).characterMotor.velocity = Vector3.zero;
					state = KickState.EXPLODE;
					((EntityState)this).PlayAnimation("FullBody, Override", "InfernoKickLanding", "warlockPunch.playbackRate", duration);
				}
			}
			if (state != KickState.EXPLODE)
			{
				return;
			}
			Util.PlaySound(hitSoundString, ((EntityState)this).gameObject);
			Util.PlaySound(swingSoundString, ((EntityState)this).gameObject);
			if (!hasFired)
			{
				hasFired = true;
				isExplosion = true;
				blastAttack.position = ((EntityState)this).transform.position;
				int hitCount = blastAttack.Fire().hitCount;
				if (hitCount > 0)
				{
					OnHitEnemyAuthority(hitCount);
				}
			}
			for (int i = 0; i <= 6; i++)
			{
				Vector3 origin = ((EntityState)this).characterBody.footPosition + Random.insideUnitSphere * 8f;
				origin.y = ((EntityState)this).characterBody.footPosition.y;
				EffectManager.SpawnEffect(SpawnState.spawnEffectPrefab, new EffectData
				{
					origin = origin,
					scale = 4f
				}, true);
			}
			((EntityState)this).outer.SetNextStateToMain();
		}

		public void GetMaxWeight()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: 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_005a: Expected O, but got Unknown
			BullseyeSearch val = new BullseyeSearch
			{
				teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()),
				filterByLoS = false,
				searchOrigin = ((EntityState)this).transform.position,
				searchDirection = Random.onUnitSphere,
				sortMode = (SortMode)1,
				maxDistanceFilter = pullRadius,
				maxAngleFilter = 360f
			};
			val.RefreshCandidates();
			val.FilterOutGameObject(((EntityState)this).gameObject);
			maxWeight = 12f;
			checkedWeight = true;
			List<HurtBox> list = val.GetResults().ToList();
			foreach (HurtBox item in list)
			{
				if (!Object.op_Implicit((Object)(object)item) || !Object.op_Implicit((Object)(object)item.healthComponent) || !Object.op_Implicit((Object)(object)item.healthComponent.body))
				{
					continue;
				}
				if (Object.op_Implicit((Object)(object)item.healthComponent.body.characterMotor))
				{
					if (item.healthComponent.body.characterMotor.mass > maxWeight)
					{
						maxWeight = item.healthComponent.body.characterMotor.mass;
					}
				}
				else if (Object.op_Implicit((Object)(object)item.healthComponent.body.rigidbody) && item.healthComponent.body.rigidbody.mass > maxWeight)
				{
					maxWeight = item.healthComponent.body.rigidbody.mass;
				}
			}
		}

		public void SearchToPull()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00a6: Unknown result type (might be due to invalid IL or missing references)
			if (!checkedWeight)
			{
				GetMaxWeight();
			}
			BlastAttack val = new BlastAttack();
			val.damageType = (DamageType)0;
			val.position = ((EntityState)this).transform.position;
			val.attacker = ((EntityState)this).gameObject;
			val.inflictor = ((EntityState)this).gameObject;
			val.teamIndex = ((EntityState)this).teamComponent.teamIndex;
			val.baseDamage = 0f;
			val.procCoefficient = 0f;
			val.radius = explosionRadius * 2f;
			val.bonusForce = Vector3.zero;
			val.baseForce = 0f - maxWeight;
			val.crit = false;
			val.Fire();
		}

		private void CreateIndicator()
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: 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_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)ArrowRain.areaIndicatorPrefab))
			{
				Ray val = default(Ray);
				((Ray)(ref val)).direction = Vector3.down;
				((Ray)(ref val)).origin = ((EntityState)this).transform.position;
				downRay = val;
				slamIndicatorInstance = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab).transform;
				slamIndicatorInstance.localScale = Vector3.one * explosionRadius;
				slamCenterIndicatorInstance = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab).transform;
				slamCenterIndicatorInstance.localScale = Vector3.one * explosionRadius / 3f;
			}
		}

		private void UpdateSlamIndicator()
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: 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_0044: 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_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: 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_00c2: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				float num = 250f;
				Ray val = default(Ray);
				((Ray)(ref val)).direction = Vector3.down;
				((Ray)(ref val)).origin = ((EntityState)this).transform.position;
				downRay = val;
				RaycastHit val2 = default(RaycastHit);
				if (Physics.Raycast(downRay, ref val2, num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)))
				{
					((Component)slamIndicatorInstance).transform.position = ((RaycastHit)(ref val2)).point;
					((Component)slamIndicatorInstance).transform.up = ((RaycastHit)(ref val2)).normal;
					((Component)slamCenterIndicatorInstance).transform.position = ((RaycastHit)(ref val2)).point;
					((Component)slamCenterIndicatorInstance).transform.up = ((RaycastHit)(ref val2)).normal;
				}
			}
		}

		public override void OnExit()
		{
			ganonController.FootRInfernoFire.Stop();
			((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
			if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				EntityState.Destroy((Object)(object)((Component)slamIndicatorInstance).gameObject);
			}
			if (Object.op_Implicit((Object)(object)slamCenterIndicatorInstance))
			{
				EntityState.Destroy((Object)(object)((Component)slamCenterIndicatorInstance).gameObject);
			}
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
			base.OnExit();
		}

		public void setupInfernoGuillotineAttack()
		{
			//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_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Expected O, but got Unknown
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: 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_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01be: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Expected O, but got Unknown
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Unknown result type (might be due to invalid IL or missing references)
			//IL_0267: Unknown result type (might be due to invalid IL or missing references)
			swingSoundString = "warlockPunchSFX";
			hitSoundString = "superHitsVoice";
			voiceLine = "infernoKickStart";
			damageCoefficient = 11f;
			pushForce = maxWeight;
			procCoefficient = 1.5f;
			bonusForce = Vector3.up;
			baseDuration = 2.25f;
			attackStartTime = 1.45f;
			attackEndTime = 1.65f;
			baseEarlyExitTime = 2.2f;
			hitStopDuration = 0.1f;
			impactSound = Assets.punchSFX.index;
			blastAttack = new BlastAttack();
			blastAttack.damageType = (DamageType)32;
			blastAttack.attacker = ((EntityState)this).gameObject;
			blastAttack.inflictor = ((EntityState)this).gameObject;
			blastAttack.teamIndex = ((EntityState)this).teamComponent.teamIndex;
			blastAttack.baseDamage = damageCoefficient * ((BaseState)this).damageStat * dmgMultiplier;
			blastAttack.procCoefficient = 1f;
			blastAttack.radius = explosionRadius;
			blastAttack.bonusForce = bonusForce;
			blastAttack.baseForce = pushForce;
			blastAttack.falloffModel = (FalloffModel)0;
			blastAttack.crit = ((BaseState)this).RollCrit();
			duration = baseDuration;
			earlyExitTime = baseEarlyExitTime;
			HitBoxGroup hitBoxGroup = null;
			Transform modelTransform = ((EntityState)this).GetModelTransform();
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "inferno");
			}
			attack = new OverlapAttack();
			attack.damageType = (DamageType)0;
			attack.attacker = ((EntityState)this).gameObject;
			attack.inflictor = ((EntityState)this).gameObject;
			attack.teamIndex = ((BaseState)this).GetTeam();
			attack.damage = 1f * ((BaseState)this).damageStat;
			attack.procCoefficient = 1f;
			attack.hitBoxGroup = hitBoxGroup;
			attack.isCrit = ((BaseState)this).RollCrit();
			attack.impactSound = impactSound;
			attack.forceVector = Vector3.down;
			attack.pushAwayForce = 100f;
		}

		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 InfernoGuillotineScepter : BaseMeleeAttack
	{
		private enum KickState : ushort
		{
			CHARGE,
			DROP,
			EXPLODE
		}

		private bool checkedWeight;

		private float maxWeight;

		private bool isAttacking;

		private string voiceLine = "";

		private float dmgMultiplier = 1f;

		private bool hitEnemy = false;

		private GanondorfController ganonController;

		private BlastAttack blastAttack;

		private float windupTimer = 1.2f;

		private new float stopwatch = 0f;

		private float dropForce = 100f;

		private KickState state;

		private float initialSmallhop = 20f;

		private float pullRadius = 30f;

		private bool isExplosion;

		private float explosionRadius = 20f;

		private bool alreadyPulled;

		private float pullMultiplier = 1.5f;

		private Transform slamIndicatorInstance;

		private Transform slamCenterIndicatorInstance;

		private Ray downRay;

		private bool halfBoosted;

		private bool fullBoosted;

		public override void OnEnter()
		{
			//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)
			((BaseState)this).OnEnter();
			maxWeight = 12f;
			swingSoundString = "tauntSpin";
			hasFired = false;
			isExplosion = false;
			alreadyPulled = false;
			checkedWeight = false;
			animator = ((EntityState)this).GetModelAnimator();
			((BaseState)this).StartAimMode(0.5f + duration, false);
			ganonController = ((EntityState)this).GetComponent<GanondorfController>();
			animator.SetBool("attacking", true);
			isAttacking = true;
			halfBoosted = false;
			fullBoosted = false;
			int buffCount = ((EntityState)this).characterBody.GetBuffCount(Buffs.triforceBuff);
			if (buffCount < 50)
			{
				dmgMultiplier = 1f;
			}
			else if (buffCount >= 50 && buffCount < 100)
			{
				dmgMultiplier = 6.6666665f;
				halfBoosted = true;
			}
			else if (buffCount >= 100)
			{
				dmgMultiplier = 20f;
				fullBoosted = true;
			}
			setupInfernoGuillotineAttack();
			state = KickState.CHARGE;
			if (!((BaseState)this).isGrounded)
			{
				((EntityState)this).characterMotor.velocity = Vector3.zero;
				((BaseState)this).SmallHop(((EntityState)this).characterMotor, initialSmallhop);
			}
			ganonController.FootRInfernoFire.Play();
			ganonController.PullShockwave.Play();
			ganonController.SwapToFist();
			Util.PlaySound(voiceLine, ((EntityState)this).gameObject);
			CreateIndicator();
			PlayAttackAnimation();
		}

		protected override void PlayAttackAnimation()
		{
			((EntityState)this).PlayAnimation("FullBody, Override", "InfernoKickStart", "warlockPunch.playbackRate", duration);
		}

		protected override void PlaySwingEffect()
		{
			base.PlaySwingEffect();
		}

		protected override void OnHitEnemyAuthority()
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			if (!inHitPause && hitStopDuration > 0f)
			{
				storedVelocity = ((EntityState)this).characterMotor.velocity;
				hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, "warlockPunch.playbackRate");
				hitPauseTimer = hitStopDuration / ((BaseState)this).attackSpeedStat;
				inHitPause = true;
			}
			if (isExplosion)
			{
				if (!halfBoosted && !fullBoosted)
				{
					((EntityState)this).GetComponent<TriforceBuffComponent>().AddToBuffCount(10);
				}
				else if (halfBoosted)
				{
					((EntityState)this).GetComponent<TriforceBuffComponent>().RemoveAmountOfBuff(50);
				}
				else if (fullBoosted)
				{
					((EntityState)this).GetComponent<TriforceBuffComponent>().RemoveAmountOfBuff(100);
				}
			}
		}

		public override void FixedUpdate()
		{
			//IL_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0261: Unknown result type (might be due to invalid IL or missing references)
			//IL_026c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0295: 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_02a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02da: Unknown result type (might be due to invalid IL or missing references)
			//IL_02eb: Expected O, but got Unknown
			//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_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
			if (state == KickState.CHARGE)
			{
				stopwatch += Time.fixedDeltaTime;
				SearchToPull();
				UpdateSlamIndicator();
				if (stopwatch > windupTimer)
				{
					state = KickState.DROP;
					ganonController.PullShockwave.Stop();
					ganonController.InfernoKickFalling.Play();
					((EntityState)this).PlayAnimation("FullBody, Override", "InfernoKickAirtime", "warlockPunch.playbackRate", duration);
				}
			}
			if (state == KickState.DROP)
			{
				if (hitPauseTimer <= 0f && inHitPause)
				{
					((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator);
					inHitPause = false;
					((EntityState)this).characterMotor.velocity = storedVelocity;
				}
				if (!inHitPause)
				{
					if (attack.Fire((List<HurtBox>)null))
					{
						OnHitEnemyAuthority();
					}
					((EntityState)this).characterMotor.velocity.y = 0f - dropForce;
				}
				else
				{
					hitPauseTimer -= Time.fixedDeltaTime;
					if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
					{
						((EntityState)this).characterMotor.velocity = Vector3.zero;
					}
					if (Object.op_Implicit((Object)(object)animator))
					{
						animator.SetFloat("warlockPunch.playbackRate", 0f);
					}
				}
				if (((BaseState)this).isGrounded)
				{
					ganonController.InfernoKickFalling.Stop();
					((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator);
					inHitPause = false;
					((EntityState)this).characterMotor.velocity = Vector3.zero;
					state = KickState.EXPLODE;
					((EntityState)this).PlayAnimation("FullBody, Override", "InfernoKickLanding", "warlockPunch.playbackRate", duration);
				}
			}
			if (state != KickState.EXPLODE)
			{
				return;
			}
			Util.PlaySound(hitSoundString, ((EntityState)this).gameObject);
			Util.PlaySound(swingSoundString, ((EntityState)this).gameObject);
			if (!hasFired)
			{
				hasFired = true;
				isExplosion = true;
				blastAttack.position = ((EntityState)this).transform.position;
				if (blastAttack.Fire().hitCount > 0)
				{
					OnHitEnemyAuthority();
				}
			}
			for (int i = 0; i <= 6; i++)
			{
				Vector3 origin = ((EntityState)this).characterBody.footPosition + Random.insideUnitSphere * 8f;
				origin.y = ((EntityState)this).characterBody.footPosition.y;
				EffectManager.SpawnEffect(SpawnState.spawnEffectPrefab, new EffectData
				{
					origin = origin,
					scale = 4f
				}, true);
			}
			((EntityState)this).outer.SetNextStateToMain();
		}

		public void GetMaxWeight()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: 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_005a: Expected O, but got Unknown
			BullseyeSearch val = new BullseyeSearch
			{
				teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()),
				filterByLoS = false,
				searchOrigin = ((EntityState)this).transform.position,
				searchDirection = Random.onUnitSphere,
				sortMode = (SortMode)1,
				maxDistanceFilter = pullRadius,
				maxAngleFilter = 360f
			};
			val.RefreshCandidates();
			val.FilterOutGameObject(((EntityState)this).gameObject);
			maxWeight = 12f;
			checkedWeight = true;
			List<HurtBox> list = val.GetResults().ToList();
			foreach (HurtBox item in list)
			{
				if (!Object.op_Implicit((Object)(object)item) || !Object.op_Implicit((Object)(object)item.healthComponent) || !Object.op_Implicit((Object)(object)item.healthComponent.body))
				{
					continue;
				}
				if (Object.op_Implicit((Object)(object)item.healthComponent.body.characterMotor))
				{
					if (item.healthComponent.body.characterMotor.mass > maxWeight)
					{
						maxWeight = item.healthComponent.body.characterMotor.mass;
					}
				}
				else if (Object.op_Implicit((Object)(object)item.healthComponent.body.rigidbody) && item.healthComponent.body.rigidbody.mass > maxWeight)
				{
					maxWeight = item.healthComponent.body.rigidbody.mass;
				}
			}
		}

		public void SearchToPull()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00a6: Unknown result type (might be due to invalid IL or missing references)
			if (!checkedWeight)
			{
				GetMaxWeight();
			}
			BlastAttack val = new BlastAttack();
			val.damageType = (DamageType)0;
			val.position = ((EntityState)this).transform.position;
			val.attacker = ((EntityState)this).gameObject;
			val.inflictor = ((EntityState)this).gameObject;
			val.teamIndex = ((EntityState)this).teamComponent.teamIndex;
			val.baseDamage = 0f;
			val.procCoefficient = 0f;
			val.radius = explosionRadius * 2f;
			val.bonusForce = Vector3.zero;
			val.baseForce = 0f - maxWeight;
			val.crit = false;
			val.Fire();
		}

		private void CreateIndicator()
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: 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_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)ArrowRain.areaIndicatorPrefab))
			{
				Ray val = default(Ray);
				((Ray)(ref val)).direction = Vector3.down;
				((Ray)(ref val)).origin = ((EntityState)this).transform.position;
				downRay = val;
				slamIndicatorInstance = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab).transform;
				slamIndicatorInstance.localScale = Vector3.one * explosionRadius;
				slamCenterIndicatorInstance = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab).transform;
				slamCenterIndicatorInstance.localScale = Vector3.one * explosionRadius / 3f;
			}
		}

		private void UpdateSlamIndicator()
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: 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_0044: 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_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: 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_00c2: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				float num = 250f;
				Ray val = default(Ray);
				((Ray)(ref val)).direction = Vector3.down;
				((Ray)(ref val)).origin = ((EntityState)this).transform.position;
				downRay = val;
				RaycastHit val2 = default(RaycastHit);
				if (Physics.Raycast(downRay, ref val2, num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)))
				{
					((Component)slamIndicatorInstance).transform.position = ((RaycastHit)(ref val2)).point;
					((Component)slamIndicatorInstance).transform.up = ((RaycastHit)(ref val2)).normal;
					((Component)slamCenterIndicatorInstance).transform.position = ((RaycastHit)(ref val2)).point;
					((Component)slamCenterIndicatorInstance).transform.up = ((RaycastHit)(ref val2)).normal;
				}
			}
		}

		public override void OnExit()
		{
			ganonController.FootRInfernoFire.Stop();
			((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
			if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				EntityState.Destroy((Object)(object)((Component)slamIndicatorInstance).gameObject);
			}
			if (Object.op_Implicit((Object)(object)slamCenterIndicatorInstance))
			{
				EntityState.Destroy((Object)(object)((Component)slamCenterIndicatorInstance).gameObject);
			}
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
			base.OnExit();
		}

		public void setupInfernoGuillotineAttack()
		{
			//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_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Expected O, but got Unknown
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: 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_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01be: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Expected O, but got Unknown
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Unknown result type (might be due to invalid IL or missing references)
			//IL_0267: Unknown result type (might be due to invalid IL or missing references)
			swingSoundString = "warlockPunchSFX";
			hitSoundString = "superHitsVoice";
			voiceLine = "infernoKickStart";
			damageCoefficient = 11f;
			pushForce = maxWeight;
			procCoefficient = 1.5f;
			bonusForce = Vector3.up;
			baseDuration = 2.25f;
			attackStartTime = 1.45f;
			attackEndTime = 1.65f;
			baseEarlyExitTime = 2.2f;
			hitStopDuration = 0.1f;
			impactSound = Assets.punchSFX.index;
			blastAttack = new BlastAttack();
			blastAttack.damageType = (DamageType)32;
			blastAttack.attacker = ((EntityState)this).gameObject;
			blastAttack.inflictor = ((EntityState)this).gameObject;
			blastAttack.teamIndex = ((EntityState)this).teamComponent.teamIndex;
			blastAttack.baseDamage = damageCoefficient * ((BaseState)this).damageStat * dmgMultiplier;
			blastAttack.procCoefficient = 1f;
			blastAttack.radius = explosionRadius;
			blastAttack.bonusForce = bonusForce;
			blastAttack.baseForce = pushForce;
			blastAttack.falloffModel = (FalloffModel)0;
			blastAttack.crit = ((BaseState)this).RollCrit();
			duration = baseDuration;
			earlyExitTime = baseEarlyExitTime;
			HitBoxGroup hitBoxGroup = null;
			Transform modelTransform = ((EntityState)this).GetModelTransform();
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "inferno");
			}
			attack = new OverlapAttack();
			attack.damageType = (DamageType)0;
			attack.attacker = ((EntityState)this).gameObject;
			attack.inflictor = ((EntityState)this).gameObject;
			attack.teamIndex = ((BaseState)this).GetTeam();
			attack.damage = 1f * ((BaseState)this).damageStat;
			attack.procCoefficient = 1f;
			attack.hitBoxGroup = hitBoxGroup;
			attack.isCrit = ((BaseState)this).RollCrit();
			attack.impactSound = impactSound;
			attack.forceVector = Vector3.down;
			attack.pushAwayForce = 100f;
		}

		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;
		}
	}
	internal class ObliterateBeginCharging : BaseSkillState
	{
		internal TriforceBuffComponent triforceComponent;

		internal GanondorfController ganoncon;

		internal float damage;

		internal float maxDamage;

		internal float rampingDamageIncrement;

		internal float explosionNum;

		internal float maxExplosion;

		internal float rampingeExplosionNumIncrement;

		internal float distance;

		internal float maxDistance;

		internal float rampingDistanceIncrement;

		internal GameObject obliteratorIndicatorInstance;

		internal bool sentRequest;

		internal bool isFullyCharged;

		internal Ray downRay;

		public override void OnEnter()
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			isFullyCharged = false;
			sentRequest = false;
			NetMessageExtensions.Send((INetMessage)(object)new ChargingSwordNetworkRequest(((EntityState)this).characterBody.masterObjectId, incomingChargedVal: true), (NetworkDestination)1);
			((EntityState)this).PlayCrossfade("FullBody, Override", "StartForwardSmash", 0.1f);
			AkSoundEngine.PostEvent(4208541365u, ((EntityState)this).gameObject);
			damage = 6f * ((BaseState)this).damageStat;
			maxDamage = 6f * ((BaseState)this).damageStat * 5f;
			rampingDamageIncrement = (maxDamage - damage) / (5f / ((BaseState)this).attackSpeedStat);
			explosionNum = 1f;
			maxExplosion = 10f;
			rampingeExplosionNumIncrement = (maxExplosion - explosionNum) / (5f / ((BaseState)this).attackSpeedStat);
			distance = 0f;
			maxDistance = 75f;
			rampingDistanceIncrement = (maxDistance - distance) / (5f / ((BaseState)this).attackSpeedStat);
			CreateIndicator();
			ganoncon = ((EntityState)this).GetComponent<GanondorfController>();
			ganoncon.SwapToSword();
			triforceComponent = ((EntityState)this).GetComponent<TriforceBuffComponent>();
			triforceComponent.pauseDecay = true;
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.SetBuffCount(Buffs.damageAbsorberBuff.buffIndex, 1);
			}
		}

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

		public override void Update()
		{
			((EntityState)this).Update();
			if (((EntityState)this).inputBank.skill4.down)
			{
				UpdateIndicator();
			}
		}

		public override void FixedUpdate()
		{
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_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_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			if (!((EntityState)this).isAuthority)
			{
				return;
			}
			if (((EntityState)this).inputBank.skill4.down)
			{
				CharacterDirection characterDirection = ((EntityState)this).characterDirection;
				Ray aimRay = ((BaseState)this).GetAimRay();
				Vector3 direction = ((Ray)(ref aimRay)).direction;
				characterDirection.moveVector = ((Vector3)(ref direction)).normalized;
				if (damage <= maxDamage)
				{
					damage += rampingDamageIncrement * Time.fixedDeltaTime;
				}
				if (explosionNum <= maxExplosion)
				{
					explosionNum += rampingeExplosionNumIncrement * Time.fixedDeltaTime;
				}
				if (distance <= maxDistance)
				{
					distance += rampingDistanceIncrement * Time.fixedDeltaTime;
				}
				if (damage >= maxDamage || explosionNum >= maxExplosion || distance >= maxDistance)
				{
					isFullyCharged = true;
				}
				if ((damage >= maxDamage || explosionNum >= maxExplosion || distance >= maxDistance) && isFullyCharged && !sentRequest)
				{
					sentRequest = true;
					AkSoundEngine.PostEvent(2184839552u, ((EntityState)this).gameObject);
					NetMessageExtensions.Send((INetMessage)(object)new ChargingSwordNetworkRequest(((EntityState)this).characterBody.masterObjectId, incomingChargedVal: false), (NetworkDestination)1);
					NetMessageExtensions.Send((INetMessage)(object)new FullyChargedSwordNetworkRequest(((EntityState)this).cha