Decompiled source of Pantheon v1.1.0

Pantheon.dll

Decompiled 2 days 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 EntityStates.Assassin.Weapon;
using EntityStates.BeetleGuardMonster;
using EntityStates.BrotherMonster;
using EntityStates.ImpBossMonster;
using EntityStates.Loader;
using EntityStates.Merc;
using JetBrains.Annotations;
using KinematicCharacterController;
using On.RoR2;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.Projectile;
using RoR2.Skills;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("Pantheon")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Pantheon")]
[assembly: AssemblyTitle("Pantheon")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Pantheon;

internal class Assets
{
	public static AssetBundle MainAssetBundle;

	public static void PopulateAssets()
	{
		if ((Object)(object)MainAssetBundle == (Object)null)
		{
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Pantheon.AssetBundle.pantheonassets");
			MainAssetBundle = AssetBundle.LoadFromStream(stream);
		}
		using Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("Pantheon.Pantheon.bnk");
		byte[] array = new byte[stream2.Length];
		stream2.Read(array, 0, array.Length);
		SoundBanks.Add(array);
	}
}
internal class PantheonSkillBehaviour : MonoBehaviour
{
	public bool canExecute = true;

	public bool canExecutePrimary = true;

	public bool canExecuteSecondary = true;

	public float fwForce = 8200f;

	public float upForce = 2500f;

	public float minDistance = 8f;

	public float dashSpeed = 14f;

	public float minAge = 0.25f;

	public float hopDuration = 0.35f;
}
internal class ProjectileHitCallback : MonoBehaviour
{
	private ProjectileStickOnImpact stickComponent;

	private ProjectileController controllerComponent;

	private EntityStateMachine stateMachine;

	[SerializeField]
	public GameObject owner;

	[SerializeField]
	public GameObject ghost;

	[SerializeField]
	public ProjectileController controller;

	[SerializeField]
	public Transform muzzle;

	[SerializeField]
	public LineRenderer line;

	[SerializeField]
	public Transform start;

	private CapsuleCollider collider;

	private void Start()
	{
		collider = ((Component)this).GetComponent<CapsuleCollider>();
		stickComponent = ((Component)this).GetComponent<ProjectileStickOnImpact>();
		controllerComponent = ((Component)this).GetComponent<ProjectileController>();
		if (Object.op_Implicit((Object)(object)controllerComponent) && Object.op_Implicit((Object)(object)controllerComponent.owner))
		{
			stateMachine = Array.Find(controllerComponent.owner.GetComponents<EntityStateMachine>(), (EntityStateMachine element) => element.customName == "Body");
		}
		((Component)this).gameObject.layer = LayerIndex.fakeActor.intVal;
	}

	private void FixedUpdate()
	{
		//IL_0146: 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)
		if (!Object.op_Implicit((Object)(object)owner))
		{
			controller = ((Component)this).GetComponent<ProjectileController>();
			if (Object.op_Implicit((Object)(object)controller) && Object.op_Implicit((Object)(object)controller.Networkowner))
			{
				if (Object.op_Implicit((Object)(object)controller.ghost))
				{
					ghost = ((Component)controller.ghost).gameObject;
					line = ghost.GetComponent<LineRenderer>();
					start = ghost.transform.GetChild(1);
				}
				owner = controller.owner;
				ModelLocator component = owner.GetComponent<ModelLocator>();
				if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.modelTransform))
				{
					ChildLocator component2 = ((Component)component.modelTransform).GetComponent<ChildLocator>();
					if (Object.op_Implicit((Object)(object)component2))
					{
						muzzle = component2.FindChild("gunMuzzle");
					}
				}
			}
		}
		if (Object.op_Implicit((Object)(object)muzzle) && Object.op_Implicit((Object)(object)line) && Object.op_Implicit((Object)(object)start))
		{
			line.SetPosition(0, start.position);
			line.SetPosition(1, muzzle.position);
		}
		if (Object.op_Implicit((Object)(object)stickComponent) && stickComponent.stuck && Object.op_Implicit((Object)(object)stateMachine) && stateMachine.state is SpecialThrow specialThrow)
		{
			specialThrow.Hit(((Component)this).gameObject);
		}
	}

	private void OnDisable()
	{
	}
}
internal class WeaponModelHideBehaviour : MonoBehaviour
{
	public GameObject child;

	private Animator animator;

	public bool doThrow;

	public bool leap;

	public bool aim;

	public bool dash;

	public GameObject areaIndicatorInstance;

	public Vector3 throwPosition;

	public Vector3 dropPosition;

	public AimRequest aimRequest;

	public GameObject ultprojectile;

	private int skinIndex;

	private ChildLocator childLocator;

	private void Start()
	{
		animator = ((Component)this).GetComponent<Animator>();
		childLocator = ((Component)this).GetComponent<ChildLocator>();
	}

	private void PlayIntro()
	{
		AkSoundEngine.PostEvent(Sounds.Play_Pantheon_Intro, ((Component)this).gameObject);
	}

	private void FixedUpdate()
	{
		//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)
		if (Object.op_Implicit((Object)(object)areaIndicatorInstance))
		{
			throwPosition = areaIndicatorInstance.transform.position;
		}
	}

	public void Drop()
	{
		if (Object.op_Implicit((Object)(object)animator))
		{
			AkSoundEngine.PostEvent(ExitSkyLeap.soundString, ((Component)this).gameObject);
		}
	}

	public void HideHair()
	{
		if (Object.op_Implicit((Object)(object)childLocator))
		{
			string text = "";
			text = ((skinIndex != 0) ? (((skinIndex >= 10) ? "skin" : "skin0") + skinIndex + "Hair") : "baseHair");
			Transform val = childLocator.FindChild(text);
			if (Object.op_Implicit((Object)(object)val))
			{
				((Component)val).gameObject.SetActive(false);
			}
		}
	}

	public void Pause()
	{
		if (Object.op_Implicit((Object)(object)animator))
		{
			animator.SetFloat("Special", 0f);
		}
	}

	public void Aim()
	{
		aim = true;
	}

	public void LeapOver()
	{
		leap = false;
	}

	public void Leap()
	{
		leap = true;
	}

	public void Throw()
	{
		doThrow = true;
		Hide();
	}

	public void Anim(float duration)
	{
		//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)
		if (Object.op_Implicit((Object)(object)animator))
		{
			AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(2);
			float length = ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).length;
			animator.SetFloat("Special", length / duration);
		}
	}

	public void Normalize()
	{
		if (Object.op_Implicit((Object)(object)animator))
		{
			animator.SetFloat("Special", 1f);
		}
	}

	public void SetChild(int skinIndex)
	{
		if (Object.op_Implicit((Object)(object)childLocator))
		{
			string text = "";
			text = ((skinIndex != 0) ? (((skinIndex >= 10) ? "skin" : "skin0") + skinIndex + "Weapon") : "baseWeapon");
			child = ((Component)childLocator.FindChild(text)).gameObject;
			this.skinIndex = skinIndex;
		}
	}

	public void Show()
	{
		if (Object.op_Implicit((Object)(object)child))
		{
			child.SetActive(true);
		}
	}

	public void Hide()
	{
		if (Object.op_Implicit((Object)(object)child))
		{
			child.SetActive(false);
		}
	}
}
internal class Hook
{
	internal static void Hooks()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Expected O, but got Unknown
		HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
		RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
	}

	private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
	{
		if (sender.HasBuff(Prefabs.shield))
		{
			args.moveSpeedReductionMultAdd += 0.8f;
		}
	}

	private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
	{
		//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_0040: Invalid comparison between Unknown and I4
		//IL_005d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0062: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_0075: Unknown result type (might be due to invalid IL or missing references)
		//IL_007a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0090: Unknown result type (might be due to invalid IL or missing references)
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a0: 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_00cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dc: Expected O, but got Unknown
		//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_0152: 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_0169: Unknown result type (might be due to invalid IL or missing references)
		//IL_016c: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_017e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0183: Unknown result type (might be due to invalid IL or missing references)
		//IL_018f: 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_019b: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bd: Expected O, but got Unknown
		//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0200: Unknown result type (might be due to invalid IL or missing references)
		//IL_0205: Unknown result type (might be due to invalid IL or missing references)
		//IL_0211: Expected O, but got Unknown
		if (Object.op_Implicit((Object)(object)damageInfo.attacker))
		{
			if (Object.op_Implicit((Object)(object)self.body) && self.body.HasBuff(Prefabs.shield) && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType) != 64)
			{
				Vector3 forward = self.body.characterDirection.forward;
				bool flag = Vector3.Dot(self.body.corePosition - damageInfo.position, forward) < 0f;
				bool flag2 = Vector3.Dot(self.body.corePosition - damageInfo.position, Vector3.up) < 0f;
				if (flag || flag2)
				{
					EffectManager.SpawnEffect(Prefabs.shieldBlockEffect, new EffectData
					{
						origin = damageInfo.position
					}, true);
					damageInfo.rejected = true;
				}
			}
			CharacterDirection component = damageInfo.attacker.GetComponent<CharacterDirection>();
			RigidbodyMotor component2 = damageInfo.attacker.GetComponent<RigidbodyMotor>();
			CharacterMotor component3 = damageInfo.attacker.GetComponent<CharacterMotor>();
			float num = 100f;
			if (Object.op_Implicit((Object)(object)component2))
			{
				num = component2.mass;
			}
			else if (Object.op_Implicit((Object)(object)component3))
			{
				num = component3.mass;
			}
			Vector3 val = (Object.op_Implicit((Object)(object)component) ? (-component.forward) : (-damageInfo.attacker.transform.forward));
			if (DamageAPI.HasModdedDamageType(damageInfo, Prefabs.knockback))
			{
				self.TakeDamageForce(new DamageInfo
				{
					attacker = damageInfo.attacker,
					force = val * (0f - 8f * num),
					position = ((Component)self).transform.position
				}, true, false);
			}
			if (DamageAPI.HasModdedDamageType(damageInfo, Prefabs.midKnockback))
			{
				self.TakeDamageForce(new DamageInfo
				{
					attacker = damageInfo.attacker,
					force = val * (0f - 18f * num),
					position = ((Component)self).transform.position
				}, true, false);
			}
		}
		orig.Invoke(self, damageInfo);
	}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.Dragonyck.Pantheon", "Pantheon", "1.1.0")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
public class MainPlugin : BaseUnityPlugin
{
	public const string MODUID = "com.Dragonyck.Pantheon";

	public const string MODNAME = "Pantheon";

	public const string VERSION = "1.1.0";

	public const string SURVIVORNAME = "Pantheon";

	public const string SURVIVORNAMEKEY = "PANTHEON";

	public static GameObject characterPrefab;

	private static readonly Color characterColor = new Color(0.95294f, 0.8549f, 0.45882f);

	private void Awake()
	{
		Assets.PopulateAssets();
		Prefabs.CreatePrefabs();
		CreatePrefab();
		RegisterStates();
		RegisterCharacter();
		Hook.Hooks();
	}

	internal static void CreatePrefab()
	{
		//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b6: Expected O, but got Unknown
		//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_0112: 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_0128: Expected O, but got Unknown
		//IL_014f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0160: Unknown result type (might be due to invalid IL or missing references)
		//IL_0171: Unknown result type (might be due to invalid IL or missing references)
		//IL_0191: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b8: 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_024e: Unknown result type (might be due to invalid IL or missing references)
		//IL_037f: Unknown result type (might be due to invalid IL or missing references)
		//IL_03b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_03be: Unknown result type (might be due to invalid IL or missing references)
		//IL_0422: Unknown result type (might be due to invalid IL or missing references)
		//IL_0427: Unknown result type (might be due to invalid IL or missing references)
		//IL_043f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0444: Unknown result type (might be due to invalid IL or missing references)
		//IL_0466: Unknown result type (might be due to invalid IL or missing references)
		//IL_046b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0744: Unknown result type (might be due to invalid IL or missing references)
		//IL_0765: Unknown result type (might be due to invalid IL or missing references)
		//IL_0786: Unknown result type (might be due to invalid IL or missing references)
		//IL_07a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_07c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_07e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_080a: Unknown result type (might be due to invalid IL or missing references)
		//IL_082b: Unknown result type (might be due to invalid IL or missing references)
		//IL_084c: Unknown result type (might be due to invalid IL or missing references)
		//IL_086e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0890: Unknown result type (might be due to invalid IL or missing references)
		//IL_08b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_08d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_08f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ace: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bc3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bc8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bf6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bfb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c25: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c43: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c68: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c86: Unknown result type (might be due to invalid IL or missing references)
		//IL_0cab: Unknown result type (might be due to invalid IL or missing references)
		//IL_0566: Unknown result type (might be due to invalid IL or missing references)
		//IL_0584: Unknown result type (might be due to invalid IL or missing references)
		//IL_0591: Unknown result type (might be due to invalid IL or missing references)
		characterPrefab = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody"), "PantheonBody", true);
		characterPrefab.AddComponent<PantheonSkillBehaviour>();
		characterPrefab.GetComponent<NetworkIdentity>().localPlayerAuthority = true;
		Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("ModelBase")).gameObject);
		Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("CameraPivot")).gameObject);
		Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("AimOrigin")).gameObject);
		GameObject val = Assets.MainAssetBundle.LoadAsset<GameObject>("panth");
		val.AddComponent<WeaponModelHideBehaviour>();
		GameObject val2 = new GameObject("ModelBase");
		val2.transform.parent = characterPrefab.transform;
		val2.transform.localPosition = new Vector3(0f, -0.94f, 0f);
		val2.transform.localRotation = Quaternion.identity;
		val2.transform.localScale = new Vector3(1f, 1f, 1f);
		GameObject val3 = new GameObject("AimOrigin");
		val3.transform.parent = val2.transform;
		val3.transform.localPosition = new Vector3(0f, 2f, 0f);
		val3.transform.localRotation = Quaternion.identity;
		val3.transform.localScale = Vector3.one;
		Transform transform = val.transform;
		transform.parent = val2.transform;
		transform.localPosition = Vector3.zero;
		transform.localScale = new Vector3(1f, 1f, 1f);
		transform.localRotation = Quaternion.identity;
		CharacterDirection component = characterPrefab.GetComponent<CharacterDirection>();
		component.moveVector = Vector3.zero;
		component.targetTransform = val2.transform;
		component.overrideAnimatorForwardTransform = null;
		component.rootMotionAccumulator = null;
		component.modelAnimator = val.GetComponentInChildren<Animator>();
		component.driveFromRootRotation = false;
		component.turnSpeed = 720f;
		CharacterBody component2 = characterPrefab.GetComponent<CharacterBody>();
		((Object)component2).name = "PantheonBody";
		component2.baseNameToken = "PANTHEON_NAME";
		component2.subtitleNameToken = "PANTHEON_SUBTITLE";
		component2.bodyFlags = (BodyFlags)16;
		component2.rootMotionInMainState = false;
		component2.mainRootSpeed = 0f;
		component2.baseMaxHealth = 130f;
		component2.levelMaxHealth = 40f;
		component2.baseRegen = 1f;
		component2.levelRegen = 0.37f;
		component2.baseMaxShield = 0f;
		component2.levelMaxShield = 0f;
		component2.baseMoveSpeed = 7f;
		component2.levelMoveSpeed = 0f;
		component2.baseAcceleration = 110f;
		component2.baseJumpPower = 15f;
		component2.levelJumpPower = 0f;
		component2.baseDamage = 12f;
		component2.levelDamage = 2.4f;
		component2.baseAttackSpeed = 1f;
		component2.levelAttackSpeed = 0f;
		component2.baseCrit = 1f;
		component2.levelCrit = 0f;
		component2.baseArmor = 20f;
		component2.levelArmor = 0f;
		component2.baseJumpCount = 1;
		component2.sprintingSpeedMultiplier = 1.45f;
		component2.wasLucky = false;
		component2.hideCrosshair = false;
		component2.aimOriginTransform = val3.transform;
		component2.hullClassification = (HullClassification)0;
		component2.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait").texture;
		component2.isChampion = false;
		component2.currentVehicle = null;
		component2.skinIndex = 0u;
		component2.bodyColor = characterColor;
		CharacterMotor component3 = characterPrefab.GetComponent<CharacterMotor>();
		component3.walkSpeedPenaltyCoefficient = 1f;
		component3.characterDirection = component;
		component3.muteWalkMotion = false;
		component3.mass = 160f;
		component3.airControl = 0.25f;
		component3.disableAirControlUntilCollision = false;
		component3.generateParametersOnAwake = true;
		InputBankTest component4 = characterPrefab.GetComponent<InputBankTest>();
		component4.moveVector = Vector3.zero;
		CameraTargetParams component5 = characterPrefab.GetComponent<CameraTargetParams>();
		component5.cameraParams = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoBody.prefab").WaitForCompletion().GetComponent<CameraTargetParams>()
			.cameraParams;
		component5.cameraPivotTransform = null;
		component5.recoil = Vector2.zero;
		component5.dontRaycastToPivot = false;
		ModelLocator component6 = characterPrefab.GetComponent<ModelLocator>();
		component6.modelTransform = transform;
		component6.modelBaseTransform = val2.transform;
		component6.dontReleaseModelOnDeath = false;
		component6.autoUpdateModelTransform = true;
		component6.dontDetatchFromParent = false;
		component6.noCorpse = false;
		component6.normalizeToFloor = false;
		component6.preserveModel = false;
		ChildLocator component7 = val.GetComponent<ChildLocator>();
		CharacterModel val4 = val.AddComponent<CharacterModel>();
		SkinnedMeshRenderer[] componentsInChildren = val.GetComponentsInChildren<SkinnedMeshRenderer>();
		List<RendererInfo> list = new List<RendererInfo>();
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			string name = ((Object)componentsInChildren[i]).name;
			if (name != "baseCape" && name != "skin10Cape" && name != "skin11Cape" && name != "skin13Cape" && name != "trail")
			{
				Material defaultMaterial = Utils.InstantiateMaterial(((Renderer)componentsInChildren[i]).material.mainTexture);
				list.Add(new RendererInfo
				{
					renderer = (Renderer)(object)componentsInChildren[i],
					defaultMaterial = defaultMaterial,
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				});
			}
			if (!name.Contains("base"))
			{
				((Component)componentsInChildren[i]).gameObject.SetActive(false);
			}
		}
		RendererInfo[] array = list.ToArray();
		val4.body = component2;
		val4.baseRendererInfos = array;
		val4.autoPopulateLightInfos = true;
		val4.invisibilityCount = 0;
		val4.temporaryOverlays = new List<TemporaryOverlayInstance>();
		Reflection.SetFieldValue<SkinnedMeshRenderer>((object)val4, "mainSkinnedMeshRenderer", componentsInChildren[0]);
		GameObject gameObject = ((Component)transform).gameObject;
		CharacterModel component8 = gameObject.GetComponent<CharacterModel>();
		ModelSkinController val5 = gameObject.AddComponent<ModelSkinController>();
		ChildLocator component9 = gameObject.GetComponent<ChildLocator>();
		LanguageAPI.Add("PANTHEONBODY_DEFAULT_SKIN_NAME", "Default");
		LanguageAPI.Add("PANTHEONBODY_SKIN01_NAME", "Myrmidon");
		LanguageAPI.Add("PANTHEONBODY_SKIN02_NAME", "Ruthless");
		LanguageAPI.Add("PANTHEONBODY_SKIN03_NAME", "Perseus");
		LanguageAPI.Add("PANTHEONBODY_SKIN04_NAME", "Full Metal");
		LanguageAPI.Add("PANTHEONBODY_SKIN05_NAME", "Glaive Warrior");
		LanguageAPI.Add("PANTHEONBODY_SKIN06_NAME", "Dragonslayer");
		LanguageAPI.Add("PANTHEONBODY_SKIN07_NAME", "Zombie Slayer");
		LanguageAPI.Add("PANTHEONBODY_SKIN08_NAME", "Baker");
		LanguageAPI.Add("PANTHEONBODY_SKIN09_NAME", "Pulsefire");
		LanguageAPI.Add("PANTHEONBODY_SKIN10_NAME", "Ruined");
		LanguageAPI.Add("PANTHEONBODY_SKIN11_NAME", "Prestige Ascended");
		LanguageAPI.Add("PANTHEONBODY_SKIN12_NAME", "Ashen Conqueror");
		LanguageAPI.Add("PANTHEONBODY_SKIN13_NAME", "Chosen of the Wolf");
		SkinDef[] array2 = new SkinDef[14];
		Renderer[] childList = (Renderer[])(object)componentsInChildren;
		array2[0] = Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "PANTHEONBODY_DEFAULT_SKIN_NAME", "base", array));
		childList = (Renderer[])(object)componentsInChildren;
		array2[1] = Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "PANTHEONBODY_SKIN01_NAME", "skin01", array));
		childList = (Renderer[])(object)componentsInChildren;
		array2[2] = Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "PANTHEONBODY_SKIN02_NAME", "skin02", array));
		childList = (Renderer[])(object)componentsInChildren;
		array2[3] = Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "PANTHEONBODY_SKIN03_NAME", "skin03", array));
		childList = (Renderer[])(object)componentsInChildren;
		array2[4] = Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "PANTHEONBODY_SKIN04_NAME", "skin04", array));
		childList = (Renderer[])(object)componentsInChildren;
		array2[5] = Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "PANTHEONBODY_SKIN05_NAME", "skin05", array));
		childList = (Renderer[])(object)componentsInChildren;
		array2[6] = Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "PANTHEONBODY_SKIN06_NAME", "skin06", array));
		childList = (Renderer[])(object)componentsInChildren;
		array2[7] = Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "PANTHEONBODY_SKIN07_NAME", "skin07", array));
		childList = (Renderer[])(object)componentsInChildren;
		array2[8] = Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "PANTHEONBODY_SKIN08_NAME", "skin08", array));
		childList = (Renderer[])(object)componentsInChildren;
		array2[9] = Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "PANTHEONBODY_SKIN09_NAME", "skin09", array));
		childList = (Renderer[])(object)componentsInChildren;
		array2[10] = Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "PANTHEONBODY_SKIN10_NAME", "skin10", array));
		childList = (Renderer[])(object)componentsInChildren;
		array2[11] = Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "PANTHEONBODY_SKIN11_NAME", "skin11", array));
		childList = (Renderer[])(object)componentsInChildren;
		array2[12] = Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "PANTHEONBODY_SKIN12_NAME", "skin12", array));
		childList = (Renderer[])(object)componentsInChildren;
		array2[13] = Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "PANTHEONBODY_SKIN13_NAME", "skin13", array));
		val5.skins = (SkinDef[])(object)array2;
		HealthComponent component10 = characterPrefab.GetComponent<HealthComponent>();
		component10.health = 130f;
		component10.shield = 0f;
		component10.barrier = 0f;
		component10.magnetiCharge = 0f;
		component10.body = null;
		component10.dontShowHealthbar = false;
		component10.globalDeathEventChanceCoefficient = 1f;
		characterPrefab.GetComponent<Interactor>().maxInteractionDistance = 3f;
		characterPrefab.GetComponent<InteractionDriver>().highlightInteractor = true;
		SfxLocator component11 = characterPrefab.GetComponent<SfxLocator>();
		component11.deathSound = "Play_ui_player_death";
		component11.barkSound = "";
		component11.openSound = "";
		component11.landingSound = "Play_char_land";
		component11.fallDamageSound = "Play_char_land_fall_damage";
		component11.aliveLoopStart = "";
		component11.aliveLoopStop = "";
		Rigidbody component12 = characterPrefab.GetComponent<Rigidbody>();
		component12.mass = 100f;
		component12.drag = 0f;
		component12.angularDrag = 0f;
		component12.useGravity = false;
		component12.isKinematic = true;
		component12.interpolation = (RigidbodyInterpolation)0;
		component12.collisionDetectionMode = (CollisionDetectionMode)0;
		component12.constraints = (RigidbodyConstraints)0;
		CapsuleCollider component13 = ((Component)component7.FindChild("collider")).GetComponent<CapsuleCollider>();
		((Collider)component13).isTrigger = false;
		((Collider)component13).material = null;
		KinematicCharacterMotor component14 = characterPrefab.GetComponent<KinematicCharacterMotor>();
		component14.CharacterController = (ICharacterController)(object)component3;
		component14.Capsule = component13;
		component14.playerCharacter = true;
		HurtBoxGroup val6 = val.AddComponent<HurtBoxGroup>();
		HurtBox val7 = ((Component)component13).gameObject.AddComponent<HurtBox>();
		((Component)val7).gameObject.layer = LayerIndex.entityPrecise.intVal;
		val7.healthComponent = component10;
		val7.isBullseye = true;
		val7.damageModifier = (DamageModifier)0;
		val7.hurtBoxGroup = val6;
		val7.indexInGroup = 0;
		val6.hurtBoxes = (HurtBox[])(object)new HurtBox[1] { val7 };
		val6.mainHurtBox = val7;
		val6.bullseyeCount = 1;
		AimAnimator val8 = val.AddComponent<AimAnimator>();
		val8.inputBank = component4;
		val8.directionComponent = component;
		val8.pitchRangeMax = 55f;
		val8.pitchRangeMin = -50f;
		val8.yawRangeMin = -44f;
		val8.yawRangeMax = 44f;
		val8.pitchGiveupRange = 30f;
		val8.yawGiveupRange = 10f;
		val8.giveupDuration = 8f;
		FootstepHandler val9 = val.AddComponent<FootstepHandler>();
		val9.baseFootstepString = "Play_player_footstep";
		val9.sprintFootstepOverrideString = "";
		val9.enableFootstepDust = true;
		val9.footstepDustPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/GenericFootstepDust");
		EntityStateMachine component15 = ((Component)component2).GetComponent<EntityStateMachine>();
		component15.mainStateType = new SerializableEntityStateType(typeof(CharacterMain));
		CharacterDeathBehavior component16 = characterPrefab.GetComponent<CharacterDeathBehavior>();
		component16.deathStateMachine = characterPrefab.GetComponent<EntityStateMachine>();
		component16.deathState = new SerializableEntityStateType(typeof(GenericCharacterDeath));
		ContentAddition.AddBody(characterPrefab);
		Utils.CreateHitbox("Thrust", val.transform, new Vector3(4.5f, 4.5f, 4.8f)).transform.localPosition = new Vector3(0f, 1f, 1.6f);
		Utils.CreateHitbox("Shield", val.transform, new Vector3(5f, 5f, 6.4f)).transform.localPosition = new Vector3(0f, 1f, 2.8f);
		Utils.CreateHitbox("Ult", val.transform, new Vector3(45f, 45f, 70f));
	}

	private void RegisterCharacter()
	{
		//IL_00ab: 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_011a: Unknown result type (might be due to invalid IL or missing references)
		//IL_011f: Unknown result type (might be due to invalid IL or missing references)
		string text = "Pantheon is a jack of all trades and a master of none. No matter the conditions, he always gets back up…<style=cSub>\r\n\r\n< ! > Pantheon is a balanced melee fighter who can fly across the stage with his Ultimate ability, Grand Starfall." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > His Comet Spear is a deadly offensive weapon that can be used up close or from afar." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > Pantheon can stun opponents and use timed blocks with his Aegis shield.";
		string text2 = "..and so he left.";
		string text3 = "..and so he vanished.";
		LanguageAPI.Add("PANTHEON_NAME", "Pantheon");
		LanguageAPI.Add("PANTHEON_DESCRIPTION", text);
		LanguageAPI.Add("PANTHEON_SUBTITLE", "Unbreakable Spear");
		LanguageAPI.Add("PANTHEON_OUTRO", text2);
		LanguageAPI.Add("PANTHEON_FAIL", text3);
		SurvivorDef val = ScriptableObject.CreateInstance<SurvivorDef>();
		val.cachedName = "PANTHEON_NAME";
		val.unlockableDef = null;
		val.descriptionToken = "PANTHEON_DESCRIPTION";
		val.primaryColor = characterColor;
		val.bodyPrefab = characterPrefab;
		val.displayPrefab = Utils.NewDisplayModel(((Component)characterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "PantheonDisplay");
		val.outroFlavorToken = "PANTHEON_OUTRO";
		val.desiredSortPosition = 7f;
		val.mainEndingEscapeFailureFlavorToken = "PANTHEON_FAIL";
		ContentAddition.AddSurvivorDef(val);
		SkillSetup();
		GameObject val2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/MercMonsterMaster.prefab").WaitForCompletion(), "PantheonMaster", true);
		ContentAddition.AddMaster(val2);
		CharacterMaster component = val2.GetComponent<CharacterMaster>();
		component.bodyPrefab = characterPrefab;
	}

	private void RegisterStates()
	{
		//IL_0003: 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_0013: 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_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: 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_0043: 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_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: 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_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: 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)
		bool flag = default(bool);
		ContentAddition.AddEntityState<Spawn>(ref flag);
		ContentAddition.AddEntityState<CharacterMain>(ref flag);
		ContentAddition.AddEntityState<BasePanthState>(ref flag);
		ContentAddition.AddEntityState<MeleeSkillState>(ref flag);
		ContentAddition.AddEntityState<Primary>(ref flag);
		ContentAddition.AddEntityState<SingleHit>(ref flag);
		ContentAddition.AddEntityState<MultiHit>(ref flag);
		ContentAddition.AddEntityState<Secondary>(ref flag);
		ContentAddition.AddEntityState<SecondaryCharge>(ref flag);
		ContentAddition.AddEntityState<SecondaryThrow>(ref flag);
		ContentAddition.AddEntityState<SecondaryThrust>(ref flag);
		ContentAddition.AddEntityState<Utility>(ref flag);
		ContentAddition.AddEntityState<UtilityCast>(ref flag);
		ContentAddition.AddEntityState<UtilityDash>(ref flag);
		ContentAddition.AddEntityState<UtilityBlast>(ref flag);
		ContentAddition.AddEntityState<Special>(ref flag);
		ContentAddition.AddEntityState<SpecialAim>(ref flag);
		ContentAddition.AddEntityState<SpecialDash>(ref flag);
		ContentAddition.AddEntityState<SpecialThrow>(ref flag);
		ContentAddition.AddEntityState<SpecialEnd>(ref flag);
	}

	private void SkillSetup()
	{
		GenericSkill[] componentsInChildren = characterPrefab.GetComponentsInChildren<GenericSkill>();
		foreach (GenericSkill val in componentsInChildren)
		{
			Object.DestroyImmediate((Object)(object)val);
		}
		PrimarySetup();
		SecondarySetup();
		UtilitySetup();
		SpecialSetup();
	}

	private void PrimarySetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: 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_0148: Unknown result type (might be due to invalid IL or missing references)
		//IL_0152: Expected O, but got Unknown
		//IL_0153: Unknown result type (might be due to invalid IL or missing references)
		//IL_0155: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("PANTHEON_M1", "Aegis Assault");
		LanguageAPI.Add("PANTHEON_M1_DESCRIPTION", "Pantheon quickly strikes in the target direction for <style=cIsDamage>210% damage</style> that causes a light <style=cIsDamage>Knockback</style>. Holding the ability for <style=cIsUtility>0.5s</style> causes Pantheon to brace his shield in the target direction and channels for <style=cIsUtility>1.5s</style>, during which he becomes <style=cIsDamage>invulnerable</style> against any damage dealt by enemies from the target direction. He also continually performs strikes in a cone in front of him, dealing <style=cIsDamage>50% damage</style> every <style=cIsUtility>0.125s</style>.");
		PanthSkillDef panthSkillDef = ScriptableObject.CreateInstance<PanthSkillDef>();
		((SkillDef)panthSkillDef).activationState = new SerializableEntityStateType(typeof(Primary));
		((SkillDef)panthSkillDef).activationStateMachineName = "Weapon";
		((SkillDef)panthSkillDef).baseMaxStock = 0;
		((SkillDef)panthSkillDef).baseRechargeInterval = 0f;
		((SkillDef)panthSkillDef).beginSkillCooldownOnSkillEnd = true;
		((SkillDef)panthSkillDef).canceledFromSprinting = false;
		((SkillDef)panthSkillDef).fullRestockOnAssign = true;
		((SkillDef)panthSkillDef).interruptPriority = (InterruptPriority)0;
		((SkillDef)panthSkillDef).isCombatSkill = true;
		((SkillDef)panthSkillDef).mustKeyPress = false;
		((SkillDef)panthSkillDef).cancelSprintingOnActivation = true;
		((SkillDef)panthSkillDef).rechargeStock = 0;
		((SkillDef)panthSkillDef).requiredStock = 0;
		((SkillDef)panthSkillDef).stockToConsume = 0;
		((SkillDef)panthSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("pantheon_e1");
		((SkillDef)panthSkillDef).skillDescriptionToken = "PANTHEON_M1_DESCRIPTION";
		((SkillDef)panthSkillDef).skillName = "PANTHEON_M1";
		((SkillDef)panthSkillDef).skillNameToken = "PANTHEON_M1";
		ContentAddition.AddSkillDef((SkillDef)(object)panthSkillDef);
		component.primary = characterPrefab.AddComponent<GenericSkill>();
		SkillFamily val = ScriptableObject.CreateInstance<SkillFamily>();
		val.variants = (Variant[])(object)new Variant[1];
		Reflection.SetFieldValue<SkillFamily>((object)component.primary, "_skillFamily", val);
		SkillFamily skillFamily = component.primary.skillFamily;
		Variant[] variants = skillFamily.variants;
		Variant val2 = new Variant
		{
			skillDef = (SkillDef)(object)panthSkillDef
		};
		((Variant)(ref val2)).viewableNode = new Node(((SkillDef)panthSkillDef).skillNameToken, false, (Node)null);
		variants[0] = val2;
		ContentAddition.AddSkillFamily(skillFamily);
	}

	private void SecondarySetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: 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_0148: Unknown result type (might be due to invalid IL or missing references)
		//IL_0152: Expected O, but got Unknown
		//IL_0153: Unknown result type (might be due to invalid IL or missing references)
		//IL_0155: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("PANTHEON_M2", "Comet Spear");
		LanguageAPI.Add("PANTHEON_M2_DESCRIPTION", "Pantheon hurls his <style=cIsDamage>piercing</style> spear in the target direction that deals <style=cIsDamage>250-500% damage</style>. Releasing the ability within <style=cIsUtility>0.4s</style> causes Pantheon to instead thrust his spear in the target direction, dealing <style=cIsDamage>500% damage</style> critical hit.");
		PanthSkillDef panthSkillDef = ScriptableObject.CreateInstance<PanthSkillDef>();
		((SkillDef)panthSkillDef).activationState = new SerializableEntityStateType(typeof(Secondary));
		((SkillDef)panthSkillDef).activationStateMachineName = "Slide";
		((SkillDef)panthSkillDef).baseMaxStock = 1;
		((SkillDef)panthSkillDef).baseRechargeInterval = 4f;
		((SkillDef)panthSkillDef).beginSkillCooldownOnSkillEnd = true;
		((SkillDef)panthSkillDef).canceledFromSprinting = false;
		((SkillDef)panthSkillDef).fullRestockOnAssign = false;
		((SkillDef)panthSkillDef).interruptPriority = (InterruptPriority)0;
		((SkillDef)panthSkillDef).isCombatSkill = true;
		((SkillDef)panthSkillDef).mustKeyPress = true;
		((SkillDef)panthSkillDef).cancelSprintingOnActivation = true;
		((SkillDef)panthSkillDef).rechargeStock = 1;
		((SkillDef)panthSkillDef).requiredStock = 1;
		((SkillDef)panthSkillDef).stockToConsume = 1;
		((SkillDef)panthSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("pantheon_q1");
		((SkillDef)panthSkillDef).skillDescriptionToken = "PANTHEON_M2_DESCRIPTION";
		((SkillDef)panthSkillDef).skillName = "PANTHEON_M2";
		((SkillDef)panthSkillDef).skillNameToken = "PANTHEON_M2";
		ContentAddition.AddSkillDef((SkillDef)(object)panthSkillDef);
		component.secondary = characterPrefab.AddComponent<GenericSkill>();
		SkillFamily val = ScriptableObject.CreateInstance<SkillFamily>();
		val.variants = (Variant[])(object)new Variant[1];
		Reflection.SetFieldValue<SkillFamily>((object)component.secondary, "_skillFamily", val);
		SkillFamily skillFamily = component.secondary.skillFamily;
		Variant[] variants = skillFamily.variants;
		Variant val2 = new Variant
		{
			skillDef = (SkillDef)(object)panthSkillDef
		};
		((Variant)(ref val2)).viewableNode = new Node(((SkillDef)panthSkillDef).skillNameToken, false, (Node)null);
		variants[0] = val2;
		ContentAddition.AddSkillFamily(skillFamily);
	}

	private void UtilitySetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0144: Unknown result type (might be due to invalid IL or missing references)
		//IL_015c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0166: Expected O, but got Unknown
		//IL_0167: Unknown result type (might be due to invalid IL or missing references)
		//IL_0169: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("PANTHEON_UTIL", "Shield Vault");
		LanguageAPI.Add("PANTHEON_UTIL_DESCRIPTION", "Pantheon smashes the ground, dealing <style=cIsDamage>stunning</style> all nearby enemies. Casting while airborne causes Pantheon to quickly slam downwards dealing <style=cIsDamage>320% damage</style>, releasing several shockwaves each dealing <style=cIsDamage>26% damage</style> and knocking back enemies. Nearby enemies are also knocked upwards a great distance.");
		PanthSkillDef panthSkillDef = ScriptableObject.CreateInstance<PanthSkillDef>();
		((SkillDef)panthSkillDef).activationState = new SerializableEntityStateType(typeof(Utility));
		((SkillDef)panthSkillDef).activationStateMachineName = "Body";
		((SkillDef)panthSkillDef).baseMaxStock = 1;
		((SkillDef)panthSkillDef).baseRechargeInterval = 5f;
		((SkillDef)panthSkillDef).beginSkillCooldownOnSkillEnd = true;
		((SkillDef)panthSkillDef).canceledFromSprinting = false;
		((SkillDef)panthSkillDef).fullRestockOnAssign = false;
		((SkillDef)panthSkillDef).interruptPriority = (InterruptPriority)0;
		((SkillDef)panthSkillDef).isCombatSkill = false;
		((SkillDef)panthSkillDef).mustKeyPress = true;
		((SkillDef)panthSkillDef).cancelSprintingOnActivation = true;
		((SkillDef)panthSkillDef).rechargeStock = 1;
		((SkillDef)panthSkillDef).requiredStock = 1;
		((SkillDef)panthSkillDef).stockToConsume = 1;
		((SkillDef)panthSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("pantheon_w1");
		((SkillDef)panthSkillDef).skillDescriptionToken = "PANTHEON_UTIL_DESCRIPTION";
		((SkillDef)panthSkillDef).skillName = "PANTHEON_UTIL";
		((SkillDef)panthSkillDef).skillNameToken = "PANTHEON_UTIL";
		((SkillDef)panthSkillDef).keywordTokens = new string[1] { "KEYWORD_STUNNING" };
		ContentAddition.AddSkillDef((SkillDef)(object)panthSkillDef);
		component.utility = characterPrefab.AddComponent<GenericSkill>();
		SkillFamily val = ScriptableObject.CreateInstance<SkillFamily>();
		val.variants = (Variant[])(object)new Variant[1];
		Reflection.SetFieldValue<SkillFamily>((object)component.utility, "_skillFamily", val);
		SkillFamily skillFamily = component.utility.skillFamily;
		Variant[] variants = skillFamily.variants;
		Variant val2 = new Variant
		{
			skillDef = (SkillDef)(object)panthSkillDef
		};
		((Variant)(ref val2)).viewableNode = new Node(((SkillDef)panthSkillDef).skillNameToken, false, (Node)null);
		variants[0] = val2;
		ContentAddition.AddSkillFamily(skillFamily);
	}

	private void SpecialSetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0144: Unknown result type (might be due to invalid IL or missing references)
		//IL_015c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0166: Expected O, but got Unknown
		//IL_0167: Unknown result type (might be due to invalid IL or missing references)
		//IL_0169: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("PANTHEON_SPEC", "Grand Starfall");
		LanguageAPI.Add("PANTHEON_SPEC_DESCRIPTION", "Pantheon channels for <style=cIsUtility>2s</style> becoming invulnerable for the duration, then leaps into the air. While in the air, Pantheon can target an area to hurl an empowered Comet Spear for <style=cIsDamage>1500% damage</style>. After the spear lands, Pantheon dashes to the target location dealing <style=cIsDamage>1800% damage</style> to nearby enemies in a large radius around him.");
		PanthSkillDef panthSkillDef = ScriptableObject.CreateInstance<PanthSkillDef>();
		((SkillDef)panthSkillDef).activationState = new SerializableEntityStateType(typeof(Special));
		((SkillDef)panthSkillDef).activationStateMachineName = "Body";
		((SkillDef)panthSkillDef).baseMaxStock = 1;
		((SkillDef)panthSkillDef).baseRechargeInterval = 30f;
		((SkillDef)panthSkillDef).beginSkillCooldownOnSkillEnd = true;
		((SkillDef)panthSkillDef).canceledFromSprinting = false;
		((SkillDef)panthSkillDef).fullRestockOnAssign = false;
		((SkillDef)panthSkillDef).interruptPriority = (InterruptPriority)0;
		((SkillDef)panthSkillDef).isCombatSkill = true;
		((SkillDef)panthSkillDef).mustKeyPress = true;
		((SkillDef)panthSkillDef).cancelSprintingOnActivation = false;
		((SkillDef)panthSkillDef).rechargeStock = 1;
		((SkillDef)panthSkillDef).requiredStock = 1;
		((SkillDef)panthSkillDef).stockToConsume = 1;
		((SkillDef)panthSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("pantheon_r");
		((SkillDef)panthSkillDef).skillDescriptionToken = "PANTHEON_SPEC_DESCRIPTION";
		((SkillDef)panthSkillDef).skillName = "PANTHEON_SPEC";
		((SkillDef)panthSkillDef).skillNameToken = "PANTHEON_SPEC";
		((SkillDef)panthSkillDef).keywordTokens = new string[1] { "KEYWORD_STUNNING" };
		ContentAddition.AddSkillDef((SkillDef)(object)panthSkillDef);
		component.special = characterPrefab.AddComponent<GenericSkill>();
		SkillFamily val = ScriptableObject.CreateInstance<SkillFamily>();
		val.variants = (Variant[])(object)new Variant[1];
		Reflection.SetFieldValue<SkillFamily>((object)component.special, "_skillFamily", val);
		SkillFamily skillFamily = component.special.skillFamily;
		Variant[] variants = skillFamily.variants;
		Variant val2 = new Variant
		{
			skillDef = (SkillDef)(object)panthSkillDef
		};
		((Variant)(ref val2)).viewableNode = new Node(((SkillDef)panthSkillDef).skillNameToken, false, (Node)null);
		variants[0] = val2;
		ContentAddition.AddSkillFamily(skillFamily);
	}
}
internal class PanthSkillDef : SkillDef
{
	private class InstanceData : BaseSkillInstanceData
	{
		public PantheonSkillBehaviour behaviour;
	}

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

	internal static bool IsExecutable([NotNull] GenericSkill skillSlot)
	{
		PantheonSkillBehaviour behaviour = ((InstanceData)(object)skillSlot.skillInstanceData).behaviour;
		CharacterMotor component = ((Component)skillSlot).GetComponent<CharacterMotor>();
		return skillSlot.defaultSkillDef.skillNameToken switch
		{
			"PANTHEON_SPEC" => behaviour.canExecute && component.isGrounded, 
			"PANTHEON_M1" => behaviour.canExecute && behaviour.canExecutePrimary, 
			"PANTHEON_M2" => behaviour.canExecute && behaviour.canExecuteSecondary, 
			_ => behaviour.canExecute, 
		};
	}

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

	public override bool IsReady([NotNull] GenericSkill skillSlot)
	{
		return ((SkillDef)this).IsReady(skillSlot) && IsExecutable(skillSlot);
	}
}
internal class Prefabs
{
	internal static ModdedDamageType knockback;

	internal static ModdedDamageType midKnockback;

	internal static GameObject spearProjectile;

	internal static GameObject ultIndicator;

	internal static GameObject ultProjectile;

	internal static GameObject autoHitEffect;

	internal static GameObject multiHitEffect;

	internal static GameObject spearHitEffect;

	internal static GameObject shieldHitEffect;

	internal static GameObject shieldBlockEffect;

	internal static GameObject aoeHitEffect;

	internal static GameObject aoeImpactEffect;

	internal static GameObject kickHitEffect;

	internal static GameObject ultImpactEffect;

	internal static GameObject jumpExplosionEffect;

	internal static GameObject thrustVFX;

	internal static GameObject thrustVFXSimple;

	internal static GameObject shieldSwipeVFX;

	internal static GameObject kickVFX;

	internal static BuffDef shield;

	internal static void CreatePrefabs()
	{
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_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_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_0087: Unknown result type (might be due to invalid IL or missing references)
		//IL_008c: Unknown result type (might be due to invalid IL or missing references)
		//IL_013d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0142: 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_017c: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_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_0225: 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_025f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0264: Unknown result type (might be due to invalid IL or missing references)
		//IL_0299: 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)
		//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_039f: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_0455: 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_04e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_04f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_052b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0530: Unknown result type (might be due to invalid IL or missing references)
		//IL_06a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_06a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_06c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_06c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_06e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0343: Unknown result type (might be due to invalid IL or missing references)
		//IL_0355: Unknown result type (might be due to invalid IL or missing references)
		//IL_035f: Unknown result type (might be due to invalid IL or missing references)
		//IL_072c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0731: Unknown result type (might be due to invalid IL or missing references)
		//IL_075b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0760: Unknown result type (might be due to invalid IL or missing references)
		//IL_07a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_07ad: Unknown result type (might be due to invalid IL or missing references)
		shield = ScriptableObject.CreateInstance<BuffDef>();
		shield.canStack = false;
		shield.isHidden = true;
		ContentAddition.AddBuffDef(shield);
		knockback = DamageAPI.ReserveDamageType();
		midKnockback = DamageAPI.ReserveDamageType();
		ultIndicator = PrefabAPI.InstantiateClone(Assets.MainAssetBundle.LoadAsset<GameObject>("ultIndicator"), "PantheonUltIndicator", false);
		ultIndicator.GetComponentInChildren<Renderer>().material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/moon2/matRescueshipAreaIndicator.mat").WaitForCompletion();
		GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Gravekeeper/GravekeeperHookGhost.prefab").WaitForCompletion(), "PantheonSpearProjectileGhost", true);
		val.AddComponent<NetworkIdentity>();
		Transform val2 = val.transform.Find("WinchHead");
		Object.Destroy((Object)(object)((Component)val2.Find("WinchMesh")).gameObject);
		Object.Destroy((Object)(object)((Component)val2.Find("Trail")).gameObject);
		Object.Instantiate<GameObject>(Assets.MainAssetBundle.LoadAsset<GameObject>("ultSpear"), val.transform);
		ObjectScaleCurve val3 = val.AddComponent<ObjectScaleCurve>();
		val3.useOverallCurveOnly = true;
		val3.overallCurve = AnimationCurve.Linear(0f, 0.66f, 1f, 1f);
		val3.timeMax = 0.2f;
		kickHitEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Loader/OmniImpactVFXLoader.prefab").WaitForCompletion(), "PantheonKickHitEffect", true);
		Utils.RegisterEffect(kickHitEffect, 1f, "Play_Pantheon_Kick_Hit");
		autoHitEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFX.prefab").WaitForCompletion(), "PantheonAutoHitEffect", true);
		Utils.RegisterEffect(autoHitEffect, 1f, "Play_Pantheon_Auto_Hit");
		multiHitEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFX.prefab").WaitForCompletion(), "PantheonMultiHitEffect", true);
		Utils.RegisterEffect(multiHitEffect, 1f, "Play_Pantheon_Shield_Hit");
		spearHitEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFXLarge.prefab").WaitForCompletion(), "PantheonSpearHitEffect", true);
		Utils.RegisterEffect(spearHitEffect, 1f, "Play_Pantheon_Spear_Hit");
		shieldHitEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFX.prefab").WaitForCompletion(), "PantheonShieldHitEffect", true);
		Utils.RegisterEffect(shieldHitEffect, 1f, "Play_Pantheon_Shield_Hit");
		shieldBlockEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/DamageRejected.prefab").WaitForCompletion(), "PantheonBlockEffect", true);
		Utils.RegisterEffect(shieldBlockEffect, 1f, "Play_Pantheon_Shield_Block");
		aoeHitEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Parent/ParentBodyEnergyEffect.prefab").WaitForCompletion(), "PantheonAOEHitEffect", true);
		Utils.RegisterEffect(aoeHitEffect, 1f, "Play_Pantheon_AOE_Hit");
		aoeImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Parent/ParentSlamEffect.prefab").WaitForCompletion(), "PantheonSlamEffect", true);
		ParticleSystem[] componentsInChildren = aoeImpactEffect.GetComponentsInChildren<ParticleSystem>(true);
		foreach (ParticleSystem val4 in componentsInChildren)
		{
			val4.scalingMode = (ParticleSystemScalingMode)0;
			if (((Object)val4).name == "Flames, Radial")
			{
				((Component)val4).transform.localPosition = new Vector3(8f, -0.7f, 0f);
				((Component)val4).transform.localScale = Vector3.one * 2.5f;
				val4.maxParticles = 1;
			}
		}
		Utils.RegisterEffect(aoeImpactEffect, 1f);
		ultProjectile = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Gravekeeper/GravekeeperHookProjectileSimple.prefab").WaitForCompletion(), "PantheonUltSpearProjectile", true);
		ObjectScaleCurve val5 = ultProjectile.AddComponent<ObjectScaleCurve>();
		val5.useOverallCurveOnly = true;
		val5.overallCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f);
		val5.timeMax = 0.2f;
		Object.Destroy((Object)(object)ultProjectile.GetComponent<ProjectileSingleTargetImpact>());
		ultProjectile.AddComponent<ProjectileHitCallback>();
		ultProjectile.GetComponent<ProjectileController>().ghostPrefab = val;
		ultProjectile.GetComponent<ProjectileSimple>().lifetime = 99f;
		CapsuleCollider component = ultProjectile.GetComponent<CapsuleCollider>();
		component.center = new Vector3(0f, 0f, -1f);
		component.radius = 1.6f;
		component.height = 4.3f;
		component.direction = 2;
		ultProjectile.GetComponent<ProjectileStickOnImpact>().ignoreCharacters = true;
		Utils.CreateHitbox("Spear", ultProjectile.transform, new Vector3(6f, 6f, 12f));
		ProjectileOverlapAttack val6 = ultProjectile.AddComponent<ProjectileOverlapAttack>();
		val6.damageCoefficient = 1f;
		val6.impactEffect = spearHitEffect;
		val6.forceVector = Vector3.back * 2500f;
		val6.fireFrequency = 60f;
		ContentAddition.AddProjectile(ultProjectile);
		GameObject val7 = Assets.MainAssetBundle.LoadAsset<GameObject>("spear");
		val7.AddComponent<ProjectileGhostController>();
		spearProjectile = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/FMJRamping.prefab").WaitForCompletion(), "PantheonSpearProjectile", true);
		spearProjectile.GetComponent<Rigidbody>().useGravity = true;
		spearProjectile.GetComponent<ProjectileController>().ghostPrefab = val7;
		ProjectileOverlapAttack component2 = spearProjectile.GetComponent<ProjectileOverlapAttack>();
		component2.impactEffect = spearHitEffect;
		ContentAddition.AddProjectile(spearProjectile);
		ultImpactEffect = PrefabAPI.InstantiateClone(Assets.MainAssetBundle.LoadAsset<GameObject>("ultImpact"), "PantheonUltImpactEffect", false);
		Utils.RegisterEffect(ultImpactEffect, 2f);
		jumpExplosionEffect = PrefabAPI.InstantiateClone(Assets.MainAssetBundle.LoadAsset<GameObject>("jumpExplosion"), "PantheonJumpExplosionEffect", false);
		Utils.RegisterEffect(jumpExplosionEffect, 2f);
		thrustVFX = PrefabAPI.InstantiateClone(Assets.MainAssetBundle.LoadAsset<GameObject>("thrustVFX"), "PantheonThrustEffect", false);
		Utils.RegisterEffect(thrustVFX, 1f);
		thrustVFXSimple = PrefabAPI.InstantiateClone(Assets.MainAssetBundle.LoadAsset<GameObject>("thrustVFXSimple"), "PantheonThrustEffectSimple", false);
		Utils.RegisterEffect(thrustVFXSimple, 1f);
		shieldSwipeVFX = PrefabAPI.InstantiateClone(Assets.MainAssetBundle.LoadAsset<GameObject>("SlashFX"), "PantheonShieldSwipeEffect", false);
		Utils.RegisterEffect(shieldSwipeVFX, 1f);
		kickVFX = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Loader/LoaderFistLoop.prefab").WaitForCompletion(), "PantheonKickEffect", false);
		Material val8 = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Common/VFX/matOmniRing2.mat").WaitForCompletion());
		val8.SetColor("_TintColor", Color.red);
		ParticleSystemRenderer[] componentsInChildren2 = kickVFX.GetComponentsInChildren<ParticleSystemRenderer>(true);
		foreach (ParticleSystemRenderer val9 in componentsInChildren2)
		{
			string name = ((Object)val9).name;
			if (name == "Ring Billboards")
			{
				((Renderer)val9).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/TeamWarCry/matTeamWarCryRings02.mat").WaitForCompletion();
			}
			if (name == "Sparks, Fast")
			{
				((Renderer)val9).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Captain/matCaptainTracerHead.mat").WaitForCompletion();
			}
			if (name == "OmniBillboard")
			{
				((Renderer)val9).material = val8;
			}
			if (name == "LoaderLightning")
			{
				((Renderer)val9).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Teleporters/matTPShockwave.mat").WaitForCompletion();
			}
			if (name == "SwingTrail")
			{
				((Renderer)val9).material = Assets.MainAssetBundle.LoadAsset<Material>("airbusrt 2");
			}
		}
		Utils.RegisterEffect(kickVFX, 0.3f);
	}
}
internal class BasePanthState : BaseState
{
	public Animator animator;

	public WeaponModelHideBehaviour modelBehaviour;

	public PantheonSkillBehaviour behaviour;

	public Ray aimRay;

	public override void OnEnter()
	{
		//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)
		((BaseState)this).OnEnter();
		animator = ((EntityState)this).GetModelAnimator();
		behaviour = ((EntityState)this).GetComponent<PantheonSkillBehaviour>();
		modelBehaviour = ((Component)((EntityState)this).GetModelTransform()).GetComponent<WeaponModelHideBehaviour>();
		aimRay = ((BaseState)this).GetAimRay();
	}

	public void InterruptState(GenericSkill skillSlot, EntityState state)
	{
		skillSlot.stateMachine.SetInterruptState(state, (InterruptPriority)5);
	}

	public void UninterruptState(GenericSkill skillSlot)
	{
		skillSlot.stateMachine.SetInterruptState(EntityStateCatalog.InstantiateState(ref skillSlot.stateMachine.mainStateType), (InterruptPriority)5);
	}

	public void LockSkills(int skill = 0)
	{
		if (Object.op_Implicit((Object)(object)behaviour))
		{
			switch (skill)
			{
			case 1:
				behaviour.canExecutePrimary = false;
				break;
			case 2:
				behaviour.canExecuteSecondary = false;
				break;
			}
			behaviour.canExecute = false;
		}
	}

	public void UnlockSkills(int skill = 0)
	{
		if (Object.op_Implicit((Object)(object)behaviour))
		{
			switch (skill)
			{
			case 1:
				behaviour.canExecutePrimary = true;
				break;
			case 2:
				behaviour.canExecuteSecondary = true;
				break;
			}
			behaviour.canExecute = true;
		}
	}

	public void CameraZoomOut()
	{
		if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams))
		{
			modelBehaviour.aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2);
		}
	}

	public void CameraZoomIn()
	{
		if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams))
		{
			modelBehaviour.aimRequest.Dispose();
		}
	}

	public void Hover()
	{
		//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_0037: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).rigidbody))
		{
			((EntityState)this).characterMotor.velocity = Vector3.zero;
			((EntityState)this).rigidbody.velocity = Vector3.zero;
		}
	}

	public void AdjustModelForwardAim()
	{
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: 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_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: 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_0064: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
		{
			Ray val = ((BaseState)this).GetAimRay();
			Vector2 val2 = Util.Vector3XZToVector2XY(((Ray)(ref val)).direction);
			if (val2 != Vector2.zero)
			{
				((Vector2)(ref val2)).Normalize();
				Vector3 val3 = new Vector3(val2.x, 0f, val2.y);
				Vector3 normalized = ((Vector3)(ref val3)).normalized;
				((EntityState)this).characterDirection.forward = normalized;
			}
		}
	}
}
internal class CharacterMain : GenericCharacterMain
{
	private WeaponModelHideBehaviour behaviour;

	public override void OnEnter()
	{
		((GenericCharacterMain)this).OnEnter();
		behaviour = ((Component)((EntityState)this).GetModelTransform()).GetComponent<WeaponModelHideBehaviour>();
		behaviour.SetChild((int)((EntityState)this).characterBody.skinIndex);
		behaviour.HideHair();
	}

	public override void FixedUpdate()
	{
		((GenericCharacterMain)this).FixedUpdate();
	}
}
internal class MeleeSkillState : BasePanthState
{
	internal float hitPauseDuration;

	internal float hopVelocity = Assaulter.smallHopVelocity;

	internal string animParameter = "";

	internal float hitPauseTimer;

	internal bool isInHitPause;

	internal HitStopCachedState hitStopCachedState;

	internal new Animator animator;

	internal float stopwatch;

	internal OverlapAttack attack;

	internal bool hitCallback;

	internal float damage;

	internal GameObject hitEffectPrefab;

	internal HitBoxGroup hitBoxGroup;

	internal DamageType damageType = (DamageType)0;

	internal DamageColorIndex damageColor = (DamageColorIndex)0;

	internal Vector3 forceVector = Vector3.back * 100f;

	internal float attackStopwatch;

	internal bool crit;

	internal float stepDistance;

	internal float stepDistanceCoefficient = 0.05f;

	public override void OnEnter()
	{
		base.OnEnter();
		stepDistance = stepDistanceCoefficient * ((BaseState)this).moveSpeedStat;
		animator = ((EntityState)this).GetModelAnimator();
		isInHitPause = false;
		hitPauseDuration = GroundLight.hitPauseDuration / ((BaseState)this).attackSpeedStat;
		crit = ((BaseState)this).RollCrit();
	}

	internal OverlapAttack NewOverlapAttack()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_006b: Unknown result type (might be due to invalid IL or missing references)
		//IL_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_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a0: 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)
		OverlapAttack val = new OverlapAttack();
		val.procChainMask = default(ProcChainMask);
		val.procCoefficient = 1f;
		val.attacker = ((EntityState)this).gameObject;
		val.inflictor = ((EntityState)this).gameObject;
		val.teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex;
		val.damage = ((EntityState)this).characterBody.damage * damage;
		val.forceVector = forceVector;
		val.hitEffectPrefab = hitEffectPrefab;
		val.isCrit = crit;
		val.damageColorIndex = damageColor;
		val.damageType = DamageTypeCombo.op_Implicit(damageType);
		val.maximumOverlapTargets = 100;
		val.hitBoxGroup = hitBoxGroup;
		val.damageType = DamageTypeCombo.GenericPrimary;
		return val;
	}

	public override void FixedUpdate()
	{
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		//IL_007f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0084: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0153: Unknown result type (might be due to invalid IL or missing references)
		//IL_0158: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b7: 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_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_00cd: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).FixedUpdate();
		if (stopwatch > 0f && stopwatch <= 0.08f && !isInHitPause && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && ((EntityState)this).characterMotor.isGrounded)
		{
			((EntityState)this).characterMotor.velocity = Vector3.zero;
			Vector3 zero = Vector3.zero;
			zero = ((!(((EntityState)this).characterMotor.moveDirection == Vector3.zero)) ? ((EntityState)this).characterMotor.moveDirection : ((Ray)(ref aimRay)).direction);
			CharacterMotor characterMotor = ((EntityState)this).characterMotor;
			characterMotor.rootMotion += zero * stepDistance;
		}
		hitPauseTimer -= Time.fixedDeltaTime;
		if (hitCallback && !isInHitPause)
		{
			if (!((BaseState)this).isGrounded)
			{
				((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity);
			}
			if (!Utility.IsNullOrWhiteSpace(animParameter))
			{
				hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, animParameter);
			}
			hitPauseTimer = hitPauseDuration / ((BaseState)this).attackSpeedStat;
			isInHitPause = true;
		}
		if (!Utility.IsNullOrWhiteSpace(animParameter) && hitPauseTimer <= 0f && isInHitPause)
		{
			((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator);
			isInHitPause = false;
		}
		if (!isInHitPause)
		{
			attackStopwatch += Time.fixedDeltaTime;
			stopwatch += Time.fixedDeltaTime;
			if (Object.op_Implicit((Object)(object)animator))
			{
				animator.speed = 1f;
			}
		}
		else if (Object.op_Implicit((Object)(object)animator))
		{
			animator.speed = 0f;
		}
	}
}
internal class Primary : BasePanthState
{
	private float duration = 0.5f;

	public override void OnEnter()
	{
		base.OnEnter();
		LockSkills(2);
	}

	public override void FixedUpdate()
	{
		((EntityState)this).FixedUpdate();
		if (!((BaseState)this).isGrounded || (!((EntityState)this).inputBank.skill1.down && ((EntityState)this).isAuthority))
		{
			((EntityState)this).outer.SetNextState((EntityState)(object)new SingleHit());
		}
		if (((EntityState)this).fixedAge >= duration && ((BaseState)this).isGrounded && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextState((EntityState)(object)new MultiHit());
		}
	}

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

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		return (InterruptPriority)2;
	}
}
internal class SingleHit : MeleeSkillState
{
	private float duration;

	private float baseDuration = 0.5f;

	private float swingDelay;

	private float baseSwingDelay = 0.12f;

	private float maxSwingTime = 0.5f;

	public override void OnEnter()
	{
		//IL_00da: Unknown result type (might be due to invalid IL or missing references)
		//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
		base.OnEnter();
		UnlockSkills(2);
		duration = baseDuration / ((BaseState)this).attackSpeedStat;
		swingDelay = baseSwingDelay / ((BaseState)this).attackSpeedStat;
		((BaseState)this).StartAimMode(duration, false);
		damage = 2.1f;
		animParameter = "M1";
		hitPauseDuration = 0.1f / ((BaseState)this).attackSpeedStat;
		hitEffectPrefab = Prefabs.autoHitEffect;
		if (Object.op_Implicit((Object)(object)((EntityState)this).GetModelTransform()))
		{
			hitBoxGroup = Array.Find(((Component)((EntityState)this).GetModelTransform()).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "Thrust");
		}
		if (((EntityState)this).isAuthority)
		{
			attack = NewOverlapAttack();
			DamageAPI.AddModdedDamageType(attack, Prefabs.knockback);
			attack.damageType = DamageTypeCombo.GenericPrimary;
		}
		int num = RoR2Application.rng.RangeInt(1, 4);
		string text = "Attack" + num;
		if (crit)
		{
			AkSoundEngine.PostEvent(Sounds.Play_Pantheon_Kick_Cast, ((EntityState)this).gameObject);
			text = "CritAttack";
		}
		else
		{
			AkSoundEngine.PostEvent(Sounds.Play_Pantheon_Auto_Cast, ((EntityState)this).gameObject);
		}
		((EntityState)this).PlayAnimation("FullBody, Override", text);
		if (!crit)
		{
			switch (num)
			{
			case 1:
				EffectManager.SimpleMuzzleFlash(Prefabs.thrustVFXSimple, ((EntityState)this).gameObject, "thrustMuzzle", false);
				break;
			case 2:
				EffectManager.SimpleMuzzleFlash(Prefabs.shieldSwipeVFX, ((EntityState)this).gameObject, "swipeMuzzle", false);
				break;
			case 3:
				EffectManager.SimpleMuzzleFlash(Prefabs.thrustVFXSimple, ((EntityState)this).gameObject, "thrustMuzzle", false);
				break;
			}
		}
		else
		{
			EffectManager.SimpleMuzzleFlash(Prefabs.kickVFX, ((EntityState)this).gameObject, "foot.l", false);
		}
	}

	public override void FixedUpdate()
	{
		base.FixedUpdate();
		((EntityState)this).characterBody.isSprinting = false;
		if (((EntityState)this).isAuthority && stopwatch >= swingDelay && stopwatch <= maxSwingTime / ((BaseState)this).attackSpeedStat)
		{
			hitCallback = attack.Fire((List<HurtBox>)null);
		}
		if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
	}

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

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		return (InterruptPriority)2;
	}
}
internal class MultiHit : MeleeSkillState
{
	private float duration = 1.5f;

	private float swingDelay;

	private float baseSwingDelay = 0.125f;

	private GameObject shieldWall;

	private uint ID;

	public override void OnEnter()
	{
		//IL_0153: Unknown result type (might be due to invalid IL or missing references)
		//IL_0158: Unknown result type (might be due to invalid IL or missing references)
		base.OnEnter();
		swingDelay = baseSwingDelay / ((BaseState)this).attackSpeedStat;
		stepDistance = 0f;
		shieldWall = ((Component)((BaseState)this).FindModelChild("shieldWall")).gameObject;
		shieldWall.SetActive(true);
		((BaseState)this).StartAimMode(duration, false);
		damage = 0.5f;
		animParameter = "";
		hitPauseDuration = 0.1f / ((BaseState)this).attackSpeedStat;
		hitEffectPrefab = (crit ? Prefabs.kickHitEffect : Prefabs.multiHitEffect);
		if (Object.op_Implicit((Object)(object)((EntityState)this).GetModelTransform()))
		{
			hitBoxGroup = Array.Find(((Component)((EntityState)this).GetModelTransform()).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "Shield");
		}
		ID = AkSoundEngine.PostEvent(Sounds.Play_Pantheon_Shield_Cast, ((EntityState)this).gameObject);
		if (((EntityState)this).isAuthority)
		{
			attack = NewOverlapAttack();
		}
		((EntityState)this).PlayAnimation("FullBody, Override", "Shield");
		animator.SetFloat("M1", ((BaseState)this).attackSpeedStat);
		if (((EntityState)this).isAuthority)
		{
			attack.Fire((List<HurtBox>)null);
			attack.damageType = DamageTypeCombo.GenericPrimary;
		}
		if (NetworkServer.active)
		{
			((EntityState)this).characterBody.AddBuff(Prefabs.shield);
		}
	}

	public override void FixedUpdate()
	{
		base.FixedUpdate();
		((EntityState)this).characterBody.isSprinting = false;
		if (stopwatch >= swingDelay)
		{
			stopwatch = 0f;
			Util.PlaySound(SlashCombo.attackString, ((EntityState)this).gameObject);
			if (((EntityState)this).isAuthority)
			{
				attack = NewOverlapAttack();
				attack.Fire((List<HurtBox>)null);
			}
		}
		if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
	}

	public override void OnExit()
	{
		UnlockSkills(2);
		AkSoundEngine.StopPlayingID(ID);
		if (Object.op_Implicit((Object)(object)shieldWall))
		{
			shieldWall.SetActive(false);
		}
		if (NetworkServer.active)
		{
			((EntityState)this).characterBody.RemoveBuff(Prefabs.shield);
		}
		((EntityState)this).GetModelAnimator().SetTrigger("ThrustOver");
		((EntityState)this).OnExit();
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		return (InterruptPriority)2;
	}
}
internal class Secondary : BasePanthState
{
	private float duration = 0.4f;

	public override void OnEnter()
	{
		base.OnEnter();
		LockSkills(1);
	}

	public override void FixedUpdate()
	{
		((EntityState)this).FixedUpdate();
		if (!((EntityState)this).inputBank.skill2.down)
		{
			if (((EntityState)this).fixedAge < 0.4f)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new SecondaryThrust());
			}
			else
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new SecondaryCharge());
			}
		}
		if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextState((EntityState)(object)new SecondaryCharge());
		}
	}

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

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		return (InterruptPriority)1;
	}
}
internal class SecondaryThrust : MeleeSkillState
{
	private float duration;

	private float baseDuration = 0.65f;

	private float swingDelay;

	private float baseSwingDelay = 0.12f;

	private float maxSwingTime = 0.5f;

	private bool playFX;

	public override void OnEnter()
	{
		//IL_00d9: 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_00ef: Unknown result type (might be due to invalid IL or missing references)
		base.OnEnter();
		duration = baseDuration / ((BaseState)this).attackSpeedStat;
		swingDelay = baseSwingDelay / ((BaseState)this).attackSpeedStat;
		((BaseState)this).StartAimMode(duration, false);
		damage = 5f;
		animParameter = "M2";
		hitPauseDuration = 0.1f / ((BaseState)this).attackSpeedStat;
		hitEffectPrefab = Prefabs.spearHitEffect;
		crit = true;
		if (Object.op_Implicit((Object)(object)((EntityState)this).GetModelTransform()))
		{
			hitBoxGroup = Array.Find(((Component)((EntityState)this).GetModelTransform()).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "Shield");
		}
		if (((EntityState)this).isAuthority)
		{
			attack = NewOverlapAttack();
			DamageAPI.AddModdedDamageType(attack, Prefabs.midKnockback);
			attack.damageType = DamageTypeCombo.GenericSecondary;
		}
		((EntityState)this).PlayAnimation("FullBody, Override", "Thrust", "M2", duration, 0f);
		AkSoundEngine.PostEvent(Sounds.Play_Pantheon_Thrust_Cast, ((EntityState)this).gameObject);
		EffectManager.SimpleMuzzleFlash(Prefabs.thrustVFX, ((EntityState)this).gameObject, "thrustMuzzle", false);
	}

	public override void FixedUpdate()
	{
		base.FixedUpdate();
		((EntityState)this).characterBody.isSprinting = false;
		if (stopwatch >= swingDelay && stopwatch <= maxSwingTime / ((BaseState)this).attackSpeedStat)
		{
			if (!playFX)
			{
				playFX = true;
			}
			if (((EntityState)this).isAuthority)
			{
				hitCallback = attack.Fire((List<HurtBox>)null);
			}
		}
		if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
	}

	public override void OnExit()
	{
		UnlockSkills(1);
		((EntityState)this).skillLocator.secondary.RunRecharge(2f);
		((EntityState)this).OnExit();
	}

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

	private float maxCharge = 0.75f;

	private Ray aimRay;

	private GameObject chargeEffectInstance;

	private Animator animator;

	private uint loopSoundInstanceId;

	private SecondaryThrow state;

	public override void OnEnter()
	{
		((BaseState)this).OnEnter();
		((BaseState)this).StartAimMode(0f, false);
		state = new SecondaryThrow();
		((EntityState)this).PlayAnimation("FullBody, Override", "Charge");
		animator = ((EntityState)this).GetModelAnimator();
		chargeEffectInstance = Object.Instantiate<GameObject>(Assets.MainAssetBundle.LoadAsset<GameObject>("chargeEffect"), ((EntityState)this).GetModelChildLocator().FindChild("spearMuzzle"));
		loopSoundInstanceId = AkSoundEngine.PostEvent(Sounds.Play_Pantheon_Spear_Charge, ((EntityState)this).gameObject);
	}

	public override void FixedUpdate()
	{
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: 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_0041: 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_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_005b: 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_0067: 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)
		((EntityState)this).FixedUpdate();
		if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
		{
			Vector2 val = Util.Vector3XZToVector2XY(((EntityState)this).characterDirection.moveVector);
			if (val != Vector2.zero)
			{
				((Vector2)(ref val)).Normalize();
				Vector3 val2 = new Vector3(val.x, 0f, val.y);
				Vector3 normalized = ((Vector3)(ref val2)).normalized;
				((EntityState)this).characterDirection.moveVector = normalized;
			}
		}
		((EntityState)this).characterBody.isSprinting = false;
		if (state != null)
		{
			state.charge = Mathf.Clamp(Mathf.Clamp01(((EntityState)this).fixedAge / maxCharge), 0f, 1f);
		}
		if (!((EntityState)this).inputBank.skill2.down && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextState((EntityState)(object)state);
		}
	}

	public override void OnExit()
	{
		AkSoundEngine.StopPlayingID(loopSoundInstanceId);
		if (Object.op_Implicit((Object)(object)chargeEffectInstance))
		{
			Object.Destroy((Object)(object)chargeEffectInstance);
		}
		((EntityState)this).OnExit();
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		return (InterruptPriority)5;
	}
}
internal class SecondaryThrow : BasePanthState
{
	internal float charge;

	private float duration = 0.45f;

	private float minDelay = 0.12f;

	private bool hasFired;

	private float minDamageCoefficient = 2.5f;

	private float maxDamageCoefficient = 5f;

	private ChildLocator childLocator;

	private new Animator animator;

	private new Ray aimRay;

	public override void OnEnter()
	{
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		base.OnEnter();
		childLocator = ((EntityState)this).GetModelChildLocator();
		animator = ((EntityState)this).GetModelAnimator();
		animator.SetTrigger("ChargeOver");
		((EntityState)this).PlayAnimation("FullBody, Override", "Throw", "M2", duration, 0f);
		aimRay = ((BaseState)this).GetAimRay();
	}

	public override void FixedUpdate()
	{
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).FixedUpdate();
		((EntityState)this).characterBody.isSprinting = false;
		if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
		{
			((EntityState)this).characterDirection.moveVector = ((Ray)(ref aimRay)).direction;
		}
		if (((EntityState)this).fixedAge >= minDelay && !hasFired)
		{
			hasFired = true;
			Throw();
		}
		if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
	}

	private void Throw()
	{
		//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_0039: Unknown result type (might be due to invalid IL or missing references)
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_006f: 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_00c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0113: Unknown result type (might be due to invalid IL or missing references)
		//IL_0118: Unknown result type (might be due to invalid IL or missing references)
		//IL_011d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: 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_014b: Unknown result type (might be due to invalid IL or missing references)
		AkSoundEngine.PostEvent(Sounds.Play_Pantheon_Spear_Throw, ((EntityState)this).gameObject);
		EffectManager.SimpleEffect(LegacyResourcesAPI.Load<GameObject>("prefabs/effects/muzzleflashes/muzzleflashengigrenade"), ((BaseState)this).FindModelChild("handMuzzle").position, Quaternion.identity, false);
		Ray val = ((BaseState)this).GetAimRay();
		if (((EntityState)this).isAuthority)
		{
			float speedOverride = Util.Remap(charge, 0f, 1f, 150f, 220f);
			FireProjectileInfo val2 = default(FireProjectileInfo);
			val2.crit = ((BaseState)this).RollCrit();
			val2.damage = ((EntityState)this).characterBody.damage * Util.Remap(charge, 0f, 1f, minDamageCoefficient, maxDamageCoefficient);
			val2.damageColorIndex = (DamageColorIndex)0;
			val2.damageTypeOverride = DamageTypeCombo.GenericSecondary;
			val2.force = 500f;
			val2.owner = ((EntityState)this).gameObject;
			val2.position = ((Ray)(ref val)).origin;
			val2.procChainMask = default(ProcChainMask);
			val2.projectilePrefab = Prefabs.spearProjectile;
			val2.rotation = Quaternion.LookRotation(((Ray)(ref val)).direction);
			val2.useFuseOverride = false;
			val2.useSpeedOverride = true;
			((FireProjectileInfo)(ref val2)).speedOverride = speedOverride;
			val2.target = null;
			FireProjectileInfo val3 = val2;
			ProjectileManager.instance.FireProjectile(val3);
		}
	}

	public override void OnExit()
	{
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Expected O, but got Unknown
		//IL_003c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		UnlockSkills(1);
		modelBehaviour.Show();
		if (Object.op_Implicit((Object)(object)animator) && Object.op_Implicit((Object)(object)childLocator))
		{
			EffectData val = new EffectData();
			val.rotation = Quaternion.identity;
		}
		((EntityState)this).OnExit();
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		return (InterruptPriority)5;
	}
}
internal class Spawn : BaseState
{
	private float duration = 2f;

	private SkinnedMeshRenderer[] meshes;

	private bool e;

	private GameObject model;

	public override void OnEnter()
	{
		((BaseState)this).OnEnter();
		if (NetworkServer.active)
		{
			((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility);
		}
	}

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

	public override void OnExit()
	{
		((EntityState)this).OnExit();
		if (NetworkServer.active)
		{
			((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility);
		}
	}
}
internal class Special : BasePanthState
{
	private float duration = 1.2f;

	public float leapSpeed = 1230f;

	private bool zoomed;

	private GameObject chargeFX;

	private GameObject jumpFX;

	public override void OnEnter()
	{
		//IL_00f6: 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_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)
		base.OnEnter();
		LockSkills();
		((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal;
		((EntityState)this).PlayAnimation("FullBody, Override", "Ult", "Special", duration, 0f);
		AkSoundEngine.PostEvent(Sounds.Play_Pantheon_Ult_Cast, ((EntityState)this).gameObject);
		if (NetworkServer.active)
		{
			((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility);
		}
		if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
		{
			((EntityState)this).characterMotor.velocity = Vector3.zero;
		}
		((EntityState)this).characterBody.isSprinting = false;
		animator.SetBool("isSprinting", false);
		animator.SetBool("isMoving", false);
		chargeFX = Object.Instantiate<GameObject>(Assets.MainAssetBundle.LoadAsset<GameObject>("jumpCharge"), ((BaseState)this).FindModelChild("ultMuzzle"));
		chargeFX.transform.localPosition = Vector3.zero;
		((EntityState)this).characterDirection.moveVector = Vector3.zero;
	}

	public override void FixedUpdate()
	{
		//IL_013b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0158: Unknown result type (might be due to invalid IL or missing references)
		//IL_015d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e5: 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_010f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0114: Unknown result type (might be due to invalid IL or missing references)
		//IL_0119: 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).characterBody.currentVehicle))
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
		else
		{
			if (!Object.op_Implicit((Object)(object)modelBehaviour))
			{
				return;
			}
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && modelBehaviour.leap)
			{
				if (!zoomed)
				{
					if (Object.op_Implicit((Object)(object)chargeFX))
					{
						EntityState.Destroy((Object)(object)chargeFX);
						jumpFX = Object.Instantiate<GameObject>(Assets.MainAssetBundle.LoadAsset<GameObject>("jumpTrail"), ((BaseState)this).FindModelChild("collider"));
						jumpFX.transform.localPosition = new Vector3(0f, -2.5f, 0f);
						EffectManager.SimpleEffect(Prefabs.jumpExplosionEffect, ((EntityState)this).characterBody.corePosition - new Vector3(0f, 1f, 0f), Quaternion.identity, false);
					}
					zoomed = true;
					CameraZoomOut();
				}
				((EntityState)this).characterMotor.velocity = Vector3.up * (((EntityState)this).characterBody.jumpPower * leapSpeed * Time.fixedDeltaTime);
			}
			if (modelBehaviour.aim && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new SpecialAim());
			}
		}
	}

	public override void OnExit()
	{
		modelBehaviour.aim = false;
		if (NetworkServer.active)
		{
			((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility);
		}
		if (Object.op_Implicit((Object)(object)jumpFX))
		{
			EntityState.Destroy((Object)(object)jumpFX);
		}
		((EntityState)this).OnExit();
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		return (InterruptPriority)1;
	}
}
internal class SpecialAim : BasePanthState
{
	private float maxTime = 4f;

	private float stopwatch;

	private Transform baseTransform;

	public override void OnEnter()
	{
		base.OnEnter();
		if (NetworkServer.active)
		{
			((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility);
		}
		AkSoundEngine.PostEvent(Sounds.Play_Pantheon_Ult_Aim, ((EntityState)this).gameObject);
		modelBehaviour.aim = false;
		baseTransform = ((EntityState)this).GetModelBaseTransform();
	}

	public override void Update()
	{
		//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_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_0109: 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 refe