Decompiled source of DekuMod v5.0.5

DekuMod.dll

Decompiled 4 days 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 BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using DekuMod.Modules;
using DekuMod.Modules.Networking;
using DekuMod.Modules.Survivors;
using DekuMod.SkillStates;
using DekuMod.SkillStates.BaseStates;
using DekuMod.SkillStates.BlackWhip;
using DekuMod.SkillStates.Might;
using DekuMod.SkillStates.Orbs;
using DekuMod.SkillStates.ShootStyle;
using EmotesAPI;
using EntityStates;
using EntityStates.BeetleGuardMonster;
using EntityStates.Commando;
using EntityStates.Commando.CommandoWeapon;
using EntityStates.Huntress;
using EntityStates.ImpMonster;
using EntityStates.LemurianBruiserMonster;
using EntityStates.Mage;
using EntityStates.Merc;
using EntityStates.Treebot.Weapon;
using EntityStates.VagrantMonster;
using ExtraSkillSlots;
using HG;
using HG.BlendableTypes;
using IL.RoR2;
using KinematicCharacterController;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using MonoMod.RuntimeDetour;
using On.RoR2;
using On.RoR2.UI;
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.CharacterAI;
using RoR2.ContentManagement;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.UI;

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

	public SkillDefInfo()
	{
	}

	public SkillDefInfo(string skillNameToken, string skillDescriptionToken, Sprite skillIcon, SerializableEntityStateType activationState, string activationStateMachineName = "Weapon", bool agile = false)
	{
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		skillName = skillNameToken;
		this.skillNameToken = skillNameToken;
		this.skillDescriptionToken = skillDescriptionToken;
		this.skillIcon = skillIcon;
		this.activationState = activationState;
		this.activationStateMachineName = activationStateMachineName;
		interruptPriority = (InterruptPriority)0;
		isCombatSkill = true;
		baseRechargeInterval = 0f;
		requiredStock = 0;
		stockToConsume = 0;
		cancelSprintingOnActivation = !agile;
		if (agile)
		{
			keywordTokens = new string[1] { "KEYWORD_AGILE" };
		}
	}
}
namespace DekuMod
{
	[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.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.TeaL.DekuMod", "DekuMod", "5.0.5")]
	public class DekuPlugin : BaseUnityPlugin
	{
		public const string MODUID = "com.TeaL.DekuMod";

		public const string MODNAME = "DekuMod";

		public const string MODVERSION = "5.0.5";

		public const float passiveRegenBonus = 0.035f;

		public const string developerPrefix = "TEAL";

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

		public static DekuPlugin instance;

		public static CharacterBody DekuCharacterBody;

		public Hook AddBankAfterAKSoundEngineInit { get; private set; }

		private void Awake()
		{
			Log.Init(((BaseUnityPlugin)this).Logger);
			instance = this;
			DekuCharacterBody = null;
			instance = this;
			DekuAssets.Initialize();
			Config.ReadConfig();
			if (Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"))
			{
				Config.SetupRiskOfOptions();
			}
			Config.OnChangeHooks();
			Damage.SetupModdedDamage();
			States.RegisterStates();
			Buffs.RegisterBuffs();
			Projectiles.RegisterProjectiles();
			Tokens.AddTokens();
			ItemDisplays.PopulateDisplays();
			new Deku().Initialize();
			NetworkingAPI.RegisterMessageType<SpendHealthNetworkRequest>();
			NetworkingAPI.RegisterMessageType<HealNetworkRequest>();
			NetworkingAPI.RegisterMessageType<ServerForceGoBeyondStateNetworkRequest>();
			NetworkingAPI.RegisterMessageType<PerformDetroitSmashNetworkRequest>();
			NetworkingAPI.RegisterMessageType<PeformShootStyleKickAttackNetworkRequest>();
			NetworkingAPI.RegisterMessageType<PerformStLouisSmashNetworkRequest>();
			NetworkingAPI.RegisterMessageType<PerformBlackwhipPullNetworkRequest>();
			NetworkingAPI.RegisterMessageType<ForceCounterState>();
			NetworkingAPI.RegisterMessageType<ForceDangerSenseState>();
			NetworkingAPI.RegisterMessageType<TakeDamageForceRequest>();
			NetworkingAPI.RegisterMessageType<SetDodgeStateMachine>();
			NetworkingAPI.RegisterMessageType<BlackwhipImmobilizeRequest>();
			NetworkingAPI.RegisterMessageType<PerformDetroitDelawareNetworkRequest>();
			NetworkingAPI.RegisterMessageType<PerformFinalSmashNetworkRequest>();
			new ContentPacks().Initialize();
			ContentManager.onContentPacksAssigned += LateSetup;
			Hook();
		}

		private void Start()
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Expected O, but got Unknown
			//IL_004e: 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_0078: Unknown result type (might be due to invalid IL or missing references)
			AddBankAfterAKSoundEngineInit = new Hook((MethodBase)Reflection.GetMethodCached(typeof(AkSoundEngineInitialization), "InitializeSoundEngine"), Reflection.GetMethodCached(typeof(DekuPlugin), "AddBank"));
			if (AkSoundEngine.IsInitialized())
			{
				AkSoundEngine.SetRTPCValue("Volume_DekuMusic", Config.dekuMusic.Value);
				AkSoundEngine.SetRTPCValue("Volume_DekuVoice", Config.dekuVoice.Value);
				AkSoundEngine.SetRTPCValue("Volume_DekuSFX", Config.dekuSFX.Value);
			}
		}

		private static bool AddBank(Func<AkSoundEngineInitialization, bool> orig, AkSoundEngineInitialization self)
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			bool result = orig(self);
			if (AkSoundEngine.IsInitialized())
			{
				AkSoundEngine.SetRTPCValue("Volume_DekuMusic", Config.dekuMusic.Value);
				AkSoundEngine.SetRTPCValue("Volume_DekuVoice", Config.dekuVoice.Value);
				AkSoundEngine.SetRTPCValue("Volume_DekuSFX", Config.dekuSFX.Value);
			}
			return result;
		}

		private void LateSetup(ReadOnlyArray<ReadOnlyContentPack> obj)
		{
			SurvivorBase.instance.SetItemDisplays();
		}

		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_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_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Expected O, but got Unknown
			CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats);
			CharacterModel.UpdateOverlays += new hook_UpdateOverlays(CharacterModel_UpdateOverlays);
			CharacterBody.OnDeathStart += new hook_OnDeathStart(CharacterBody_OnDeathStart);
			CharacterModel.Awake += new hook_Awake(CharacterModel_Awake);
			GlobalEventManager.onServerDamageDealt += GlobalEventManager_OnDamageDealt;
			HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
			GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy);
			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)
			{
				Debug.Log((object)((Object)allSurvivorDef.bodyPrefab).name);
				if (((Object)allSurvivorDef.bodyPrefab).name == "DekuBody")
				{
					CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, DekuAssets.mainAssetBundle.LoadAsset<GameObject>("humanoidDeku"), 0, true);
				}
			}
		}

		private void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim)
		{
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Invalid comparison between Unknown and I4
			//IL_00b4: 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_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01de: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, damageInfo, victim);
			GameObject attacker = damageInfo.attacker;
			if (!Object.op_Implicit((Object)(object)attacker))
			{
				return;
			}
			CharacterBody component = attacker.GetComponent<CharacterBody>();
			CharacterBody component2 = victim.GetComponent<CharacterBody>();
			if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component2) || !Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component2) || !(damageInfo.damage > 0f) || (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) == 67108864 || !(component.baseNameToken == "TEAL_DEKU_BODY_NAME"))
			{
				return;
			}
			if (DamageAPI.HasModdedDamageType(damageInfo, Damage.blackwhipImmobilise))
			{
				NetworkingHelpers.ApplyBuff(component2, Buffs.blackwhipDebuff.buffIndex, 1, (float)(component2.GetBuffCount(Buffs.blackwhipDebuff) + 2));
			}
			EnergySystem component3 = ((Component)component).GetComponent<EnergySystem>();
			component3.plusUltraBoostTimer = 2f;
			if (component.HasBuff(Buffs.fajinBuff) && damageInfo.procCoefficient > 0f)
			{
				component.healthComponent.AddBarrierAuthority(component.healthComponent.fullCombinedHealth * 0.05f);
				NetworkingHelpers.ApplyBuff(component, Buffs.fajinBuff.buffIndex, component.GetBuffCount(Buffs.fajinBuff) - 1, -1f);
			}
			if (component.HasBuff(Buffs.fajinMaxBuff) && damageInfo.procCoefficient > 0f)
			{
				component.healthComponent.AddBarrierAuthority(component.healthComponent.fullCombinedHealth * 0.05f);
				NetworkingHelpers.ApplyBuff(component, Buffs.fajinMaxBuff.buffIndex, component.GetBuffCount(Buffs.fajinMaxBuff) - 1, -1f);
				if (component.GetBuffCount(Buffs.fajinMaxBuff) == 0)
				{
					NetworkingHelpers.ApplyBuff(component, Buffs.fajinStoredBuff.buffIndex, component.GetBuffCount(Buffs.fajinStoredBuff) + 1, -1f);
				}
			}
			if (!component.HasBuff(Buffs.fajinBuff) && !component.HasBuff(Buffs.fajinMaxBuff) && (Object)(object)component.skillLocator.utility.skillDef == (Object)(object)Deku.mightUtilitySkillDef && component.skillLocator.utility.stock < component.skillLocator.utility.maxStock)
			{
				component.skillLocator.utility.AddOneStock();
			}
			if (component2.HasBuff(Buffs.comboDebuff) && damageInfo.procCoefficient > 0f)
			{
				component.skillLocator.DeductCooldownFromAllSkillsServer((float)component2.GetBuffCount(Buffs.comboDebuff));
			}
		}

		private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
		{
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Invalid comparison between Unknown and I4
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: 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_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: Expected O, but got Unknown
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0246: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0253: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_031d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0322: Unknown result type (might be due to invalid IL or missing references)
			//IL_0329: Unknown result type (might be due to invalid IL or missing references)
			//IL_0334: Unknown result type (might be due to invalid IL or missing references)
			//IL_033f: Unknown result type (might be due to invalid IL or missing references)
			//IL_034b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0356: Unknown result type (might be due to invalid IL or missing references)
			//IL_035b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0360: Unknown result type (might be due to invalid IL or missing references)
			//IL_0365: Unknown result type (might be due to invalid IL or missing references)
			//IL_0370: Expected O, but got Unknown
			//IL_037c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0381: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)self) && damageInfo != null && Object.op_Implicit((Object)(object)damageInfo.attacker) && Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<CharacterBody>()) && self.body.baseNameToken == "TEAL_DEKU_BODY_NAME")
			{
				DekuController component = ((Component)self).gameObject.GetComponent<DekuController>();
				EnergySystem component2 = ((Component)self).gameObject.GetComponent<EnergySystem>();
				bool flag = (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)2)) > 0;
				if (!flag && damageInfo.damage > self.body.healthComponent.health && component2.currentPlusUltra > StaticValues.goBeyondThreshold && !self.body.HasBuff(Buffs.goBeyondBuffUsed))
				{
					component2.currentPlusUltra = 0f;
					damageInfo.rejected = true;
					self.body.healthComponent.health = 1f;
					NetMessageExtensions.Send((INetMessage)(object)new ServerForceGoBeyondStateNetworkRequest(self.body.masterObjectId), (NetworkDestination)1);
				}
				if (!flag && self.body.HasBuff(Buffs.dangersenseBuff.buffIndex) && !self.body.HasBuff(Buffs.HiddenInvincibility))
				{
					NetworkingHelpers.ApplyBuff(self.body, Buffs.dangersenseBuff.buffIndex, 0, -1f);
					AkSoundEngine.PostEvent("dangersensesfx", ((Component)self).gameObject);
					damageInfo.force = Vector3.zero;
					if (self.body.level >= 20f)
					{
						damageInfo.damage = 0f;
					}
					damageInfo.damage -= self.body.armor * self.body.level;
					if (damageInfo.damage < 0f)
					{
						self.Heal(Mathf.Abs(damageInfo.damage), default(ProcChainMask), true);
						damageInfo.damage = 0f;
					}
					DamageInfo val = new DamageInfo();
					val.damage = self.body.damage * 2f;
					val.position = damageInfo.attacker.transform.position;
					val.force = Vector3.zero;
					val.damageColorIndex = (DamageColorIndex)0;
					val.crit = Util.CheckRoll(self.body.crit, self.body.master);
					val.attacker = ((Component)self.body).gameObject;
					val.inflictor = ((Component)self.body).gameObject;
					val.damageType = DamageTypeCombo.op_Implicit((DamageType)256);
					val.procCoefficient = 1f;
					val.procChainMask = default(ProcChainMask);
					if (damageInfo.attacker.gameObject.GetComponent<CharacterBody>().baseNameToken != "TEAL_DEKU_BODY_NAME" && (Object)(object)damageInfo.attacker != (Object)null)
					{
						damageInfo.attacker.GetComponent<CharacterBody>().healthComponent.TakeDamage(val);
					}
					EffectManager.SpawnEffect(DekuAssets.airforceEffect, new EffectData
					{
						origin = self.body.corePosition,
						scale = 1f,
						rotation = Quaternion.LookRotation(damageInfo.attacker.transform.position - self.body.corePosition)
					}, true);
					Vector3 position = damageInfo.attacker.transform.position;
				}
			}
			orig.Invoke(self, damageInfo);
		}

		private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (!Object.op_Implicit((Object)(object)self))
			{
				return;
			}
			if (self.HasBuff(Buffs.blackwhipDebuff))
			{
				self.moveSpeed *= 0.1f;
				self.attackSpeed *= 0.1f;
			}
			if (!(self.baseNameToken == "TEAL_DEKU_BODY_NAME"))
			{
				return;
			}
			if (self.HasBuff(Buffs.counterAttackBuff))
			{
				self.attackSpeed *= 3f;
			}
			if (self.HasBuff(Buffs.counterBuff))
			{
				self.armor += 200f;
			}
			if (self.HasBuff(Buffs.mightBuff))
			{
				self.damage *= 2f;
			}
			if (self.HasBuff(Buffs.blackwhipCDBuff))
			{
				GenericSkill secondary = self.skillLocator.secondary;
				secondary.cooldownScale *= 0.5f;
				GenericSkill utility = self.skillLocator.utility;
				utility.cooldownScale *= 0.5f;
			}
			if (self.HasBuff(Buffs.fajinBuff))
			{
				self.damage *= 1.5f;
			}
			if (self.HasBuff(Buffs.fajinMaxBuff))
			{
				self.damage *= 2f;
			}
			if (self.HasBuff(Buffs.floatBuff))
			{
				if (self.level >= 20f)
				{
					self.moveSpeed *= 2f;
					self.acceleration *= 3f;
				}
				self.moveSpeed *= 1.5f;
				self.acceleration *= 2f;
			}
			if (self.HasBuff(Buffs.goBeyondBuff))
			{
				self.armor *= 5f;
				self.moveSpeed *= 1.5f;
			}
		}

		private void CharacterBody_OnDeathStart(orig_OnDeathStart orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (self.baseNameToken == "TEAL_DEKU_BODY_NAME" && Config.allowVoice.Value)
			{
				AkSoundEngine.PostEvent("dekudeath", ((Component)self).gameObject);
			}
		}

		private void GlobalEventManager_OnDamageDealt(DamageReport report)
		{
			bool flag = !Object.op_Implicit((Object)(object)report.attacker) || !Object.op_Implicit((Object)(object)report.attackerBody);
		}

		private void CharacterModel_Awake(orig_Awake orig, CharacterModel self)
		{
			orig.Invoke(self);
			if (((Object)((Component)self).gameObject).name.Contains("DekuDisplay"))
			{
				if (Config.allowVoice.Value)
				{
					AkSoundEngine.PostEvent("dekuEntrance", ((Component)self).gameObject);
				}
				AkSoundEngine.PostEvent("stlouissfx", ((Component)self).gameObject);
			}
		}

		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))
			{
				OverlayFunction(DekuAssets.blackwhipDebuffMaterial, self.body.HasBuff(Buffs.blackwhipDebuff), self);
				OverlayFunction(DekuAssets.redblinkingMaterial, self.body.HasBuff(Buffs.counterAttackBuff), self);
				OverlayFunction(DekuAssets.whiteblinkingMaterial, self.body.HasBuff(Buffs.overlayBuff), self);
				OverlayFunction(DekuAssets.yellowblinkingMaterial, self.body.HasBuff(Buffs.mightBuff), self);
				OverlayFunction(DekuAssets.purpleblinkingMaterial, self.body.HasBuff(Buffs.blackwhipCDBuff), self);
			}
		}

		private void OverlayFunction(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;
			}
		}
	}
	internal static class Log
	{
		internal static ManualLogSource _logSource;

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

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

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

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

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

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

		internal static void Warning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
}
namespace DekuMod.SkillStates
{
	public class BaseMode : BaseDekuSkillState
	{
		public override void OnEnter()
		{
			base.OnEnter();
			if (energySystem.currentPlusUltra > StaticValues.super1Cost)
			{
				energySystem.SpendPlusUltra(StaticValues.super1Cost);
				SwitchAttack();
			}
		}

		protected virtual void SwitchAttack()
		{
		}

		public override void FixedUpdate()
		{
			base.FixedUpdate();
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			((EntityState)this).skillLocator.DeductCooldownFromAllSkillsServer(dekucon.skillCDTimer);
			dekucon.skillCDTimer = 0f;
		}

		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)5;
		}
	}
	public class BaseSkillstate
	{
	}
	public class BaseSpecial : BaseDekuSkillState
	{
		public enum superState
		{
			SUPER1,
			SUPER2,
			SUPER3
		}

		public superState state;

		public override void OnEnter()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0049: 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_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: 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_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			base.OnEnter();
			if (((EntityState)this).inputBank.moveVector == Vector3.zero)
			{
				NeutralSuper();
				state = superState.SUPER1;
				return;
			}
			Vector3 moveVector = ((EntityState)this).inputBank.moveVector;
			Vector3 aimDirection = ((EntityState)this).inputBank.aimDirection;
			Vector3 val = new Vector3(aimDirection.x, 0f, aimDirection.z);
			Vector3 normalized = ((Vector3)(ref val)).normalized;
			if (Vector3.Dot(((EntityState)this).inputBank.moveVector, normalized) >= 0.8f)
			{
				ForwardSuper();
				state = superState.SUPER3;
			}
			else if (Vector3.Dot(((EntityState)this).inputBank.moveVector, normalized) <= -0.8f)
			{
				BackwardSuper();
				state = superState.SUPER2;
			}
		}

		public override void FixedUpdate()
		{
			base.FixedUpdate();
		}

		protected virtual void NeutralSuper()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			if (((EntityState)this).characterBody.HasBuff(Buffs.fajinStoredBuff))
			{
				NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.fajinStoredBuff.buffIndex, ((EntityState)this).characterBody.GetBuffCount(Buffs.fajinStoredBuff) - 1, -1f);
				return;
			}
			if (energySystem.currentPlusUltra > StaticValues.super1Cost)
			{
				energySystem.SpendPlusUltra(StaticValues.super1Cost);
				return;
			}
			float num = StaticValues.super1Cost - energySystem.currentPlusUltra;
			float num2 = Mathf.FloorToInt(num / StaticValues.barCostCheck);
			float num3 = 0.1f;
			float num4 = num2;
			float num5 = num4;
			if (num5 != 1f)
			{
				if (num5 != 2f)
				{
					if (num5 == 3f)
					{
						num3 = StaticValues.plusUltraHealthCost3;
					}
				}
				else
				{
					num3 = StaticValues.plusUltraHealthCost2;
				}
			}
			else
			{
				num3 = StaticValues.plusUltraHealthCost;
			}
			if (((EntityState)this).isAuthority)
			{
				NetMessageExtensions.Send((INetMessage)(object)new SpendHealthNetworkRequest(((EntityState)this).characterBody.masterObjectId, ((EntityState)this).characterBody.healthComponent.fullHealth * num3), (NetworkDestination)1);
			}
		}

		protected virtual void BackwardSuper()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			if (((EntityState)this).characterBody.HasBuff(Buffs.fajinStoredBuff))
			{
				NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.fajinStoredBuff.buffIndex, ((EntityState)this).characterBody.GetBuffCount(Buffs.fajinStoredBuff) - 1, -1f);
				return;
			}
			if (energySystem.currentPlusUltra > StaticValues.super2Cost)
			{
				energySystem.SpendPlusUltra(StaticValues.super2Cost);
				return;
			}
			float num = StaticValues.super2Cost - energySystem.currentPlusUltra;
			float num2 = Mathf.FloorToInt(num / StaticValues.barCostCheck);
			Chat.AddMessage("bars missing = " + num2);
			float num3 = 0.1f;
			float num4 = num2;
			float num5 = num4;
			if (num5 != 1f)
			{
				if (num5 != 2f)
				{
					if (num5 == 3f)
					{
						num3 = StaticValues.plusUltraHealthCost3;
					}
				}
				else
				{
					num3 = StaticValues.plusUltraHealthCost2;
				}
			}
			else
			{
				num3 = StaticValues.plusUltraHealthCost;
				energySystem.SpendPlusUltra(StaticValues.super1Cost);
			}
			if (((EntityState)this).isAuthority)
			{
				NetMessageExtensions.Send((INetMessage)(object)new SpendHealthNetworkRequest(((EntityState)this).characterBody.masterObjectId, ((EntityState)this).characterBody.healthComponent.fullHealth * num3), (NetworkDestination)1);
			}
		}

		protected virtual void ForwardSuper()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			if (((EntityState)this).characterBody.HasBuff(Buffs.fajinStoredBuff))
			{
				NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.fajinStoredBuff.buffIndex, ((EntityState)this).characterBody.GetBuffCount(Buffs.fajinStoredBuff) - 1, -1f);
				return;
			}
			if (energySystem.currentPlusUltra >= StaticValues.super3Cost)
			{
				energySystem.SpendPlusUltra(StaticValues.super3Cost);
				return;
			}
			float num = StaticValues.super3Cost - energySystem.currentPlusUltra;
			float num2 = Mathf.FloorToInt(num / StaticValues.barCostCheck);
			Chat.AddMessage("bars missing = " + num2);
			float num3 = 0.1f;
			float num4 = num2;
			float num5 = num4;
			if (num5 != 1f)
			{
				if (num5 != 2f)
				{
					if (num5 == 3f)
					{
						num3 = StaticValues.plusUltraHealthCost3;
					}
				}
				else
				{
					num3 = StaticValues.plusUltraHealthCost2;
					energySystem.SpendPlusUltra(StaticValues.super1Cost);
				}
			}
			else
			{
				num3 = StaticValues.plusUltraHealthCost;
				energySystem.SpendPlusUltra(StaticValues.super2Cost);
			}
			if (((EntityState)this).isAuthority)
			{
				NetMessageExtensions.Send((INetMessage)(object)new SpendHealthNetworkRequest(((EntityState)this).characterBody.masterObjectId, ((EntityState)this).characterBody.healthComponent.fullHealth * num3), (NetworkDestination)1);
			}
		}

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)5;
		}
	}
	public class GoBeyondEmptySkill : BaseSkillState
	{
		public DekuController dekucon;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			dekucon = ((EntityState)this).GetComponent<DekuController>();
			if (((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)5;
		}
	}
	public class BlackwhipMode : BaseDekuSkillState
	{
		public SkillDef skilldef1;

		public SkillDef skilldef2;

		public SkillDef skilldef3;

		public SkillDef skilldef4;

		private bool isSwitch;

		private float duration;

		private BlastAttack blastAttack;

		public override void OnEnter()
		{
			base.OnEnter();
			skilldef1 = ((EntityState)this).characterBody.skillLocator.primary.skillDef;
			skilldef2 = ((EntityState)this).characterBody.skillLocator.secondary.skillDef;
			skilldef3 = ((EntityState)this).characterBody.skillLocator.utility.skillDef;
			skilldef4 = ((EntityState)this).characterBody.skillLocator.special.skillDef;
			if ((Object)(object)skilldef1 != (Object)(object)Deku.blackwhipPrimarySkillDef)
			{
				((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).skillLocator.primary, skilldef1, (SkillOverridePriority)4);
				((EntityState)this).skillLocator.primary.SetSkillOverride((object)((EntityState)this).skillLocator.primary, Deku.blackwhipPrimarySkillDef, (SkillOverridePriority)4);
				((EntityState)this).skillLocator.secondary.UnsetSkillOverride((object)((EntityState)this).skillLocator.secondary, skilldef2, (SkillOverridePriority)4);
				((EntityState)this).skillLocator.secondary.SetSkillOverride((object)((EntityState)this).skillLocator.secondary, Deku.blackwhipSecondarySkillDef, (SkillOverridePriority)4);
				((EntityState)this).skillLocator.utility.UnsetSkillOverride((object)((EntityState)this).skillLocator.utility, skilldef3, (SkillOverridePriority)4);
				((EntityState)this).skillLocator.utility.SetSkillOverride((object)((EntityState)this).skillLocator.utility, Deku.blackwhipUtilitySkillDef, (SkillOverridePriority)4);
				((EntityState)this).skillLocator.special.UnsetSkillOverride((object)((EntityState)this).skillLocator.utility, skilldef4, (SkillOverridePriority)4);
				((EntityState)this).skillLocator.special.SetSkillOverride((object)((EntityState)this).skillLocator.utility, Deku.blackwhipSpecialSkillDef, (SkillOverridePriority)4);
				if (energySystem.currentPlusUltra > StaticValues.super1Cost)
				{
					energySystem.SpendPlusUltra(StaticValues.super1Cost);
					SwitchAttack();
				}
			}
		}

		protected virtual void SwitchAttack()
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			isSwitch = true;
			((EntityState)this).skillLocator.ResetSkills();
			duration = 0.5f;
			NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.blackwhipCDBuff.buffIndex, 1, (float)(((EntityState)this).characterBody.GetBuffCount(Buffs.blackwhipCDBuff) + 6));
		}

		public override void FixedUpdate()
		{
			//IL_0033: 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_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Expected O, but got Unknown
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			base.FixedUpdate();
			if (isSwitch)
			{
				if (((EntityState)this).fixedAge > duration)
				{
					CharacterMotor characterMotor = ((EntityState)this).characterMotor;
					characterMotor.velocity *= 0.1f;
					blastAttack = new BlastAttack();
					blastAttack.procCoefficient = 1f;
					blastAttack.attacker = ((EntityState)this).gameObject;
					blastAttack.crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master);
					blastAttack.falloffModel = (FalloffModel)0;
					blastAttack.baseForce = 20000f;
					blastAttack.teamIndex = TeamComponent.GetObjectTeam(blastAttack.attacker);
					blastAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)0);
					blastAttack.attackerFiltering = (AttackerFiltering)2;
					blastAttack.radius = 20f * ((BaseState)this).attackSpeedStat;
					blastAttack.baseDamage = ((BaseState)this).damageStat * 3f * ((BaseState)this).attackSpeedStat;
					blastAttack.position = ((EntityState)this).characterBody.corePosition;
					DamageAPI.AddModdedDamageType(blastAttack, Damage.blackwhipImmobilise);
					blastAttack.Fire();
					((EntityState)this).outer.SetNextStateToMain();
				}
			}
			else
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			((EntityState)this).skillLocator.DeductCooldownFromAllSkillsServer(dekucon.skillCDTimer);
			dekucon.skillCDTimer = 0f;
		}

		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)5;
		}
	}
	public class MightMode : BaseDekuSkillState
	{
		public enum positionState
		{
			GROUND,
			AIR
		}

		public SkillDef skilldef1;

		public SkillDef skilldef2;

		public SkillDef skilldef3;

		public SkillDef skilldef4;

		private bool resetSwappedSkill2;

		private bool resetSwappedSkill3;

		private bool hasFired;

		private bool isSwitch;

		private float duration;

		private float attackTime;

		private float slamRadius;

		private GameObject slamIndicatorInstance;

		private float dropForce = 100f;

		public positionState state;

		private float dropTimer;

		private bool hasDropped;

		private CharacterCameraParamsData texasCameraParams = new CharacterCameraParamsData
		{
			maxPitch = BlendableFloat.op_Implicit(70f),
			minPitch = BlendableFloat.op_Implicit(-70f),
			pivotVerticalOffset = BlendableFloat.op_Implicit(1f),
			idealLocalCameraPos = BlendableVector3.op_Implicit(new Vector3(0f, 0f, -20f)),
			wallCushion = BlendableFloat.op_Implicit(0.1f)
		};

		private CameraParamsOverrideHandle camOverrideHandle;

		private float damage;

		private float force;

		public override void OnEnter()
		{
			base.OnEnter();
			skilldef1 = ((EntityState)this).characterBody.skillLocator.primary.skillDef;
			skilldef2 = ((EntityState)this).characterBody.skillLocator.secondary.skillDef;
			skilldef3 = ((EntityState)this).characterBody.skillLocator.utility.skillDef;
			skilldef4 = ((EntityState)this).characterBody.skillLocator.special.skillDef;
			if (dekucon.resetSkill2)
			{
				resetSwappedSkill2 = true;
			}
			if (dekucon.resetSkill3)
			{
				resetSwappedSkill3 = true;
			}
			if (((EntityState)this).skillLocator.secondary.stock >= 1)
			{
				dekucon.resetSkill2 = true;
			}
			else if (((EntityState)this).skillLocator.secondary.cooldownRemaining > 0f)
			{
				dekucon.resetSkill2 = false;
			}
			if ((Object)(object)skilldef3 == (Object)(object)Deku.mightUtilitySkillDef && ((EntityState)this).skillLocator.utility.stock >= ((EntityState)this).skillLocator.utility.GetBaseMaxStock())
			{
				dekucon.resetSkill3 = true;
			}
			else if ((Object)(object)skilldef3 == (Object)(object)Deku.mightUtilitySkillDef && ((EntityState)this).skillLocator.utility.stock < ((EntityState)this).skillLocator.utility.maxStock)
			{
				dekucon.resetSkill3 = false;
			}
			else if (((EntityState)this).skillLocator.utility.cooldownRemaining > 0f)
			{
				dekucon.resetSkill3 = false;
			}
			if (!((Object)(object)skilldef1 != (Object)(object)Deku.mightPrimarySkillDef))
			{
				return;
			}
			((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).skillLocator.primary, skilldef1, (SkillOverridePriority)4);
			((EntityState)this).skillLocator.primary.SetSkillOverride((object)((EntityState)this).skillLocator.primary, Deku.mightPrimarySkillDef, (SkillOverridePriority)4);
			((EntityState)this).skillLocator.secondary.UnsetSkillOverride((object)((EntityState)this).skillLocator.secondary, skilldef2, (SkillOverridePriority)4);
			((EntityState)this).skillLocator.secondary.SetSkillOverride((object)((EntityState)this).skillLocator.secondary, Deku.mightSecondarySkillDef, (SkillOverridePriority)4);
			((EntityState)this).skillLocator.utility.UnsetSkillOverride((object)((EntityState)this).skillLocator.utility, skilldef3, (SkillOverridePriority)4);
			((EntityState)this).skillLocator.utility.SetSkillOverride((object)((EntityState)this).skillLocator.utility, Deku.mightUtilitySkillDef, (SkillOverridePriority)4);
			((EntityState)this).skillLocator.special.UnsetSkillOverride((object)((EntityState)this).skillLocator.utility, skilldef4, (SkillOverridePriority)4);
			((EntityState)this).skillLocator.special.SetSkillOverride((object)((EntityState)this).skillLocator.utility, Deku.mightSpecialSkillDef, (SkillOverridePriority)4);
			if (resetSwappedSkill2)
			{
				((EntityState)this).skillLocator.secondary.AddOneStock();
			}
			if (resetSwappedSkill3)
			{
				for (int i = 0; i < ((EntityState)this).skillLocator.utility.GetBaseMaxStock(); i++)
				{
					((EntityState)this).skillLocator.utility.AddOneStock();
				}
			}
			if (!resetSwappedSkill2 || !resetSwappedSkill3)
			{
				((EntityState)this).skillLocator.DeductCooldownFromAllSkillsAuthority(dekucon.skillCDTimer);
				for (int j = 0; j < (int)dekucon.skillCDTimer; j++)
				{
					((EntityState)this).skillLocator.utility.AddOneStock();
				}
			}
			dekucon.skillCDTimer = 0f;
			if (energySystem.currentPlusUltra > StaticValues.super1Cost)
			{
				energySystem.SpendPlusUltra(StaticValues.super1Cost);
				SwitchAttack();
			}
		}

		protected virtual void SwitchAttack()
		{
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_028d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0292: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0304: Unknown result type (might be due to invalid IL or missing references)
			//IL_0309: Unknown result type (might be due to invalid IL or missing references)
			//IL_031a: Unknown result type (might be due to invalid IL or missing references)
			//IL_031c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0325: Unknown result type (might be due to invalid IL or missing references)
			//IL_032d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0332: Unknown result type (might be due to invalid IL or missing references)
			isSwitch = true;
			((EntityState)this).skillLocator.ResetSkills();
			for (int i = 0; i < ((EntityState)this).skillLocator.utility.maxStock; i++)
			{
				if (((EntityState)this).skillLocator.utility.stock < ((EntityState)this).skillLocator.utility.maxStock)
				{
					((EntityState)this).skillLocator.utility.AddOneStock();
				}
			}
			modelTransform = ((EntityState)this).GetModelTransform();
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				animator = ((Component)modelTransform).GetComponent<Animator>();
				characterModel = ((Component)modelTransform).GetComponent<CharacterModel>();
				hurtboxGroup = ((Component)modelTransform).GetComponent<HurtBoxGroup>();
			}
			((EntityState)this).GetModelAnimator().SetFloat("Attack.playbackRate", ((BaseState)this).attackSpeedStat);
			slamRadius = 20f * ((BaseState)this).attackSpeedStat;
			damage = 6f * ((BaseState)this).attackSpeedStat;
			force = 5000f;
			if (((EntityState)this).characterMotor.isGrounded)
			{
				state = positionState.GROUND;
				duration = 0.5f / ((BaseState)this).attackSpeedStat;
				attackTime = 0.25f / ((BaseState)this).attackSpeedStat;
				CameraParamsOverrideRequest val = default(CameraParamsOverrideRequest);
				val.cameraParamsData = texasCameraParams;
				val.priority = 0f;
				CameraParamsOverrideRequest val2 = val;
				camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val2, attackTime);
				((EntityState)this).PlayCrossfade("FullBody, Override", "TexasSmash", "Attack.playbackRate", duration, 0.01f);
				AkSoundEngine.PostEvent("shootstyledashcombosfx", ((EntityState)this).gameObject);
				switch (level)
				{
				case 0:
					break;
				case 1:
					slamRadius *= 1.5f;
					force *= 1.5f;
					break;
				case 2:
					slamRadius *= 2f;
					force *= 2f;
					if (dekucon.RARMGEARSHIFT.isStopped)
					{
						dekucon.RARMGEARSHIFT.Play();
					}
					break;
				}
			}
			else if (!((EntityState)this).characterMotor.isGrounded)
			{
				state = positionState.AIR;
				((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
				((EntityState)this).characterMotor.velocity = Vector3.zero;
				((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
				((EntityState)this).characterMotor.disableAirControlUntilCollision = true;
				((EntityState)this).GetModelAnimator().SetBool("texasSmashAirEnd", false);
				attackTime = 0.8f / ((BaseState)this).attackSpeedStat;
				((EntityState)this).PlayAnimation("FullBody, Override", "TexasSmashAir", "Attack.playbackRate", attackTime, 0f);
				CameraParamsOverrideRequest val = default(CameraParamsOverrideRequest);
				val.cameraParamsData = texasCameraParams;
				val.priority = 0f;
				CameraParamsOverrideRequest val3 = val;
				camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val3, attackTime);
				switch (level)
				{
				case 0:
					break;
				case 1:
					dropForce *= 1.5f;
					break;
				case 2:
					dropForce *= 2f;
					break;
				}
			}
		}

		public override void FixedUpdate()
		{
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Expected O, but got Unknown
			base.FixedUpdate();
			if (isSwitch)
			{
				switch (state)
				{
				case positionState.GROUND:
					if (((EntityState)this).fixedAge > attackTime && !hasFired)
					{
						hasFired = true;
						switch (level)
						{
						case 0:
							LandingImpact();
							break;
						case 1:
							LandingImpact();
							LandingImpact();
							break;
						case 2:
							LandingImpact();
							LandingImpact();
							LandingImpact();
							LandingImpact();
							LandingImpact();
							break;
						}
					}
					if (((EntityState)this).fixedAge > duration)
					{
						((EntityState)this).outer.SetNextStateToMain();
					}
					break;
				case positionState.AIR:
					if (((EntityState)this).fixedAge <= attackTime)
					{
						((EntityState)this).characterMotor.velocity.y = 0f;
					}
					if (((EntityState)this).fixedAge > attackTime)
					{
						if (dekucon.RARM.isStopped)
						{
							dekucon.RARM.Play();
						}
						TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(new GameObject());
						val.duration = 1f;
						val.animateShaderAlpha = true;
						val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
						val.destroyComponentOnEnd = true;
						val.originalMaterial = DekuAssets.fullCowlingMaterial;
						val.inspectorCharacterModel = ((Component)animator).gameObject.GetComponent<CharacterModel>();
						dropTimer += Time.fixedDeltaTime;
						switch (level)
						{
						case 0:
							slamRadius = 20f + (1f + dropTimer / 2f) * ((BaseState)this).attackSpeedStat;
							damage = 6f + (1f + dropTimer / 2f) * ((BaseState)this).attackSpeedStat;
							force = 5000f * (1f + dropTimer);
							break;
						case 1:
							slamRadius = 20f + (1f + dropTimer / 2f) * ((BaseState)this).attackSpeedStat * 1.5f;
							force = 5000f * (1f + dropTimer / 2f) * ((BaseState)this).attackSpeedStat * 1.5f;
							damage = 6f + (1f + dropTimer / 2f) * ((BaseState)this).attackSpeedStat * 1.5f;
							break;
						case 2:
							slamRadius = 20f + (1f + dropTimer / 2f) * ((BaseState)this).attackSpeedStat * 2f;
							force = 5000f * (1f + dropTimer / 2f) * ((BaseState)this).attackSpeedStat * 2f;
							damage = 6f + (1f + dropTimer / 2f) * ((BaseState)this).attackSpeedStat * 2f;
							break;
						}
						if (!hasDropped)
						{
							StartDrop();
							AkSoundEngine.PostEvent("shootstyledashsfx", ((EntityState)this).gameObject);
						}
						if (!Object.op_Implicit((Object)(object)slamIndicatorInstance))
						{
							CreateIndicator();
						}
						if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
						{
							UpdateSlamIndicator();
						}
						if (hasDropped && ((EntityState)this).isAuthority && !((EntityState)this).characterMotor.disableAirControlUntilCollision)
						{
							((EntityState)this).GetModelAnimator().SetBool("texasSmashAirEnd", true);
							switch (level)
							{
							case 0:
								LandingImpact();
								break;
							case 1:
								LandingImpact();
								LandingImpact();
								break;
							case 2:
								LandingImpact();
								LandingImpact();
								LandingImpact();
								LandingImpact();
								LandingImpact();
								if (dekucon.RARMGEARSHIFT.isStopped)
								{
									dekucon.RARMGEARSHIFT.Play();
								}
								break;
							}
							((EntityState)this).outer.SetNextStateToMain();
							break;
						}
					}
					if (((EntityState)this).fixedAge > 6f)
					{
						((EntityState)this).outer.SetNextStateToMain();
					}
					break;
				}
			}
			else
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private void StartDrop()
		{
			hasDropped = true;
			((EntityState)this).characterMotor.disableAirControlUntilCollision = true;
			((EntityState)this).characterMotor.velocity.y = (0f - dropForce) * ((BaseState)this).attackSpeedStat;
		}

		private void CreateIndicator()
		{
			if (Object.op_Implicit((Object)(object)ArrowRain.areaIndicatorPrefab))
			{
				slamIndicatorInstance = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab);
				slamIndicatorInstance.SetActive(true);
			}
		}

		private void UpdateSlamIndicator()
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				slamIndicatorInstance.transform.localScale = Vector3.one * slamRadius;
				slamIndicatorInstance.transform.localPosition = ((EntityState)this).transform.position;
			}
		}

		private void LandingImpact()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: 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_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Expected O, but got Unknown
			//IL_016c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Expected O, but got Unknown
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			if (((EntityState)this).isAuthority)
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
				if (state == positionState.AIR)
				{
					CharacterMotor characterMotor = ((EntityState)this).characterMotor;
					characterMotor.velocity *= 0.1f;
				}
				BlastAttack val = new BlastAttack();
				val.radius = slamRadius;
				val.procCoefficient = 1f;
				val.position = ((EntityState)this).characterBody.footPosition;
				val.attacker = ((EntityState)this).gameObject;
				val.crit = ((BaseState)this).RollCrit();
				val.baseDamage = ((EntityState)this).characterBody.damage * damage;
				val.falloffModel = (FalloffModel)0;
				val.baseForce = force;
				val.bonusForce = new Vector3(0f, force / 10f, 0f);
				val.teamIndex = ((EntityState)this).teamComponent.teamIndex;
				val.damageType = DamageTypeCombo.op_Implicit((DamageType)0);
				val.attackerFiltering = (AttackerFiltering)2;
				Result val2 = val.Fire();
				if (val2.hitCount > 0)
				{
					OnHitEnemyAuthority(val2);
				}
				GameObject mageLightningBombEffectPrefab = DekuAssets.mageLightningBombEffectPrefab;
				EffectData val3 = new EffectData
				{
					origin = ((EntityState)this).characterBody.corePosition,
					scale = 20f * ((BaseState)this).attackSpeedStat
				};
				Ray aimRay2 = ((BaseState)this).GetAimRay();
				val3.rotation = Quaternion.LookRotation(((Ray)(ref aimRay2)).direction);
				EffectManager.SpawnEffect(mageLightningBombEffectPrefab, val3, true);
				GameObject texasEffect = DekuAssets.texasEffect;
				EffectData val4 = new EffectData
				{
					origin = ((EntityState)this).characterBody.corePosition,
					scale = 1f
				};
				aimRay2 = ((BaseState)this).GetAimRay();
				val4.rotation = Quaternion.LookRotation(((Ray)(ref aimRay2)).direction);
				EffectManager.SpawnEffect(texasEffect, val4, true);
			}
		}

		protected virtual void OnHitEnemyAuthority(Result result)
		{
			//IL_0013: 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_002c: 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_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			AkSoundEngine.PostEvent("impactsfx", ((EntityState)this).gameObject);
			HitPoint[] hitPoints = result.hitPoints;
			foreach (HitPoint val in hitPoints)
			{
				EffectManager.SpawnEffect(DekuAssets.dekuHitImpactEffect, new EffectData
				{
					origin = ((Component)val.hurtBox.healthComponent.body).gameObject.transform.position,
					scale = 1f
				}, true);
			}
		}

		public override void OnExit()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).OnExit();
			((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.3f);
			if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				slamIndicatorInstance.SetActive(false);
				EntityState.Destroy((Object)(object)slamIndicatorInstance);
			}
			if (isSwitch)
			{
				switch (level)
				{
				case 0:
					NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.mightBuff.buffIndex, 1, 6f);
					break;
				case 1:
					NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.mightBuff.buffIndex, 1, 9f);
					break;
				case 2:
					NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.mightBuff.buffIndex, 1, 12f);
					break;
				}
			}
		}

		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)5;
		}
	}
	public class ShootStyleMode : BaseDekuSkillState
	{
		public SkillDef skilldef1;

		public SkillDef skilldef2;

		public SkillDef skilldef3;

		public SkillDef skilldef4;

		private bool resetSwappedSkill2;

		private bool resetSwappedSkill3;

		private bool isSwitch;

		private BlastAttack blastAttack;

		private float dropForce = 100f;

		private float slamForce;

		private float damage;

		private GameObject slamIndicatorInstance;

		private float dropTimer;

		private bool hasDropped;

		private float movespeedMultiplier;

		private float slamRadius;

		private float attackTime;

		private bool hasJumped;

		private CharacterCameraParamsData manchesterCameraParams = new CharacterCameraParamsData
		{
			maxPitch = BlendableFloat.op_Implicit(70f),
			minPitch = BlendableFloat.op_Implicit(-70f),
			pivotVerticalOffset = BlendableFloat.op_Implicit(1f),
			idealLocalCameraPos = BlendableVector3.op_Implicit(new Vector3(0f, 20f, -50f)),
			wallCushion = BlendableFloat.op_Implicit(0.1f)
		};

		private CameraParamsOverrideHandle camOverrideHandle;

		private Vector3 startPos;

		private Vector3 endPos;

		public override void OnEnter()
		{
			base.OnEnter();
			skilldef1 = ((EntityState)this).characterBody.skillLocator.primary.skillDef;
			skilldef2 = ((EntityState)this).characterBody.skillLocator.secondary.skillDef;
			skilldef3 = ((EntityState)this).characterBody.skillLocator.utility.skillDef;
			skilldef4 = ((EntityState)this).characterBody.skillLocator.special.skillDef;
			if (dekucon.resetSkill2)
			{
				resetSwappedSkill2 = true;
			}
			if (dekucon.resetSkill3)
			{
				resetSwappedSkill3 = true;
			}
			if (((EntityState)this).skillLocator.secondary.cooldownRemaining > 0f)
			{
				dekucon.resetSkill2 = false;
			}
			if ((Object)(object)skilldef3 == (Object)(object)Deku.mightUtilitySkillDef && ((EntityState)this).skillLocator.utility.stock < ((EntityState)this).skillLocator.utility.maxStock)
			{
				dekucon.resetSkill3 = false;
			}
			else if (((EntityState)this).skillLocator.utility.cooldownRemaining > 0f)
			{
				dekucon.resetSkill3 = false;
			}
			if ((Object)(object)skilldef1 != (Object)(object)Deku.shootPrimarySkillDef)
			{
				((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).skillLocator.primary, skilldef1, (SkillOverridePriority)4);
				((EntityState)this).skillLocator.primary.SetSkillOverride((object)((EntityState)this).skillLocator.primary, Deku.shootPrimarySkillDef, (SkillOverridePriority)4);
				((EntityState)this).skillLocator.secondary.UnsetSkillOverride((object)((EntityState)this).skillLocator.secondary, skilldef2, (SkillOverridePriority)4);
				((EntityState)this).skillLocator.secondary.SetSkillOverride((object)((EntityState)this).skillLocator.secondary, Deku.shootSecondarySkillDef, (SkillOverridePriority)4);
				((EntityState)this).skillLocator.utility.UnsetSkillOverride((object)((EntityState)this).skillLocator.utility, skilldef3, (SkillOverridePriority)4);
				((EntityState)this).skillLocator.utility.SetSkillOverride((object)((EntityState)this).skillLocator.utility, Deku.shootUtilitySkillDef, (SkillOverridePriority)4);
				((EntityState)this).skillLocator.special.UnsetSkillOverride((object)((EntityState)this).skillLocator.utility, skilldef4, (SkillOverridePriority)4);
				((EntityState)this).skillLocator.special.SetSkillOverride((object)((EntityState)this).skillLocator.utility, Deku.shootSpecialSkillDef, (SkillOverridePriority)4);
				if (resetSwappedSkill2)
				{
					((EntityState)this).skillLocator.secondary.AddOneStock();
				}
				if (resetSwappedSkill3)
				{
					((EntityState)this).skillLocator.utility.AddOneStock();
				}
				if (!resetSwappedSkill2 || !resetSwappedSkill3)
				{
					((EntityState)this).skillLocator.DeductCooldownFromAllSkillsAuthority(dekucon.skillCDTimer);
				}
				dekucon.skillCDTimer = 0f;
				if (energySystem.currentPlusUltra > StaticValues.super1Cost)
				{
					energySystem.SpendPlusUltra(StaticValues.super1Cost);
					SwitchAttack();
				}
			}
		}

		protected virtual void SwitchAttack()
		{
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_0248: 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_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_021a: Unknown result type (might be due to invalid IL or missing references)
			//IL_021f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_022e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0233: 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_026c: Expected O, but got Unknown
			isSwitch = true;
			((EntityState)this).skillLocator.ResetSkills();
			attackTime = 0.5f / ((BaseState)this).attackSpeedStat;
			modelTransform = ((EntityState)this).GetModelTransform();
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				animator = ((Component)modelTransform).GetComponent<Animator>();
				characterModel = ((Component)modelTransform).GetComponent<CharacterModel>();
				hurtboxGroup = ((Component)modelTransform).GetComponent<HurtBoxGroup>();
			}
			((EntityState)this).GetModelAnimator().SetFloat("Attack.playbackRate", ((BaseState)this).attackSpeedStat);
			((EntityState)this).GetModelAnimator().SetBool("manchesterDownEnd", false);
			((EntityState)this).PlayAnimation("Body", "Jump", "Attack.playbackRate", attackTime, 0f);
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
			((EntityState)this).characterMotor.velocity = Vector3.zero;
			startPos = ((EntityState)this).characterBody.corePosition;
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
			float num = ((BaseState)this).moveSpeedStat;
			if (((EntityState)this).characterBody.isSprinting)
			{
				num /= ((EntityState)this).characterBody.sprintingSpeedMultiplier;
			}
			float num2 = (num / ((EntityState)this).characterBody.baseMoveSpeed - 1f) * 0.67f;
			movespeedMultiplier = num2 + 1f;
			dropForce *= movespeedMultiplier;
			((EntityState)this).characterMotor.disableAirControlUntilCollision = true;
			switch (level)
			{
			case 1:
				dropForce *= 1.5f;
				break;
			case 2:
				dropForce *= 2f;
				NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.fajinStoredBuff.buffIndex, ((EntityState)this).characterBody.GetBuffCount(Buffs.fajinStoredBuff) + 3, -1f);
				break;
			}
			if (Object.op_Implicit((Object)(object)dekucon.GetTrackingTarget()))
			{
				endPos = ((Component)dekucon.GetTrackingTarget()).transform.position + Vector3.up * 40f;
			}
			else
			{
				endPos = ((EntityState)this).characterBody.footPosition + Vector3.up * 40f;
			}
			TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(new GameObject());
			val.duration = 1f;
			val.animateShaderAlpha = true;
			val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
			val.destroyComponentOnEnd = true;
			val.originalMaterial = DekuAssets.fullCowlingMaterial;
			val.inspectorCharacterModel = ((Component)animator).gameObject.GetComponent<CharacterModel>();
		}

		public override void Update()
		{
			((EntityState)this).Update();
			if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				UpdateSlamIndicator();
			}
		}

		protected virtual void OnHitEnemyAuthority(Result result)
		{
			//IL_0013: 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_002c: 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_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			AkSoundEngine.PostEvent("impactsfx", ((EntityState)this).gameObject);
			HitPoint[] hitPoints = result.hitPoints;
			foreach (HitPoint val in hitPoints)
			{
				EffectManager.SpawnEffect(DekuAssets.dekuHitImpactEffect, new EffectData
				{
					origin = ((Component)val.hurtBox.healthComponent.body).gameObject.transform.position,
					scale = 1f
				}, true);
				((EntityState)this).characterBody.skillLocator.secondary.AddOneStock();
				((EntityState)this).characterBody.skillLocator.utility.AddOneStock();
			}
		}

		private void SetPosition(Vector3 newPosition)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPositionAndRotation(newPosition, Quaternion.identity, true);
			}
		}

		public override void FixedUpdate()
		{
			//IL_002d: 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_0044: Unknown result type (might be due to invalid IL or missing references)
			base.FixedUpdate();
			if (isSwitch)
			{
				if (((EntityState)this).fixedAge <= 0.2f)
				{
					SetPosition(Vector3.Lerp(startPos, endPos, ((EntityState)this).fixedAge / 0.2f));
				}
				else if (((EntityState)this).fixedAge > 0.2f && !hasJumped)
				{
					hasJumped = true;
					((EntityState)this).PlayAnimation("FullBody, Override", "ManchesterSmashDown", "Attack.playbackRate", attackTime, 0f);
					if (level == 2 && dekucon.BODYGEARSHIFT.isStopped)
					{
						dekucon.BODYGEARSHIFT.Play();
					}
				}
				if (((EntityState)this).fixedAge > attackTime)
				{
					dropTimer += Time.fixedDeltaTime;
					slamRadius = 5f + (1f + dropTimer / 2f) * movespeedMultiplier;
					if (!hasDropped)
					{
						AkSoundEngine.PostEvent("shootstyledashsfx", ((EntityState)this).gameObject);
						StartDrop();
					}
					if (!Object.op_Implicit((Object)(object)slamIndicatorInstance))
					{
						CreateIndicator();
					}
					if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
					{
						UpdateSlamIndicator();
					}
					if (hasDropped && ((EntityState)this).isAuthority && !((EntityState)this).characterMotor.disableAirControlUntilCollision)
					{
						((EntityState)this).GetModelAnimator().SetBool("manchesterDownEnd", true);
						switch (level)
						{
						case 0:
							LandingImpact();
							break;
						case 1:
							LandingImpact();
							break;
						case 2:
							LandingImpact();
							break;
						}
						((EntityState)this).outer.SetNextStateToMain();
						return;
					}
				}
				if (((EntityState)this).fixedAge > 6f)
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
			}
			else
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private void StartDrop()
		{
			hasDropped = true;
			((EntityState)this).characterMotor.disableAirControlUntilCollision = true;
			((EntityState)this).characterMotor.velocity.y = 0f - dropForce;
		}

		private void CreateIndicator()
		{
			if (Object.op_Implicit((Object)(object)ArrowRain.areaIndicatorPrefab))
			{
				slamIndicatorInstance = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab);
				slamIndicatorInstance.SetActive(true);
			}
		}

		private void UpdateSlamIndicator()
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				slamIndicatorInstance.transform.localScale = Vector3.one * slamRadius;
				slamIndicatorInstance.transform.localPosition = ((EntityState)this).transform.position;
			}
		}

		private void LandingImpact()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Expected O, but got Unknown
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_021f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0224: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_0236: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_0248: Unknown result type (might be due to invalid IL or missing references)
			//IL_025f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_0287: Unknown result type (might be due to invalid IL or missing references)
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0296: 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_02b0: 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_02e4: Expected O, but got Unknown
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_0307: 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_0319: Unknown result type (might be due to invalid IL or missing references)
			//IL_032b: Unknown result type (might be due to invalid IL or missing references)
			//IL_032d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0332: Unknown result type (might be due to invalid IL or missing references)
			//IL_0336: Unknown result type (might be due to invalid IL or missing references)
			//IL_033b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0340: Unknown result type (might be due to invalid IL or missing references)
			//IL_034b: Expected O, but got Unknown
			if (((EntityState)this).isAuthority)
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
				switch (level)
				{
				case 0:
					slamRadius = 5f + (1f + dropTimer / 2f) * ((BaseState)this).attackSpeedStat;
					damage = 6f * (1f + dropTimer / 2f) * movespeedMultiplier;
					slamForce = 1000f * (1f + dropTimer);
					break;
				case 1:
					slamRadius = 5f + (1f + dropTimer / 2f) * ((BaseState)this).attackSpeedStat * 1.5f;
					slamForce = 1000f * (1f + dropTimer) * ((BaseState)this).attackSpeedStat * 1.5f;
					damage = 6f * (1f + dropTimer / 2f) * movespeedMultiplier * 1.5f;
					break;
				case 2:
					slamRadius = 5f + (1f + dropTimer / 2f) * ((BaseState)this).attackSpeedStat * 2f;
					slamForce = 1000f * (1f + dropTimer) * ((BaseState)this).attackSpeedStat * 2f;
					damage = 6f * (1f + dropTimer / 2f) * movespeedMultiplier * 2f;
					break;
				}
				BlastAttack val = new BlastAttack();
				val.radius = slamRadius;
				val.procCoefficient = 1f;
				val.position = ((EntityState)this).characterBody.footPosition;
				val.attacker = ((EntityState)this).gameObject;
				val.crit = ((BaseState)this).RollCrit();
				val.baseDamage = ((EntityState)this).characterBody.damage * damage;
				val.falloffModel = (FalloffModel)0;
				val.baseForce = slamForce;
				val.teamIndex = ((EntityState)this).teamComponent.teamIndex;
				val.damageType = DamageTypeCombo.op_Implicit((DamageType)0);
				val.attackerFiltering = (AttackerFiltering)2;
				Result val2 = val.Fire();
				if (val2.hitCount > 0)
				{
					OnHitEnemyAuthority(val2);
				}
				for (int i = 0; i <= 4; i++)
				{
					Vector3 origin = ((EntityState)this).characterBody.footPosition + Random.insideUnitSphere * (slamRadius * (1f + dropTimer) * 0.5f);
					origin.y = ((EntityState)this).characterBody.footPosition.y;
					EffectManager.SpawnEffect(GroundSlam.slamEffectPrefab, new EffectData
					{
						origin = origin,
						scale = slamRadius * (1f + dropTimer / 2f) * movespeedMultiplier
					}, true);
				}
				GameObject mageLightningBombEffectPrefab = DekuAssets.mageLightningBombEffectPrefab;
				EffectData val3 = new EffectData
				{
					origin = ((EntityState)this).characterBody.corePosition,
					scale = 20f * ((BaseState)this).attackSpeedStat
				};
				Ray aimRay2 = ((BaseState)this).GetAimRay();
				val3.rotation = Quaternion.LookRotation(((Ray)(ref aimRay2)).direction);
				EffectManager.SpawnEffect(mageLightningBombEffectPrefab, val3, true);
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				slamIndicatorInstance.SetActive(false);
			}
			EntityState.Destroy((Object)(object)slamIndicatorInstance);
			((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal;
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
		}

		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)5;
		}
	}
	public class Airforce100 : BaseDekuSkillState
	{
		public static float procCoefficient = 1f;

		public static float baseDuration = 0.4f;

		public static float force = 300f;

		public static float recoil = 0.5f;

		public static float range = 200f;

		private float duration;

		private float fireTime;

		private bool hasFired;

		private string muzzleString;

		private string muzzleSwingString;

		protected DamageType damageType = (DamageType)0;

		private BulletAttack bulletAttack;

		private BlastAttack blastAttack;

		public float blastRadius = 5f;

		public int punchIndex;

		public int actualshotsFired;

		public int shotsFired = 1;

		public override void OnEnter()
		{
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			base.OnEnter();
			if (shotsFired > 10)
			{
				shotsFired = 10;
			}
			duration = baseDuration / (((BaseState)this).attackSpeedStat * ((float)shotsFired / 5f));
			fireTime = 0.5f * duration;
			((EntityState)this).characterBody.SetAimTimer(duration);
			((EntityState)this).GetModelAnimator().SetFloat("Attack.playbackRate", ((BaseState)this).attackSpeedStat);
			((EntityState)this).GetModelAnimator().SetBool("attacking", true);
			muzzleString = ((punchIndex % 2 == 0) ? "LFinger" : "RFinger");
			muzzleSwingString = ((punchIndex % 2 == 0) ? "LPunchSwing" : "RPunchSwing");
			EffectManager.SimpleMuzzleFlash(DekuAssets.dekuKickEffect, ((EntityState)this).gameObject, muzzleSwingString, true);
			((EntityState)this).PlayAnimation("FullBody, Override", (punchIndex % 2 == 0) ? "DekurapidpunchL" : "DekurapidpunchR", "Attack.playbackRate", duration, 0f);
			if (((EntityState)this).isAuthority)
			{
				NetMessageExtensions.Send((INetMessage)(object)new SpendHealthNetworkRequest(((EntityState)this).characterBody.masterObjectId, 0.005f * ((EntityState)this).characterBody.healthComponent.fullHealth), (NetworkDestination)1);
			}
		}

		private bool ApplyBlastAttackOnHit(BulletAttack bulletAttackRef, ref BulletHit hitInfo)
		{
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Expected O, but got Unknown
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Expected O, but got Unknown
			//IL_00c5: 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_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			HurtBox hitHurtBox = hitInfo.hitHurtBox;
			if (Object.op_Implicit((Object)(object)hitHurtBox))
			{
				HealthComponent healthComponent = hitHurtBox.healthComponent;
				if (Object.op_Implicit((Object)(object)healthComponent))
				{
					CharacterBody body = healthComponent.body;
					if (Object.op_Implicit((Object)(object)body))
					{
						Ray aimRay = ((BaseState)this).GetAimRay();
						EffectManager.SpawnEffect(DekuAssets.airforce100impactEffect, new EffectData
						{
							origin = healthComponent.body.corePosition,
							scale = 1f,
							rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction)
						}, true);
						blastAttack = new BlastAttack();
						blastAttack.radius = blastRadius;
						blastAttack.procCoefficient = 0.2f;
						blastAttack.position = healthComponent.body.corePosition;
						blastAttack.attacker = ((EntityState)this).gameObject;
						blastAttack.crit = ((BaseState)this).RollCrit();
						blastAttack.baseDamage = 4f * ((BaseState)this).damageStat;
						blastAttack.falloffModel = (FalloffModel)0;
						blastAttack.baseForce = force;
						blastAttack.teamIndex = TeamComponent.GetObjectTeam(blastAttack.attacker);
						blastAttack.damageType = DamageTypeCombo.op_Implicit(damageType);
						blastAttack.attackerFiltering = (AttackerFiltering)0;
						blastAttack.Fire();
					}
				}
			}
			return false;
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			((EntityState)this).GetModelAnimator().SetBool("attacking", false);
		}

		private void Fire()
		{
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Expected O, but got Unknown
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fb: 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_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_025a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Expected O, but got Unknown
			if (!hasFired)
			{
				hasFired = true;
				((EntityState)this).characterBody.AddSpreadBloom(1f);
				EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false);
				if (((EntityState)this).isAuthority)
				{
					AkSoundEngine.PostEvent("airforcesfx", ((EntityState)this).gameObject);
				}
				if (((EntityState)this).isAuthority)
				{
					Ray aimRay = ((BaseState)this).GetAimRay();
					((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil);
					bulletAttack = new BulletAttack();
					bulletAttack.bulletCount = 1u;
					bulletAttack.aimVector = ((Ray)(ref aimRay)).direction;
					bulletAttack.origin = ((Ray)(ref aimRay)).origin;
					bulletAttack.damage = 4f * ((BaseState)this).damageStat;
					bulletAttack.damageColorIndex = (DamageColorIndex)0;
					bulletAttack.damageType = DamageTypeCombo.op_Implicit(damageType);
					bulletAttack.falloffModel = (FalloffModel)0;
					bulletAttack.maxDistance = range;
					bulletAttack.force = force;
					bulletAttack.hitMask = CommonMasks.bullet;
					bulletAttack.minSpread = 0f;
					bulletAttack.maxSpread = 0f;
					bulletAttack.isCrit = ((BaseState)this).RollCrit();
					bulletAttack.owner = ((EntityState)this).gameObject;
					bulletAttack.muzzleName = muzzleString;
					bulletAttack.smartCollision = false;
					bulletAttack.procChainMask = default(ProcChainMask);
					bulletAttack.procCoefficient = procCoefficient;
					bulletAttack.radius = 0.5f;
					bulletAttack.sniper = false;
					bulletAttack.stopperMask = CommonMasks.bullet;
					bulletAttack.weapon = null;
					bulletAttack.spreadPitchScale = 0f;
					bulletAttack.spreadYawScale = 0f;
					bulletAttack.queryTriggerInteraction = (QueryTriggerInteraction)0;
					bulletAttack.hitEffectPrefab = DekuAssets.airforce100impactEffect;
					bulletAttack.hitCallback = new HitCallback(ApplyBlastAttackOnHit);
					bulletAttack.Fire();
				}
			}
		}

		protected void SetNextState()
		{
			int num = ((punchIndex == 0) ? 1 : 0);
			int num2 = shotsFired + 1;
			((EntityState)this).outer.SetNextState((EntityState)(object)new Airforce100
			{
				punchIndex = num,
				shotsFired = num2
			});
		}

		public override void FixedUpdate()
		{
			base.FixedUpdate();
			if (((EntityState)this).fixedAge >= fireTime)
			{
				Fire();
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				if (((EntityState)this).inputBank.skill1.down)
				{
					SetNextState();
				}
				else
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
			}
		}

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

		public float baseDuration = 0.7f;

		public static int bulletCount = 3;

		public static float bulletSpread = 1f;

		public static float bulletRecoil = 1f;

		public static float bulletRange = 100f;

		public static float bulletwidth = 0.7f;

		public static GameObject tracerEffectPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/TracerHuntressSnipe");

		public static bool levelHasChanged;

		private float originalBulletwidth = 0.7f;

		protected float duration;

		protected float fireDuration;

		protected float attackStopDuration;

		protected bool hasFired;

		private new Animator animator;

		protected string muzzleString;

		private Quaternion baserotation;

		public override void OnEnter()
		{
			base.OnEnter();
			((EntityState)this).characterBody.SetAimTimer(5f);
			animator = ((EntityState)this).GetModelAnimator();
			muzzleString = "LFinger";
			hasFired = false;
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			((EntityState)this).GetModelAnimator().SetFloat("Attack.playbackRate", ((BaseState)this).attackSpeedStat);
			((EntityState)this).PlayCrossfade("LeftArm, Override", "FingerFlick", "Attack.playbackRate", duration, 0.2f);
			fireDuration = 0.1f * duration;
		}

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

		public virtual void FireBullet()
		{
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: 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_016a: 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_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Expected O, but got Unknown
			if (!hasFired)
			{
				hasFired = true;
				if (((EntityState)this).isAuthority)
				{
					AkSoundEngine.PostEvent("airforcesfx", ((EntityState)this).gameObject);
				}
				bool isCrit = ((BaseState)this).RollCrit();
				float num = bulletRecoil / ((BaseState)this).attackSpeedStat;
				((BaseState)this).AddRecoil(-0.4f * num, -0.8f * num, -0.3f * num, 0.3f * num);
				((EntityState)this).characterBody.AddSpreadBloom(4f);
				EffectManager.SimpleMuzzleFlash(FireBarrage.effectPrefab, ((EntityState)this).gameObject, muzzleString, false);
				if (((EntityState)this).isAuthority)
				{
					float damage = 2f * ((BaseState)this).damageStat;
					Ray aimRay = ((BaseState)this).GetAimRay();
					float num2 = bulletSpread;
					float radius = bulletwidth;
					float force = 100f;
					baserotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction);
					BulletAttack val = new BulletAttack
					{
						aimVector = ((Ray)(ref aimRay)).direction,
						origin = ((Ray)(ref aimRay)).origin,
						damage = damage,
						damageColorIndex = (DamageColorIndex)0,
						damageType = DamageTypeCombo.op_Implicit((DamageType)0),
						falloffModel = (FalloffModel)2,
						maxDistance = bulletRange,
						force = force,
						hitMask = CommonMasks.bullet,
						isCrit = isCrit,
						owner = ((EntityState)this).gameObject,
						muzzleName = muzzleString,
						smartCollision = false,
						procChainMask = default(ProcChainMask),
						procCoefficient = procCoefficient,
						radius = radius,
						sniper = false,
						stopperMask = ((LayerIndex)(ref LayerIndex.world)).collisionMask,
						weapon = null,
						spreadPitchScale = 1f,
						spreadYawScale = 1f,
						queryTriggerInteraction = (QueryTriggerInteraction)0,
						hitEffectPrefab = FireBarrage.hitEffectPrefab,
						HitEffectNormal = false
					};
					val.minSpread = 0f;
					val.maxSpread = 0f;
					val.bulletCount = 1u;
					val.Fire();
					uint num3 = (uint)(Mathf.CeilToInt((float)bulletCount / 2f) - 1);
					val.minSpread = 0f;
					val.maxSpread = num2 / 1.45f;
					val.bulletCount = num3;
					val.Fire();
					val.minSpread = num2 / 1.45f;
					val.maxSpread = num2;
					val.bulletCount = (uint)Mathf.FloorToInt((float)bulletCount / 2f);
					val.Fire();
				}
			}
		}

		private void enlargeTracer(ref GameObject tracerEffect)
		{
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			LineRenderer[] componentsInChildren = tracerEffect.GetComponentsInChildren<LineRenderer>();
			foreach (LineRenderer val in componentsInChildren)
			{
				if (Object.op_Implicit((Object)(object)val))
				{
					val.startColor = new Color(0.68f, 0.58f, 0.05f);
					val.endColor = new Color(0.68f, 0.58f, 0.05f);
					float num = bulletwidth - originalBulletwidth;
					val.widthMultiplier = (1f + num) * 0.5f;
				}
			}
		}

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

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

		public static float blastRadius = 10f;

		public static float succForce = 4f;

		private GameObject effectPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/effects/ImpBossBlink");

		private float duration;

		private float maxWeight;

		private BlastAttack blastAttack;

		private bool hasFired;

		private bool hasFired2;

		private bool hasFired3;

		public Vector3 theSpot;

		public Vector3 thecloserSpot;

		public float whipage;

		public float speedattack;

		public override void OnEnter()
		{
			//IL_0009: 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_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Expected O, but got Unknown
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Expected O, but got Unknown
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Unknown result