Decompiled source of Rocket v1.0.12

plugins/EnforcerGang-Rocket/RocketSurvivor.dll

Decompiled 4 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AncientScepter;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EmotesAPI;
using EntityStates;
using EntityStates.RocketSurvivorSkills;
using EntityStates.RocketSurvivorSkills.Emote;
using EntityStates.RocketSurvivorSkills.Primary;
using EntityStates.RocketSurvivorSkills.Secondary;
using EntityStates.RocketSurvivorSkills.Special;
using EntityStates.RocketSurvivorSkills.Utility;
using HG;
using HG.BlendableTypes;
using IL.RoR2;
using JetBrains.Annotations;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.RoR2;
using R2API;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.Options;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.Projectile;
using RoR2.Skills;
using RocketSurvivor;
using RocketSurvivor.Components;
using RocketSurvivor.Components.Projectile;
using RocketSurvivor.Modules;
using RocketSurvivor.Modules.Characters;
using RocketSurvivor.Modules.Survivors;
using RocketSurvivor.SkillStates.BaseStates;
using TILER2;
using ThinkInvisible.ClassicItems;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using VRAPI;

[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: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: CompilationRelaxations(8)]
[assembly: AssemblyCompany("RocketSurvivor")]
[assembly: AssemblyProduct("RocketSurvivor")]
[assembly: AssemblyTitle("RocketSurvivor")]
[assembly: AssemblyInformationalVersion("1.0.0+fd5059f2f3c52f9e7bb5079d3157898def7f20ed")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	[CompilerGenerated]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
public class AnimationPlaySmokeParticle : MonoBehaviour
{
	[SerializeField]
	private Transform smokeBone;

	[SerializeField]
	private ParticleSystem smokeParticleSystem;

	public void Smoke()
	{
	}
}
public class BootlegCopyTransformsConstraint : MonoBehaviour
{
	[SerializeField]
	private Animator animator;

	[SerializeField]
	private Transform shovel;

	[SerializeField]
	private Transform shovelHand;

	[SerializeField]
	private string animatorParameter;

	private bool holdingShovel = false;

	private void FixedUpdate()
	{
		if (holdingShovel && animator.GetFloat(animatorParameter) < 1f)
		{
			holdingShovel = false;
		}
	}

	private void LateUpdate()
	{
		//IL_0018: 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)
		if (holdingShovel)
		{
			shovel.position = shovelHand.position;
			shovel.rotation = shovelHand.rotation;
		}
	}

	public void Reparent()
	{
		holdingShovel = true;
	}
}
namespace EntityStates.RocketSurvivorSkills
{
	public class RocketMainState : GenericCharacterMain
	{
		private Animator animator;

		public LocalUser localUser;

		public override void OnEnter()
		{
			((GenericCharacterMain)this).OnEnter();
			animator = ((EntityState)this).GetModelAnimator();
			FindLocalUser();
		}

		private void FindLocalUser()
		{
			if (localUser != null || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody))
			{
				return;
			}
			foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList)
			{
				if ((Object)(object)readOnlyLocalUsers.cachedBody == (Object)(object)((EntityState)this).characterBody)
				{
					localUser = readOnlyLocalUsers;
					break;
				}
			}
		}

		public override void FixedUpdate()
		{
			((GenericCharacterMain)this).FixedUpdate();
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)animator))
			{
				animator.SetFloat("RocketJump", ((EntityState)this).characterBody.HasBuff(Buffs.RocketJumpSpeedBuff) ? 1f : 0f);
			}
			if (((EntityState)this).isAuthority && ((EntityState)this).characterMotor.isGrounded)
			{
				CheckEmote<Sit>(Config.KeybindEmoteSit);
				CheckEmote<Explode>(Config.KeybindEmoteShovel);
				CheckEmote<MenuPose>(Config.KeybindEmoteCSS);
			}
		}

		private void CheckEmote<T>(ConfigEntry<KeyboardShortcut> keybind) where T : EntityState, new()
		{
			if (Config.GetKeyPressed(keybind))
			{
				FindLocalUser();
				if (localUser != null && !localUser.isUIFocused)
				{
					((EntityState)this).outer.SetInterruptState((EntityState)(object)new T(), (InterruptPriority)0);
				}
			}
		}
	}
}
namespace EntityStates.RocketSurvivorSkills.Utility
{
	public class C4 : BaseState
	{
		public static string muzzleString = "MuzzleCenter";

		public static string attackSoundString = "Play_commando_M2_grenade_throw";

		public static GameObject projectilePrefab;

		public static GameObject effectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/MuzzleflashFMJ.prefab").WaitForCompletion();

		public static float damageCoefficient = 12f;

		public static float force = 2400f;

		public static ConfigEntry<bool> vrUseOffhand;

		public static float baseDuration = 0.8f;

		public static float baseMinDuration = 0.2f;

		private float minDuration;

		private float duration;

		private bool buttonReleased = false;

		public override void OnEnter()
		{
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//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_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			duration = baseDuration / base.attackSpeedStat;
			minDuration = baseMinDuration / base.attackSpeedStat;
			Ray val = ((!RocketSurvivorPlugin.VRAPILoaded) ? ((BaseState)this).GetAimRay() : GetVRAimRay());
			((BaseState)this).StartAimMode(val, 3f, false);
			((EntityState)this).PlayAnimation("Gesture, Override", "NitroCharge", "ThrowBomb.playbackRate", duration, 0f);
			Util.PlaySound(attackSoundString, ((EntityState)this).gameObject);
			if (Object.op_Implicit((Object)(object)effectPrefab))
			{
				EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, muzzleString, false);
			}
			if (((EntityState)this).isAuthority)
			{
				ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref val)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction), ((EntityState)this).gameObject, base.damageStat * damageCoefficient, force, false, (DamageColorIndex)0, (GameObject)null, -1f);
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
		private Ray GetVRAimRay()
		{
			//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_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: 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_0050: 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)
			Ray result = ((BaseState)this).GetAimRay();
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master) && Utils.IsUsingMotionControls(((EntityState)this).characterBody.master))
			{
				result = (vrUseOffhand.Value ? MotionControls.nonDominantHand.aimRay : MotionControls.dominantHand.aimRay);
			}
			return result;
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (!buttonReleased && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && !((EntityState)this).inputBank.skill3.down)
			{
				buttonReleased = true;
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)((((EntityState)this).fixedAge >= minDuration && buttonReleased) ? 1 : 3);
		}
	}
	public class PrepComicallyLargeSpoon : BaseState
	{
		private bool success = false;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			Util.PlayAttackSpeedSound("Play_Moffein_RocketSurvivor_R_Alt_Prep", ((EntityState)this).gameObject, base.attackSpeedStat);
			((EntityState)this).PlayAnimation("Shovel, Override", "HoldShovel");
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).isAuthority && (!Object.op_Implicit((Object)(object)((EntityState)this).inputBank) || !((EntityState)this).inputBank.skill3.down))
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new ComicallyLargeSpoon());
				success = true;
			}
		}

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

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			if (!success)
			{
				((EntityState)this).PlayAnimation("Shovel, Override", "BufferEmpty");
			}
		}
	}
	public class ComicallyLargeSpoon : BaseMeleeAttack
	{
		private bool firedExplosion = false;

		public static float blastDamageCoefficient = 12f;

		public static float speedDamageCoefficient = 0.2f;

		public static float minSpeedForDamageBonus = 10.150001f;

		public override void OnEnter()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			hitboxName = "Sword";
			damageType = (DamageType)0;
			damageCoefficient = 0f;
			procCoefficient = 0f;
			pushForce = 0f;
			bonusForce = Vector3.zero;
			baseDuration = 0.6f;
			attackStartTime = 0f;
			attackEndTime = 0.8f;
			baseEarlyExitTime = 1f;
			hitStopDuration = 0.012f;
			attackRecoil = 0.5f;
			hitHopVelocity = 36f;
			swingSoundString = "Play_Moffein_RocketSurvivor_R_Alt_Swing";
			hitSoundString = "Play_Moffein_RocketSurvivor_R_Alt_Hit";
			muzzleString = "SwordHitbox";
			swingEffectPrefab = Assets.spoonSwingEffect;
			hitEffectPrefab = null;
			impactSound = Assets.spoonHitSoundEvent.index;
			base.OnEnter();
		}

		protected override void PlayAttackAnimation()
		{
			base.PlayAttackAnimation();
			((EntityState)this).PlayCrossfade("Gesture, Override", "SwingShovel", "Swing.playbackRate", duration * 2f, 0.05f);
		}

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

		protected override void OnHitEnemyAuthority()
		{
			//IL_0074: 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_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: 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_00be: 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_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Expected O, but got Unknown
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Expected O, but got Unknown
			base.OnHitEnemyAuthority();
			if (!firedExplosion)
			{
				firedExplosion = true;
				float num = 0f;
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
				{
					num = ((Vector3)(ref ((EntityState)this).characterMotor.velocity)).magnitude;
				}
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody))
				{
					float num2 = Mathf.Max(0f, num - minSpeedForDamageBonus) * speedDamageCoefficient;
					BlastAttack val = new BlastAttack
					{
						attacker = ((EntityState)this).gameObject,
						attackerFiltering = (AttackerFiltering)2,
						baseDamage = (blastDamageCoefficient + num2) * ((BaseState)this).damageStat,
						baseForce = 2400f,
						bonusForce = Vector3.zero,
						canRejectForce = true,
						crit = false,
						damageColorIndex = (DamageColorIndex)0,
						damageType = DamageTypeCombo.op_Implicit((DamageType)32),
						falloffModel = (FalloffModel)0,
						inflictor = ((EntityState)this).gameObject,
						position = ((EntityState)this).characterBody.corePosition,
						procChainMask = default(ProcChainMask),
						procCoefficient = 1f,
						radius = 12f,
						teamIndex = ((BaseState)this).GetTeam()
					};
					DamageAPI.AddModdedDamageType(val, DamageTypes.ScaleForceToMass);
					DamageAPI.AddModdedDamageType(val, DamageTypes.SlamDunk);
					DamageAPI.AddModdedDamageType(val, DamageTypes.MarketGarden);
					val.Fire();
					EffectManager.SpawnEffect(AirDet.explosionEffectPrefab, new EffectData
					{
						origin = ((EntityState)this).characterBody.corePosition,
						scale = val.radius
					}, true);
				}
			}
		}

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

		public override void OnExit()
		{
			base.OnExit();
			((EntityState)this).PlayAnimation("Shovel, Override", "BufferEmpty");
		}
	}
}
namespace EntityStates.RocketSurvivorSkills.Special
{
	public class FireAllRockets : BaseState
	{
		public class RocketSkillInfo
		{
			public SkillDef skillDef;

			public GameObject projectilePrefab;

			public GameObject projectilePrefabICBM;

			public GameObject effectPrefab;

			public string muzzleString;

			public string attackSoundString;

			public float damageCoefficient;

			public float force;
		}

		private float lastUpdateTime;

		private RocketSkillInfo selectedRocketSkill;

		private bool isCrit;

		private float fireStopwatch;

		public float delayBetweenShots;

		public int shotsRemaining;

		public static int baseShotCount = 4;

		public static float baseDelayBetweenShots = 0.2f;

		public static List<RocketSkillInfo> rocketSkillInfoList = new List<RocketSkillInfo>();

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			lastUpdateTime = Time.time;
			fireStopwatch = 0f;
			delayBetweenShots = baseDelayBetweenShots / base.attackSpeedStat;
			shotsRemaining = ((Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.primary)) ? ((EntityState)this).skillLocator.primary.maxStock : baseShotCount);
			isCrit = ((BaseState)this).RollCrit();
			SkillDef sd = ((!Object.op_Implicit((Object)(object)((EntityState)this).skillLocator)) ? RocketSurvivorSetup.FireRocketSkillDef : ((EntityState)this).skillLocator.primary.baseSkill);
			selectedRocketSkill = FindRocketSkillInfo(sd);
			ModifyStats();
		}

		public virtual void ModifyStats()
		{
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			float num = Time.time - lastUpdateTime;
			lastUpdateTime = Time.time;
			if (fireStopwatch <= 0f)
			{
				fireStopwatch += delayBetweenShots;
				if (shotsRemaining > 0)
				{
					FireProjectile();
				}
			}
			fireStopwatch -= num;
			if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && shotsRemaining <= 0)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new Rearm());
			}
		}

		public void FireProjectile()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: 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_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			if (((EntityState)this).isAuthority)
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
				Vector3 direction = ((Ray)(ref aimRay)).direction;
				float iCBMDamageMult = RocketSurvivorPlugin.GetICBMDamageMult(((EntityState)this).characterBody);
				if (Config.pocketICBM.Value && Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory) && ((EntityState)this).characterBody.inventory.GetItemCount(Items.MoreMissile) > 0)
				{
					Vector3 val = Vector3.Cross(Vector3.up, ((Ray)(ref aimRay)).direction);
					Vector3 val2 = Vector3.Cross(((Ray)(ref aimRay)).direction, val);
					float num = 0f;
					float num2 = 0f;
					float num3 = 0f;
					num3 = Random.Range(1f + num, 1f + num) * 3f;
					num2 = num3 / 2f;
					Vector3 val3 = Quaternion.AngleAxis((0f - num3) * 0.5f, val2) * ((Ray)(ref aimRay)).direction;
					Quaternion val4 = Quaternion.AngleAxis(num2, val2);
					Ray val5 = default(Ray);
					((Ray)(ref val5))..ctor(((Ray)(ref aimRay)).origin, val3);
					for (int i = 0; i < 3; i++)
					{
						direction = ((Ray)(ref val5)).direction;
						if (shotsRemaining != baseShotCount)
						{
						}
						bool flag = i == 1 || Config.pocketICBMEnableKnockback.Value;
						ProjectileManager.instance.FireProjectile(GetProjectilePrefab(flag), ((Ray)(ref val5)).origin, Util.QuaternionSafeLookRotation(direction), ((EntityState)this).gameObject, iCBMDamageMult * base.damageStat * GetDamageCoefficient(), flag ? (GetForce() * 0.25f) : 0f, isCrit, (DamageColorIndex)0, (GameObject)null, -1f);
						((Ray)(ref val5)).direction = val4 * ((Ray)(ref val5)).direction;
					}
				}
				else
				{
					if (shotsRemaining != baseShotCount)
					{
					}
					ProjectileManager.instance.FireProjectile(GetProjectilePrefab(), ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(direction), ((EntityState)this).gameObject, base.damageStat * GetDamageCoefficient(), GetForce() * 0.25f, isCrit, (DamageColorIndex)0, (GameObject)null, -1f);
				}
				((BaseState)this).StartAimMode(aimRay, 3f, false);
			}
			GameObject effectPrefab = GetEffectPrefab();
			if (Object.op_Implicit((Object)(object)effectPrefab))
			{
				EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, GetMuzzleString(), false);
			}
			((EntityState)this).PlayAnimation("Gesture, Override", "SpecialShoot");
			Util.PlaySound(GetAttackSoundString(), ((EntityState)this).gameObject);
			shotsRemaining--;
		}

		private string GetAttackSoundString()
		{
			if (selectedRocketSkill != null)
			{
				return selectedRocketSkill.attackSoundString;
			}
			return FireRocket.attackSoundString;
		}

		private GameObject GetProjectilePrefab(bool enableKnockback = true)
		{
			if (selectedRocketSkill == null)
			{
				return null;
			}
			if (enableKnockback)
			{
				return selectedRocketSkill.projectilePrefab;
			}
			return selectedRocketSkill.projectilePrefabICBM;
		}

		private GameObject GetEffectPrefab()
		{
			if (selectedRocketSkill != null)
			{
				return selectedRocketSkill.effectPrefab;
			}
			return null;
		}

		private string GetMuzzleString()
		{
			if (selectedRocketSkill != null)
			{
				return selectedRocketSkill.muzzleString;
			}
			return string.Empty;
		}

		private float GetDamageCoefficient()
		{
			if (selectedRocketSkill != null)
			{
				return selectedRocketSkill.damageCoefficient;
			}
			return 0f;
		}

		private float GetForce()
		{
			if (selectedRocketSkill != null)
			{
				return selectedRocketSkill.force;
			}
			return 0f;
		}

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

		public static RocketSkillInfo FindRocketSkillInfo(SkillDef sd)
		{
			foreach (RocketSkillInfo rocketSkillInfo in rocketSkillInfoList)
			{
				if ((Object)(object)rocketSkillInfo.skillDef == (Object)(object)sd)
				{
					return rocketSkillInfo;
				}
			}
			return null;
		}
	}
	public class FireAllRocketsScepter : FireAllRockets
	{
		public override void ModifyStats()
		{
			shotsRemaining = Mathf.FloorToInt((float)shotsRemaining * 2.5f);
			delayBetweenShots *= 0.5f;
		}
	}
	public class Rearm : BaseState
	{
		public static GameObject effectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Loader/OmniImpactVFXLoader.prefab").WaitForCompletion();

		public static string soundString = "Play_Moffein_RocketSurvivor_Shift_Rearm";

		public static float baseDuration = 0.96f;

		public static float vfxPercent = 0.75f;

		private float duration;

		private bool playedEffect = false;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			duration = baseDuration / base.attackSpeedStat;
			Util.PlayAttackSpeedSound(soundString, ((EntityState)this).gameObject, base.attackSpeedStat);
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (!playedEffect && ((EntityState)this).fixedAge >= duration * vfxPercent)
			{
				playedEffect = true;
				EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, "Exhaust", false);
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator))
				{
					((EntityState)this).skillLocator.primary.Reset();
				}
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)3;
		}
	}
}
namespace EntityStates.RocketSurvivorSkills.Secondary
{
	public class AirDet : BaseState
	{
		public static GameObject explosionEffectPrefab;

		public static GameObject concExplosionEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/Railgunner/RailgunnerMineExplosion.prefab").WaitForCompletion();

		public static float forceMult = 1.3f;

		public static float radiusMult = 1.5f;

		public static float damageMult = 1.5f;

		public static float minRadius = 10f;

		public static float baseDuration = 0.25f;

		private bool buttonReleased = false;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			RocketTrackerComponent component = ((EntityState)this).GetComponent<RocketTrackerComponent>();
			if (Object.op_Implicit((Object)(object)component))
			{
				if (((EntityState)this).isAuthority)
				{
					component.ClientDetonateBlastJump();
				}
				if (NetworkServer.active)
				{
					component.ServerDetonateRocket();
				}
			}
			((EntityState)this).PlayAnimation("LeftArm, Override", "RemoteDet");
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).isAuthority)
			{
				if (!buttonReleased && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && !((EntityState)this).inputBank.skill2.down)
				{
					buttonReleased = true;
				}
				if (((EntityState)this).fixedAge > baseDuration)
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_000d: 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)
			return (InterruptPriority)((!buttonReleased) ? 2 : 0);
		}
	}
}
namespace EntityStates.RocketSurvivorSkills.Primary
{
	public class EnterReload : BaseState
	{
		public static float baseDuration = 0.12f;

		private float duration => baseDuration / base.attackSpeedStat;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge > duration)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new Reload());
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)1;
		}
	}
	public class FireRocket : BaseState
	{
		public static GameObject explosionEffectPrefab;

		public static string muzzleString = "MuzzleRocketLauncher";

		public static string attackSoundString = "Play_Moffein_RocketSurvivor_M1_Shoot";

		public static GameObject projectilePrefab;

		public static GameObject projectilePrefabICBM;

		public static GameObject effectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/MuzzleflashBarrage.prefab").WaitForCompletion();

		public static float damageCoefficient = 6f;

		public static float force = 2000f;

		public static float baseDuration = 0.8f;

		private float duration;

		public override void OnEnter()
		{
			//IL_001b: 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_0022: 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_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_023d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fc: 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)
			((BaseState)this).OnEnter();
			duration = baseDuration / base.attackSpeedStat;
			Ray aimRay = ((BaseState)this).GetAimRay();
			((BaseState)this).StartAimMode(aimRay, 3f, false);
			((EntityState)this).PlayAnimation("Gesture, Override", "Shoot");
			Util.PlaySound(attackSoundString, ((EntityState)this).gameObject);
			if (Object.op_Implicit((Object)(object)effectPrefab))
			{
				EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, muzzleString, false);
			}
			if (!((EntityState)this).isAuthority)
			{
				return;
			}
			float iCBMDamageMult = RocketSurvivorPlugin.GetICBMDamageMult(((EntityState)this).characterBody);
			if (Config.pocketICBM.Value && Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory) && ((EntityState)this).characterBody.inventory.GetItemCount(Items.MoreMissile) > 0)
			{
				Vector3 val = Vector3.Cross(Vector3.up, ((Ray)(ref aimRay)).direction);
				Vector3 val2 = Vector3.Cross(((Ray)(ref aimRay)).direction, val);
				float num = 0f;
				float num2 = 0f;
				float num3 = 0f;
				num3 = Random.Range(1f + num, 1f + num) * 3f;
				num2 = num3 / 2f;
				Vector3 val3 = Quaternion.AngleAxis((0f - num3) * 0.5f, val2) * ((Ray)(ref aimRay)).direction;
				Quaternion val4 = Quaternion.AngleAxis(num2, val2);
				Ray val5 = default(Ray);
				((Ray)(ref val5))..ctor(((Ray)(ref aimRay)).origin, val3);
				for (int i = 0; i < 3; i++)
				{
					bool flag = i == 1 || Config.pocketICBMEnableKnockback.Value;
					ProjectileManager.instance.FireProjectile(flag ? projectilePrefab : projectilePrefabICBM, ((Ray)(ref val5)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref val5)).direction), ((EntityState)this).gameObject, iCBMDamageMult * base.damageStat * damageCoefficient, flag ? force : 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f);
					((Ray)(ref val5)).direction = val4 * ((Ray)(ref val5)).direction;
				}
			}
			else
			{
				ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, base.damageStat * damageCoefficient, force, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f);
			}
		}

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}
	}
	public class FireRocketAlt : BaseState
	{
		public static GameObject explosionEffectPrefab;

		public static string muzzleString = "MuzzleRocketLauncher";

		public static string attackSoundString = "Play_Moffein_RocketSurvivor_M1_Alt_Shoot";

		public static GameObject projectilePrefab;

		public static GameObject projectilePrefabICBM;

		public static GameObject effectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/MuzzleflashBarrage.prefab").WaitForCompletion();

		public static float damageCoefficient = 6f;

		public static float force = 2250f;

		public static float baseDuration = 0.8f;

		private float duration;

		public override void OnEnter()
		{
			//IL_001b: 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_0022: 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_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_023d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fc: 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)
			((BaseState)this).OnEnter();
			duration = FireRocket.baseDuration / base.attackSpeedStat;
			Ray aimRay = ((BaseState)this).GetAimRay();
			((BaseState)this).StartAimMode(aimRay, 3f, false);
			((EntityState)this).PlayAnimation("Gesture, Override", "Shoot");
			Util.PlaySound(attackSoundString, ((EntityState)this).gameObject);
			if (Object.op_Implicit((Object)(object)effectPrefab))
			{
				EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, muzzleString, false);
			}
			if (!((EntityState)this).isAuthority)
			{
				return;
			}
			float iCBMDamageMult = RocketSurvivorPlugin.GetICBMDamageMult(((EntityState)this).characterBody);
			if (Config.pocketICBM.Value && Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory) && ((EntityState)this).characterBody.inventory.GetItemCount(Items.MoreMissile) > 0)
			{
				Vector3 val = Vector3.Cross(Vector3.up, ((Ray)(ref aimRay)).direction);
				Vector3 val2 = Vector3.Cross(((Ray)(ref aimRay)).direction, val);
				float num = 0f;
				float num2 = 0f;
				float num3 = 0f;
				num3 = Random.Range(1f + num, 1f + num) * 3f;
				num2 = num3 / 2f;
				Vector3 val3 = Quaternion.AngleAxis((0f - num3) * 0.5f, val2) * ((Ray)(ref aimRay)).direction;
				Quaternion val4 = Quaternion.AngleAxis(num2, val2);
				Ray val5 = default(Ray);
				((Ray)(ref val5))..ctor(((Ray)(ref aimRay)).origin, val3);
				for (int i = 0; i < 3; i++)
				{
					bool flag = i == 1 || Config.pocketICBMEnableKnockback.Value;
					ProjectileManager.instance.FireProjectile(flag ? projectilePrefab : projectilePrefabICBM, ((Ray)(ref val5)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref val5)).direction), ((EntityState)this).gameObject, iCBMDamageMult * base.damageStat * damageCoefficient, flag ? force : 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f);
					((Ray)(ref val5)).direction = val4 * ((Ray)(ref val5)).direction;
				}
			}
			else
			{
				ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, base.damageStat * damageCoefficient, force, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f);
			}
		}

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

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

		public static float exitSoundPitch = 1f;

		public static string enterSoundString = "Play_Moffein_RocketSurvivor_M1_Reload";

		public static GameObject reloadEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/MuzzleflashSmokeRing.prefab").WaitForCompletion();

		public static float baseDuration = 0.8f;

		private bool hasGivenStock;

		private float duration => baseDuration / base.attackSpeedStat;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			((EntityState)this).PlayCrossfade("Reload, Override", "EnterReload", "Reload.playbackRate", duration, 0.1f);
			Util.PlayAttackSpeedSound(enterSoundString, ((EntityState)this).gameObject, enterSoundPitch);
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge >= duration / 2f)
			{
				GiveStock();
			}
			if (((EntityState)this).isAuthority && !(((EntityState)this).fixedAge < duration))
			{
				if (((EntityState)this).skillLocator.primary.stock < ((EntityState)this).skillLocator.primary.maxStock)
				{
					((EntityState)this).outer.SetNextState((EntityState)(object)new Reload());
				}
				else
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
			}
		}

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

		private void GiveStock()
		{
			if (!hasGivenStock)
			{
				if (((EntityState)this).isAuthority && ((EntityState)this).skillLocator.primary.stock < ((EntityState)this).skillLocator.primary.maxStock)
				{
					((EntityState)this).skillLocator.primary.AddOneStock();
				}
				if (Object.op_Implicit((Object)(object)reloadEffectPrefab))
				{
					EffectManager.SimpleMuzzleFlash(reloadEffectPrefab, ((EntityState)this).gameObject, "MuzzleRocketLauncher", false);
				}
				hasGivenStock = true;
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)1;
		}
	}
}
namespace EntityStates.RocketSurvivorSkills.Emote
{
	public class BaseEmote : BaseState
	{
		public string soundString;

		public string animString;

		public float duration;

		public float animDuration;

		private Animator animator;

		private ChildLocator childLocator;

		public LocalUser localUser;

		private CharacterCameraParamsData emoteCameraParams = new CharacterCameraParamsData
		{
			maxPitch = BlendableFloat.op_Implicit(70f),
			minPitch = BlendableFloat.op_Implicit(-70f),
			pivotVerticalOffset = BlendableFloat.op_Implicit(0.5f),
			idealLocalCameraPos = BlendableVector3.op_Implicit(emoteCameraPosition),
			wallCushion = BlendableFloat.op_Implicit(0.1f)
		};

		public static Vector3 emoteCameraPosition = new Vector3(0f, -0.5f, -8.9f);

		private CameraParamsOverrideHandle camOverrideHandle;

		public override void OnEnter()
		{
			//IL_0151: 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_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: 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_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			animator = ((EntityState)this).GetModelAnimator();
			childLocator = ((EntityState)this).GetModelChildLocator();
			FindLocalUser();
			((EntityState)this).characterBody.hideCrosshair = true;
			if (Object.op_Implicit((Object)(object)((EntityState)this).GetAimAnimator()))
			{
				((Behaviour)((EntityState)this).GetAimAnimator()).enabled = false;
			}
			animator.SetLayerWeight(animator.GetLayerIndex("AimPitch"), 0f);
			animator.SetLayerWeight(animator.GetLayerIndex("AimYaw"), 0f);
			if (duration == 0f && animDuration == 0f)
			{
				duration = GetAnimatorClipDuration();
			}
			if (animDuration == 0f && duration != 0f)
			{
				animDuration = duration;
			}
			if (animDuration > 0f)
			{
				((EntityState)this).PlayAnimation("FullBody, Override", animString, "Emote.playbackRate", animDuration, 0f);
			}
			else
			{
				((EntityState)this).PlayAnimation("FullBody, Override", animString);
			}
			Util.PlaySound(soundString, ((EntityState)this).gameObject);
			CameraParamsOverrideRequest val = default(CameraParamsOverrideRequest);
			val.cameraParamsData = emoteCameraParams;
			val.priority = 0f;
			CameraParamsOverrideRequest val2 = val;
			camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val2, 0.5f);
		}

		private float GetAnimatorClipDuration()
		{
			//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)
			Animator modelAnimator = ((EntityState)this).GetModelAnimator();
			modelAnimator.speed = 1f;
			modelAnimator.Update(0f);
			int layerIndex = modelAnimator.GetLayerIndex("FullBody, Override");
			if (layerIndex >= 0)
			{
				modelAnimator.PlayInFixedTime(animString, layerIndex, 0f);
				modelAnimator.Update(0f);
				AnimatorStateInfo currentAnimatorStateInfo = modelAnimator.GetCurrentAnimatorStateInfo(layerIndex);
				return ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).length;
			}
			return 0f;
		}

		private void FindLocalUser()
		{
			if (localUser != null || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody))
			{
				return;
			}
			foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList)
			{
				if ((Object)(object)readOnlyLocalUsers.cachedBody == (Object)(object)((EntityState)this).characterBody)
				{
					localUser = readOnlyLocalUsers;
					break;
				}
			}
		}

		public override void OnExit()
		{
			//IL_008a: 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)
			((EntityState)this).OnExit();
			((EntityState)this).characterBody.hideCrosshair = false;
			if (Object.op_Implicit((Object)(object)((EntityState)this).GetAimAnimator()))
			{
				((Behaviour)((EntityState)this).GetAimAnimator()).enabled = true;
			}
			animator.SetLayerWeight(animator.GetLayerIndex("AimPitch"), 1f);
			animator.SetLayerWeight(animator.GetLayerIndex("AimYaw"), 1f);
			((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
			((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.5f);
		}

		public override void FixedUpdate()
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			bool flag = false;
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				if (!((EntityState)this).characterMotor.isGrounded)
				{
					flag = true;
				}
				if (((EntityState)this).characterMotor.velocity != Vector3.zero)
				{
					flag = true;
				}
			}
			if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank))
			{
				if (((EntityState)this).inputBank.skill1.down)
				{
					flag = true;
				}
				if (((EntityState)this).inputBank.skill2.down)
				{
					flag = true;
				}
				if (((EntityState)this).inputBank.skill3.down)
				{
					flag = true;
				}
				if (((EntityState)this).inputBank.skill4.down)
				{
					flag = true;
				}
				if (((EntityState)this).inputBank.jump.down)
				{
					flag = true;
				}
				if (((EntityState)this).inputBank.moveVector != Vector3.zero)
				{
					flag = true;
				}
			}
			if (((EntityState)this).isAuthority && ((EntityState)this).characterMotor.isGrounded)
			{
				CheckEmote<Sit>(Config.KeybindEmoteSit);
				CheckEmote<Explode>(Config.KeybindEmoteShovel);
				CheckEmote<MenuPose>(Config.KeybindEmoteCSS);
			}
			if (duration > 0f && ((EntityState)this).fixedAge >= duration)
			{
				flag = true;
			}
			if (flag)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private void CheckEmote<T>(ConfigEntry<KeyboardShortcut> keybind) where T : EntityState, new()
		{
			if (Config.GetKeyPressed(keybind))
			{
				FindLocalUser();
				if (localUser != null && !localUser.isUIFocused)
				{
					((EntityState)this).outer.SetInterruptState((EntityState)(object)new T(), (InterruptPriority)0);
				}
			}
		}

		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)0;
		}
	}
	public class Sit : BaseEmote
	{
		public override void OnEnter()
		{
			animString = "TauntSit";
			duration = -1f;
			base.OnEnter();
		}
	}
	public class Explode : BaseEmote
	{
		private const float startSoundDelay = 1f;

		private bool playedStartSound = false;

		private const float thump1Delay = 2.6666667f;

		private bool playedThump1 = false;

		private bool explosion = false;

		public override void OnEnter()
		{
			animString = "TauntShovel";
			base.OnEnter();
		}

		public override void FixedUpdate()
		{
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_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)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: 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_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_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: 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_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Expected O, but got Unknown
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: 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_0197: 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_01b5: Expected O, but got Unknown
			base.FixedUpdate();
			if (!playedStartSound && ((EntityState)this).fixedAge >= 1f)
			{
				playedStartSound = true;
				Util.PlaySound("Play_Moffein_RocketSurvivor_R_Alt_Prep", ((EntityState)this).gameObject);
			}
			if (!playedThump1 && ((EntityState)this).fixedAge >= 2.6666667f)
			{
				playedThump1 = true;
				Util.PlaySound("Play_MULT_shift_hit", ((EntityState)this).gameObject);
			}
			if (explosion || !(((EntityState)this).fixedAge / duration >= 1f))
			{
				return;
			}
			explosion = true;
			Util.PlaySound("Play_MULT_shift_hit", ((EntityState)this).gameObject);
			if (((EntityState)this).isAuthority)
			{
				BlastAttack val = new BlastAttack
				{
					attacker = null,
					attackerFiltering = (AttackerFiltering)1,
					baseDamage = 100f * ((BaseState)this).damageStat,
					baseForce = 8000f,
					bonusForce = Vector3.zero,
					canRejectForce = true,
					crit = ((BaseState)this).RollCrit(),
					damageColorIndex = (DamageColorIndex)0,
					damageType = DamageTypeCombo.op_Implicit((DamageType)262176),
					falloffModel = (FalloffModel)2,
					inflictor = null,
					position = ((EntityState)this).characterBody.corePosition,
					procChainMask = default(ProcChainMask),
					procCoefficient = 1f,
					radius = 12f,
					teamIndex = ((BaseState)this).GetTeam()
				};
				val.Fire();
				EffectManager.SpawnEffect(AirDet.explosionEffectPrefab, new EffectData
				{
					origin = ((EntityState)this).characterBody.corePosition,
					scale = val.radius
				}, true);
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
				{
					((BaseState)this).SmallHop(((EntityState)this).characterMotor, 36f);
				}
			}
		}
	}
	public class MenuPose : BaseEmote
	{
		private const float thumpSoundDelay = 1.5f;

		private const float loadSoundDelay = 4f / 15f;

		private bool playedThump = false;

		private bool playedLoad = false;

		public override void OnEnter()
		{
			animString = "TauntCSS";
			duration = -1f;
			base.OnEnter();
		}

		public override void FixedUpdate()
		{
			base.FixedUpdate();
			if (!playedLoad && ((EntityState)this).fixedAge >= 4f / 15f)
			{
				playedLoad = true;
				Util.PlaySound("Play_Moffein_RocketSurvivor_Shift_Rearm", ((EntityState)this).gameObject);
			}
			if (!playedThump && ((EntityState)this).fixedAge >= 1.5f)
			{
				playedThump = true;
				Util.PlaySound("Play_MULT_shift_hit", ((EntityState)this).gameObject);
			}
		}
	}
}
namespace RocketSurvivor
{
	public class Buffs
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static StatHookEventHandler <>9__2_0;

			public static hook_FixedUpdate <>9__2_1;

			public static hook_Jump <>9__2_2;

			public static Func<Instruction, bool> <>9__2_4;

			public static Func<Vector3, CharacterMotor, Vector3> <>9__2_5;

			public static Func<Instruction, bool> <>9__2_6;

			public static Func<float, CharacterMotor, float> <>9__2_7;

			public static Manipulator <>9__2_3;

			internal void <Initialize>b__2_0(CharacterBody sender, StatHookEventArgs args)
			{
				if (sender.HasBuff(RocketJumpSpeedBuff))
				{
					args.moveSpeedMultAdd += 0.4f;
				}
			}

			internal void <Initialize>b__2_1(orig_FixedUpdate orig, CharacterMotor self)
			{
				orig.Invoke(self);
				if (((NetworkBehaviour)self).hasAuthority && self.isGrounded && Object.op_Implicit((Object)(object)self.body) && self.body.HasBuff(RocketJumpSpeedBuff))
				{
					NetworkedBodyBlastJumpHandler component = ((Component)self).GetComponent<NetworkedBodyBlastJumpHandler>();
					if (Object.op_Implicit((Object)(object)component))
					{
						component.CallCmdRemoveRocketJumpBuff();
					}
				}
			}

			internal void <Initialize>b__2_2(orig_Jump orig, CharacterMotor self, float hMult, float vMult, bool vault)
			{
				orig.Invoke(self, hMult, vMult, vault);
				if (((NetworkBehaviour)self).hasAuthority && self.body.HasBuff(RocketJumpSpeedBuff))
				{
					NetworkedBodyBlastJumpHandler component = ((Component)self).GetComponent<NetworkedBodyBlastJumpHandler>();
					if (Object.op_Implicit((Object)(object)component))
					{
						component.CallCmdRemoveRocketJumpBuff();
					}
				}
			}

			internal void <Initialize>b__2_3(ILContext il)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Expected O, but got Unknown
				//IL_0039: 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)
				ILCursor val = new ILCursor(il);
				val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchCall<CharacterMotor>(x, "get_moveDirection")
				});
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Func<Vector3, CharacterMotor, Vector3>>((Func<Vector3, CharacterMotor, Vector3>)delegate(Vector3 moveDirection, CharacterMotor self)
				{
					//IL_0056: 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_0016: Unknown result type (might be due to invalid IL or missing references)
					//IL_005a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0023: 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)
					if (self.body.HasBuff(RocketJumpSpeedBuff) && moveDirection.x == 0f && moveDirection.z == 0f)
					{
						moveDirection = self.velocity;
						moveDirection.y = 0f;
						((Vector3)(ref moveDirection)).Normalize();
					}
					return moveDirection;
				});
				val.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchCall<CharacterMotor>(x, "get_walkSpeed")
				});
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Func<float, CharacterMotor, float>>((Func<float, CharacterMotor, float>)delegate(float walkSpeed, CharacterMotor self)
				{
					//IL_004a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0055: Unknown result type (might be due to invalid IL or missing references)
					//IL_006b: Unknown result type (might be due to invalid IL or missing references)
					//IL_006c: Unknown result type (might be due to invalid IL or missing references)
					if (self.body.HasBuff(RocketJumpSpeedBuff))
					{
						Vector2 val2 = default(Vector2);
						((Vector2)(ref val2))..ctor(self.velocity.x, self.velocity.z);
						float magnitude = ((Vector2)(ref val2)).magnitude;
						if (magnitude > walkSpeed)
						{
							Vector2 val3 = default(Vector2);
							((Vector2)(ref val3))..ctor(self.moveDirection.x, self.moveDirection.z);
							float num = 45f;
							float num2 = Vector2.Angle(val2, val3);
							float num3 = ((num2 <= num) ? 1f : (1f - (num2 - num) / (180f - num)));
							walkSpeed = Mathf.Lerp(walkSpeed, magnitude, num3);
						}
					}
					return walkSpeed;
				});
			}

			internal bool <Initialize>b__2_4(Instruction x)
			{
				return ILPatternMatchingExt.MatchCall<CharacterMotor>(x, "get_moveDirection");
			}

			internal Vector3 <Initialize>b__2_5(Vector3 moveDirection, CharacterMotor self)
			{
				//IL_0056: 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_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_005a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0023: 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)
				if (self.body.HasBuff(RocketJumpSpeedBuff) && moveDirection.x == 0f && moveDirection.z == 0f)
				{
					moveDirection = self.velocity;
					moveDirection.y = 0f;
					((Vector3)(ref moveDirection)).Normalize();
				}
				return moveDirection;
			}

			internal bool <Initialize>b__2_6(Instruction x)
			{
				return ILPatternMatchingExt.MatchCall<CharacterMotor>(x, "get_walkSpeed");
			}

			internal float <Initialize>b__2_7(float walkSpeed, CharacterMotor self)
			{
				//IL_004a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0055: Unknown result type (might be due to invalid IL or missing references)
				//IL_006b: Unknown result type (might be due to invalid IL or missing references)
				//IL_006c: Unknown result type (might be due to invalid IL or missing references)
				if (self.body.HasBuff(RocketJumpSpeedBuff))
				{
					Vector2 val = default(Vector2);
					((Vector2)(ref val))..ctor(self.velocity.x, self.velocity.z);
					float magnitude = ((Vector2)(ref val)).magnitude;
					if (magnitude > walkSpeed)
					{
						Vector2 val2 = default(Vector2);
						((Vector2)(ref val2))..ctor(self.moveDirection.x, self.moveDirection.z);
						float num = 45f;
						float num2 = Vector2.Angle(val, val2);
						float num3 = ((num2 <= num) ? 1f : (1f - (num2 - num) / (180f - num)));
						walkSpeed = Mathf.Lerp(walkSpeed, magnitude, num3);
					}
				}
				return walkSpeed;
			}
		}

		public static BuffDef RocketJumpSpeedBuff;

		public static bool initialized;

		public static void Initialize()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Expected O, but got Unknown
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Expected O, but got Unknown
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Expected O, but got Unknown
			//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_00dc: Expected O, but got Unknown
			if (initialized)
			{
				return;
			}
			BuffDef val = Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/Base/SprintOutOfCombat/bdWhipBoost.asset").WaitForCompletion();
			RocketJumpSpeedBuff = CreateBuffDef("RocketSurvivorRocketJumpSpeedBuff", canStack: false, isCooldown: false, isDebuff: false, new Color(0.376f, 0.843f, 0.898f), val.iconSprite);
			object obj = <>c.<>9__2_0;
			if (obj == null)
			{
				StatHookEventHandler val2 = delegate(CharacterBody sender, StatHookEventArgs args)
				{
					if (sender.HasBuff(RocketJumpSpeedBuff))
					{
						args.moveSpeedMultAdd += 0.4f;
					}
				};
				<>c.<>9__2_0 = val2;
				obj = (object)val2;
			}
			RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj;
			object obj2 = <>c.<>9__2_1;
			if (obj2 == null)
			{
				hook_FixedUpdate val3 = delegate(orig_FixedUpdate orig, CharacterMotor self)
				{
					orig.Invoke(self);
					if (((NetworkBehaviour)self).hasAuthority && self.isGrounded && Object.op_Implicit((Object)(object)self.body) && self.body.HasBuff(RocketJumpSpeedBuff))
					{
						NetworkedBodyBlastJumpHandler component2 = ((Component)self).GetComponent<NetworkedBodyBlastJumpHandler>();
						if (Object.op_Implicit((Object)(object)component2))
						{
							component2.CallCmdRemoveRocketJumpBuff();
						}
					}
				};
				<>c.<>9__2_1 = val3;
				obj2 = (object)val3;
			}
			CharacterMotor.FixedUpdate += (hook_FixedUpdate)obj2;
			object obj3 = <>c.<>9__2_2;
			if (obj3 == null)
			{
				hook_Jump val4 = delegate(orig_Jump orig, CharacterMotor self, float hMult, float vMult, bool vault)
				{
					orig.Invoke(self, hMult, vMult, vault);
					if (((NetworkBehaviour)self).hasAuthority && self.body.HasBuff(RocketJumpSpeedBuff))
					{
						NetworkedBodyBlastJumpHandler component = ((Component)self).GetComponent<NetworkedBodyBlastJumpHandler>();
						if (Object.op_Implicit((Object)(object)component))
						{
							component.CallCmdRemoveRocketJumpBuff();
						}
					}
				};
				<>c.<>9__2_2 = val4;
				obj3 = (object)val4;
			}
			CharacterMotor.Jump += (hook_Jump)obj3;
			object obj4 = <>c.<>9__2_3;
			if (obj4 == null)
			{
				Manipulator val5 = delegate(ILContext il)
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0008: Expected O, but got Unknown
					//IL_0039: 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)
					ILCursor val6 = new ILCursor(il);
					val6.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
					{
						(Instruction x) => ILPatternMatchingExt.MatchCall<CharacterMotor>(x, "get_moveDirection")
					});
					val6.Emit(OpCodes.Ldarg_0);
					val6.EmitDelegate<Func<Vector3, CharacterMotor, Vector3>>((Func<Vector3, CharacterMotor, Vector3>)delegate(Vector3 moveDirection, CharacterMotor self)
					{
						//IL_0056: 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_0016: Unknown result type (might be due to invalid IL or missing references)
						//IL_005a: Unknown result type (might be due to invalid IL or missing references)
						//IL_0023: 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)
						if (self.body.HasBuff(RocketJumpSpeedBuff) && moveDirection.x == 0f && moveDirection.z == 0f)
						{
							moveDirection = self.velocity;
							moveDirection.y = 0f;
							((Vector3)(ref moveDirection)).Normalize();
						}
						return moveDirection;
					});
					val6.GotoNext((MoveType)2, new Func<Instruction, bool>[1]
					{
						(Instruction x) => ILPatternMatchingExt.MatchCall<CharacterMotor>(x, "get_walkSpeed")
					});
					val6.Emit(OpCodes.Ldarg_0);
					val6.EmitDelegate<Func<float, CharacterMotor, float>>((Func<float, CharacterMotor, float>)delegate(float walkSpeed, CharacterMotor self)
					{
						//IL_004a: Unknown result type (might be due to invalid IL or missing references)
						//IL_0055: Unknown result type (might be due to invalid IL or missing references)
						//IL_006b: Unknown result type (might be due to invalid IL or missing references)
						//IL_006c: Unknown result type (might be due to invalid IL or missing references)
						if (self.body.HasBuff(RocketJumpSpeedBuff))
						{
							Vector2 val7 = default(Vector2);
							((Vector2)(ref val7))..ctor(self.velocity.x, self.velocity.z);
							float magnitude = ((Vector2)(ref val7)).magnitude;
							if (magnitude > walkSpeed)
							{
								Vector2 val8 = default(Vector2);
								((Vector2)(ref val8))..ctor(self.moveDirection.x, self.moveDirection.z);
								float num = 45f;
								float num2 = Vector2.Angle(val7, val8);
								float num3 = ((num2 <= num) ? 1f : (1f - (num2 - num) / (180f - num)));
								walkSpeed = Mathf.Lerp(walkSpeed, magnitude, num3);
							}
						}
						return walkSpeed;
					});
				};
				<>c.<>9__2_3 = val5;
				obj4 = (object)val5;
			}
			CharacterMotor.PreMove += (Manipulator)obj4;
			initialized = true;
		}

		public static BuffDef CreateBuffDef(string name, bool canStack, bool isCooldown, bool isDebuff, Color color, Sprite iconSprite)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			BuffDef val = ScriptableObject.CreateInstance<BuffDef>();
			((Object)val).name = name;
			val.canStack = canStack;
			val.isCooldown = isCooldown;
			val.isDebuff = isDebuff;
			val.buffColor = color;
			val.iconSprite = iconSprite;
			Content.AddBuffDef(val);
			((Object)val).name = ((Object)val).name;
			return val;
		}
	}
	public class DamageTypes
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static Func<Instruction, bool> <>9__6_2;

			public static Func<float, BlastAttack, float> <>9__6_1;

			public static Manipulator <>9__6_0;

			internal void <Initialize>b__6_0(ILContext il)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Expected O, but got Unknown
				//IL_003d: Unknown result type (might be due to invalid IL or missing references)
				ILCursor val = new ILCursor(il);
				if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.75f)
				}))
				{
					val.Emit(OpCodes.Ldarg_0);
					val.EmitDelegate<Func<float, BlastAttack, float>>((Func<float, BlastAttack, float>)delegate(float damagePenalty, BlastAttack self)
					{
						//IL_0002: Unknown result type (might be due to invalid IL or missing references)
						if (DamageAPI.HasModdedDamageType(self, SweetSpotModifier))
						{
							damagePenalty *= 2f / 3f;
						}
						return damagePenalty;
					});
				}
				else
				{
					Debug.LogError((object)"RocketSurvivor: SweetSpotModifier IL Hook failed.");
				}
			}

			internal bool <Initialize>b__6_2(Instruction x)
			{
				return ILPatternMatchingExt.MatchLdcR4(x, 0.75f);
			}

			internal float <Initialize>b__6_1(float damagePenalty, BlastAttack self)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				if (DamageAPI.HasModdedDamageType(self, SweetSpotModifier))
				{
					damagePenalty *= 2f / 3f;
				}
				return damagePenalty;
			}
		}

		public static bool initialized;

		public static ModdedDamageType ScaleForceToMass;

		public static ModdedDamageType AirborneBonus;

		public static ModdedDamageType MarketGarden;

		public static ModdedDamageType SlamDunk;

		public static ModdedDamageType SweetSpotModifier;

		public static void Initialize()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: 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_0074: Expected O, but got Unknown
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Expected O, but got Unknown
			if (initialized)
			{
				return;
			}
			ScaleForceToMass = DamageAPI.ReserveDamageType();
			AirborneBonus = DamageAPI.ReserveDamageType();
			MarketGarden = DamageAPI.ReserveDamageType();
			SlamDunk = DamageAPI.ReserveDamageType();
			SweetSpotModifier = DamageAPI.ReserveDamageType();
			object obj = <>c.<>9__6_0;
			if (obj == null)
			{
				Manipulator val = delegate(ILContext il)
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0008: Expected O, but got Unknown
					//IL_003d: Unknown result type (might be due to invalid IL or missing references)
					ILCursor val2 = new ILCursor(il);
					if (val2.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
					{
						(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.75f)
					}))
					{
						val2.Emit(OpCodes.Ldarg_0);
						val2.EmitDelegate<Func<float, BlastAttack, float>>((Func<float, BlastAttack, float>)delegate(float damagePenalty, BlastAttack self)
						{
							//IL_0002: Unknown result type (might be due to invalid IL or missing references)
							if (DamageAPI.HasModdedDamageType(self, SweetSpotModifier))
							{
								damagePenalty *= 2f / 3f;
							}
							return damagePenalty;
						});
					}
					else
					{
						Debug.LogError((object)"RocketSurvivor: SweetSpotModifier IL Hook failed.");
					}
				};
				<>c.<>9__6_0 = val;
				obj = (object)val;
			}
			BlastAttack.HandleHits += (Manipulator)obj;
			HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
			initialized = true;
		}

		private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
		{
			//IL_0307: 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_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			//IL_0296: Unknown result type (might be due to invalid IL or missing references)
			//IL_0248: Unknown result type (might be due to invalid IL or missing references)
			//IL_026b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0270: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_027e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0280: Unknown result type (might be due to invalid IL or missing references)
			//IL_0285: Unknown result type (might be due to invalid IL or missing references)
			//IL_028a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: 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_00a7: 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_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_02d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02de: Invalid comparison between Unknown and I4
			//IL_02b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
			CharacterBody body = self.body;
			if (Object.op_Implicit((Object)(object)body))
			{
				bool flag = false;
				if (DamageAPI.HasModdedDamageType(damageInfo, ScaleForceToMass))
				{
					bool flag2 = true;
					float num = 0f;
					if (Object.op_Implicit((Object)(object)body.characterMotor))
					{
						flag2 = body.characterMotor.isGrounded;
						float magnitude = ((Vector3)(ref damageInfo.force)).magnitude;
						if (Object.op_Implicit((Object)(object)damageInfo.inflictor) && Object.op_Implicit((Object)(object)damageInfo.inflictor.transform))
						{
							Vector3 val = body.corePosition - damageInfo.inflictor.transform.position;
							damageInfo.force = ((Vector3)(ref val)).normalized * magnitude;
						}
						num = body.characterMotor.mass;
						if (!body.characterMotor.isFlying && !flag2 && body.characterMotor.velocity.y < 0f)
						{
							damageInfo.force.y += body.characterMotor.velocity.y * -120f;
						}
					}
					else if (Object.op_Implicit((Object)(object)body.rigidbody))
					{
						num = body.rigidbody.mass;
					}
					float num2 = Mathf.Max(1f, num / 100f * ((self.body.isChampion && flag2) ? 0.3f : 1f));
					num2 = Mathf.Min(num2, 2.5f);
					damageInfo.force *= num2;
				}
				if (DamageAPI.HasModdedDamageType(damageInfo, AirborneBonus) && (body.isFlying || (Object.op_Implicit((Object)(object)body.characterMotor) && !body.characterMotor.isGrounded)))
				{
					damageInfo.damage *= 1.3f;
					flag = true;
				}
				if (DamageAPI.HasModdedDamageType(damageInfo, SlamDunk))
				{
					Vector3 down = Vector3.down;
					if (body.isFlying)
					{
						Rigidbody rigidbody = body.rigidbody;
						if (Object.op_Implicit((Object)(object)rigidbody))
						{
							damageInfo.force.y = 0f;
							down *= Mathf.Min(2.5f, Mathf.Max(rigidbody.mass / 100f, 1f));
							damageInfo.force += 1600f * down;
						}
					}
				}
				if (flag && DamageAPI.HasModdedDamageType(damageInfo, ScaleForceToMass) && damageInfo.damage > 0f && DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)2048)) == 0)
				{
					if ((int)damageInfo.damageColorIndex == 0)
					{
						damageInfo.damageColorIndex = (DamageColorIndex)5;
					}
					EffectManager.SimpleSoundEffect(Assets.spoonHitSoundEvent.index, damageInfo.position, true);
				}
			}
			if (DamageAPI.HasModdedDamageType(damageInfo, MarketGarden) && Object.op_Implicit((Object)(object)damageInfo.attacker))
			{
				CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
				if (Object.op_Implicit((Object)(object)component) && component.HasBuff(Buffs.RocketJumpSpeedBuff))
				{
					damageInfo.crit = true;
					float num3 = component.crit / 100f;
					float num4 = (component.critMultiplier + num3) / component.critMultiplier;
					damageInfo.damage *= num4;
				}
			}
			orig.Invoke(self, damageInfo);
		}
	}
	internal static class Log
	{
		internal static ManualLogSource _logSource;

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

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

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

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

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

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

		internal static void Warning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.EnforcerGang.RocketSurvivor", "RocketSurvivor", "1.0.12")]
	public class RocketSurvivorPlugin : BaseUnityPlugin
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_Init <>9__12_0;

			internal void <EmoteAPICompat>b__12_0(orig_Init orig)
			{
				orig.Invoke();
				foreach (SurvivorDef allSurvivorDef in SurvivorCatalog.allSurvivorDefs)
				{
					if (((Object)allSurvivorDef.bodyPrefab).name == "RocketSurvivorBody")
					{
						GameObject val = Assets.mainAssetBundle.LoadAsset<GameObject>("animRocketEmote.prefab");
						CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val, 0, true);
						val.GetComponentInChildren<BoneMapper>().scale = 1.5f;
					}
				}
			}
		}

		public const string MODUID = "com.EnforcerGang.RocketSurvivor";

		public const string MODNAME = "RocketSurvivor";

		public const string MODVERSION = "1.0.12";

		public const string DEVELOPER_PREFIX = "MOFFEIN";

		public static RocketSurvivorPlugin instance;

		public static bool infernoPluginLoaded;

		public static bool scepterStandaloneLoaded;

		public static bool scepterClassicLoaded;

		public static bool emoteAPILoaded;

		public static bool riskOfOptionsLoaded;

		public static bool VRAPILoaded;

		private void Awake()
		{
			instance = this;
			Files.PluginInfo = ((BaseUnityPlugin)this).Info;
			infernoPluginLoaded = Chainloader.PluginInfos.ContainsKey("HIFU.Inferno");
			scepterStandaloneLoaded = Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter");
			scepterClassicLoaded = Chainloader.PluginInfos.ContainsKey("com.ThinkInvisible.ClassicItems");
			emoteAPILoaded = Chainloader.PluginInfos.ContainsKey("com.weliveinasociety.CustomEmotesAPI");
			riskOfOptionsLoaded = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions");
			VRAPILoaded = Chainloader.PluginInfos.ContainsKey("com.DrBibop.VRAPI");
			Log.Init(((BaseUnityPlugin)this).Logger);
			DamageTypes.Initialize();
			Buffs.Initialize();
			Assets.Initialize();
			SoundBanks.Init();
			Config.ReadConfig();
			States.RegisterStates();
			Projectiles.RegisterProjectiles();
			new LanguageTokens();
			ItemDisplays.PopulateDisplays();
			new RocketSurvivorSetup().Initialize();
			new ContentPacks().Initialize();
			if (emoteAPILoaded)
			{
				EmoteAPICompat();
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
		private void EmoteAPICompat()
		{
			//IL_0015: 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_0020: Expected O, but got Unknown
			object obj = <>c.<>9__12_0;
			if (obj == null)
			{
				hook_Init val = delegate(orig_Init orig)
				{
					orig.Invoke();
					foreach (SurvivorDef allSurvivorDef in SurvivorCatalog.allSurvivorDefs)
					{
						if (((Object)allSurvivorDef.bodyPrefab).name == "RocketSurvivorBody")
						{
							GameObject val2 = Assets.mainAssetBundle.LoadAsset<GameObject>("animRocketEmote.prefab");
							CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val2, 0, true);
							val2.GetComponentInChildren<BoneMapper>().scale = 1.5f;
						}
					}
				};
				<>c.<>9__12_0 = val;
				obj = (object)val;
			}
			SurvivorCatalog.Init += (hook_Init)obj;
		}

		public static float GetICBMDamageMult(CharacterBody body)
		{
			float num = 1f;
			if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory))
			{
				int itemCount = body.inventory.GetItemCount(Items.MoreMissile);
				int num2 = itemCount - 1;
				if (num2 > 0)
				{
					num += (float)num2 * 0.5f;
				}
			}
			return num;
		}

		public static void SetupScepterClassic(string bodyName, SkillDef scepterSkill, SkillDef origSkill)
		{
			if (scepterClassicLoaded)
			{
				SetupScepterClassicInternal(bodyName, scepterSkill, origSkill);
			}
		}

		public static void SetupScepterStandalone(string bodyName, SkillDef scepterSkill, SkillSlot skillSlot, int skillIndex)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			if (scepterStandaloneLoaded)
			{
				SetupScepterStandaloneInternal(bodyName, scepterSkill, skillSlot, skillIndex);
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
		private static void SetupScepterStandaloneInternal(string bodyName, SkillDef scepterSkill, SkillSlot skillSlot, int skillIndex)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(scepterSkill, bodyName, skillSlot, skillIndex);
		}

		[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
		private static void SetupScepterClassicInternal(string bodyName, SkillDef scepterSkill, SkillDef origSkill)
		{
			Item<Scepter>.instance.RegisterScepterSkill(scepterSkill, bodyName, (SkillSlot)3, origSkill);
		}
	}
	public class RocketTrackerSkillDef : SkillDef
	{
		protected class InstanceData : BaseSkillInstanceData
		{
			public RocketTrackerComponent rocketTracker;
		}

		public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot)
		{
			return (BaseSkillInstanceData)(object)new InstanceData
			{
				rocketTracker = ((Component)skillSlot).GetComponent<RocketTrackerComponent>()
			};
		}

		public override bool CanExecute([NotNull] GenericSkill skillSlot)
		{
			return HasRocket(skillSlot) && ((SkillDef)this).CanExecute(skillSlot);
		}

		public override bool IsReady([NotNull] GenericSkill skillSlot)
		{
			return ((SkillDef)this).IsReady(skillSlot) && HasRocket(skillSlot);
		}

		private static bool HasRocket([NotNull] GenericSkill skillSlot)
		{
			RocketTrackerComponent rocketTracker = ((InstanceData)(object)skillSlot.skillInstanceData).rocketTracker;
			return (Object)(object)rocketTracker != (Object)null && rocketTracker.IsRocketAvailable();
		}
	}
}
namespace RocketSurvivor.SkillStates.BaseStates
{
	public class BaseMeleeAttack : BaseSkillState
	{
		public int swingIndex;

		protected string hitboxName = "Sword";

		protected DamageType damageType = (DamageType)0;

		protected float damageCoefficient = 3.5f;

		protected float procCoefficient = 1f;

		protected float pushForce = 300f;

		protected Vector3 bonusForce = Vector3.zero;

		protected float baseDuration = 1f;

		protected float attackStartTime = 0.2f;

		protected float attackEndTime = 0.4f;

		protected float baseEarlyExitTime = 0.4f;

		protected float hitStopDuration = 0.012f;

		protected float attackRecoil = 0.75f;

		protected float hitHopVelocity = 4f;

		protected bool cancelled = false;

		protected string swingSoundString = "";

		protected string hitSoundString = "";

		protected string muzzleString = "SwingCenter";

		protected GameObject swingEffectPrefab;

		protected GameObject hitEffectPrefab;

		protected NetworkSoundEventIndex impactSound;

		private float earlyExitTime;

		public float duration;

		private bool hasFired;

		private float hitPauseTimer;

		private OverlapAttack attack;

		protected bool inHitPause;

		private bool hasHopped;

		protected float stopwatch;

		protected Animator animator;

		private HitStopCachedState hitStopCachedState;

		private Vector3 storedVelocity;

		public override void OnEnter()
		{
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: 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_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: 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_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Expected O, but got Unknown
			((BaseState)this).OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			earlyExitTime = baseEarlyExitTime / ((BaseState)this).attackSpeedStat;
			hasFired = false;
			animator = ((EntityState)this).GetModelAnimator();
			((BaseState)this).StartAimMode(0.5f + duration, false);
			((EntityState)this).characterBody.outOfCombatStopwatch = 0f;
			animator.SetBool("attacking", true);
			HitBoxGroup hitBoxGroup = null;
			Transform modelTransform = ((EntityState)this).GetModelTransform();
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitboxName);
			}
			PlayAttackAnimation();
			attack = new OverlapAttack
			{
				damageType = DamageTypeCombo.op_Implicit(damageType),
				attacker = ((EntityState)this).gameObject,
				inflictor = ((EntityState)this).gameObject,
				teamIndex = ((BaseState)this).GetTeam(),
				damage = damageCoefficient * ((BaseState)this).damageStat,
				procCoefficient = procCoefficient,
				hitEffectPrefab = hitEffectPrefab,
				forceVector = bonusForce,
				pushAwayForce = pushForce,
				hitBoxGroup = hitBoxGroup,
				isCrit = ((BaseState)this).RollCrit(),
				impactSound = impactSound
			};
		}

		protected virtual void PlayAttackAnimation()
		{
			((EntityState)this).PlayCrossfade("Gesture, Override", "Slash" + (1 + swingIndex), "Slash.playbackRate", duration, 0.05f);
		}

		public override void OnExit()
		{
			if (!hasFired && !cancelled)
			{
				FireAttack();
			}
			((EntityState)this).OnExit();
			animator.SetBool("attacking", false);
		}

		protected virtual void PlaySwingEffect()
		{
			if (Object.op_Implicit((Object)(object)swingEffectPrefab))
			{
				EffectManager.SimpleMuzzleFlash(swingEffectPrefab, ((EntityState)this).gameObject, muzzleString, true);
			}
		}

		protected virtual void OnHitEnemyAuthority()
		{
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: 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)
			Util.PlaySound(hitSoundString, ((EntityState)this).gameObject);
			if (!hasHopped)
			{
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded && hitHopVelocity > 0f)
				{
					((BaseState)this).SmallHop(((EntityState)this).characterMotor, hitHopVelocity);
				}
				hasHopped = true;
			}
			if (!inHitPause && hitStopDuration > 0f)
			{
				storedVelocity = ((EntityState)this).characterMotor.velocity;
				hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, "Slash.playbackRate");
				hitPauseTimer = hitStopDuration / ((BaseState)this).attackSpeedStat;
				inHitPause = true;
			}
		}

		private void FireAttack()
		{
			if (!hasFired)
			{
				hasFired = true;
				Util.PlayAttackSpeedSound(swingSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat);
				if (((EntityState)this).isAuthority)
				{
					PlaySwingEffect();
					((BaseState)this).AddRecoil(-1f * attackRecoil, -2f * attackRecoil, -0.5f * attackRecoil, 0.5f * attackRecoil);
				}
			}
			if (((EntityState)this).isAuthority && attack.Fire((List<HurtBox>)null))
			{
				OnHitEnemyAuthority();
			}
		}

		protected virtual void SetNextState()
		{
			int num = ((swingIndex == 0) ? 1 : 0);
			((EntityState)this).outer.SetNextState((EntityState)(object)new BaseMeleeAttack
			{
				swingIndex = num
			});
		}

		public override void FixedUpdate()
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			hitPauseTimer -= Time.fixedDeltaTime;
			if (hitPauseTimer <= 0f && inHitPause)
			{
				((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator);
				inHitPause = false;
				((EntityState)this).characterMotor.velocity = storedVelocity;
			}
			if (!inHitPause)
			{
				stopwatch += Time.fixedDeltaTime;
			}
			else
			{
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
				{
					((EntityState)this).characterMotor.velocity = Vector3.zero;
				}
				if (Object.op_Implicit((Object)(object)animator))
				{
					animator.SetFloat("Swing.playbackRate", 0f);
				}
			}
			if (stopwatch >= duration * attackStartTime && stopwatch <= duration * attackEndTime)
			{
				FireAttack();
			}
			if (stopwatch >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

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

		public override void OnSerialize(NetworkWriter writer)
		{
			((BaseSkillState)this).OnSerialize(writer);
			writer.Write(swingIndex);
		}

		public override void OnDeserialize(NetworkReader reader)
		{
			((BaseSkillState)this).OnDeserialize(reader);
			swingIndex = reader.ReadInt32();
		}
	}
	public class BaseTimedSkillState : BaseSkillState
	{
		public static float TimedBaseDuration;

		public static float TimedBaseCastStartTime;

		public static float TimedBaseCastEndTime;

		protected float duration;

		protected float castStartTime;

		protected float castEndTime;

		protected bool hasFired;

		protected bool isFiring;

		protected bool hasExited;

		protected virtual void InitDurationValues(float baseDuration, float baseCastStartTime, float baseCastEndTime = 1f)
		{
			TimedBaseDuration = baseDuration;
			TimedBaseCastStartTime = baseCastStartTime;
			TimedBaseCastEndTime = baseCastEndTime;
			duration = TimedBaseDuration / ((BaseState)this).attackSpeedStat;
			castStartTime = baseCastStartTime * duration;
			castEndTime = baseCastEndTime * duration;
		}

		protected virtual void OnCastEnter()
		{
		}

		protected virtual void OnCastFixedUpdate()
		{
		}

		protected virtual void OnCastUpdate()
		{
		}

		protected virtual void OnCastExit()
		{
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (!hasFired && ((EntityState)this).fixedAge > castStartTime)
			{
				hasFired = true;
				OnCastEnter();
			}
			bool flag = ((EntityState)this).fixedAge >= castSta