Decompiled source of Bayonetta Survivor v0.1.2

plugins/psyche-bayomod/BayoMod.dll

Decompiled 13 hours ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
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 BayoMod.Characters.Survivors.Bayo.SkillStates;
using BayoMod.Characters.Survivors.Bayo.SkillStates.BaseStates;
using BayoMod.Characters.Survivors.Bayo.SkillStates.Emotes;
using BayoMod.Characters.Survivors.Bayo.SkillStates.M1;
using BayoMod.Characters.Survivors.Bayo.SkillStates.Weave;
using BayoMod.Modules;
using BayoMod.Modules.Achievements;
using BayoMod.Modules.Characters;
using BayoMod.Modules.Components;
using BayoMod.Survivors.Bayo;
using BayoMod.Survivors.Bayo.Components;
using BayoMod.Survivors.Bayo.SkillStates;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using EntityStates.AI.Walker;
using EntityStates.Commando.CommandoWeapon;
using EntityStates.Drone.DroneWeapon;
using EntityStates.Loader;
using EntityStates.Seeker;
using EntityStates.Toolbot;
using EntityStates.Wisp1Monster;
using HG;
using HG.BlendableTypes;
using KinematicCharacterController;
using On.RoR2;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.CameraModes;
using RoR2.CharacterAI;
using RoR2.ConVar;
using RoR2.ContentManagement;
using RoR2.Projectile;
using RoR2.Skills;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;

[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("BayoMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+58bf7718692c7c5f4d250061c79a8628385b4337")]
[assembly: AssemblyProduct("BayoMod")]
[assembly: AssemblyTitle("BayoMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace BayoMod
{
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.psyche.BayoMod", "Bayonetta Survivor", "0.1.0")]
	public class BayoPlugin : BaseUnityPlugin
	{
		public const string MODUID = "com.psyche.BayoMod";

		public const string MODNAME = "Bayonetta Survivor";

		public const string MODVERSION = "0.1.0";

		public const string DEVELOPER_PREFIX = "PSYCHE";

		public static BayoPlugin instance;

		private void Awake()
		{
			instance = this;
			Log.Init(((BaseUnityPlugin)this).Logger);
			Language.Init();
			new BayoSurvivor().Initialize();
			new ContentPacks().Initialize();
		}
	}
	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 ErrorAssetBundle(string assetName, string bundleName)
		{
			Error("failed to load asset, " + assetName + ", because it does not exist in asset bundle, " + bundleName);
		}

		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 BayoMod.Characters.Survivors.Bayo.SkillStates
{
	public class ABK : BaseMeleeAttack
	{
		private Vector3 forwardDir;

		private bool hasExtended;

		protected AnimationCurve kickSpeed;

		protected Vector3 speedVec;

		protected Ray saveRay;

		public override void OnEnter()
		{
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: 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_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_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: 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_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Expected O, but got Unknown
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Expected O, but got Unknown
			duration = 0.65f;
			attackStartPercentTime = 0.05f;
			attackEndPercentTime = 1f;
			damageCoefficient = 3.75f;
			procCoefficient = 1f;
			damageType = DamageTypeCombo.op_Implicit((DamageType)32);
			hitStopDuration = 0.1f;
			attackRecoil = 1f;
			hitHopVelocity = 4f;
			Ray aimRay = ((BaseState)this).GetAimRay();
			forwardDir = ((Ray)(ref aimRay)).direction;
			saveRay = ((BaseState)this).GetAimRay();
			voice = true;
			voiceString = "stompabk";
			swingSoundString = "abk";
			((EntityState)this).characterDirection.forward = forwardDir;
			CharacterBody characterBody = ((EntityState)this).characterBody;
			characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1);
			if ((double)forwardDir.y < -0.5)
			{
				kickSpeed = new AnimationCurve((Keyframe[])(object)new Keyframe[3]
				{
					new Keyframe(0f, 1.5f),
					new Keyframe(0.2f, 7f),
					new Keyframe(0.5f, 7f)
				});
			}
			else
			{
				kickSpeed = new AnimationCurve((Keyframe[])(object)new Keyframe[4]
				{
					new Keyframe(0f, 1.5f),
					new Keyframe(0.2f, 7f),
					new Keyframe(0.5f, 7f),
					new Keyframe(0.75f, 1.5f)
				});
				launch = true;
			}
			((EntityState)this).PlayAnimation("Body", "Abk", playbackRateParam, duration, 0f);
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
			exitToStance = false;
			hasExtended = false;
			base.OnEnter();
		}

		public override void FixedUpdate()
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			base.FixedUpdate();
			if (CanDodge())
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new Dodge());
				((EntityState)this).inputBank.skill3.hasPressBeenClaimed = true;
				return;
			}
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterDirection.forward = forwardDir;
			}
			if (!inHitPause && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				float num = kickSpeed.Evaluate(stopwatch / duration);
				speedVec = forwardDir * num * ((BaseState)this).moveSpeedStat;
				((EntityState)this).characterMotor.velocity = speedVec;
			}
			if (stopwatch >= duration && ((EntityState)this).isAuthority)
			{
				if (((EntityState)this).inputBank.skill2.down)
				{
					((EntityState)this).outer.SetNextState((EntityState)(object)new ABKEnd
					{
						forwardDirr = forwardDir
					});
					hasExtended = true;
				}
				else
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
			}
		}

		protected override void RemoveHitstop()
		{
			base.RemoveHitstop();
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
		}

		public override void OnExit()
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			if (!hasExtended)
			{
				((EntityState)this).PlayAnimation("Body", "AbkExit");
			}
			if ((double)forwardDir.y > -0.5)
			{
				CharacterBody characterBody = ((EntityState)this).characterBody;
				characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2);
			}
			LastHit();
			base.OnExit();
		}

		protected override void ApplyForce(HealthComponent item)
		{
			//IL_0116: 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_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			CharacterBody body = item.body;
			bool flag = body.healthComponent.combinedHealth <= body.maxHealth * 0.5f;
			if (Object.op_Implicit((Object)(object)((Component)body).GetComponent<KinematicCharacterMotor>()))
			{
				((Component)body).GetComponent<KinematicCharacterMotor>().ForceUnground(0.1f);
			}
			if (!Object.op_Implicit((Object)(object)body.characterMotor) || (!(body.HasBuff(BayoBuffs.wtDebuff) || flag) && !(body.characterMotor.mass < 300f)))
			{
				return;
			}
			if (!launchList.Contains(item))
			{
				launchList.Add(item);
				float num = Vector3.Distance(((EntityState)this).characterBody.transform.position, body.transform.position);
				if (num > 2.5f)
				{
					CharacterMotor characterMotor = body.characterMotor;
					characterMotor.rootMotion += ((Vector3)(ref speedVec)).normalized * -1f * (num - 2.5f);
				}
			}
			else
			{
				Vector3 velocity = speedVec * 0.9f;
				body.characterMotor.velocity = velocity;
			}
		}

		private void LastHit()
		{
			//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_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			int count = launchList.Count;
			TeamIndex team = ((BaseState)this).GetTeam();
			for (int i = 0; i < count; i++)
			{
				HealthComponent val = launchList[i];
				if (FriendlyFireManager.ShouldDirectHitProceed(val, team) && (!val.body.isChampion || (((Object)((Component)val).gameObject).name.Contains("Brother") && ((Object)((Component)val).gameObject).name.Contains("Body"))) && Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)((Component)val).transform))
				{
					CharacterBody body = val.body;
					if (Object.op_Implicit((Object)(object)body.characterMotor))
					{
						body.characterMotor.velocity = ((Vector3)(ref speedVec)).normalized * 1.3499999f;
					}
				}
			}
		}
	}
	public class ABKEnd : BaseMeleeAttack
	{
		public Vector3 forwardDirr;

		protected AnimationCurve hoverSpeed;

		public override void OnEnter()
		{
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: 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_0086: 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_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Expected O, but got Unknown
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			duration = 0.75f;
			attackStartPercentTime = 1.1f;
			attackEndPercentTime = 1.11f;
			damageCoefficient = 0f;
			procCoefficient = 0f;
			((EntityState)this).characterDirection.forward = forwardDirr;
			CharacterBody characterBody = ((EntityState)this).characterBody;
			characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1);
			hoverSpeed = new AnimationCurve((Keyframe[])(object)new Keyframe[2]
			{
				new Keyframe(0f, 1.5f),
				new Keyframe(0.25f, 0f)
			});
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
			exitToStance = false;
			shootRay = ((BaseState)this).GetAimRay();
			gunName = "muzrf";
			gunDamage = 1f;
			fireTime = 0.15f;
			base.OnEnter();
		}

		public override void FixedUpdate()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: 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_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			base.FixedUpdate();
			shootRay = ((BaseState)this).GetAimRay();
			if (CanDodge())
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new Dodge());
				((EntityState)this).inputBank.skill3.hasPressBeenClaimed = true;
				return;
			}
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterDirection.forward = forwardDirr;
			}
			if (!inHitPause && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				float num = hoverSpeed.Evaluate(stopwatch / duration);
				((EntityState)this).characterMotor.velocity = forwardDirr * num * ((BaseState)this).moveSpeedStat;
			}
			if (!((EntityState)this).inputBank.skill2.down)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			//IL_0019: 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_0021: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).PlayAnimation("Body", "AbkExit");
			CharacterBody characterBody = ((EntityState)this).characterBody;
			characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2);
			base.OnExit();
		}
	}
	public class Break : RisingFinisher
	{
		private RootMotionAccumulator rootMotionAccumulator;

		public AimRequest aimRequest;

		public static CharacterCameraParams cameraParams;

		private CameraParamsOverrideHandle cameraParamsOverrideHandle;

		private CharacterCameraParams BreakFirst;

		private CharacterCameraParams BreakSec;

		public CameraRigController Camera;

		private Vector3 rotateAngle;

		protected float pose = 0.88f;

		protected float poseTimer = 999f;

		private float snapTime = 0.5f;

		private bool snapped = false;

		private bool sounded = false;

		private bool inPose = false;

		private bool posed = false;

		private HitStopCachedState poseCachedState;

		private Vector3 forwardDir;

		private bool flip = false;

		public override void OnEnter()
		{
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			dur = 4.04f;
			attackStart = 0f;
			earlyEnd = 2.64f;
			attackEnd = 0.653f;
			rootMotionAccumulator = ((EntityState)this).GetModelRootMotionAccumulator();
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddBuff(Buffs.Slow50);
			}
			CreateCameras();
			muzName = "muzrf";
			gDam = 0.5f;
			frTime = 0.15f;
			base.OnEnter();
			cameraParams = BreakFirst;
			if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams))
			{
				cameraParamsOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(new CameraParamsOverrideRequest
				{
					cameraParamsData = cameraParams.data,
					priority = 1f
				}, 0.3f);
			}
			exitToStance = true;
		}

		public override void FixedUpdate()
		{
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: 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_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: 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_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: 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_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_035e: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b5: Unknown result type (might be due to invalid IL or missing references)
			base.FixedUpdate();
			if (((EntityState)this).inputBank.jump.down)
			{
				((ButtonState)(ref ((EntityState)this).inputBank.jump)).PushState(false);
				((EntityState)this).outer.SetNextStateToMain();
				return;
			}
			if (((EntityState)this).characterMotor.isGrounded)
			{
				if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !hasEnded)
				{
					((EntityState)this).characterMotor.moveDirection = ((EntityState)this).inputBank.moveVector;
					((EntityState)this).characterDirection.moveVector = ((EntityState)this).characterMotor.moveDirection;
				}
				if (Object.op_Implicit((Object)(object)rootMotionAccumulator) && hasEnded)
				{
					if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
					{
						((EntityState)this).inputBank.moveVector = Vector3.zero;
						((EntityState)this).characterMotor.moveDirection = Vector3.zero;
						((EntityState)this).characterDirection.forward = forwardDir;
					}
					Vector3 val = rootMotionAccumulator.ExtractRootMotion();
					if (val != Vector3.zero && ((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
					{
						CharacterMotor characterMotor = ((EntityState)this).characterMotor;
						characterMotor.rootMotion += val;
					}
				}
				else
				{
					rootMotionAccumulator.accumulatedRootMotion = Vector3.zero;
				}
			}
			if (hasEnded && Object.op_Implicit((Object)(object)Camera))
			{
				Quaternion val2 = Quaternion.AngleAxis(207.5f, Vector3.up);
				Vector3 val3 = forwardDir;
				val3.y = 0f;
				val3 = val2 * val3;
				val3.y = 0.15f;
				rotateAngle = Vector3.Lerp(forwardDir, val3, (stopwatch - earlyEnd) / (pose + 0.1f));
				((InstanceData)Camera.cameraMode.camToRawInstanceData[UnityObjectWrapperKey<CameraRigController>.op_Implicit(Camera)]).SetPitchYawFromLookVector(rotateAngle);
			}
			if (stopwatch >= earlyEnd + pose && !posed)
			{
				ApplyPause();
			}
			if (poseTimer <= 0.5f && !sounded)
			{
				Util.PlaySound("snap", ((EntityState)this).gameObject);
				sounded = true;
			}
			if (poseTimer <= 0.46f && !snapped)
			{
				((EntityState)this).characterBody.AddTimedBuff(BayoBuffs.snapBuff, 0.06f);
				snapped = true;
			}
			if (inPose)
			{
				stopwatch -= Time.fixedDeltaTime;
				poseTimer -= Time.fixedDeltaTime;
				if (Object.op_Implicit((Object)(object)animator))
				{
					animator.SetFloat(playbackRateParam, 0f);
				}
			}
			if (poseTimer <= 0f && inPose)
			{
				((BaseState)this).ConsumeHitStopCachedState(poseCachedState, ((EntityState)this).characterMotor, animator);
				inPose = false;
				if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams) && ((CameraParamsOverrideHandle)(ref cameraParamsOverrideHandle)).isValid)
				{
					cameraParamsOverrideHandle = ((EntityState)this).cameraTargetParams.RemoveParamsOverride(cameraParamsOverrideHandle, 0.8f);
				}
			}
		}

		protected override void FireAttack()
		{
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: 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_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			if (fireAge >= fireFreq)
			{
				if (!flip)
				{
					flip = true;
					muzName = "muzlf";
					gunName = muzName;
					if (Object.op_Implicit((Object)(object)component2))
					{
						int num = component2.FindChildIndex(muzName);
						Transform val = component2.FindChild(num);
						int num2 = component2.FindChildIndex(muzName + "f");
						Transform val2 = component2.FindChild(num2);
						gunRay = new Ray(((EntityState)this).transform.position, val2.position - val.position);
					}
				}
				else
				{
					flip = false;
					muzName = "muzrf";
					gunName = muzName;
					if (Object.op_Implicit((Object)(object)component2))
					{
						int num3 = component2.FindChildIndex(muzName);
						Transform val3 = component2.FindChild(num3);
						int num4 = component2.FindChildIndex(muzName + "f");
						Transform val4 = component2.FindChild(num4);
						gunRay = new Ray(((EntityState)this).transform.position, val4.position - val3.position);
					}
				}
			}
			base.FireAttack();
		}

		private void CreateCameras()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			BreakFirst = ScriptableObject.CreateInstance<CharacterCameraParams>();
			((Object)BreakFirst).name = "BreakFirst";
			BreakFirst.data.wallCushion = BlendableFloat.op_Implicit(0.1f);
			BreakFirst.data.idealLocalCameraPos = BlendableVector3.op_Implicit(new Vector3(0f, -1.5f, -7f));
			BreakSec = ScriptableObject.CreateInstance<CharacterCameraParams>();
			((Object)BreakSec).name = "BreakSec";
			BreakSec.data.wallCushion = BlendableFloat.op_Implicit(0.1f);
			BreakSec.data.maxPitch = BlendableFloat.op_Implicit(-15f);
			BreakSec.data.minPitch = BlendableFloat.op_Implicit(-15f);
			BreakSec.data.idealLocalCameraPos = BlendableVector3.op_Implicit(new Vector3(0f, -3.6f, -4.5f));
		}

		private void ApplyPause()
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			if (!inPose)
			{
				poseCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, playbackRateParam);
				inPose = true;
				posed = true;
				poseTimer = 0.8f;
			}
		}

		protected override void EnterAttack()
		{
			hasFired = true;
			PlaySwingEffect();
			if (((EntityState)this).isAuthority)
			{
				((BaseState)this).AddRecoil(-1f * attackRecoil, -2f * attackRecoil, -0.5f * attackRecoil, 0.5f * attackRecoil);
			}
		}

		protected override void DetermineCancel()
		{
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)((EntityState)this).inputBank))
			{
				return;
			}
			if (stopwatch >= earlyExitPercentTime + 0.88f)
			{
				if (((EntityState)this).inputBank.skill1.down)
				{
					cancel = true;
				}
				if (((EntityState)this).inputBank.skill3.down)
				{
					cancel = true;
				}
				if (((EntityState)this).inputBank.skill4.down)
				{
					cancel = true;
				}
				if (((EntityState)this).inputBank.moveVector != Vector3.zero)
				{
					cancel = true;
				}
			}
			if (((ButtonState)(ref ((EntityState)this).inputBank.jump)).justPressed)
			{
				cancel = true;
				jumped = true;
			}
		}

		protected override void PlayAnim()
		{
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).PlayAnimation("Body", "Break", playbackRateParam, 1.32f, 0f);
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterMotor.velocity = ((EntityState)this).characterMotor.velocity * 0f;
			}
		}

		protected override void FinisherSpecific()
		{
			//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_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: 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_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: 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)
			if (!(stopwatch >= earlyExitPercentTime) || hasEnded)
			{
				return;
			}
			hasEnded = true;
			fireTime = 9999f;
			Ray aimRay = ((BaseState)this).GetAimRay();
			forwardDir = ((Ray)(ref aimRay)).direction;
			((EntityState)this).inputBank.moveVector = Vector3.zero;
			((EntityState)this).characterMotor.moveDirection = forwardDir;
			((EntityState)this).characterDirection.moveVector = forwardDir;
			((EntityState)this).PlayAnimation("Body", "BreakExit", playbackRateParam, duration - earlyExitPercentTime, 0f);
			if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams) & ((CameraParamsOverrideHandle)(ref cameraParamsOverrideHandle)).isValid)
			{
				cameraParamsOverrideHandle = ((EntityState)this).cameraTargetParams.RemoveParamsOverride(cameraParamsOverrideHandle, 0.6f);
				cameraParams = BreakSec;
				cameraParamsOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(new CameraParamsOverrideRequest
				{
					cameraParamsData = cameraParams.data,
					priority = 1f
				}, 0.6f);
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master.playerCharacterMasterController.networkUser))
				{
					Camera = ((EntityState)this).characterBody.master.playerCharacterMasterController.networkUser.cameraRigController;
				}
			}
		}

		public override void OnExit()
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.RemoveBuff(Buffs.Slow50);
			}
			if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams) && ((CameraParamsOverrideHandle)(ref cameraParamsOverrideHandle)).isValid)
			{
				cameraParamsOverrideHandle = ((EntityState)this).cameraTargetParams.RemoveParamsOverride(cameraParamsOverrideHandle, 0.2f);
			}
			base.OnExit();
		}
	}
	public class BreakStart : SpinStart
	{
		public override void OnEnter()
		{
			sound = "";
			base.OnEnter();
			duration = 0.36f;
			((EntityState)this).PlayAnimation("Body", "BreakStart", "Slash.playbackRate", duration, 0f);
		}

		protected override void NextState()
		{
			((EntityState)this).outer.SetNextState((EntityState)(object)new Break());
		}
	}
	public class HeelSlide : BaseMeleeAttack
	{
		protected float fallOffTime = 0.35f;

		protected float initialSpeedCoefficient = 0f;

		protected float midSpeedCoefficient = 8f;

		private Vector3 forwardDir;

		private bool hasEnded;

		private bool hasHit;

		private bool hasStarted;

		protected AnimationCurve kickSpeed;

		public override void OnEnter()
		{
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Expected O, but got Unknown
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: 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_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
			duration = 1.72f;
			earlyExitPercentTime = 1.36f;
			attackStartPercentTime = 0f;
			attackEndPercentTime = 1f;
			damageCoefficient = 1f;
			procCoefficient = 1f;
			damageType = DamageTypeCombo.op_Implicit((DamageType)0);
			hasHit = false;
			hitStopDuration = 0.1f;
			attackRecoil = 1f;
			hitHopVelocity = 4f;
			Ray aimRay = ((BaseState)this).GetAimRay();
			forwardDir = ((Ray)(ref aimRay)).direction;
			forwardDir.y = 0f;
			hitboxGroupName = "HeelGroup";
			((EntityState)this).characterDirection.forward = forwardDir;
			kickSpeed = new AnimationCurve((Keyframe[])(object)new Keyframe[7]
			{
				new Keyframe(0f, 1f),
				new Keyframe(0.4f, 2f),
				new Keyframe(0.41f, 9f),
				new Keyframe(0.8f, 6.5f),
				new Keyframe(0.1f, 3f),
				new Keyframe(earlyExitPercentTime, 1f),
				new Keyframe(1.72f, 0f)
			});
			((EntityState)this).PlayAnimation("Body", "HeelSlide", playbackRateParam, 0.52f, 0f);
			exitToStance = true;
			Vector3 val = forwardDir;
			val.y = 0f;
			aimRay = ((BaseState)this).GetAimRay();
			Ray val2 = default(Ray);
			((Ray)(ref val2))..ctor(((Ray)(ref aimRay)).origin, val);
			shootRay = val2;
			gunName = "muzrf";
			gunDamage = 0.1f;
			base.OnEnter();
		}

		public override void FixedUpdate()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: 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_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: 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_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_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			base.FixedUpdate();
			Ray aimRay = ((BaseState)this).GetAimRay();
			Ray val = default(Ray);
			((Ray)(ref val))..ctor(((Ray)(ref aimRay)).origin, forwardDir);
			shootRay = val;
			if (CanDodge())
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new Dodge());
				((EntityState)this).inputBank.skill3.hasPressBeenClaimed = true;
				return;
			}
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterDirection.forward = forwardDir;
			}
			if (!inHitPause && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				float num = kickSpeed.Evaluate(stopwatch);
				((EntityState)this).characterMotor.velocity = forwardDir * num * ((BaseState)this).moveSpeedStat;
				if (hasHit)
				{
					((EntityState)this).characterMotor.velocity = Vector3.zero;
				}
			}
			if (((EntityState)this).isAuthority && (((EntityState)this).fixedAge >= earlyExitPercentTime || hasHit))
			{
				if (!hasEnded)
				{
					hasEnded = true;
					fireTime = 100f;
					((EntityState)this).PlayAnimation("Body", "SlideExit", playbackRateParam, duration - earlyExitPercentTime, 0f);
				}
				if (((EntityState)this).inputBank.skill2.down)
				{
					((EntityState)this).characterMotor.velocity = Vector3.zero;
					((EntityState)this).outer.SetNextState((EntityState)(object)new HeelKick());
					return;
				}
				if (hasHit)
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
			}
			if (((EntityState)this).isAuthority && !hasStarted && stopwatch >= 0.4f)
			{
				fireTime = 0.15f / ((BaseState)this).attackSpeedStat;
				Util.PlaySound("fallslide", ((EntityState)this).gameObject);
				Util.PlaySound("heelslide", ((EntityState)this).gameObject);
				hasStarted = true;
			}
		}

		protected override void RemoveHitstop()
		{
			base.RemoveHitstop();
			((EntityState)this).fixedAge = earlyExitPercentTime;
			stopwatch = earlyExitPercentTime;
			hasHit = true;
		}
	}
	public class M2Entry : BaseSkillState
	{
		protected float direction = 0f;

		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_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			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;
			direction = Vector3.Dot(moveVector, normalized);
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && ((EntityState)this).characterMotor.isGrounded)
			{
				if (direction < -0.5f)
				{
					((EntityState)this).outer.SetNextState((EntityState)(object)new RisingKick());
				}
				else if (direction > 0.5f)
				{
					((EntityState)this).outer.SetNextState((EntityState)(object)new HeelSlide());
				}
				else
				{
					((EntityState)this).outer.SetNextState((EntityState)(object)new BreakStart());
				}
			}
			else if (direction < -0.5f)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new FallingKickStart());
			}
			else if (direction > 0.5f)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new ABK());
			}
			else
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new SpinStart());
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}
	}
	public class RisingKick : BaseMeleeAttack
	{
		public enum SpeedState
		{
			starting,
			middle,
			slower
		}

		protected float fallOffTime = 0.7f;

		protected float initialSpeedCoefficient = 0f;

		protected float midSpeedCoefficient = 8f;

		private Vector3 forwardDir;

		private Vector3 previousPosition;

		private float rollSpeed;

		public SpeedState speedState;

		private bool hasEnded;

		private float enderTime = 0.9f;

		public override void OnEnter()
		{
			//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_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: 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_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: 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_0121: 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_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			duration = 1f;
			earlyExitPercentTime = 0.75f;
			attackStartPercentTime = 0.5f;
			attackEndPercentTime = 0.95f;
			damageCoefficient = 3.95f;
			procCoefficient = 1f;
			damageType = DamageTypeCombo.op_Implicit((DamageType)32);
			hitStopDuration = 0.1f;
			attackRecoil = 1f;
			hitHopVelocity = 4f;
			launch = true;
			voice = true;
			voiceString = "rise";
			swingSoundString = "risekick";
			forwardDir = Vector3.up;
			rollSpeed = 0f;
			CharacterDirection characterDirection = ((EntityState)this).characterDirection;
			Ray aimRay = ((BaseState)this).GetAimRay();
			characterDirection.forward = ((Ray)(ref aimRay)).direction;
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterMotor.velocity = forwardDir * rollSpeed;
			}
			Vector3 val = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero);
			previousPosition = ((EntityState)this).transform.position - val;
			((EntityState)this).PlayAnimation("Body", "BackKickStart", "Roll.playbackRate", attackStartPercentTime, 0f);
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
			exitToStance = false;
			base.OnEnter();
		}

		private void GetNextSpeed()
		{
			if (stopwatch <= attackStartPercentTime * duration)
			{
				speedState = SpeedState.starting;
			}
			if (stopwatch > attackStartPercentTime * duration && stopwatch <= fallOffTime)
			{
				speedState = SpeedState.middle;
			}
			if (stopwatch > fallOffTime)
			{
				speedState = SpeedState.slower;
			}
		}

		private void RecalculateRollSpeed()
		{
			switch (speedState)
			{
			case SpeedState.starting:
				rollSpeed = 0f;
				break;
			case SpeedState.middle:
				rollSpeed = ((BaseState)this).moveSpeedStat * midSpeedCoefficient;
				break;
			case SpeedState.slower:
				rollSpeed = ((BaseState)this).moveSpeedStat * Mathf.Lerp(midSpeedCoefficient, 1f, stopwatch / duration);
				break;
			}
		}

		public override void FixedUpdate()
		{
			//IL_005e: 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_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: 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_0129: 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_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: 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_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			base.FixedUpdate();
			GetNextSpeed();
			RecalculateRollSpeed();
			if (CanDodge())
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new Dodge());
				((EntityState)this).inputBank.skill3.hasPressBeenClaimed = true;
				return;
			}
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				CharacterDirection characterDirection = ((EntityState)this).characterDirection;
				Ray aimRay = ((BaseState)this).GetAimRay();
				characterDirection.forward = ((Ray)(ref aimRay)).direction;
			}
			if (!inHitPause)
			{
				Vector3 val = ((EntityState)this).transform.position - previousPosition;
				Vector3 normalized = ((Vector3)(ref val)).normalized;
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
				{
					Vector3 val2 = normalized * rollSpeed;
					float num = Mathf.Max(Vector3.Dot(val2, forwardDir), 0f);
					val2 = forwardDir * num;
					val2.x = 0f;
					val2.z = 0f;
					((EntityState)this).characterMotor.velocity = val2;
				}
				previousPosition = ((EntityState)this).transform.position;
			}
			if (((EntityState)this).isAuthority && stopwatch >= earlyExitPercentTime)
			{
				if (!hasEnded)
				{
					hasEnded = true;
				}
				if (((EntityState)this).inputBank.skill2.down && stopwatch >= enderTime)
				{
					((EntityState)this).outer.SetNextState((EntityState)(object)new RisingFinisher());
				}
			}
		}

		protected override void ApplyForce(HealthComponent item)
		{
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01be: Unknown result type (might be due to invalid IL or missing references)
			CharacterBody body = item.body;
			float num = 7f;
			float num2 = 1f;
			if (!launchList.Contains(item))
			{
				launchList.Add(item);
				float num3 = 1f;
				bool flag = body.healthComponent.combinedHealth <= body.maxHealth * 0.5f;
				if (Object.op_Implicit((Object)(object)body.characterMotor))
				{
					num3 = ((!(body.HasBuff(BayoBuffs.wtDebuff) || flag) && !(body.characterMotor.mass < 300f)) ? 100f : body.characterMotor.mass);
					body.characterMotor.velocity.x = 0f;
					body.characterMotor.velocity.z = 0f;
					((BaseCharacterController)body.characterMotor).Motor.ForceUnground(0.1f);
				}
				else if (Object.op_Implicit((Object)(object)((Component)item).GetComponent<Rigidbody>()))
				{
					num3 = ((!(body.HasBuff(BayoBuffs.wtDebuff) || flag) && !(body.characterMotor.mass < 300f)) ? 100f : body.rigidbody.mass);
				}
				if (((EntityState)this).characterBody.isSprinting)
				{
					num *= ((EntityState)this).characterBody.sprintingSpeedMultiplier;
				}
				if (((BaseState)this).moveSpeedStat - num > 0f)
				{
					num2 = (((BaseState)this).moveSpeedStat - num) / num * 0.5f;
					num2 += 1f;
				}
				num3 *= 22f * num2;
				Vector3 val = Vector3.up * num3;
				item.TakeDamageForce(val, true, true);
			}
		}

		protected override void RemoveHitstop()
		{
			base.RemoveHitstop();
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
		}

		protected override void EnterAttack()
		{
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
			base.EnterAttack();
		}

		public override void OnExit()
		{
			((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
			base.OnExit();
		}
	}
	public class Spin : RisingFinisher
	{
		public override void OnEnter()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			dur = 1.6f;
			damage = 2f;
			fireFreq = 0.24f;
			clear = false;
			attackEnd = 0.625f;
			muzName = "muzrf";
			gDam = 0.25f;
			frTime = 0.1f;
			damageType = DamageTypeCombo.op_Implicit((DamageType)32);
			Util.PlaySound("spin", ((EntityState)this).gameObject);
			base.OnEnter();
		}

		public override void FixedUpdate()
		{
			base.FixedUpdate();
			if (stopwatch >= fireFreq && ((EntityState)this).inputBank.jump.down)
			{
				((ButtonState)(ref ((EntityState)this).inputBank.jump)).PushState(false);
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		protected override void PlayAnim()
		{
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).PlayAnimation("Body", "Spin", playbackRateParam, fireFreq, 0f);
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterMotor.velocity = ((EntityState)this).characterMotor.velocity * 0f;
			}
		}

		protected override void FinisherSpecific()
		{
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: 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_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)component2))
			{
				int num = component2.FindChildIndex(muzName);
				Transform val = component2.FindChild(num);
				int num2 = component2.FindChildIndex(muzName + "f");
				Transform val2 = component2.FindChild(num2);
				gunRay = new Ray(((EntityState)this).transform.position, val2.position - val.position);
			}
			Vector3 direction = ((Ray)(ref gunRay)).direction;
			direction.y = 0f;
			gunRay = new Ray(((Ray)(ref gunRay)).origin, direction);
			if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				((EntityState)this).inputBank.moveVector = Vector3.zero;
				((EntityState)this).characterMotor.moveDirection = Vector3.zero;
			}
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterMotor.velocity = ((EntityState)this).characterMotor.velocity * 0f;
			}
			if (stopwatch >= earlyExitPercentTime && !hasEnded)
			{
				hasEnded = true;
				fireTime = 100f;
				((EntityState)this).PlayAnimation("Body", "SpinExit", playbackRateParam, duration - earlyExitPercentTime, 0f);
			}
		}

		protected override void ApplyForce(HealthComponent item)
		{
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_014f: Unknown result type (might be due to invalid IL or missing references)
			CharacterBody body = item.body;
			if (!launchList.Contains(item))
			{
				launchList.Add(item);
				float num = 1f;
				bool flag = body.healthComponent.combinedHealth <= body.maxHealth * 0.5f;
				if (Object.op_Implicit((Object)(object)((Component)body).GetComponent<KinematicCharacterMotor>()))
				{
					((Component)body).GetComponent<KinematicCharacterMotor>().ForceUnground(0.1f);
				}
				if (Object.op_Implicit((Object)(object)body.characterMotor))
				{
					num = ((!(body.HasBuff(BayoBuffs.wtDebuff) || flag) && !(body.characterMotor.mass < 300f)) ? 100f : body.characterMotor.mass);
				}
				else if (Object.op_Implicit((Object)(object)((Component)item).GetComponent<Rigidbody>()))
				{
					num = ((!(body.HasBuff(BayoBuffs.wtDebuff) || flag) && !(body.characterMotor.mass < 300f)) ? 50f : body.rigidbody.mass);
				}
				num *= 16f;
				Ray aimRay = ((BaseState)this).GetAimRay();
				Vector3 direction = ((Ray)(ref aimRay)).direction;
				direction.y = 1.5f;
				direction *= num;
				item.TakeDamageForce(direction, true, true);
			}
		}
	}
	public class SpinStart : BaseSkillState
	{
		protected float duration = 0.16f;

		private RootMotionAccumulator rootMotionAccumulator;

		protected string sound = "flurspin";

		public override void OnEnter()
		{
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			rootMotionAccumulator = ((EntityState)this).GetModelRootMotionAccumulator();
			((EntityState)this).PlayAnimation("Body", "SpinStart", "Slash.playbackRate", duration, 0f);
			Util.PlaySound(sound, ((EntityState)this).gameObject);
			CharacterDirection characterDirection = ((EntityState)this).characterDirection;
			Ray aimRay = ((BaseState)this).GetAimRay();
			characterDirection.forward = ((Ray)(ref aimRay)).direction;
			((EntityState)this).characterMotor.velocity.y = 0f;
		}

		protected bool CanDodge()
		{
			if (((EntityState)this).inputBank.skill3.down && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.utility) && (!((EntityState)this).skillLocator.utility.mustKeyPress || !((EntityState)this).inputBank.skill3.hasPressBeenClaimed) && ((EntityState)this).skillLocator.utility.ExecuteIfReady())
			{
				return true;
			}
			return false;
		}

		public override void FixedUpdate()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			CharacterDirection characterDirection = ((EntityState)this).characterDirection;
			Ray aimRay = ((BaseState)this).GetAimRay();
			characterDirection.forward = ((Ray)(ref aimRay)).direction;
			if (CanDodge())
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new Dodge());
				((EntityState)this).inputBank.skill3.hasPressBeenClaimed = true;
				return;
			}
			((EntityState)this).characterMotor.velocity.y = 0f;
			if (((EntityState)this).characterMotor.isGrounded)
			{
				if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
				{
					((EntityState)this).inputBank.moveVector = Vector3.zero;
					((EntityState)this).characterMotor.moveDirection = Vector3.zero;
				}
				if (Object.op_Implicit((Object)(object)rootMotionAccumulator))
				{
					Vector3 val = rootMotionAccumulator.ExtractRootMotion();
					if (val != Vector3.zero && ((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
					{
						CharacterMotor characterMotor = ((EntityState)this).characterMotor;
						characterMotor.rootMotion += val;
					}
				}
			}
			if (((EntityState)this).fixedAge >= duration)
			{
				NextState();
			}
		}

		protected virtual void NextState()
		{
			((EntityState)this).outer.SetNextState((EntityState)(object)new Spin());
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
		}
	}
}
namespace BayoMod.Characters.Survivors.Bayo.SkillStates.Weave
{
	public class Stomp : Tetsu
	{
		public override void OnEnter()
		{
			((GenericProjectileBaseState)this).baseDuration = 1.68f;
			Tetsu.startDuration = 0.5f;
			Tetsu.BaseDelayDuration = 0.4f;
			fForce = 1f;
			voiceString = "stompabk";
			projpref = BayoAssets.footProjectilePrefab;
			base.OnEnter();
		}

		public override void PlayAnimation(float duration)
		{
			if (Object.op_Implicit((Object)(object)((EntityState)this).GetModelAnimator()))
			{
				((EntityState)this).PlayAnimation("Body", "Stomp", "Slash.playbackRate", ((GenericProjectileBaseState)this).baseDuration, 0f);
			}
		}

		public override void Fire()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: 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_002f: 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_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			Ray aimRay = ((BaseState)this).GetAimRay();
			Vector3 direction = ((Ray)(ref aimRay)).direction;
			direction.y = 0f;
			Vector3 position = ((Component)target).transform.position;
			position.y -= 2.5f;
			ProjectileManager.instance.FireProjectile(((GenericProjectileBaseState)this).projectilePrefab, position, Util.QuaternionSafeLookRotation(direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * ((GenericProjectileBaseState)this).damageCoefficient, ((GenericProjectileBaseState)this).force, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null);
		}
	}
	public class Tetsu : GenericProjectileBaseState
	{
		public static float BaseDuration = 1.12f;

		public static float startDuration = 0.36f;

		public static float BaseDelayDuration = 0.15f;

		public string voiceString = "tetsu";

		public static float DamageCoefficient = 12f;

		public GameObject projpref = BayoAssets.fistProjectilePrefab;

		private bool ended = false;

		private bool cancel = false;

		private bool jumped = false;

		private bool noTarget = false;

		private RootMotionAccumulator rootMotionAccumulator;

		private BayoTracker tracker;

		protected HurtBox target;

		private bool targetIsValid;

		protected AimRequest aimRequest;

		protected float fForce = 3500f;

		public override void OnEnter()
		{
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			base.projectilePrefab = projpref;
			base.attackSoundString = "weave";
			base.baseDuration = BaseDuration;
			base.baseDelayBeforeFiringProjectile = BaseDelayDuration;
			base.damageCoefficient = DamageCoefficient;
			base.force = fForce;
			base.recoilAmplitude = 0.1f;
			base.bloom = 10f;
			rootMotionAccumulator = ((EntityState)this).GetModelRootMotionAccumulator();
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterMotor.velocity = ((EntityState)this).characterMotor.velocity * 0f;
			}
			CharacterDirection characterDirection = ((EntityState)this).characterDirection;
			Ray aimRay = ((BaseState)this).GetAimRay();
			characterDirection.forward = ((Ray)(ref aimRay)).direction;
			((GenericProjectileBaseState)this).OnEnter();
			tracker = ((EntityState)this).GetComponent<BayoTracker>();
			target = tracker.GetTrackingTarget();
			if (!Object.op_Implicit((Object)(object)tracker.GetTrackingTarget()))
			{
				((EntityState)this).outer.SetNextStateToMain();
				noTarget = true;
			}
			else if (Object.op_Implicit((Object)(object)target) && Object.op_Implicit((Object)(object)target.healthComponent) && target.healthComponent.alive)
			{
				targetIsValid = true;
			}
		}

		protected bool CanDodge()
		{
			if (((EntityState)this).inputBank.skill3.down && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.utility) && (!((EntityState)this).skillLocator.utility.mustKeyPress || !((EntityState)this).inputBank.skill3.hasPressBeenClaimed) && ((EntityState)this).skillLocator.utility.ExecuteIfReady())
			{
				return true;
			}
			return false;
		}

		private void DetermineCancel()
		{
			//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)
			if (!Object.op_Implicit((Object)(object)((EntityState)this).inputBank))
			{
				return;
			}
			if (((EntityState)this).inputBank.jump.down)
			{
				cancel = true;
				jumped = true;
			}
			if (base.stopwatch >= startDuration)
			{
				if (((EntityState)this).inputBank.skill1.down)
				{
					cancel = true;
				}
				if (((EntityState)this).inputBank.skill2.down)
				{
					cancel = true;
				}
				if (((EntityState)this).inputBank.skill3.down)
				{
					cancel = true;
				}
				if (((EntityState)this).inputBank.moveVector != Vector3.zero)
				{
					cancel = true;
				}
			}
		}

		public override void FixedUpdate()
		{
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//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_017f: 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_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: 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)
			((GenericProjectileBaseState)this).FixedUpdate();
			cancel = false;
			jumped = false;
			if (base.stopwatch >= startDuration && !ended)
			{
				ended = true;
			}
			if (CanDodge())
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new Dodge());
				((EntityState)this).inputBank.skill3.hasPressBeenClaimed = true;
				return;
			}
			if (((EntityState)this).isAuthority && base.stopwatch >= base.baseDelayBeforeFiringProjectile)
			{
				DetermineCancel();
				if (jumped)
				{
					((ButtonState)(ref ((EntityState)this).inputBank.jump)).PushState(false);
				}
				if (cancel)
				{
					((EntityState)this).outer.SetNextStateToMain();
					return;
				}
			}
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= base.duration)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new Stance());
				return;
			}
			((EntityState)this).characterMotor.velocity.y = 0f;
			if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				((EntityState)this).inputBank.moveVector = Vector3.zero;
				((EntityState)this).characterMotor.moveDirection = Vector3.zero;
			}
			if (Object.op_Implicit((Object)(object)rootMotionAccumulator))
			{
				Vector3 val = rootMotionAccumulator.ExtractRootMotion();
				if (val != Vector3.zero && ((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
				{
					CharacterMotor characterMotor = ((EntityState)this).characterMotor;
					characterMotor.rootMotion += val;
				}
			}
		}

		public override void FireProjectile()
		{
			if (((EntityState)this).isAuthority && targetIsValid)
			{
				Util.PlaySound(voiceString, ((EntityState)this).gameObject);
				Fire();
			}
		}

		public virtual void Fire()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: 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_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: 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_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			Ray aimRay = ((BaseState)this).GetAimRay();
			Vector3 direction = ((Ray)(ref aimRay)).direction;
			direction.y = 0.1f;
			Vector3 position = ((Component)target).transform.position;
			position -= ((Vector3)(ref direction)).normalized * 1f;
			position.y -= 3f;
			ProjectileManager.instance.FireProjectile(base.projectilePrefab, position, Util.QuaternionSafeLookRotation(direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * base.damageCoefficient, base.force, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null);
		}

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

		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 override void PlayAnimation(float duration)
		{
			if (Object.op_Implicit((Object)(object)((EntityState)this).GetModelAnimator()))
			{
				((EntityState)this).PlayAnimation("Body", "Tetsu", "Slash.playbackRate", startDuration * base.baseDuration, 0f);
			}
		}
	}
	public class WeaveDummy
	{
	}
	public class WeaveEntry : BaseSkillState
	{
		public static SkillDef tetsuRealDef = BayoSurvivor.tetsuSkillDef;

		public static SkillDef stompRealDef = BayoSurvivor.stompSkillDef;

		public static SkillDef cancelDef = BayoSurvivor.weaveCancelSkillDef;

		public AimRequest aimRequest;

		private BayoTracker tracker;

		private float stopwatch;

		private int secondStockMax;

		private int specialStockMax;

		private int secondStocks;

		private int specialStocks;

		private bool fired = false;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddBuff(Buffs.Slow50);
			}
			Util.PlaySound("portalsum", ((EntityState)this).gameObject);
			((EntityState)this).gameObject.AddComponent<BayoTracker>();
			tracker = ((EntityState)this).GetComponent<BayoTracker>();
			secondStockMax = ((EntityState)this).skillLocator.secondary.maxStock;
			specialStockMax = ((EntityState)this).skillLocator.special.maxStock;
			secondStocks = ((EntityState)this).skillLocator.secondary.stock;
			specialStocks = ((EntityState)this).skillLocator.special.stock + 1;
			((EntityState)this).skillLocator.primary.SetSkillOverride((object)((EntityState)this).skillLocator.primary, tetsuRealDef, (SkillOverridePriority)4);
			((EntityState)this).skillLocator.secondary.SetSkillOverride((object)((EntityState)this).skillLocator.secondary, stompRealDef, (SkillOverridePriority)4);
			((EntityState)this).skillLocator.special.SetSkillOverride((object)((EntityState)this).skillLocator.special, cancelDef, (SkillOverridePriority)4);
			if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams))
			{
				aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)UnseenHand.abilityAimType);
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			((EntityState)this).characterBody.SetAimTimer(3f);
			stopwatch += ((EntityState)this).GetDeltaTime();
			if (((EntityState)this).isAuthority)
			{
				AuthorityFixedUpdate();
			}
		}

		private void AuthorityFixedUpdate()
		{
			if (((ButtonState)(ref ((EntityState)this).inputBank.skill1)).justPressed)
			{
				((EntityState)this).outer.SetNextStateToMain();
				if (Object.op_Implicit((Object)(object)tracker.GetTrackingTarget()))
				{
					fired = true;
				}
			}
			else if (((ButtonState)(ref ((EntityState)this).inputBank.skill2)).justPressed)
			{
				((EntityState)this).outer.SetNextStateToMain();
				if (Object.op_Implicit((Object)(object)tracker.GetTrackingTarget()))
				{
					fired = true;
				}
			}
			else if (((ButtonState)(ref ((EntityState)this).inputBank.skill3)).justPressed)
			{
				((EntityState)this).outer.SetNextStateToMain();
				if (Object.op_Implicit((Object)(object)tracker))
				{
					EntityState.Destroy((Object)(object)tracker);
				}
			}
			else if (((ButtonState)(ref ((EntityState)this).inputBank.skill4)).justPressed && !((EntityState)this).inputBank.skill4.wasDown && stopwatch >= 0.1f)
			{
				((EntityState)this).outer.SetNextStateToMain();
				if (Object.op_Implicit((Object)(object)tracker))
				{
					EntityState.Destroy((Object)(object)tracker);
				}
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			AimRequest obj = aimRequest;
			if (obj != null)
			{
				obj.Dispose();
			}
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.RemoveBuff(Buffs.Slow50);
			}
			((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).skillLocator.primary, tetsuRealDef, (SkillOverridePriority)4);
			((EntityState)this).skillLocator.secondary.UnsetSkillOverride((object)((EntityState)this).skillLocator.secondary, stompRealDef, (SkillOverridePriority)4);
			((EntityState)this).skillLocator.special.UnsetSkillOverride((object)((EntityState)this).skillLocator.special, cancelDef, (SkillOverridePriority)4);
			((EntityState)this).skillLocator.secondary.DeductStock(secondStockMax - secondStocks);
			((EntityState)this).skillLocator.special.DeductStock(specialStockMax - specialStocks);
			if (fired)
			{
				((EntityState)this).skillLocator.special.DeductStock(1);
			}
		}

		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;
		}
	}
}
namespace BayoMod.Characters.Survivors.Bayo.SkillStates.M1
{
	public class Flurry : BaseMeleeAttack
	{
		protected float fireAge;

		protected float fireFreq;

		protected float animTime;

		protected float myDuration;

		private string animName;

		public static float verticalAcceleration = GroundSlam.verticalAcceleration * 0.2f;

		protected float hopVelocity = 1.25f;

		protected bool flip = false;

		public override void OnEnter()
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			attackStartPercentTime = 0f;
			attackEndPercentTime = 1f;
			earlyExitPercentTime = 0.3f;
			damageCoefficient = 1.35f;
			procCoefficient = 0.75f;
			damageType = DamageTypeCombo.GenericPrimary;
			pushForce = 300f;
			hitStopDuration = 0.012f;
			attackRecoil = 1f;
			hitHopVelocity = 4f;
			exitToStance = false;
			fireAge = 0f;
			shootRay = ((BaseState)this).GetAimRay();
			gunName = "muzrh";
			gunDamage = 0.5f;
			launch = false;
			fireTime = 0.15f;
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterMotor.velocity = ((EntityState)this).characterMotor.velocity * 0f;
			}
			Util.PlaySound("flurry", ((EntityState)this).gameObject);
			Util.PlaySound("falling", ((EntityState)this).gameObject);
			base.OnEnter();
			if (((EntityState)this).characterMotor.isGrounded)
			{
				animName = "Flurry";
			}
			else
			{
				animName = "FlurryA";
				((EntityState)this).characterMotor.airControl = ((EntityState)this).characterMotor.airControl;
				launch = true;
				juggleHop = 2.5f / ((BaseState)this).attackSpeedStat;
			}
			myDuration = 2.666f / ((BaseState)this).attackSpeedStat;
			duration = 3f / ((BaseState)this).attackSpeedStat;
			fireFreq = 0.2f / ((BaseState)this).attackSpeedStat;
			animTime = 0.9333f / ((BaseState)this).attackSpeedStat;
			CharacterDirection characterDirection = ((EntityState)this).characterDirection;
			Ray aimRay = ((BaseState)this).GetAimRay();
			characterDirection.forward = ((Ray)(ref aimRay)).direction;
			((EntityState)this).PlayAnimation("Body", animName, playbackRateParam, animTime, 0f);
		}

		protected override void FireAttack()
		{
			if (fireAge >= fireFreq)
			{
				fireAge = 0f;
				attack.ResetIgnoredHealthComponents();
				hasFired = false;
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded && hopVelocity > 0f)
				{
					((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity);
				}
				launchList.Clear();
				if (!flip)
				{
					flip = true;
					gunName = "muzlh";
				}
				else
				{
					flip = false;
					gunName = "muzrh";
				}
			}
			base.FireAttack();
		}

		public override void FixedUpdate()
		{
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: 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_00ed: Unknown result type (might be due to invalid IL or missing references)
			if (CanDodge())
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new Dodge
				{
					currentSwing = 4
				});
				((EntityState)this).inputBank.skill3.hasPressBeenClaimed = true;
				return;
			}
			CharacterDirection characterDirection = ((EntityState)this).characterDirection;
			Ray aimRay = ((BaseState)this).GetAimRay();
			characterDirection.forward = ((Ray)(ref aimRay)).direction;
			shootRay = ((BaseState)this).GetAimRay();
			if (((EntityState)this).characterMotor.isGrounded)
			{
				if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
				{
					((EntityState)this).inputBank.moveVector = Vector3.zero;
					((EntityState)this).characterMotor.moveDirection = Vector3.zero;
				}
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
				{
					((EntityState)this).characterMotor.velocity = ((EntityState)this).characterMotor.velocity * 0f;
				}
			}
			else
			{
				((EntityState)this).characterMotor.rootMotion = Vector3.zero;
				((EntityState)this).characterMotor.moveDirection = ((EntityState)this).inputBank.moveVector;
				((EntityState)this).characterDirection.moveVector = ((EntityState)this).characterMotor.moveDirection;
			}
			fireAge += Time.fixedDeltaTime;
			if (((EntityState)this).isAuthority && stopwatch >= earlyExitPercentTime && (!((EntityState)this).inputBank.skill1.down || stopwatch >= myDuration))
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new FlurryEnd());
			}
			else
			{
				base.FixedUpdate();
			}
		}

		private void LastHit()
		{
			//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_002a: Unknown result type (might be due to invalid IL or missing references)
			int count = launchList.Count;
			TeamIndex team = ((BaseState)this).GetTeam();
			for (int i = 0; i < count; i++)
			{
				HealthComponent val = launchList[i];
				if (!FriendlyFireManager.ShouldDirectHitProceed(val, team) || (val.body.isChampion && (!((Object)((Component)val).gameObject).name.Contains("Brother") || !((Object)((Component)val).gameObject).name.Contains("Body"))) || !Object.op_Implicit((Object)(object)val) || !Object.op_Implicit((Object)(object)((Component)val).transform))
				{
					continue;
				}
				CharacterBody body = val.body;
				if (Object.op_Implicit((Object)(object)body.characterMotor) && !body.characterMotor.isGrounded)
				{
					juggleHop = 10f / ((BaseState)this).attackSpeedStat;
					if (((EntityState)this).characterBody.HasBuff(BayoBuffs.wtBuff))
					{
						juggleHop /= 3f;
					}
					((BaseState)this).SmallHop(body.characterMotor, juggleHop);
					body.characterMotor.velocity.x = 0f;
					body.characterMotor.velocity.z = 0f;
					SetStateOnHurt component = ((Component)val).GetComponent<SetStateOnHurt>();
					if (component != null)
					{
						component.SetStun(1f);
					}
				}
			}
		}

		public override void OnExit()
		{
			if (launch)
			{
				LastHit();
			}
			base.OnExit();
		}
	}
	public class FlurryEnd : BaseMeleeAttack
	{
		private RootMotionAccumulator rootMotionAccumulator;

		private bool cancel;

		private bool jumped;

		private float earlyExit;

		private string animName;

		public static float verticalAcceleration = GroundSlam.verticalAcceleration * 0.2f;

		private GameObject projectilePrefab = BayoAssets.fistProjectilePrefab;

		private float weaveDamage = 14f;

		private float weaveForce = 3000f;

		private bool firedProjectile = false;

		private float recoilAmplitude = 0.1f;

		private float bloom = 10f;

		private bool hasEnded = false;

		private Vector3 dir;

		public override void OnEnter()
		{
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			attackStartPercentTime = 0.25f;
			attackEndPercentTime = 0.5f;
			damageCoefficient = 2f;
			procCoefficient = 1f;
			damageType = DamageTypeCombo.GenericPrimary;
			pushForce = 0f;
			hitStopDuration = 0.05f;
			attackRecoil = 1f;
			hitHopVelocity = 4f;
			((EntityState)this).characterMotor.velocity.y = 0f;
			exitToStance = true;
			voice = true;
			voiceString = "flurryend";
			CharacterDirection characterDirection = ((EntityState)this).characterDirection;
			Ray aimRay = ((BaseState)this).GetAimRay();
			characterDirection.forward = ((Ray)(ref aimRay)).direction;
			rootMotionAccumulator = ((EntityState)this).GetModelRootMotionAccumulator();
			base.OnEnter();
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody))
			{
				((EntityState)this).characterBody.SetAimTimer(2f);
			}
			duration = 1.92f / ((BaseState)this).attackSpeedStat;
			earlyExit = 1f / ((BaseState)this).attackSpeedStat;
			if (((EntityState)this).characterMotor.isGrounded)
			{
				animName = "FlurryE";
				((EntityState)this).characterMotor.velocity = ((EntityState)this).characterMotor.velocity * 0f;
			}
			else
			{
				animName = "FlurryAE";
				((EntityState)this).characterMotor.airControl = ((EntityState)this).characterMotor.airControl;
				exitToStance = false;
			}
			((EntityState)this).PlayAnimation("Body", animName, "Slash.playbackRate", duration, 0f);
		}

		private void DetermineCancel()
		{
			//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)
			if (!Object.op_Implicit((Object)(object)((EntityState)this).inputBank))
			{
				return;
			}
			if (hasEnded)
			{
				if (((EntityState)this).inputBank.skill2.down)
				{
					cancel = true;
				}
				if (((EntityState)this).inputBank.skill3.down)
				{
					cancel = true;
				}
				if (((EntityState)this).inputBank.skill4.down)
				{
					cancel = true;
				}
				if (((EntityState)this).inputBank.moveVector != Vector3.zero)
				{
					cancel = true;
				}
			}
			if (((EntityState)this).inputBank.jump.down)
			{
				cancel = true;
				jumped = true;
			}
		}

		public override void FixedUpdate()
		{
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ac: 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_00e6: 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_010d: 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_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0280: Unknown result type (might be due to invalid IL or missing references)
			//IL_0292: Unknown result type (might be due to invalid IL or missing references)
			//IL_0297: Unknown result type (might be due to invalid IL or missing references)
			//IL_01de: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: 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_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			cancel = false;
			jumped = false;
			if (stopwatch >= duration * attackEndPercentTime)
			{
				DetermineCancel();
				if (jumped)
				{
					((ButtonState)(ref ((EntityState)this).inputBank.jump)).PushState(false);
				}
				if (cancel)
				{
					((EntityState)this).outer.SetNextStateToMain();
					return;
				}
			}
			if (CanDodge())
			{
				cancel = true;
				((EntityState)this).outer.SetNextState((EntityState)(object)new Dodge
				{
					currentSwing = -1
				});
				((EntityState)this).inputBank.skill3.hasPressBeenClaimed = true;
				return;
			}
			if (((EntityState)this).characterMotor.isGrounded)
			{
				if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
				{
					((EntityState)this).inputBank.moveVector = Vector3.zero;
					((EntityState)this).characterMotor.moveDirection = Vector3.zero;
					((EntityState)this).characterMotor.velocity = ((EntityState)this).characterMotor.velocity * 0f;
				}
				if (Object.op_Implicit((Object)(object)rootMotionAccumulator))
				{
					Vector3 val = rootMotionAccumulator.ExtractRootMotion();
					if (val != Vector3.zero && ((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
					{
						CharacterMotor characterMotor = ((EntityState)this).characterMotor;
						characterMotor.rootMotion += val;
					}
				}
			}
			else
			{
				if (Object.op_Implicit((Object)(object)rootMotionAccumulator))
				{
					Vector3 val2 = rootMotionAccumulator.ExtractRootMotion();
					if (val2 != Vector3.zero && ((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
					{
						CharacterMotor characterMotor2 = ((EntityState)this).characterMotor;
						characterMotor2.rootMotion += val2;
					}
				}
				((EntityState)this).characterMotor.moveDirection = ((EntityState)this).inputBank.moveVector;
				((EntityState)this).characterDirection.moveVector = ((EntityState)this).characterMotor.moveDirection;
				((EntityState)this).characterMotor.velocity.y = 0f;
			}
			if (stopwatch >= duration * attackStartPercentTime)
			{
				if (!firedProjectile)
				{
					firedProjectile = true;
					FireProjectile();
					DoFireEffects();
				}
				((EntityState)this).characterDirection.forward = dir;
				((EntityState)this).characterDirection.moveVector = dir;
			}
			else
			{
				CharacterDirection characterDirection = ((EntityState)this).characterDirection;
				Ray aimRay = ((BaseState)this).GetAimRay();
				characterDirection.forward = ((Ray)(ref aimRay)).direction;
			}
			if (((EntityState)this).isAuthority && stopwatch >= earlyExit)
			{
				if (((EntityState)this).inputBank.skill1.down)
				{
					((EntityState)this).outer.SetNextState((EntityState)(object)new Punch1
					{
						swingIndex = 0
					});
					return;
				}
				if (!hasEnded)
				{
					hasEnded = true;
				}
			}
			base.FixedUpdate();
		}

		protected void DoFireEffects()
		{
			Util.PlaySound("weave", ((EntityState)this).gameObject);
			((BaseState)this).AddRecoil(-2f * recoilAmplitude, -3f * recoilAmplitude, -1f * recoilAmplitude, 1f * recoilAmplitude);
			((EntityState)this).characterBody.AddSpreadBloom(bloom);
		}

		protected void FireProjectile()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			if (((EntityState)this).isAuthority)
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
				dir = ((Ray)(ref aimRay)).direction;
				Vector3 position = ((EntityState)this).gameObject.transform.position;
				position.y -= 1f;
				dir.y = 0f;
				position += ((Vector3)(ref dir)).normalized * 2.5f;
				dir.y = 0.1f;
				ProjectileManager.instance.FireProjectile(projectilePrefab, position, Util.QuaternionSafeLookRotation(dir), ((EntityState)this).gameObject, ((BaseState)this).damageStat * weaveDamage, weaveForce, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)DamageTypeCombo.GenericPrimary);
			}
		}

		public override void OnExit()
		{
			base.OnExit();
		}
	}
	public class FlurryStart : BaseSkillState
	{
		public static string enterSoundString = PreGroundSlam.enterSoundString;

		protected float duration = 0.4f;

		private RootMotionAccumulator rootMotionAccumulator;

		private string animName;

		public override void OnEnter()
		{
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			duration /= ((BaseState)this).attackSpeedStat;
			if (((EntityState)this).characterMotor.isGrounded)
			{
				animName = "FlurryStart";
			}
			else
			{
				animName = "FlurryAStart";
				((EntityState)this).characterMotor.airControl = ((EntityState)this).characte