Decompiled source of JJBA Diego v1.0.1

plugins/JJBADiego.dll

Decompiled 12 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using EntityStates;
using JJBAMod.Modules;
using JJBAMod.Modules.BaseStates;
using JJBAMod.Modules.Characters;
using JJBAMod.Modules.Stands;
using JJBAMod.Survivors.Diego.Components;
using JJBAMod.Survivors.Diego.SkillStates;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.CharacterAI;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.WwiseUtils;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.Rendering.PostProcessing;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("JJBADiego")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("JJBADiego")]
[assembly: AssemblyTitle("JJBADiego")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace JJBAMod.Survivors.Diego
{
	public static class DiegoAI
	{
		public static void Init(GameObject bodyPrefab, string masterName)
		{
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: 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_00f9: 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_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: 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_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_022a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0230: 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_0288: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0313: Unknown result type (might be due to invalid IL or missing references)
			//IL_0325: Unknown result type (might be due to invalid IL or missing references)
			//IL_032b: Unknown result type (might be due to invalid IL or missing references)
			GameObject obj = Prefabs.CreateBlankMasterPrefab(bodyPrefab, masterName);
			BaseAI component = obj.GetComponent<BaseAI>();
			component.aimVectorDampTime = 0.1f;
			component.aimVectorMaxSpeed = 360f;
			AISkillDriver obj2 = obj.AddComponent<AISkillDriver>();
			obj2.customName = "Use Primary Swing";
			obj2.skillSlot = (SkillSlot)0;
			obj2.requiredSkill = null;
			obj2.requireSkillReady = false;
			obj2.requireEquipmentReady = false;
			obj2.minUserHealthFraction = float.NegativeInfinity;
			obj2.maxUserHealthFraction = float.PositiveInfinity;
			obj2.minTargetHealthFraction = float.NegativeInfinity;
			obj2.maxTargetHealthFraction = float.PositiveInfinity;
			obj2.minDistance = 0f;
			obj2.maxDistance = 8f;
			obj2.selectionRequiresTargetLoS = false;
			obj2.selectionRequiresOnGround = false;
			obj2.selectionRequiresAimTarget = false;
			obj2.maxTimesSelected = -1;
			obj2.moveTargetType = (TargetType)0;
			obj2.activationRequiresTargetLoS = false;
			obj2.activationRequiresAimTargetLoS = false;
			obj2.activationRequiresAimConfirmation = false;
			obj2.movementType = (MovementType)1;
			obj2.moveInputScale = 1f;
			obj2.aimType = (AimType)1;
			obj2.ignoreNodeGraph = false;
			obj2.shouldSprint = false;
			obj2.shouldFireEquipment = false;
			obj2.buttonPressType = (ButtonPressType)0;
			obj2.driverUpdateTimerOverride = -1f;
			obj2.resetCurrentEnemyOnNextDriverSelection = false;
			obj2.noRepeat = false;
			obj2.nextHighPriorityOverride = null;
			AISkillDriver obj3 = obj.AddComponent<AISkillDriver>();
			obj3.customName = "Use Secondary First Bomb";
			obj3.skillSlot = (SkillSlot)1;
			obj3.requireSkillReady = true;
			obj3.minDistance = 0f;
			obj3.maxDistance = 8f;
			obj3.selectionRequiresTargetLoS = false;
			obj3.selectionRequiresOnGround = false;
			obj3.selectionRequiresAimTarget = false;
			obj3.maxTimesSelected = -1;
			obj3.moveTargetType = (TargetType)0;
			obj3.activationRequiresTargetLoS = false;
			obj3.activationRequiresAimTargetLoS = false;
			obj3.activationRequiresAimConfirmation = true;
			obj3.movementType = (MovementType)1;
			obj3.moveInputScale = 1f;
			obj3.aimType = (AimType)1;
			obj3.buttonPressType = (ButtonPressType)0;
			AISkillDriver obj4 = obj.AddComponent<AISkillDriver>();
			obj4.customName = "Use Utility Bomb Dash";
			obj4.skillSlot = (SkillSlot)2;
			obj4.requireSkillReady = true;
			obj4.minDistance = 8f;
			obj4.maxDistance = 20f;
			obj4.selectionRequiresTargetLoS = true;
			obj4.selectionRequiresOnGround = false;
			obj4.selectionRequiresAimTarget = false;
			obj4.maxTimesSelected = -1;
			obj4.moveTargetType = (TargetType)0;
			obj4.activationRequiresTargetLoS = false;
			obj4.activationRequiresAimTargetLoS = false;
			obj4.activationRequiresAimConfirmation = false;
			obj4.movementType = (MovementType)2;
			obj4.moveInputScale = 1f;
			obj4.aimType = (AimType)1;
			obj4.buttonPressType = (ButtonPressType)0;
			AISkillDriver obj5 = obj.AddComponent<AISkillDriver>();
			obj5.customName = "Use Special Sheer Heart Attack";
			obj5.skillSlot = (SkillSlot)3;
			obj5.requireSkillReady = true;
			obj5.minDistance = 0f;
			obj5.maxDistance = 20f;
			obj5.selectionRequiresTargetLoS = false;
			obj5.selectionRequiresOnGround = false;
			obj5.selectionRequiresAimTarget = false;
			obj5.maxTimesSelected = -1;
			obj5.moveTargetType = (TargetType)0;
			obj5.activationRequiresTargetLoS = false;
			obj5.activationRequiresAimTargetLoS = false;
			obj5.activationRequiresAimConfirmation = false;
			obj5.movementType = (MovementType)1;
			obj5.moveInputScale = 1f;
			obj5.aimType = (AimType)1;
			obj5.buttonPressType = (ButtonPressType)0;
			AISkillDriver obj6 = obj.AddComponent<AISkillDriver>();
			obj6.customName = "Chase";
			obj6.skillSlot = (SkillSlot)(-1);
			obj6.requireSkillReady = false;
			obj6.minDistance = 0f;
			obj6.maxDistance = float.PositiveInfinity;
			obj6.moveTargetType = (TargetType)0;
			obj6.activationRequiresTargetLoS = false;
			obj6.activationRequiresAimTargetLoS = false;
			obj6.activationRequiresAimConfirmation = false;
			obj6.movementType = (MovementType)1;
			obj6.moveInputScale = 1f;
			obj6.aimType = (AimType)1;
			obj6.buttonPressType = (ButtonPressType)0;
		}
	}
	public static class DiegoAssets
	{
		public static GameObject theWorldModel;

		public static GameObject knifeProjectilePrefab;

		public static GameObject bulletProjectilePrefab;

		public static GameObject gunModel;

		public static Texture cutInTexture;

		public static NetworkSoundEventDef[] standPunchHitSoundEvents;

		public static NetworkSoundEventDef diegoPunchHitSoundEvent;

		public static NetworkSoundEventDef knifeHitSoundEvent;

		private static AssetBundle _assetBundle;

		public static void Init(AssetBundle assetBundle)
		{
			_assetBundle = assetBundle;
			standPunchHitSoundEvents = (NetworkSoundEventDef[])(object)new NetworkSoundEventDef[DiegoSounds.standPunchHits.Length];
			for (int i = 0; i < standPunchHitSoundEvents.Length; i++)
			{
				standPunchHitSoundEvents[i] = Content.CreateAndAddNetworkSoundEventDef(DiegoSounds.standPunchHits[i]);
			}
			diegoPunchHitSoundEvent = Content.CreateAndAddNetworkSoundEventDef("Play_bandit2_m2_impact");
			knifeHitSoundEvent = Content.CreateAndAddNetworkSoundEventDef("Play_JJBA_KnifeHit");
			theWorldModel = _assetBundle.LoadAsset<GameObject>("mdlTheWorld");
			cutInTexture = (Texture)(object)_assetBundle.LoadAsset<Texture2D>("texDiegoCutIn");
			TheWorldCutscene.track = StandCinematic.LoadTrack(_assetBundle.LoadAsset<TextAsset>("DiegoUltimateCamera"));
			Asset.ConvertAllRenderersToHopooShader(theWorldModel);
			CreateKnife();
			if (Object.op_Implicit((Object)(object)knifeProjectilePrefab))
			{
				Content.AddProjectilePrefab(knifeProjectilePrefab);
			}
			CreateBullet();
		}

		private static void CreateBullet()
		{
			//IL_00b3: 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_0111: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)knifeProjectilePrefab))
			{
				gunModel = _assetBundle.LoadAsset<GameObject>("DiegoGun");
				if (Object.op_Implicit((Object)(object)gunModel))
				{
					Asset.ConvertAllRenderersToHopooShader(gunModel);
				}
				bulletProjectilePrefab = PrefabAPI.InstantiateClone(knifeProjectilePrefab, "DiegoBulletProjectile", true);
				ProjectileController component = bulletProjectilePrefab.GetComponent<ProjectileController>();
				Object.DestroyImmediate((Object)(object)bulletProjectilePrefab.GetComponent<ProjectileSingleTargetImpact>());
				ProjectileImpactExplosion obj = bulletProjectilePrefab.AddComponent<ProjectileImpactExplosion>();
				((ProjectileExplosion)obj).blastRadius = 9f;
				((ProjectileExplosion)obj).blastDamageCoefficient = 1f;
				((ProjectileExplosion)obj).blastProcCoefficient = 1f;
				obj.destroyOnEnemy = true;
				obj.destroyOnWorld = true;
				obj.lifetime = 30f;
				obj.timerAfterImpact = false;
				((ProjectileExplosion)obj).falloffModel = (FalloffModel)0;
				obj.impactEffect = (Object.op_Implicit((Object)(object)SharedEffects.bitesTheDustExplosionEffect) ? SharedEffects.bitesTheDustExplosionEffect : LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/OmniEffect/OmniExplosionVFX"));
				if ((Object)(object)_assetBundle.LoadAsset<GameObject>("DiegoBulletGhost") != (Object)null)
				{
					GameObject val = Asset.CreateProjectileGhostPrefab(_assetBundle, "DiegoBulletGhost");
					val.transform.localScale = Vector3.one * 5f;
					component.ghostPrefab = val;
				}
				Content.AddProjectilePrefab(bulletProjectilePrefab);
			}
		}

		private static void CreateKnife()
		{
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: 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)
			knifeProjectilePrefab = Asset.CloneProjectilePrefab("CommandoGrenadeProjectile", "DiegoKnifeProjectile");
			Object.DestroyImmediate((Object)(object)knifeProjectilePrefab.GetComponent<ProjectileImpactExplosion>());
			ApplyTorqueOnStart component = knifeProjectilePrefab.GetComponent<ApplyTorqueOnStart>();
			if (Object.op_Implicit((Object)(object)component))
			{
				Object.DestroyImmediate((Object)(object)component);
			}
			ProjectileSingleTargetImpact obj = knifeProjectilePrefab.AddComponent<ProjectileSingleTargetImpact>();
			obj.destroyOnWorld = true;
			obj.destroyWhenNotAlive = true;
			obj.impactEffect = SharedEffects.punchHitImpactEffect;
			obj.enemyHitSound = knifeHitSoundEvent;
			Rigidbody component2 = knifeProjectilePrefab.GetComponent<Rigidbody>();
			if (Object.op_Implicit((Object)(object)component2))
			{
				component2.useGravity = false;
				component2.freezeRotation = true;
				component2.collisionDetectionMode = (CollisionDetectionMode)2;
			}
			SphereCollider component3 = knifeProjectilePrefab.GetComponent<SphereCollider>();
			if (Object.op_Implicit((Object)(object)component3))
			{
				component3.radius = 0.2f;
			}
			ProjectileSimple val = knifeProjectilePrefab.GetComponent<ProjectileSimple>();
			if (!Object.op_Implicit((Object)(object)val))
			{
				val = knifeProjectilePrefab.AddComponent<ProjectileSimple>();
			}
			val.desiredForwardSpeed = 110f;
			val.updateAfterFiring = true;
			val.lifetime = 1.2f;
			knifeProjectilePrefab.AddComponent<TimeStopKnife>();
			knifeProjectilePrefab.AddComponent<KnifeCollisionGuard>();
			ProjectileController component4 = knifeProjectilePrefab.GetComponent<ProjectileController>();
			component4.startSound = "";
			component4.procCoefficient = 1f;
			if ((Object)(object)_assetBundle.LoadAsset<GameObject>("DiegoKnifeGhost") != (Object)null)
			{
				GameObject val2 = Asset.CreateProjectileGhostPrefab(_assetBundle, "DiegoKnifeGhost");
				if (val2.transform.childCount > 0)
				{
					val2.transform.GetChild(0).localRotation = Quaternion.Euler(DiegoStaticValues.knifeGhostRotation);
				}
				val2.transform.localScale = Vector3.one * 1.6f;
				component4.ghostPrefab = val2;
			}
		}
	}
	public static class DiegoSounds
	{
		public static readonly string[] standPunchSwings = new string[3] { "Play_JJBA_StandSwing1", "Play_JJBA_StandSwing2", "Play_JJBA_StandSwing3" };

		public static readonly string[] standPunchHits = new string[3] { "Play_JJBA_StandHit1", "Play_JJBA_StandHit2", "Play_JJBA_StandHit3" };

		public static readonly string[] diegoSwings = new string[3] { "Play_Kira_Swing1", "Play_Kira_Swing2", "Play_Kira_Swing3" };

		public const string diegoPunchHit = "Play_bandit2_m2_impact";

		private static readonly string[][] punchShouts = new string[3][]
		{
			new string[1] { "Play_Diego_Shout1" },
			new string[1] { "Play_Diego_Shout2" },
			new string[1] { "Play_Diego_Shout3" }
		};

		public const string knifeThrow = "Play_Diego_KnifeThrow";

		public const string knifeHit = "Play_JJBA_KnifeHit";

		public const string dash = "Play_Diego_Dash";

		public const string rushStart = "Play_Diego_Rush";

		public const string rushFinish = "Play_Diego_RushFinish";

		public const string ultimateCut = "Play_Diego_UltCut";

		public const string ultimateAttack = "Play_Diego_UltAtk";

		public const string gunshot = "Play_bandit2_m1_shot";

		public const string timeStopCall = "Play_Diego_TheWorld";

		public const string timeStop = "Play_JJBA_TimeStop";

		public const string timeResume = "Play_JJBA_TimeResume";

		public const string timeResumeLine = "Play_Diego_TimeResume";

		public static string PunchShout(int step)
		{
			return Pick(punchShouts[step % punchShouts.Length]);
		}

		private static string Pick(string[] options)
		{
			return options[Random.Range(0, options.Length)];
		}
	}
	public static class DiegoStates
	{
		public static void Init()
		{
			Content.AddEntityState(typeof(TheWorldPunch));
			Content.AddEntityState(typeof(KnifeThrow));
			Content.AddEntityState(typeof(TheWorldDash));
			Content.AddEntityState(typeof(MudaRush));
			Content.AddEntityState(typeof(TheWorldUltimate));
			Content.AddEntityState(typeof(TheWorldTimeStop));
			Content.AddEntityState(typeof(TheWorldCutscene));
			Content.AddEntityState(typeof(TimeSkip));
			Content.AddEntityState(typeof(TimeStoppedState));
		}
	}
	public static class DiegoStaticValues
	{
		public const float punchDamageCoefficient = 2.6f;

		public const float diegoPunchDamageCoefficient = 1.2f;

		public const float punchLockOnRange = 15f;

		public const float punchStandCost = 4f;

		public const int knivesPerThrow = 3;

		public const float knifeDamageCoefficient = 1.6f;

		public const float knifeSpread = 7f;

		public const float knifeSpeed = 110f;

		public static readonly Vector3 knifeGhostRotation = new Vector3(0f, 0f, 0f);

		public const float dashDamageCoefficient = 3.5f;

		public const float dashStandCost = 18f;

		public const int rushHits = 12;

		public const float rushHitDamageCoefficient = 0.7f;

		public const float rushFinisherDamageCoefficient = 5f;

		public const float rushStandCost = 30f;

		public const float timeStopDuration = 5f;

		public const float timeStopStandCost = 50f;

		public const float timeStopCooldown = 40f;

		public const float knifeHangDistance = 1.5f;

		public const float ultimateRadius = 30f;

		public const float ultimateDamageCoefficient = 12f;

		public const int ultimateBullets = 6;

		public const float ultimateBulletRange = 50f;

		public const float ultimateBulletDamageCoefficient = 8f;

		public const float ultimateBulletBlastRadius = 9f;

		public const float ultimateExplosionInterval = 0.45f;

		public const float ultimateExplosionRadius = 10f;

		public const float ultimateExplosionDamageCoefficient = 2.5f;

		public const float timeSkipDistance = 14f;

		public const float timeSkipDamageCoefficient = 7f;

		public const float timeSkipStandCost = 20f;

		public const float timeSkipCooldown = 8f;
	}
	public static class DiegoTokens
	{
		public static void Init()
		{
			string text = "Diego Brando from another world, and his stand The World.<color=#CCD3E0>\n\n< ! > The World's punches lock on and fly to the enemy, so keep moving while it fights.\n\n< ! > Knives thrown while time is stopped hang in the air and all strike when it starts again.\n\n< ! > Stop time, then throw knives: they all land when time starts again.</color>";
			Language.Add("KAVAHN_DIEGO_" + "NAME", "Diego Brando");
			Language.Add("KAVAHN_DIEGO_" + "DESCRIPTION", text);
			Language.Add("KAVAHN_DIEGO_" + "SUBTITLE", "From Another World");
			Language.Add("KAVAHN_DIEGO_" + "LORE", "\"The World! Time, stop!\"");
			Language.Add("KAVAHN_DIEGO_" + "OUTRO_FLAVOR", "...and so he left, to another world.");
			Language.Add("KAVAHN_DIEGO_" + "OUTRO_FAILURE", "...and so he vanished, with no world left to return to.");
			Language.Add("KAVAHN_DIEGO_" + "STAND_NAME", "THE WORLD");
			Language.Add("KAVAHN_DIEGO_" + "DEFAULT_SKIN_NAME", "Default");
			Language.Add("KAVAHN_DIEGO_" + "PASSIVE_NAME", "Stand: The World");
			Language.Add("KAVAHN_DIEGO_" + "PASSIVE_DESCRIPTION", "The World's attacks spend its <style=cIsUtility>stand meter</style>. While it's out, it takes <style=cIsHealing>half the damage</style> aimed at Diego. If the meter runs dry, the stand <style=cDeath>breaks</style>.");
			Language.Add("KAVAHN_DIEGO_" + "PRIMARY_PUNCH_NAME", "The World");
			Language.Add("KAVAHN_DIEGO_" + "PRIMARY_PUNCH_DESCRIPTION", "<style=cIsUtility>Agile.</style>" + $"<style=cIsUtility>Lock on</style> to an enemy within {15f}m. The World <style=cIsUtility>dashes</style> to it and punches for <style=cIsDamage>{260f}% damage</style>. Without his stand, Diego strikes for <style=cIsDamage>{120.00001f}% damage</style>.");
			Language.Add("KAVAHN_DIEGO_" + "SECONDARY_KNIVES_NAME", "Knife Throw");
			Language.Add("KAVAHN_DIEGO_" + "SECONDARY_KNIVES_DESCRIPTION", $"Throw a fan of <style=cIsDamage>{3}</style> knives for <style=cIsDamage>{160f}% damage</style> each. In stopped time they <style=cIsUtility>hang in the air</style> until time moves again.");
			Language.Add("KAVAHN_DIEGO_" + "UTILITY_DASH_NAME", "The World: Charge");
			Language.Add("KAVAHN_DIEGO_" + "UTILITY_DASH_DESCRIPTION", $"<style=cIsUtility>Dash</style> forward behind The World, which strikes everything in your path for <style=cIsDamage>{350f}% damage</style>.");
			Language.Add("KAVAHN_DIEGO_" + "SPECIAL_RUSH_NAME", "MUDA MUDA MUDA");
			Language.Add("KAVAHN_DIEGO_" + "SPECIAL_RUSH_DESCRIPTION", $"The World punches the locked-on enemy <style=cIsDamage>{12} times for {70f}% damage</style> each, then hits once more for <style=cIsDamage>{500f}% damage</style>.");
			Language.Add("KAVAHN_DIEGO_" + "ULTIMATE_TIMESTOP_NAME", "THE WORLD");
			Language.Add("KAVAHN_DIEGO_" + "ULTIMATE_TIMESTOP_DESCRIPTION", $"<style=cIsUtility>Ultimate.</style> <style=cIsUtility>Stop time</style> for {5f} seconds. Every enemy and enemy projectile freezes in place while you keep moving and attacking. Costs {50f} stand meter.");
			Language.Add("KAVAHN_DIEGO_" + "TIMESTOP_LABEL", "TIME STOPPED");
			Language.Add("KAVAHN_DIEGO_" + "ULTIMATE_TITLE", "THE WORLD");
			Language.Add("KAVAHN_DIEGO_" + "STANDSPECIAL_NAME", "Time Skip");
			Language.Add("KAVAHN_DIEGO_" + "STANDSPECIAL_DESCRIPTION", $"<style=cIsUtility>Stand special.</style> Time stops for an instant and you appear <style=cIsUtility>behind</style> the locked-on enemy (or {14f}m ahead), as The World strikes for <style=cIsDamage>{700f}% damage</style> and <style=cIsDamage>stuns</style>.");
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.kavahn.JJBADiego", "JJBADiego", "1.0.1")]
	public class DiegoPlugin : BaseUnityPlugin
	{
		private void Awake()
		{
			string? directoryName = Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location);
			Asset.AddBundleFolder(directoryName);
			SoundBanks.Add(directoryName, "JJBADiego.bnk");
			JJBAPlugin.Safely((Action)delegate
			{
				((CharacterBase<DiegoSurvivor>)(object)new DiegoSurvivor()).Initialize();
			});
		}
	}
	public class DiegoSurvivor : SurvivorBase<DiegoSurvivor>
	{
		public const string DIEGO_PREFIX = "KAVAHN_DIEGO_";

		public const float modelScale = 1.34f;

		public override string assetBundleName => "jjbadiego";

		public override string bodyName => "KavahnDiegoBody";

		public override string masterName => "KavahnDiegoMonsterMaster";

		public override string modelPrefabName => "mdlDiego";

		public override string displayPrefabName => "DiegoDisplay";

		public override string survivorTokenPrefix => "KAVAHN_DIEGO_";

		public bool Available
		{
			get
			{
				if (Object.op_Implicit((Object)(object)((CharacterBase<DiegoSurvivor>)(object)this).assetBundle))
				{
					return ((CharacterBase<DiegoSurvivor>)(object)this).assetBundle.Contains(((CharacterBase<DiegoSurvivor>)(object)this).modelPrefabName);
				}
				return false;
			}
		}

		public override BodyInfo bodyInfo => new BodyInfo
		{
			bodyName = ((CharacterBase<DiegoSurvivor>)(object)this).bodyName,
			bodyNameToken = "KAVAHN_DIEGO_NAME",
			subtitleNameToken = "KAVAHN_DIEGO_SUBTITLE",
			characterPortrait = Icon<Texture>("texDiegoIcon", "texHenryIcon"),
			bodyColor = new Color(0.95f, 0.78f, 0.25f),
			sortPosition = 101f,
			crosshair = Asset.LoadCrosshair("Standard"),
			podPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/SurvivorPod"),
			maxHealth = 110f,
			healthRegen = 1.5f,
			armor = 0f,
			moveSpeed = 7.5f,
			jumpCount = 1,
			cameraParamsVerticalOffset = 1.7f,
			cameraParamsDepth = -12f
		};

		public override CustomRendererInfo[] customRendererInfos
		{
			get
			{
				//IL_003e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0043: Unknown result type (might be due to invalid IL or missing references)
				//IL_0045: Unknown result type (might be due to invalid IL or missing references)
				//IL_0059: Unknown result type (might be due to invalid IL or missing references)
				//IL_005e: Unknown result type (might be due to invalid IL or missing references)
				//IL_005f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: Expected O, but got Unknown
				ChildLocator val = (Object.op_Implicit((Object)(object)((CharacterBase<DiegoSurvivor>)(object)this).characterModelObject) ? ((CharacterBase<DiegoSurvivor>)(object)this).characterModelObject.GetComponent<ChildLocator>() : null);
				if (!Object.op_Implicit((Object)(object)val))
				{
					return (CustomRendererInfo[])(object)new CustomRendererInfo[0];
				}
				List<CustomRendererInfo> list = new List<CustomRendererInfo>();
				NameTransformPair[] transformPairs = val.transformPairs;
				foreach (NameTransformPair val2 in transformPairs)
				{
					if (val2.name.StartsWith("Mesh"))
					{
						list.Add(new CustomRendererInfo
						{
							childName = val2.name
						});
					}
				}
				return list.ToArray();
			}
		}

		public override UnlockableDef characterUnlockableDef => null;

		public override ItemDisplaysBase itemDisplays => null;

		public override AssetBundle assetBundle { get; protected set; }

		public override GameObject bodyPrefab { get; protected set; }

		public override CharacterBody prefabCharacterBody { get; protected set; }

		public override GameObject characterModelObject { get; protected set; }

		public override CharacterModel prefabCharacterModel { get; protected set; }

		public override GameObject displayPrefab { get; protected set; }

		private T Icon<T>(string name, string fallback) where T : Object
		{
			T val = ((CharacterBase<DiegoSurvivor>)(object)this).assetBundle.LoadAsset<T>(name);
			if (!Object.op_Implicit((Object)(object)val))
			{
				return ((CharacterBase<DiegoSurvivor>)(object)this).assetBundle.LoadAsset<T>(fallback);
			}
			return val;
		}

		public override void Initialize()
		{
			((CharacterBase<DiegoSurvivor>)(object)this).assetBundle = Asset.LoadAssetBundle(((CharacterBase<DiegoSurvivor>)(object)this).assetBundleName);
			if (!Available)
			{
				Log.Warning((object)"the asset bundle has no diego in it yet, skipping him (rebuild it with Tools/build_bundle.sh)");
			}
			else
			{
				((CharacterBase<DiegoSurvivor>)(object)this).Initialize();
			}
		}

		public override void InitializeCharacter()
		{
			base.InitializeCharacter();
			DiegoStates.Init();
			DiegoTokens.Init();
			DiegoAssets.Init(((CharacterBase<DiegoSurvivor>)(object)this).assetBundle);
			((CharacterBase<DiegoSurvivor>)(object)this).InitializeEntityStateMachines();
			((CharacterBase<DiegoSurvivor>)(object)this).InitializeSkills();
			((CharacterBase<DiegoSurvivor>)(object)this).InitializeSkins();
			((CharacterBase<DiegoSurvivor>)(object)this).InitializeCharacterMaster();
			AdditionalBodySetup();
		}

		private void AdditionalBodySetup()
		{
			//IL_000c: 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_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: 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_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: 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_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_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Expected O, but got Unknown
			Transform transform = ((CharacterBase<DiegoSurvivor>)(object)this).characterModelObject.transform;
			transform.localScale *= 1.34f;
			if (Object.op_Implicit((Object)(object)((SurvivorBase<DiegoSurvivor>)this).displayPrefab))
			{
				Transform transform2 = ((SurvivorBase<DiegoSurvivor>)this).displayPrefab.transform;
				transform2.localScale *= 1.34f;
				((SurvivorBase<DiegoSurvivor>)this).displayPrefab.transform.localRotation = Quaternion.Euler(0f, 113f, 0f) * ((SurvivorBase<DiegoSurvivor>)this).displayPrefab.transform.localRotation;
			}
			Prefabs.SetupHitBoxGroup(((CharacterBase<DiegoSurvivor>)(object)this).characterModelObject, "SwordGroup", new string[1] { "SwordHitbox" });
			if (!Object.op_Implicit((Object)(object)((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab.GetComponent<AkGameObj>()))
			{
				((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab.AddComponent<AkGameObj>();
			}
			((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab.AddComponent<TimeStop>();
			Stands.AddStandUser(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab, ((CharacterBase<DiegoSurvivor>)(object)this).bodyName, new StandDefinition
			{
				standNameToken = "KAVAHN_DIEGO_STAND_NAME",
				color = new Color(1f, 0.82f, 0.25f),
				standModelPrefab = DiegoAssets.theWorldModel,
				modelScale = 1.29f,
				actionModelScale = 1.5f,
				standOffset = new Vector3(0.7f, 0f, -1f),
				standoffFromTarget = 1.3f,
				hitboxCenter = new Vector3(0f, 0f, 1.2f),
				hitboxSize = new Vector3(3.3f, 3.3f, 3.5f),
				maxGauge = 130f
			});
			((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab.AddComponent<StandTracker>().maxTrackingDistance = 15f;
			GameObject[] array = (GameObject[])(object)new GameObject[2]
			{
				((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab,
				((SurvivorBase<DiegoSurvivor>)this).displayPrefab
			};
			foreach (GameObject val in array)
			{
				if (Object.op_Implicit((Object)(object)val))
				{
					val.AddComponent<SoundbankLoader>().soundbankStrings = SharedEffects.vanillaSoundbanks;
				}
			}
		}

		public override void InitializeEntityStateMachines()
		{
			Prefabs.ClearEntityStateMachines(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab);
			Prefabs.AddMainEntityStateMachine(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab, "Body", typeof(GenericCharacterMain), typeof(SpawnTeleporterState));
			Prefabs.AddEntityStateMachine(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab, "Weapon", (Type)null, (Type)null, true, true);
			Prefabs.AddEntityStateMachine(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab, "Weapon2", (Type)null, (Type)null, true, true);
		}

		public override void InitializeSkills()
		{
			//IL_0018: 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_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Expected O, but got Unknown
			//IL_00ea: 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_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: 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_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: 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_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_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Expected O, but got Unknown
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Expected O, but got Unknown
			//IL_021c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			//IL_029c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Expected O, but got Unknown
			//IL_02ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0304: Unknown result type (might be due to invalid IL or missing references)
			//IL_0318: Unknown result type (might be due to invalid IL or missing references)
			//IL_0371: Unknown result type (might be due to invalid IL or missing references)
			//IL_0378: Expected O, but got Unknown
			//IL_03d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0449: Unknown result type (might be due to invalid IL or missing references)
			//IL_0450: Expected O, but got Unknown
			//IL_04ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c5: Unknown result type (might be due to invalid IL or missing references)
			Skills.ClearGenericSkills(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab);
			((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab.GetComponent<SkillLocator>().passiveSkill = new PassiveSkill
			{
				enabled = true,
				skillNameToken = "KAVAHN_DIEGO_PASSIVE_NAME",
				skillDescriptionToken = "KAVAHN_DIEGO_PASSIVE_DESCRIPTION",
				keywordToken = "KEYWORD_JJBA_STAND",
				icon = Icon<Sprite>("texDiegoPassive", "texPassiveIcon")
			};
			Skills.CreateGenericSkillWithSkillFamily(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab, (SkillSlot)0, false);
			SteppedSkillDef val = Skills.CreateSkillDef<SteppedSkillDef>(new SkillDefInfo("DiegoTheWorld", "KAVAHN_DIEGO_PRIMARY_PUNCH_NAME", "KAVAHN_DIEGO_PRIMARY_PUNCH_DESCRIPTION", Icon<Sprite>("texDiegoPrimary", "texPrimaryIcon"), new SerializableEntityStateType(typeof(TheWorldPunch)), "Weapon", true));
			val.stepCount = 3;
			val.stepGraceDuration = 0.5f;
			Skills.AddPrimarySkills(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab, (SkillDef[])(object)new SkillDef[1] { (SkillDef)val });
			Skills.CreateGenericSkillWithSkillFamily(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab, (SkillSlot)1, false);
			SkillDef val2 = Skills.CreateSkillDef(new SkillDefInfo
			{
				skillName = "DiegoKnifeThrow",
				skillNameToken = "KAVAHN_DIEGO_SECONDARY_KNIVES_NAME",
				skillDescriptionToken = "KAVAHN_DIEGO_SECONDARY_KNIVES_DESCRIPTION",
				skillIcon = Icon<Sprite>("texDiegoSecondary", "texSecondaryIcon"),
				activationState = new SerializableEntityStateType(typeof(KnifeThrow)),
				activationStateMachineName = "Weapon2",
				interruptPriority = (InterruptPriority)1,
				baseRechargeInterval = 3.5f,
				baseMaxStock = 2,
				rechargeStock = 1,
				requiredStock = 1,
				stockToConsume = 1,
				fullRestockOnAssign = true,
				mustKeyPress = false,
				isCombatSkill = true,
				cancelSprintingOnActivation = true
			});
			Skills.AddSecondarySkills(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab, (SkillDef[])(object)new SkillDef[1] { val2 });
			Skills.CreateGenericSkillWithSkillFamily(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab, (SkillSlot)2, false);
			SkillDefInfo val3 = new SkillDefInfo();
			val3.skillName = "DiegoTheWorldCharge";
			val3.skillNameToken = "KAVAHN_DIEGO_UTILITY_DASH_NAME";
			val3.skillDescriptionToken = "KAVAHN_DIEGO_UTILITY_DASH_DESCRIPTION";
			val3.keywordTokens = new string[1] { "KEYWORD_JJBA_STAND" };
			val3.skillIcon = Icon<Sprite>("texDiegoUtility", "texUtilityIcon");
			val3.activationState = new SerializableEntityStateType(typeof(TheWorldDash));
			val3.activationStateMachineName = "Body";
			val3.interruptPriority = (InterruptPriority)2;
			val3.baseRechargeInterval = 6f;
			val3.baseMaxStock = 1;
			val3.fullRestockOnAssign = true;
			val3.isCombatSkill = true;
			val3.forceSprintDuringState = true;
			StandSkillDef val4 = Skills.CreateSkillDef<StandSkillDef>(val3);
			val4.standCost = 18f;
			Skills.AddUtilitySkills(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab, (SkillDef[])(object)new SkillDef[1] { (SkillDef)val4 });
			Skills.CreateGenericSkillWithSkillFamily(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab, (SkillSlot)3, false);
			val3 = new SkillDefInfo();
			val3.skillName = "DiegoMudaRush";
			val3.skillNameToken = "KAVAHN_DIEGO_SPECIAL_RUSH_NAME";
			val3.skillDescriptionToken = "KAVAHN_DIEGO_SPECIAL_RUSH_DESCRIPTION";
			val3.keywordTokens = new string[1] { "KEYWORD_JJBA_STAND" };
			val3.skillIcon = Icon<Sprite>("texDiegoSpecial", "texSpecialIcon");
			val3.activationState = new SerializableEntityStateType(typeof(MudaRush));
			val3.activationStateMachineName = "Weapon2";
			val3.interruptPriority = (InterruptPriority)1;
			val3.baseRechargeInterval = 9f;
			val3.baseMaxStock = 1;
			val3.fullRestockOnAssign = true;
			val3.isCombatSkill = true;
			val3.cancelSprintingOnActivation = true;
			StandSkillDef val5 = Skills.CreateSkillDef<StandSkillDef>(val3);
			val5.standCost = 30f;
			Skills.AddSpecialSkills(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab, (SkillDef[])(object)new SkillDef[1] { (SkillDef)val5 });
			val3 = new SkillDefInfo();
			val3.skillName = "DiegoTimeSkip";
			val3.skillNameToken = "KAVAHN_DIEGO_STANDSPECIAL_NAME";
			val3.skillDescriptionToken = "KAVAHN_DIEGO_STANDSPECIAL_DESCRIPTION";
			val3.keywordTokens = new string[1] { "KEYWORD_JJBA_STAND" };
			val3.skillIcon = Icon<Sprite>("texDiegoStandSpecial", "texDiegoUtility");
			val3.activationState = new SerializableEntityStateType(typeof(TimeSkip));
			val3.activationStateMachineName = "Weapon2";
			val3.interruptPriority = (InterruptPriority)1;
			val3.baseRechargeInterval = 8f;
			val3.baseMaxStock = 1;
			val3.fullRestockOnAssign = true;
			val3.mustKeyPress = true;
			val3.isCombatSkill = true;
			val3.cancelSprintingOnActivation = false;
			StandSkillDef val6 = Skills.CreateSkillDef<StandSkillDef>(val3);
			val6.standCost = 20f;
			ExtraSkills.AddStandSpecial(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab, (SkillDef)(object)val6);
			val3 = new SkillDefInfo();
			val3.skillName = "DiegoTimeStop";
			val3.skillNameToken = "KAVAHN_DIEGO_ULTIMATE_TIMESTOP_NAME";
			val3.skillDescriptionToken = "KAVAHN_DIEGO_ULTIMATE_TIMESTOP_DESCRIPTION";
			val3.keywordTokens = new string[1] { "KEYWORD_JJBA_STAND" };
			val3.skillIcon = Icon<Sprite>("texDiegoUltimate", "texSpecialIcon");
			val3.activationState = new SerializableEntityStateType(typeof(TheWorldUltimate));
			val3.activationStateMachineName = "Weapon2";
			val3.interruptPriority = (InterruptPriority)1;
			val3.baseRechargeInterval = 40f;
			val3.baseMaxStock = 1;
			val3.fullRestockOnAssign = true;
			val3.mustKeyPress = true;
			val3.isCombatSkill = true;
			val3.cancelSprintingOnActivation = true;
			StandSkillDef val7 = Skills.CreateSkillDef<StandSkillDef>(val3);
			val7.standCost = 50f;
			GenericSkill val8 = Skills.CreateGenericSkillWithSkillFamily(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab, "TheWorld", "Ultimate", false);
			Skills.AddSkillToFamily(val8.skillFamily, (SkillDef)(object)val7, (UnlockableDef)null);
			ExtraSkills.Slots(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab).skill = val8;
		}

		public override void InitializeSkins()
		{
			ModelSkinController obj = ((Component)((CharacterBase<DiegoSurvivor>)(object)this).prefabCharacterModel).gameObject.AddComponent<ModelSkinController>();
			SkinDef val = Skins.CreateSkinDef("DEFAULT_SKIN", Icon<Sprite>("texDiegoSkin", "texMainSkin"), ((CharacterBase<DiegoSurvivor>)(object)this).prefabCharacterModel.baseRendererInfos, ((Component)((CharacterBase<DiegoSurvivor>)(object)this).prefabCharacterModel).gameObject, (UnlockableDef)null);
			obj.skins = (SkinDef[])(object)new SkinDef[1] { val };
		}

		public override void InitializeCharacterMaster()
		{
			DiegoAI.Init(((CharacterBase<DiegoSurvivor>)(object)this).bodyPrefab, ((SurvivorBase<DiegoSurvivor>)this).masterName);
		}
	}
}
namespace JJBAMod.Survivors.Diego.SkillStates
{
	public class KnifeThrow : BaseSkillState
	{
		public static float baseDuration = 0.45f;

		public static float throwPercentTime = 0.35f;

		private float duration;

		private bool thrown;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			((BaseState)this).StartAimMode(duration + 1f, false);
			((EntityState)this).PlayAnimation("Gesture, Override", "KnifeThrow", "ThrowBomb.playbackRate", duration, 0f);
			Util.PlaySound("Play_Diego_KnifeThrow", ((EntityState)this).gameObject);
		}

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

		private void Throw()
		{
			//IL_001d: 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_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_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: 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_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_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)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: 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)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			thrown = true;
			if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)DiegoAssets.knifeProjectilePrefab))
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
				Vector3 point = ((Ray)(ref aimRay)).GetPoint(100f);
				RaycastHit val = default(RaycastHit);
				if (Util.CharacterRaycast(((EntityState)this).gameObject, aimRay, ref val, 100f, LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)), (QueryTriggerInteraction)1))
				{
					point = ((RaycastHit)(ref val)).point;
				}
				Vector3 val2 = ((Ray)(ref aimRay)).direction;
				val2.y = 0f;
				val2 = ((((Vector3)(ref val2)).sqrMagnitude > 0.001f) ? ((Vector3)(ref val2)).normalized : ((EntityState)this).characterDirection.forward);
				Vector3 val3 = ((EntityState)this).transform.position + Vector3.up * 0.55f + val2 * 0.8f;
				Vector3 val4 = point - val3;
				Vector3 normalized = ((Vector3)(ref val4)).normalized;
				int num = 3;
				for (int i = 0; i < num; i++)
				{
					Vector3 val5 = Quaternion.AngleAxis((num > 1) ? Mathf.Lerp(-7f, 7f, (float)i / ((float)num - 1f)) : 0f, Vector3.up) * normalized;
					ProjectileManager.instance.FireProjectile(new FireProjectileInfo
					{
						projectilePrefab = DiegoAssets.knifeProjectilePrefab,
						position = val3,
						rotation = Util.QuaternionSafeLookRotation(val5),
						owner = ((EntityState)this).gameObject,
						damage = 1.6f * ((BaseState)this).damageStat,
						force = 100f,
						crit = ((BaseState)this).RollCrit(),
						damageTypeOverride = DamageTypeCombo.GenericSecondary
					});
				}
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
	public class MudaRush : BaseSkillState
	{
		public static float baseRushDuration = 1.4f;

		public static float baseFinishDuration = 0.5f;

		private float rushDuration;

		private float finishDuration;

		private int hitsDone;

		private bool finished;

		private Vector3 rushDirection;

		private HurtBoxReference lockedTarget;

		private StandUser standUser;

		private float TotalDuration => rushDuration + finishDuration;

		public override void OnEnter()
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			rushDuration = baseRushDuration / ((BaseState)this).attackSpeedStat;
			finishDuration = baseFinishDuration / ((BaseState)this).attackSpeedStat;
			standUser = ((EntityState)this).GetComponent<StandUser>();
			if (((EntityState)this).isAuthority)
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
				rushDirection = ((Ray)(ref aimRay)).direction;
				StandTracker val = StandTracker.Of(((EntityState)this).gameObject);
				lockedTarget = HurtBoxReference.FromHurtBox(Object.op_Implicit((Object)(object)val) ? val.GetTrackingTarget() : null);
			}
			((EntityState)this).PlayAnimation("Gesture, Override", "StandRush", "ThrowBomb.playbackRate", TotalDuration, 0f);
			Util.PlaySound("Play_Diego_Rush", ((EntityState)this).gameObject);
			if (Object.op_Implicit((Object)(object)standUser))
			{
				standUser.UseStand(30f);
				HurtBox val2 = ((HurtBoxReference)(ref lockedTarget)).ResolveHurtBox();
				if (Object.op_Implicit((Object)(object)val2))
				{
					standUser.BeginTargetedAction(val2, TotalDuration, 0.15f);
				}
				else
				{
					standUser.BeginAction(rushDirection, 2.4f, TotalDuration);
				}
				standUser.PlayStandAnimation("Rush", 0.05f);
				standUser.ShowAfterimages("Rush", rushDuration, 4, "Punch1", "Punch2");
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			int num = Mathf.Min(12, Mathf.FloorToInt(((EntityState)this).fixedAge / rushDuration * 12f));
			while (hitsDone < num)
			{
				hitsDone++;
				Util.PlaySound(DiegoSounds.standPunchSwings[hitsDone % DiegoSounds.standPunchSwings.Length], Object.op_Implicit((Object)(object)standUser) ? standUser.StandObject : ((EntityState)this).gameObject);
				if (((EntityState)this).isAuthority)
				{
					Hit(0.7f, 200f, 0);
				}
			}
			if (!finished && ((EntityState)this).fixedAge >= rushDuration)
			{
				finished = true;
				Util.PlaySound("Play_Diego_RushFinish", ((EntityState)this).gameObject);
				if (Object.op_Implicit((Object)(object)standUser))
				{
					standUser.PlayStandAnimation("Punch3", 0.05f);
				}
				if (((EntityState)this).isAuthority)
				{
					Hit(5f, 3000f, 2);
				}
			}
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= TotalDuration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private void Hit(float coefficient, float force, int soundIndex)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: 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_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_005c: 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_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: 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)
			if (Object.op_Implicit((Object)(object)standUser) && Object.op_Implicit((Object)(object)standUser.hitBoxGroup))
			{
				Vector3 val = rushDirection;
				val.y = 0f;
				new OverlapAttack
				{
					attacker = ((EntityState)this).gameObject,
					inflictor = ((EntityState)this).gameObject,
					teamIndex = ((BaseState)this).GetTeam(),
					damage = coefficient * ((BaseState)this).damageStat,
					procCoefficient = ((coefficient < 1f) ? 0.5f : 1f),
					hitEffectPrefab = SharedEffects.punchHitImpactEffect,
					forceVector = ((Vector3)(ref val)).normalized * force,
					pushAwayForce = 0f,
					hitBoxGroup = standUser.hitBoxGroup,
					isCrit = ((BaseState)this).RollCrit(),
					damageType = DamageTypeCombo.GenericSpecial,
					impactSound = DiegoAssets.standPunchHitSoundEvents[soundIndex].index
				}.Fire((List<HurtBox>)null);
			}
		}

		public override void OnExit()
		{
			if (!finished && Object.op_Implicit((Object)(object)standUser))
			{
				standUser.PlayStandAnimation("Idle", 0.05f);
			}
			if (Object.op_Implicit((Object)(object)standUser))
			{
				standUser.ClearAfterimages();
			}
			((EntityState)this).OnExit();
		}

		public override void OnSerialize(NetworkWriter writer)
		{
			//IL_0009: 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)
			((BaseSkillState)this).OnSerialize(writer);
			writer.Write(rushDirection);
			NetworkExtensions.Write(writer, lockedTarget);
		}

		public override void OnDeserialize(NetworkReader reader)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_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)
			((BaseSkillState)this).OnDeserialize(reader);
			rushDirection = reader.ReadVector3();
			lockedTarget = NetworkExtensions.ReadHurtBoxReference(reader);
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
	public class TheWorldCutscene : StandCutscene
	{
		public static Track track;

		private static readonly Segment[] segments = (Segment[])(object)new Segment[3]
		{
			new Segment
			{
				userState = "UltCut",
				cameraSegment = "cut",
				frames = 43f,
				sound = "Play_Diego_UltCut"
			},
			new Segment
			{
				userState = "UltAtk",
				cameraSegment = "atk",
				frames = 372f,
				sound = "Play_Diego_UltAtk"
			},
			new Segment
			{
				userState = "UltEnd",
				standState = "UltEnd",
				frames = 26f
			}
		};

		private float nextExplosion = -1f;

		private GameObject gun;

		protected override Segment[] Segments => segments;

		protected override Track Track => track;

		protected override string TitleToken => "KAVAHN_DIEGO_ULTIMATE_TITLE";

		protected override Color TitleColor => new Color(1f, 0.85f, 0.3f);

		protected override Color TintColor => Color.clear;

		protected override void OnCutsceneUpdate(float time)
		{
			//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_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: 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_0165: 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_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_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			if (!NetworkServer.active || time < 1.4333333f || !Object.op_Implicit((Object)(object)SharedEffects.bitesTheDustExplosionEffect))
			{
				return;
			}
			if (nextExplosion < 0f)
			{
				nextExplosion = 1.7333333f;
			}
			if (time < nextExplosion)
			{
				return;
			}
			nextExplosion = time + 0.45f;
			List<CharacterBody> list = new List<CharacterBody>();
			TeamIndex team = ((BaseState)this).GetTeam();
			foreach (CharacterBody readOnlyInstances in CharacterBody.readOnlyInstancesList)
			{
				if (Object.op_Implicit((Object)(object)readOnlyInstances) && Object.op_Implicit((Object)(object)readOnlyInstances.healthComponent) && readOnlyInstances.healthComponent.alive && Object.op_Implicit((Object)(object)readOnlyInstances.teamComponent) && readOnlyInstances.teamComponent.teamIndex != team)
				{
					Vector3 val = readOnlyInstances.corePosition - ((EntityState)this).characterBody.corePosition;
					if (((Vector3)(ref val)).sqrMagnitude <= 900f)
					{
						list.Add(readOnlyInstances);
					}
				}
			}
			Vector3 position = ((list.Count > 0) ? list[Random.Range(0, list.Count)].corePosition : (((EntityState)this).characterBody.corePosition + Quaternion.Euler(0f, Random.Range(0f, 360f), 0f) * Vector3.forward * Random.Range(6f, 16f)));
			Explode(position, 2.5f);
		}

		private void Explode(Vector3 position, float coefficient)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: 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_0022: Expected O, but got Unknown
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			EffectManager.SpawnEffect(SharedEffects.bitesTheDustExplosionEffect, new EffectData
			{
				origin = position,
				scale = 10f
			}, true);
			new BlastAttack
			{
				attacker = ((EntityState)this).gameObject,
				inflictor = ((EntityState)this).gameObject,
				teamIndex = ((BaseState)this).GetTeam(),
				position = position,
				radius = 10f,
				baseDamage = coefficient * ((BaseState)this).damageStat,
				procCoefficient = 0.5f,
				crit = ((BaseState)this).RollCrit(),
				falloffModel = (FalloffModel)0,
				damageType = DamageTypeCombo.GenericSpecial,
				attackerFiltering = (AttackerFiltering)2
			}.Fire();
		}

		protected override void OnCutsceneStart()
		{
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)base.standUser))
			{
				base.standUser.UseStand(50f);
			}
			Transform val = ((BaseState)this).FindModelChild("HandR");
			if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)DiegoAssets.gunModel))
			{
				gun = Object.Instantiate<GameObject>(DiegoAssets.gunModel, val, false);
				gun.transform.localScale = Vector3.one / Mathf.Max(val.lossyScale.x, 0.01f) * ((EntityState)this).GetModelTransform().lossyScale.x;
				gun.AddComponent<HeldGun>().hand = val;
			}
			TimeStop component = ((EntityState)this).GetComponent<TimeStop>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.Begin(((StandCutscene)this).Duration + 5f);
				component.gradingDelay = ((StandCutscene)this).Duration;
			}
		}

		protected override void OnCutsceneExit()
		{
			if (Object.op_Implicit((Object)(object)gun))
			{
				Object.Destroy((Object)(object)gun);
			}
		}

		protected override void OnCutsceneEnd()
		{
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: 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_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Expected O, but got Unknown
			if (((EntityState)this).isAuthority)
			{
				FireBullets();
			}
			if (NetworkServer.active)
			{
				if (Object.op_Implicit((Object)(object)SharedEffects.bitesTheDustExplosionEffect))
				{
					EffectManager.SpawnEffect(SharedEffects.bitesTheDustExplosionEffect, new EffectData
					{
						origin = ((EntityState)this).characterBody.corePosition,
						scale = 30f
					}, true);
				}
				new BlastAttack
				{
					attacker = ((EntityState)this).gameObject,
					inflictor = ((EntityState)this).gameObject,
					teamIndex = ((BaseState)this).GetTeam(),
					position = ((EntityState)this).characterBody.corePosition,
					radius = 30f,
					baseDamage = 12f * ((BaseState)this).damageStat,
					procCoefficient = 1f,
					crit = ((BaseState)this).RollCrit(),
					falloffModel = (FalloffModel)0,
					damageType = DamageTypeCombo.GenericSpecial,
					attackerFiltering = (AttackerFiltering)2
				}.Fire();
			}
		}

		private void FireBullets()
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: 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_004f: 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_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: 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_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)DiegoAssets.bulletProjectilePrefab))
			{
				return;
			}
			Transform val = ((BaseState)this).FindModelChild("HandR");
			Vector3 val2 = (Object.op_Implicit((Object)(object)val) ? val.position : (((EntityState)this).characterBody.corePosition + Vector3.up * 0.4f));
			TeamIndex team = ((BaseState)this).GetTeam();
			int num = 0;
			foreach (CharacterBody readOnlyInstances in CharacterBody.readOnlyInstancesList)
			{
				if (num >= 6)
				{
					break;
				}
				if (Object.op_Implicit((Object)(object)readOnlyInstances) && Object.op_Implicit((Object)(object)readOnlyInstances.healthComponent) && readOnlyInstances.healthComponent.alive && Object.op_Implicit((Object)(object)readOnlyInstances.teamComponent) && readOnlyInstances.teamComponent.teamIndex != team)
				{
					Vector3 val3 = readOnlyInstances.corePosition - val2;
					if (!(((Vector3)(ref val3)).sqrMagnitude > 2500f))
					{
						val3 = readOnlyInstances.corePosition - val2;
						Shoot(val2, ((Vector3)(ref val3)).normalized);
						num++;
					}
				}
			}
			if (num == 0)
			{
				Shoot(val2, base.forward);
			}
			Util.PlaySound("Play_bandit2_m1_shot", ((EntityState)this).gameObject);
		}

		private void Shoot(Vector3 origin, Vector3 direction)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: 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_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			ProjectileManager.instance.FireProjectile(new FireProjectileInfo
			{
				projectilePrefab = DiegoAssets.bulletProjectilePrefab,
				position = origin + direction * 0.5f,
				rotation = Util.QuaternionSafeLookRotation(direction),
				owner = ((EntityState)this).gameObject,
				damage = 8f * ((BaseState)this).damageStat,
				force = 400f,
				crit = ((BaseState)this).RollCrit(),
				damageTypeOverride = DamageTypeCombo.GenericSpecial
			});
		}
	}
	public class TheWorldDash : BaseSkillState
	{
		public static float duration = 0.45f;

		public static float initialSpeedCoefficient = 6.5f;

		public static float finalSpeedCoefficient = 2.5f;

		private Vector3 forwardDirection;

		private StandUser standUser;

		private OverlapAttack attack;

		public override void OnEnter()
		{
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: 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_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: 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_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: 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_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_0216: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: Unknown result type (might be due to invalid IL or missing references)
			//IL_022d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: Expected O, but got Unknown
			((BaseState)this).OnEnter();
			standUser = ((EntityState)this).GetComponent<StandUser>();
			if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector);
				forwardDirection = ((Vector3)(ref val)).normalized;
			}
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				((EntityState)this).characterMotor.velocity.y = 0f;
				((EntityState)this).characterMotor.velocity = forwardDirection * DashSpeed();
			}
			((EntityState)this).PlayAnimation("FullBody, Override", "Roll", "Roll.playbackRate", duration, 0f);
			Util.PlaySound("Play_Diego_Dash", ((EntityState)this).gameObject);
			if (Object.op_Implicit((Object)(object)standUser))
			{
				standUser.UseStand(18f);
				standUser.BeginAction(forwardDirection, 2.2f, duration);
				standUser.PlayStandAnimation("Dash", 0.05f);
			}
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 0.6f * duration);
			}
			if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)standUser) && Object.op_Implicit((Object)(object)standUser.hitBoxGroup))
			{
				attack = new OverlapAttack
				{
					attacker = ((EntityState)this).gameObject,
					inflictor = ((EntityState)this).gameObject,
					teamIndex = ((BaseState)this).GetTeam(),
					damage = 3.5f * ((BaseState)this).damageStat,
					procCoefficient = 1f,
					hitEffectPrefab = SharedEffects.punchHitImpactEffect,
					forceVector = forwardDirection * 1200f + Vector3.up * 300f,
					pushAwayForce = 0f,
					hitBoxGroup = standUser.hitBoxGroup,
					isCrit = ((BaseState)this).RollCrit(),
					damageType = DamageTypeCombo.GenericUtility,
					impactSound = DiegoAssets.standPunchHitSoundEvents[2].index
				};
			}
		}

		private float DashSpeed()
		{
			return ((BaseState)this).moveSpeedStat * Mathf.Lerp(initialSpeedCoefficient, finalSpeedCoefficient, ((EntityState)this).fixedAge / duration);
		}

		public override void FixedUpdate()
		{
			//IL_001a: 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_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterDirection.forward = forwardDirection;
			}
			if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				Vector3 velocity = forwardDirection * DashSpeed();
				velocity.y = ((EntityState)this).characterMotor.velocity.y;
				((EntityState)this).characterMotor.velocity = velocity;
			}
			if (((EntityState)this).isAuthority && attack != null)
			{
				attack.Fire((List<HurtBox>)null);
			}
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

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

		public override void OnSerialize(NetworkWriter writer)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			((BaseSkillState)this).OnSerialize(writer);
			writer.Write(forwardDirection);
		}

		public override void OnDeserialize(NetworkReader reader)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			((BaseSkillState)this).OnDeserialize(reader);
			forwardDirection = reader.ReadVector3();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
	public class TheWorldPunch : BaseMeleeAttack
	{
		private bool useStand;

		private Vector3 punchDirection;

		private HurtBoxReference lockedTarget;

		private StandUser standUser;

		public override void OnEnter()
		{
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: 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_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_029e: Unknown result type (might be due to invalid IL or missing references)
			standUser = ((EntityState)this).GetComponent<StandUser>();
			float num = 4f / Mathf.Max(((EntityState)this).characterBody.attackSpeed, 0.1f);
			if (((EntityState)this).isAuthority)
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
				punchDirection = ((Ray)(ref aimRay)).direction;
				StandTracker val = ((Object.op_Implicit((Object)(object)standUser) && standUser.CanUseStand(num)) ? StandTracker.Of(((EntityState)this).gameObject) : null);
				HurtBox val2 = (Object.op_Implicit((Object)(object)val) ? val.GetTrackingTarget() : null);
				useStand = Object.op_Implicit((Object)(object)val2);
				lockedTarget = HurtBoxReference.FromHurtBox(val2);
			}
			base.hitboxGroupName = "SwordGroup";
			base.damageType = DamageTypeCombo.GenericPrimary;
			base.procCoefficient = 1f;
			base.bonusForce = Vector3.zero;
			base.attackStartPercentTime = 0.2f;
			base.attackEndPercentTime = 0.4f;
			base.earlyExitPercentTime = 0.55f;
			base.attackRecoil = 0.5f;
			base.hitSoundString = "";
			base.muzzleString = ((base.swingIndex % 2 == 0) ? "SwingLeft" : "SwingRight");
			base.playbackRateParam = "Slash.playbackRate";
			base.swingEffectPrefab = SharedEffects.punchSwingEffect;
			base.hitEffectPrefab = SharedEffects.punchHitImpactEffect;
			if (useStand)
			{
				base.damageCoefficient = 2.6f;
				base.hitStopDuration = 0f;
				base.aimUser = false;
				base.pushForce = 300f;
				base.baseDuration = 0.75f;
				base.hitHopVelocity = 0f;
				base.swingSoundString = DiegoSounds.standPunchSwings[base.swingIndex % DiegoSounds.standPunchSwings.Length];
				base.swingSoundSource = standUser.StandObject;
				base.impactSound = DiegoAssets.standPunchHitSoundEvents[base.swingIndex % DiegoAssets.standPunchHitSoundEvents.Length].index;
				standUser.UseStand(num);
			}
			else
			{
				base.damageCoefficient = 1.2f;
				base.hitStopDuration = 0.012f;
				base.pushForce = 150f;
				base.baseDuration = 0.9f;
				base.hitHopVelocity = 4f;
				base.swingSoundString = DiegoSounds.diegoSwings[base.swingIndex % DiegoSounds.diegoSwings.Length];
				base.impactSound = DiegoAssets.diegoPunchHitSoundEvent.index;
			}
			((BaseMeleeAttack)this).OnEnter();
			Util.PlaySound(DiegoSounds.PunchShout(base.swingIndex), ((EntityState)this).gameObject);
			if (useStand)
			{
				HurtBox val3 = ((HurtBoxReference)(ref lockedTarget)).ResolveHurtBox();
				if (Object.op_Implicit((Object)(object)val3))
				{
					standUser.BeginTargetedAction(val3, base.duration, base.attackStartPercentTime * base.duration);
				}
				else
				{
					standUser.BeginAction(punchDirection, 1.6f, base.duration);
				}
				standUser.PlayStandAnimation("Punch" + (1 + base.swingIndex), 0.05f);
			}
		}

		protected override void ModifyOverlapAttack(OverlapAttack attack)
		{
			((BaseMeleeAttack)this).ModifyOverlapAttack(attack);
			if (useStand && Object.op_Implicit((Object)(object)standUser) && Object.op_Implicit((Object)(object)standUser.hitBoxGroup))
			{
				attack.hitBoxGroup = standUser.hitBoxGroup;
			}
		}

		protected override void PlaySwingEffect()
		{
			if (!useStand)
			{
				((BaseMeleeAttack)this).PlaySwingEffect();
			}
		}

		protected override void PlayAttackAnimation()
		{
			if (useStand)
			{
				((EntityState)this).PlayCrossfade("Gesture, Override", "StandPunch" + (1 + base.swingIndex), base.playbackRateParam, base.duration, 0.1f * base.duration);
			}
			else
			{
				((EntityState)this).PlayCrossfade("Gesture, Override", "Slash" + (1 + base.swingIndex), base.playbackRateParam, base.duration, 0.1f * base.duration);
			}
		}

		public override void OnSerialize(NetworkWriter writer)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			((BaseMeleeAttack)this).OnSerialize(writer);
			writer.Write(useStand);
			writer.Write(punchDirection);
			NetworkExtensions.Write(writer, lockedTarget);
		}

		public override void OnDeserialize(NetworkReader reader)
		{
			//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_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			((BaseMeleeAttack)this).OnDeserialize(reader);
			useStand = reader.ReadBoolean();
			punchDirection = reader.ReadVector3();
			lockedTarget = NetworkExtensions.ReadHurtBoxReference(reader);
		}
	}
	public class TheWorldTimeStop : BaseState
	{
		public static float poseDuration = 1.2f;

		public static float stopPercentTime = 0.75f;

		private bool stopped;

		private StandZoomCamera zoom;

		private CharacterModel characterModel;

		private bool modelFadeWasDisabled;

		private static readonly FieldInfo disableFadeField = typeof(CharacterModel).GetField("disableFade", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);

		private StandUser standUser;

		public override void OnEnter()
		{
			//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_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: 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)
			((BaseState)this).OnEnter();
			standUser = ((EntityState)this).GetComponent<StandUser>();
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				((EntityState)this).characterMotor.velocity = Vector3.zero;
			}
			((EntityState)this).PlayAnimation("FullBody, Override", "TimeStopStart", "ShootGun.playbackRate", poseDuration, 0f);
			Util.PlaySound("Play_Diego_TheWorld", ((EntityState)this).gameObject);
			StandCutIn.Show(((EntityState)this).characterBody, DiegoAssets.cutInTexture, 3);
			Vector3 val = (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).transform.forward);
			val.y = 0f;
			zoom = StandZoomCamera.Begin(((EntityState)this).characterBody, val, 2.01f, poseDuration + 0.4f);
			Transform modelTransform = ((EntityState)this).GetModelTransform();
			characterModel = (Object.op_Implicit((Object)(object)modelTransform) ? ((Component)modelTransform).GetComponent<CharacterModel>() : null);
			if (Object.op_Implicit((Object)(object)characterModel) && disableFadeField != null)
			{
				modelFadeWasDisabled = (bool)disableFadeField.GetValue(characterModel);
				disableFadeField.SetValue(characterModel, true);
			}
			if (Object.op_Implicit((Object)(object)standUser))
			{
				standUser.UseStand(50f);
				standUser.BeginAction(Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).transform.forward, 1.2f, poseDuration);
				standUser.PlayStandAnimation("TimeStopStart", 0.05f);
			}
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, poseDuration + 0.2f);
			}
		}

		public override void FixedUpdate()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				((EntityState)this).characterMotor.velocity = Vector3.zero;
			}
			if (!stopped && ((EntityState)this).fixedAge >= poseDuration * stopPercentTime)
			{
				stopped = true;
				Util.PlaySound("Play_JJBA_TimeStop", ((EntityState)this).gameObject);
				TimeStop component = ((EntityState)this).GetComponent<TimeStop>();
				if (Object.op_Implicit((Object)(object)component))
				{
					component.Begin(5f);
				}
			}
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= poseDuration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			if (Object.op_Implicit((Object)(object)zoom))
			{
				zoom.End();
			}
			if (Object.op_Implicit((Object)(object)characterModel) && disableFadeField != null)
			{
				disableFadeField.SetValue(characterModel, modelFadeWasDisabled);
			}
			((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
			((EntityState)this).OnExit();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)7;
		}
	}
	public class TheWorldUltimate : BaseSkillState
	{
		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			if (((EntityState)this).isAuthority)
			{
				EntityStateMachine val = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Body");
				if (Object.op_Implicit((Object)(object)val))
				{
					val.SetInterruptState((EntityState)(object)new TheWorldTimeStop(), (InterruptPriority)7);
				}
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
	public class TimeSkip : BaseSkillState
	{
		public static float baseDuration = 0.65f;

		public static float hitPercentTime = 0.45f;

		private float duration;

		private bool hit;

		private StandUser standUser;

		private HurtBox target;

		public override void OnEnter()
		{
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: 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_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_016d: 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_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			standUser = ((EntityState)this).GetComponent<StandUser>();
			StandTracker val = StandTracker.Of(((EntityState)this).gameObject);
			target = (Object.op_Implicit((Object)(object)val) ? val.GetTrackingTarget() : null);
			Util.PlaySound("Play_JJBA_TimeStop", ((EntityState)this).gameObject);
			TimeStop component = ((EntityState)this).GetComponent<TimeStop>();
			if (Object.op_Implicit((Object)(object)component) && !component.Running)
			{
				component.Begin(0.6f);
			}
			((EntityState)this).PlayAnimation("Gesture, Override", "Blink", "ThrowBomb.playbackRate", duration, 0f);
			if (((EntityState)this).isAuthority)
			{
				Vector3 val3;
				if (Object.op_Implicit((Object)(object)target) && Object.op_Implicit((Object)(object)target.healthComponent))
				{
					Vector3 val2 = ((Component)target).transform.position - ((EntityState)this).characterBody.footPosition;
					val2.y = 0f;
					val2 = ((((Vector3)(ref val2)).sqrMagnitude > 0.01f) ? ((Vector3)(ref val2)).normalized : ((EntityState)this).characterDirection.forward);
					float num = (Object.op_Implicit((Object)(object)target.healthComponent.body) ? target.healthComponent.body.radius : 1f);
					val3 = target.healthComponent.body.footPosition + val2 * (num + 2f);
					if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
					{
						((EntityState)this).characterDirection.forward = -val2;
					}
				}
				else
				{
					Ray aimRay = ((BaseState)this).GetAimRay();
					Vector3 direction = ((Ray)(ref aimRay)).direction;
					direction.y = 0f;
					val3 = ((EntityState)this).characterBody.footPosition + ((Vector3)(ref direction)).normalized * 14f;
				}
				TeleportHelper.TeleportBody(((EntityState)this).characterBody, val3);
			}
			if (Object.op_Implicit((Object)(object)standUser))
			{
				standUser.UseStand(20f);
				if (Object.op_Implicit((Object)(object)target))
				{
					standUser.BeginTargetedAction(target, duration, 0.1f);
				}
				else
				{
					standUser.BeginAction(((EntityState)this).characterDirection.forward, 1.5f, duration);
				}
				standUser.PlayStandAnimation("Punch3", 0.05f);
			}
		}

		public override void FixedUpdate()
		{
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_009a: 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_00b7: 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_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00ee: 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_0102: 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_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			if (!hit && ((EntityState)this).fixedAge >= duration * hitPercentTime)
			{
				hit = true;
				Util.PlaySound(DiegoSounds.PunchShout(2), ((EntityState)this).gameObject);
				if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)standUser) && Object.op_Implicit((Object)(object)standUser.hitBoxGroup))
				{
					new OverlapAttack
					{
						attacker = ((EntityState)this).gameObject,
						inflictor = ((EntityState)this).gameObject,
						teamIndex = ((BaseState)this).GetTeam(),
						damage = 7f * ((BaseState)this).damageStat,
						procCoefficient = 1f,
						hitEffectPrefab = SharedEffects.punchHitImpactEffect,
						forceVector = ((EntityState)this).characterDirection.forward * 2500f,
						hitBoxGroup = standUser.hitBoxGroup,
						isCrit = ((BaseState)this).RollCrit(),
						damageType = (DamageTypeCombo.GenericSpecial | DamageTypeCombo.op_Implicit((DamageType)32)),
						impactSound = DiegoAssets.standPunchHitSoundEvents[2].index
					}.Fire((List<HurtBox>)null);
				}
			}
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
}
namespace JJBAMod.Survivors.Diego.Components
{
	public class TimeStop : MonoBehaviour
	{
		public static readonly HashSet<TeamIndex> movingTeams = new HashSet<TeamIndex>();

		private static int activeStops;

		private CharacterBody body;

		private float remaining;

		private TeamIndex team;

		private readonly List<FrozenProjectile> frozenProjectiles = new List<FrozenProjectile>();

		private float age;

		private float refreezeTimer;

		public float gradingDelay;

		private readonly HashSet<CharacterBody> caught = new HashSet<CharacterBody>();

		private static PostProcessVolume volume;

		private static ColorGrading colorGrading;

		public static bool Active => activeStops > 0;

		public bool Running => remaining > 0f;

		private void Awake()
		{
			body = ((Component)this).GetComponent<CharacterBody>();
		}

		public void Begin(float duration)
		{
			//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)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			if (Running)
			{
				remaining = Mathf.Max(remaining, duration);
				return;
			}
			remaining = duration;
			age = 0f;
			gradingDelay = 0f;
			team = (TeamIndex)((!Object.op_Implicit((Object)(object)body.teamComponent)) ? 1 : ((int)body.teamComponent.teamIndex));
			activeStops++;
			movingTeams.Add(team);
			CreateGrading();
			if (NetworkServer.active)
			{
				FreezeEverything(duration);
			}
		}

		private void FreezeEverything(float duration)
		{
			//IL_0066: 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)
			//IL_0189: 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_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Expected O, but got Unknown
			foreach (CharacterBody readOnlyInstances in CharacterBody.readOnlyInstancesList)
			{
				if (!Object.op_Implicit((Object)(object)readOnlyInstances) || !Object.op_Implicit((Object)(object)readOnlyInstances.healthComponent) || !readOnlyInstances.healthComponent.alive || caught.Contains(readOnlyInstances) || (Object.op_Implicit((Object)(object)readOnlyInstances.teamComponent) && readOnlyInstances.teamComponent.teamIndex == team))
				{
					continue;
				}
				EntityStateMachine val = EntityStateMachine.FindByCustomName(((Component)readOnlyInstances).gameObject, "Body");
				SetStateOnHurt component = ((Component)readOnlyInstances).GetComponent<SetStateOnHurt>();
				if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.targetStateMachine))
				{
					val = component.targetStateMachine;
				}
				if (!Object.op_Implicit((Object)(object)val) || !val.CanInterruptState((InterruptPriority)7))
				{
					continue;
				}
				float duration2 = (readOnlyInstances.isChampion ? (duration * 0.5f) : duration);
				val.SetInterruptState((EntityState)(object)new TimeStoppedState
				{
					duration = duration2
				}, (InterruptPriority)7);
				caught.Add(readOnlyInstances);
				if (!Object.op_Implicit((Object)(object)component) || component.idleStateMachine == null)
				{
					continue;
				}
				EntityStateMachine[] idleStateMachine = component.idleStateMachine;
				foreach (EntityStateMachine val2 in idleStateMachine)
				{
					if (Object.op_Implicit((Object)(object)val2))
					{
						val2.Se