Decompiled source of Akali v1.0.3

Akali.dll

Decompiled 3 days ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using EntityStates;
using EntityStates.Commando;
using JetBrains.Annotations;
using KinematicCharacterController;
using On.RoR2;
using R2API;
using R2API.Utils;
using Rewired.ComponentControls.Effects;
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("Akali")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Akali")]
[assembly: AssemblyTitle("Akali")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Akali;

internal class Assets
{
	public static AssetBundle MainAssetBundle;

	public static void PopulateAssets()
	{
		if ((Object)(object)MainAssetBundle == (Object)null)
		{
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Akali.akaliassets");
			MainAssetBundle = AssetBundle.LoadFromStream(stream);
		}
		using Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("Akali.Akali.bnk");
		byte[] array = new byte[stream2.Length];
		stream2.Read(array, 0, array.Length);
		SoundBanks.Add(array);
	}
}
internal class AkaliBehaviour : NetworkBehaviour
{
	public bool hasEmpower = false;

	[SerializeField]
	private static GameObject areaIndicator;

	[SerializeField]
	public CharacterBody body;

	public float radius = 45f;

	private GameObject indicatorPrefab;

	private GameObject passiveBuffEffectPrefab;

	private GameObject passiveBuffEffectInstanceR;

	private GameObject passiveBuffEffectInstanceL;

	private Transform muzzleR;

	private Transform muzzleL;

	public uint skinIndex => Object.op_Implicit((Object)(object)body) ? body.skinIndex : 0u;

	[SerializeField]
	public float distance => Object.op_Implicit((Object)(object)areaIndicator) ? Vector3.Distance(areaIndicator.transform.position, ((Component)this).transform.position) : 0f;

	public void SetIndicator(Vector3 position)
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		if (NetworkServer.active)
		{
			SpawnIndicator(position);
			RpcSpawnIndicatorClient(position);
		}
	}

	[ClientRpc]
	public void RpcSpawnIndicatorClient(Vector3 position)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		SpawnIndicator(position);
	}

	private void SpawnIndicator(Vector3 position)
	{
		//IL_0148: Unknown result type (might be due to invalid IL or missing references)
		if (!Object.op_Implicit((Object)(object)areaIndicator) && Object.op_Implicit((Object)(object)body) && body.hasEffectiveAuthority)
		{
			switch (skinIndex)
			{
			default:
				indicatorPrefab = Prefabs.basePassiveIndicator;
				passiveBuffEffectPrefab = Prefabs.basePassiveBuffEffect;
				AkSoundEngine.PostEvent(Sounds.Play_Akali_Base_Passive_Cast, ((Component)this).gameObject);
				break;
			case 4u:
				indicatorPrefab = Prefabs.skin04PassiveIndicator;
				passiveBuffEffectPrefab = Prefabs.skin04PassiveBuffEffect;
				break;
			case 12u:
				indicatorPrefab = Prefabs.skin12PassiveIndicator;
				passiveBuffEffectPrefab = Prefabs.skin12PassiveBuffEffect;
				AkSoundEngine.PostEvent(Sounds.Play_Akali_Skin12_Passive_Cast, ((Component)this).gameObject);
				break;
			case 9u:
			case 10u:
			case 15u:
				indicatorPrefab = Prefabs.skin15PassiveIndicator;
				passiveBuffEffectPrefab = Prefabs.skin15PassiveBuffEffect;
				AkSoundEngine.PostEvent(Sounds.Play_Akali_Skin15_Passive_Cast, ((Component)this).gameObject);
				break;
			case 16u:
				indicatorPrefab = Prefabs.skin16PassiveIndicator;
				passiveBuffEffectPrefab = Prefabs.skin16PassiveBuffEffect;
				AkSoundEngine.PostEvent(Sounds.Play_Akali_Skin16_Passive_Cast, ((Component)this).gameObject);
				break;
			}
			areaIndicator = Object.Instantiate<GameObject>(indicatorPrefab);
			areaIndicator.transform.position = position;
			areaIndicator.GetComponent<RadialIndicatorRotationBehaviour>().target = ((Component)this).transform;
		}
	}

	private void Start()
	{
		body = ((Component)this).GetComponent<CharacterBody>();
		if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.modelLocator) && Object.op_Implicit((Object)(object)body.modelLocator.modelTransform))
		{
			ChildLocator component = ((Component)body.modelLocator.modelTransform).GetComponent<ChildLocator>();
			if (Object.op_Implicit((Object)(object)component))
			{
				muzzleR = component.FindChild("muzzleHandR");
				muzzleL = component.FindChild("muzzleHandL");
			}
		}
	}

	[Command]
	public void CmdAddEmpowerBuff()
	{
		if (NetworkServer.active)
		{
			if (Object.op_Implicit((Object)(object)body))
			{
				body.AddBuff(Prefabs.passiveEmpower);
			}
			int buffCount = body.GetBuffCount(Prefabs.passive);
			body.ClearTimedBuffs(Prefabs.passive);
			int num = 0;
			while (num < buffCount + 1)
			{
				num++;
				body.AddTimedBuff(Prefabs.passive, 3f, 6);
			}
		}
	}

	[Command]
	public void CmdRemoveEmpowerBuff()
	{
		if (Object.op_Implicit((Object)(object)body) && NetworkServer.active)
		{
			body.RemoveBuff(Prefabs.passiveEmpower);
		}
	}

	private void FixedUpdate()
	{
		if (!Object.op_Implicit((Object)(object)body) || !body.hasEffectiveAuthority || !(distance >= radius) || !Object.op_Implicit((Object)(object)body))
		{
			return;
		}
		CmdAddEmpowerBuff();
		if (Object.op_Implicit((Object)(object)areaIndicator))
		{
			switch (skinIndex)
			{
			default:
				EffectManager.SimpleMuzzleFlash(Prefabs.basePassiveProcEffect, ((Component)this).gameObject, "baseMuzzle", false);
				AkSoundEngine.PostEvent(Sounds.Play_Akali_Base_Passive_Proc, ((Component)this).gameObject);
				break;
			case 4u:
				EffectManager.SimpleMuzzleFlash(Prefabs.skin04PassiveProcEffect, ((Component)this).gameObject, "baseMuzzle", false);
				break;
			case 12u:
				EffectManager.SimpleMuzzleFlash(Prefabs.skin12PassiveProcEffect, ((Component)this).gameObject, "baseMuzzle", false);
				AkSoundEngine.PostEvent(Sounds.Play_Akali_Skin12_Passive_Proc, ((Component)this).gameObject);
				break;
			case 9u:
			case 10u:
			case 15u:
				EffectManager.SimpleMuzzleFlash(Prefabs.skin15PassiveProcEffect, ((Component)this).gameObject, "baseMuzzle", false);
				AkSoundEngine.PostEvent(Sounds.Play_Akali_Skin15_Passive_Proc, ((Component)this).gameObject);
				break;
			case 16u:
				EffectManager.SimpleMuzzleFlash(Prefabs.skin16PassiveProcEffect, ((Component)this).gameObject, "baseMuzzle", false);
				AkSoundEngine.PostEvent(Sounds.Play_Akali_Skin16_Passive_Proc, ((Component)this).gameObject);
				break;
			}
			Object.Destroy((Object)(object)areaIndicator);
		}
		SpawnPassiveBuffEffect();
	}

	private void SpawnPassiveBuffEffect()
	{
		//IL_007d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)passiveBuffEffectInstanceR))
		{
			Object.Destroy((Object)(object)passiveBuffEffectInstanceR);
		}
		if (Object.op_Implicit((Object)(object)passiveBuffEffectInstanceL))
		{
			Object.Destroy((Object)(object)passiveBuffEffectInstanceL);
		}
		if (Object.op_Implicit((Object)(object)muzzleR) && Object.op_Implicit((Object)(object)muzzleL))
		{
			passiveBuffEffectInstanceR = Object.Instantiate<GameObject>(passiveBuffEffectPrefab, muzzleR);
			passiveBuffEffectInstanceR.transform.localPosition = Vector3.zero;
			passiveBuffEffectInstanceL = Object.Instantiate<GameObject>(passiveBuffEffectPrefab, muzzleL);
			passiveBuffEffectInstanceL.transform.localPosition = Vector3.zero;
		}
	}

	public void RemoveBuff()
	{
		CmdRemoveEmpowerBuff();
		if (Object.op_Implicit((Object)(object)passiveBuffEffectInstanceR))
		{
			Object.Destroy((Object)(object)passiveBuffEffectInstanceR);
		}
		if (Object.op_Implicit((Object)(object)passiveBuffEffectInstanceL))
		{
			Object.Destroy((Object)(object)passiveBuffEffectInstanceL);
		}
	}
}
internal class AkaliTrackerBehaviour : HuntressTracker
{
	public SkillLocator skillLocator;

	public CharacterBody body;

	public bool target => Object.op_Implicit((Object)(object)base.trackingTarget) ? true : false;

	private void Awake()
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Expected O, but got Unknown
		base.indicator = new Indicator(((Component)this).gameObject, Prefabs.akaliIndicator);
	}

	private void OnEnable()
	{
		((HuntressTracker)this).OnEnable();
		base.maxTrackingDistance = 35f;
		skillLocator = ((Component)this).GetComponent<SkillLocator>();
	}

	private void FixedUpdate()
	{
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_0073: Expected O, but got Unknown
		//IL_0081: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Expected O, but got Unknown
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a3: Expected O, but got Unknown
		//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bb: Expected O, but got Unknown
		((HuntressTracker)this).FixedUpdate();
		if (!Object.op_Implicit((Object)(object)body))
		{
			body = ((Component)this).GetComponent<CharacterBody>();
			switch (((Component)this).GetComponent<CharacterBody>().skinIndex)
			{
			case 4u:
				base.indicator = new Indicator(((Component)this).gameObject, Prefabs.akaliSkin04Indicator);
				break;
			case 12u:
				base.indicator = new Indicator(((Component)this).gameObject, Prefabs.akaliSkin12Indicator);
				break;
			case 15u:
				base.indicator = new Indicator(((Component)this).gameObject, Prefabs.akaliSkin15Indicator);
				break;
			case 16u:
				base.indicator = new Indicator(((Component)this).gameObject, Prefabs.akaliSkin16Indicator);
				break;
			}
		}
		if (Object.op_Implicit((Object)(object)skillLocator) && Object.op_Implicit((Object)(object)skillLocator.special))
		{
			base.indicator.active = skillLocator.special.IsReady();
		}
	}
}
internal class RadialIndicatorRotationBehaviour : MonoBehaviour
{
	public Transform target;

	private void Update()
	{
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0039: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_003f: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0051: Unknown result type (might be due to invalid IL or missing references)
		//IL_005d: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)target))
		{
			Vector3 val = target.position - ((Component)this).transform.position;
			val.y = 0f;
			Quaternion val2 = Quaternion.LookRotation(val);
			((Component)this).transform.rotation = Quaternion.Slerp(((Component)this).transform.rotation, val2, 360f * Time.deltaTime);
		}
	}
}
internal class SmokeBehaviour : MonoBehaviour
{
	private SphereSearch sphereSearch = new SphereSearch();

	private float stopwatch;

	private float searchInterval = 0.5f;

	public float radius = 8f;

	private void Start()
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		sphereSearch.origin = ((Component)this).transform.position;
		sphereSearch.radius = radius;
		sphereSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask;
		Search();
	}

	private void FixedUpdate()
	{
		stopwatch += Time.fixedDeltaTime;
		if (stopwatch >= searchInterval)
		{
			stopwatch = 0f;
			Search();
		}
	}

	private void Search()
	{
		HurtBox[] hurtBoxes = sphereSearch.RefreshCandidates().OrderCandidatesByDistance().FilterCandidatesByDistinctHurtBoxEntities()
			.GetHurtBoxes();
		foreach (HurtBox val in hurtBoxes)
		{
			if (Object.op_Implicit((Object)(object)val.healthComponent) && Object.op_Implicit((Object)(object)val.healthComponent.body) && NetworkServer.active)
			{
				if (Object.op_Implicit((Object)(object)((Component)val.healthComponent.body).GetComponent<AkaliBehaviour>()))
				{
					val.healthComponent.body.AddTimedBuff(Buffs.Cloak, 1f);
					val.healthComponent.body.AddTimedBuff(Buffs.CloakSpeed, 1f);
				}
				else
				{
					val.healthComponent.body.AddTimedBuff(Buffs.Slow60, 1f);
				}
			}
		}
	}
}
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
		RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
		HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
	}

	private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
	{
		//IL_0002: 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)
		if (DamageAPI.HasModdedDamageType(damageInfo, Prefabs.kunai) && Object.op_Implicit((Object)(object)damageInfo.attacker) && Object.op_Implicit((Object)(object)self.body))
		{
			AkaliBehaviour component = damageInfo.attacker.GetComponent<AkaliBehaviour>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.SetIndicator(self.body.footPosition);
			}
		}
		orig.Invoke(self, damageInfo);
	}

	private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
	{
		int buffCount = sender.GetBuffCount(Prefabs.passive);
		if (sender.HasBuff(Prefabs.invis))
		{
			args.moveSpeedMultAdd += 0.4f;
		}
		if (sender.HasBuff(Prefabs.passive))
		{
			args.moveSpeedMultAdd += 0.25f * (float)buffCount;
			args.armorAdd += (float)(5 * buffCount);
		}
	}
}
[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.Akali", "Akali", "1.0.2")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
public class MainPlugin : BaseUnityPlugin
{
	public const string MODUID = "com.Dragonyck.Akali";

	public const string MODNAME = "Akali";

	public const string VERSION = "1.0.2";

	public const string SURVIVORNAME = "Akali";

	public const string SURVIVORNAMEKEY = "AKALI";

	public static GameObject characterPrefab;

	public static readonly Color characterColor = new Color(0.57255f, 0.61961f, 0.26667f);

	public static SkillDef primary;

	public static SkillDef secondary;

	public static SkillDef special;

	public static SkillDef specialCast;

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

	internal static void CreatePrefab()
	{
		//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ba: Expected O, but got Unknown
		//IL_00e5: 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_0116: Unknown result type (might be due to invalid IL or missing references)
		//IL_0126: Unknown result type (might be due to invalid IL or missing references)
		//IL_012c: Expected O, but got Unknown
		//IL_0153: Unknown result type (might be due to invalid IL or missing references)
		//IL_0164: Unknown result type (might be due to invalid IL or missing references)
		//IL_0175: Unknown result type (might be due to invalid IL or missing references)
		//IL_0195: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01da: Unknown result type (might be due to invalid IL or missing references)
		//IL_0252: Unknown result type (might be due to invalid IL or missing references)
		//IL_0383: Unknown result type (might be due to invalid IL or missing references)
		//IL_03bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_0426: Unknown result type (might be due to invalid IL or missing references)
		//IL_042b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0443: Unknown result type (might be due to invalid IL or missing references)
		//IL_0448: Unknown result type (might be due to invalid IL or missing references)
		//IL_0460: Unknown result type (might be due to invalid IL or missing references)
		//IL_0465: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a90: Unknown result type (might be due to invalid IL or missing references)
		//IL_0aad: Unknown result type (might be due to invalid IL or missing references)
		//IL_0aca: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ae7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b04: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b21: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b3e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b5b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b78: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b96: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bb4: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bd2: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bf0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c0e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c2c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c4a: 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_0e40: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f35: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f3a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f68: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f6d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f96: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f9b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0fac: Unknown result type (might be due to invalid IL or missing references)
		//IL_0fb1: Unknown result type (might be due to invalid IL or missing references)
		//IL_0fda: Unknown result type (might be due to invalid IL or missing references)
		//IL_0fdf: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ff0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ff5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0577: Unknown result type (might be due to invalid IL or missing references)
		//IL_05a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_05b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_0524: Unknown result type (might be due to invalid IL or missing references)
		//IL_0529: Unknown result type (might be due to invalid IL or missing references)
		//IL_053c: Unknown result type (might be due to invalid IL or missing references)
		//IL_055a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0567: Unknown result type (might be due to invalid IL or missing references)
		characterPrefab = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody"), "AkaliBody", true);
		characterPrefab.GetComponent<NetworkIdentity>().localPlayerAuthority = true;
		characterPrefab.AddComponent<AkaliBehaviour>();
		characterPrefab.AddComponent<AkaliTrackerBehaviour>();
		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>("akali");
		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, 1.4f, 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 = "AkaliBody";
		component2.baseNameToken = "AKALI_NAME";
		component2.subtitleNameToken = "AKALI_SUBTITLE";
		component2.bodyFlags = (BodyFlags)16;
		component2.rootMotionInMainState = false;
		component2.mainRootSpeed = 0f;
		component2.baseMaxHealth = 110f;
		component2.levelMaxHealth = 35f;
		component2.baseRegen = 1f;
		component2.levelRegen = 0.33f;
		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 = 2;
		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<CharacterCameraParams>((object)"RoR2/Base/Common/ccpStandard.asset").WaitForCompletion();
		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++)
		{
			if (((Object)componentsInChildren[i]).name == "skin14")
			{
				Material val5 = Utils.InstantiateMaterial(((Renderer)componentsInChildren[i]).material.mainTexture);
				val5.shader = Addressables.LoadAssetAsync<Shader>((object)"RoR2/Base/Shaders/HGWavyCloth.shader").WaitForCompletion();
				list.Add(new RendererInfo
				{
					renderer = (Renderer)(object)componentsInChildren[i],
					defaultMaterial = val5,
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				});
			}
			else
			{
				list.Add(new RendererInfo
				{
					renderer = (Renderer)(object)componentsInChildren[i],
					defaultMaterial = Utils.InstantiateMaterial(((Renderer)componentsInChildren[i]).material.mainTexture),
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = 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;
		ModelSkinController val6 = gameObject.AddComponent<ModelSkinController>();
		LanguageAPI.Add("AKALIBODY_DEFAULT_SKIN_NAME", "Default");
		LanguageAPI.Add("AKALIBODY_SKIN01_NAME", "Stinger");
		LanguageAPI.Add("AKALIBODY_SKIN02_NAME", "Infernal");
		LanguageAPI.Add("AKALIBODY_SKIN03_NAME", "All-Star");
		LanguageAPI.Add("AKALIBODY_SKIN04_NAME", "Nurse");
		LanguageAPI.Add("AKALIBODY_SKIN05_NAME", "Blood Moon");
		LanguageAPI.Add("AKALIBODY_SKIN06_NAME", "Silverfang");
		LanguageAPI.Add("AKALIBODY_SKIN07_NAME", "Headhunter");
		LanguageAPI.Add("AKALIBODY_SKIN08_NAME", "Sashimi");
		LanguageAPI.Add("AKALIBODY_SKIN09_NAME", "K/DA");
		LanguageAPI.Add("AKALIBODY_SKIN10_NAME", "Prestige K/DA");
		LanguageAPI.Add("AKALIBODY_SKIN11_NAME", "PROJECT");
		LanguageAPI.Add("AKALIBODY_SKIN12_NAME", "True Damage");
		LanguageAPI.Add("AKALIBODY_SKIN13_NAME", "K/DA ALL OUT");
		LanguageAPI.Add("AKALIBODY_SKIN14_NAME", "Crime City Nightmare");
		LanguageAPI.Add("AKALIBODY_SKIN15_NAME", "Prestige K/DA (2022)");
		LanguageAPI.Add("AKALIBODY_SKIN16_NAME", "Star Guardian");
		List<GameObject> childList = new List<GameObject>
		{
			((Component)component7.FindChild("base")).gameObject,
			((Component)component7.FindChild("skin01")).gameObject,
			((Component)component7.FindChild("skin02")).gameObject,
			((Component)component7.FindChild("skin03")).gameObject,
			((Component)component7.FindChild("skin04")).gameObject,
			((Component)component7.FindChild("skin05")).gameObject,
			((Component)component7.FindChild("skin06")).gameObject,
			((Component)component7.FindChild("skin07")).gameObject,
			((Component)component7.FindChild("skin08")).gameObject,
			((Component)component7.FindChild("skin09")).gameObject,
			((Component)component7.FindChild("skin10")).gameObject,
			((Component)component7.FindChild("skin11")).gameObject,
			((Component)component7.FindChild("skin12")).gameObject,
			((Component)component7.FindChild("skin13")).gameObject,
			((Component)component7.FindChild("skin14")).gameObject,
			((Component)component7.FindChild("skin15")).gameObject,
			((Component)component7.FindChild("skin16")).gameObject,
			((Component)component7.FindChild("baseWeapon")).gameObject,
			((Component)component7.FindChild("skin01Weapon")).gameObject,
			((Component)component7.FindChild("skin02Weapon")).gameObject,
			((Component)component7.FindChild("skin03Weapon")).gameObject,
			((Component)component7.FindChild("skin04Weapon")).gameObject,
			((Component)component7.FindChild("skin05Weapon")).gameObject,
			((Component)component7.FindChild("skin06Weapon")).gameObject,
			((Component)component7.FindChild("skin07Weapon")).gameObject,
			((Component)component7.FindChild("skin08Weapon")).gameObject,
			((Component)component7.FindChild("skin09Weapon")).gameObject,
			((Component)component7.FindChild("skin10Weapon")).gameObject,
			((Component)component7.FindChild("skin11Weapon")).gameObject,
			((Component)component7.FindChild("skin12Weapon")).gameObject,
			((Component)component7.FindChild("skin13Weapon")).gameObject,
			((Component)component7.FindChild("skin14Weapon")).gameObject,
			((Component)component7.FindChild("skin15Weapon")).gameObject,
			((Component)component7.FindChild("skin16Weapon")).gameObject
		};
		val6.skins = (SkinDef[])(object)new SkinDef[17]
		{
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "AKALIBODY_DEFAULT_SKIN_NAME", "base", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "AKALIBODY_SKIN01_NAME", "skin01", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "AKALIBODY_SKIN02_NAME", "skin02", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "AKALIBODY_SKIN03_NAME", "skin03", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "AKALIBODY_SKIN04_NAME", "skin04", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "AKALIBODY_SKIN05_NAME", "skin05", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "AKALIBODY_SKIN06_NAME", "skin06", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "AKALIBODY_SKIN07_NAME", "skin07", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "AKALIBODY_SKIN08_NAME", "skin08", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "AKALIBODY_SKIN09_NAME", "skin09", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "AKALIBODY_SKIN10_NAME", "skin10", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "AKALIBODY_SKIN11_NAME", "skin11", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "AKALIBODY_SKIN12_NAME", "skin12", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "AKALIBODY_SKIN13_NAME", "skin13", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "AKALIBODY_SKIN14_NAME", "skin14", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "AKALIBODY_SKIN15_NAME", "skin15", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(childList, gameObject, "AKALIBODY_SKIN16_NAME", "skin16", array))
		};
		HealthComponent component8 = characterPrefab.GetComponent<HealthComponent>();
		component8.health = 110f;
		component8.shield = 0f;
		component8.barrier = 0f;
		component8.magnetiCharge = 0f;
		component8.body = null;
		component8.dontShowHealthbar = false;
		component8.globalDeathEventChanceCoefficient = 1f;
		characterPrefab.GetComponent<Interactor>().maxInteractionDistance = 3f;
		characterPrefab.GetComponent<InteractionDriver>().highlightInteractor = true;
		SfxLocator component9 = characterPrefab.GetComponent<SfxLocator>();
		component9.deathSound = "Play_ui_player_death";
		component9.barkSound = "";
		component9.openSound = "";
		component9.landingSound = "Play_char_land";
		component9.fallDamageSound = "Play_char_land_fall_damage";
		component9.aliveLoopStart = "";
		component9.aliveLoopStop = "";
		Rigidbody component10 = characterPrefab.GetComponent<Rigidbody>();
		component10.mass = 100f;
		component10.drag = 0f;
		component10.angularDrag = 0f;
		component10.useGravity = false;
		component10.isKinematic = true;
		component10.interpolation = (RigidbodyInterpolation)0;
		component10.collisionDetectionMode = (CollisionDetectionMode)0;
		component10.constraints = (RigidbodyConstraints)0;
		CapsuleCollider component11 = ((Component)component7.FindChild("collider")).GetComponent<CapsuleCollider>();
		((Collider)component11).isTrigger = false;
		((Collider)component11).material = null;
		KinematicCharacterMotor component12 = characterPrefab.GetComponent<KinematicCharacterMotor>();
		component12.CharacterController = (ICharacterController)(object)component3;
		component12.Capsule = component11;
		component12.playerCharacter = true;
		HurtBoxGroup val7 = val.AddComponent<HurtBoxGroup>();
		HurtBox val8 = ((Component)component11).gameObject.AddComponent<HurtBox>();
		((Component)val8).gameObject.layer = LayerIndex.entityPrecise.intVal;
		val8.healthComponent = component8;
		val8.isBullseye = true;
		val8.damageModifier = (DamageModifier)0;
		val8.hurtBoxGroup = val7;
		val8.indexInGroup = 0;
		val7.hurtBoxes = (HurtBox[])(object)new HurtBox[1] { val8 };
		val7.mainHurtBox = val8;
		val7.bullseyeCount = 1;
		AimAnimator val9 = val.AddComponent<AimAnimator>();
		val9.inputBank = component4;
		val9.directionComponent = component;
		val9.pitchRangeMax = 55f;
		val9.pitchRangeMin = -50f;
		val9.yawRangeMin = -44f;
		val9.yawRangeMax = 44f;
		val9.pitchGiveupRange = 30f;
		val9.yawGiveupRange = 10f;
		val9.giveupDuration = 8f;
		FootstepHandler val10 = val.AddComponent<FootstepHandler>();
		val10.baseFootstepString = "Play_player_footstep";
		val10.sprintFootstepOverrideString = "";
		val10.enableFootstepDust = true;
		val10.footstepDustPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/GenericFootstepDust");
		EntityStateMachine component13 = ((Component)component2).GetComponent<EntityStateMachine>();
		component13.mainStateType = new SerializableEntityStateType(typeof(CharacterMain));
		CharacterDeathBehavior component14 = characterPrefab.GetComponent<CharacterDeathBehavior>();
		component14.deathStateMachine = characterPrefab.GetComponent<EntityStateMachine>();
		component14.deathState = new SerializableEntityStateType(typeof(DeathState));
		EntityStateMachine val11 = characterPrefab.AddComponent<EntityStateMachine>();
		val11.customName = "PoppyBomb";
		val11.initialStateType = new SerializableEntityStateType(typeof(Idle));
		val11.mainStateType = new SerializableEntityStateType(typeof(Idle));
		EntityStateMachine val12 = characterPrefab.AddComponent<EntityStateMachine>();
		val12.customName = "PoppyBombDetonate";
		val12.initialStateType = new SerializableEntityStateType(typeof(Idle));
		val12.mainStateType = new SerializableEntityStateType(typeof(Idle));
		NetworkStateMachine component15 = ((Component)component2).GetComponent<NetworkStateMachine>();
		List<EntityStateMachine> list2 = component15.stateMachines.ToList();
		list2.Add(val11);
		list2.Add(val12);
		component15.stateMachines = list2.ToArray();
		ContentAddition.AddBody(characterPrefab);
	}

	private void RegisterCharacter()
	{
		//IL_00bb: 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)
		string text = "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > ";
		string text2 = "..and so she left.";
		string text3 = "..and so she vanished.";
		LanguageAPI.Add("AKALI_NAME", "Akali");
		LanguageAPI.Add("AKALI_DESCRIPTION", text);
		LanguageAPI.Add("AKALI_SUBTITLE", "The Rogue Assassin");
		LanguageAPI.Add("AKALI_OUTRO", text2);
		LanguageAPI.Add("AKALI_FAIL", text3);
		SurvivorDef val = ScriptableObject.CreateInstance<SurvivorDef>();
		val.cachedName = "AKALI_NAME";
		val.unlockableDef = null;
		val.descriptionToken = "AKALI_DESCRIPTION";
		val.primaryColor = characterColor;
		val.bodyPrefab = characterPrefab;
		val.displayPrefab = Utils.NewDisplayModel(((Component)characterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "AkaliDisplay");
		val.outroFlavorToken = "AKALI_OUTRO";
		val.desiredSortPosition = 23f;
		val.mainEndingEscapeFailureFlavorToken = "AKALI_FAIL";
		ContentAddition.AddSurvivorDef(val);
		SkillSetup();
		GameObject val2 = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/CommandoMonsterMaster"), "AkaliMaster", 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)
		bool flag = default(bool);
		ContentAddition.AddEntityState<Primary>(ref flag);
		ContentAddition.AddEntityState<Secondary>(ref flag);
		ContentAddition.AddEntityState<Utility>(ref flag);
		ContentAddition.AddEntityState<UtilityBlink>(ref flag);
		ContentAddition.AddEntityState<Special>(ref flag);
		ContentAddition.AddEntityState<SpecialDash>(ref flag);
		ContentAddition.AddEntityState<SpecialSecondCast>(ref flag);
		ContentAddition.AddEntityState<CharacterMain>(ref flag);
	}

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

	private void PassiveSetup()
	{
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("AKALI_PASSIVE_NAME", "Assassin's Mark");
		LanguageAPI.Add("AKALI_PASSIVE_DESCRIPTION", "When Akali damages an enemy with an ability, she creates a ring around them for <style=cIsUtility>4s</style>, refreshing on subsequent damaging abilities. Her damaging abilities are empowered and she gains <style=cIsDamage>25% movement speed</style> and <style=cIsDamage>5 armor</style> stacking up to <style=cIsDamage>6</style> times while moving away from the center of the ring. Only one ring may be active at a time.");
		component.passiveSkill.enabled = true;
		component.passiveSkill.skillNameToken = "AKALI_PASSIVE_NAME";
		component.passiveSkill.skillDescriptionToken = "AKALI_PASSIVE_DESCRIPTION";
		component.passiveSkill.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("passive");
	}

	private void PrimarySetup()
	{
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00af: 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_01b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ba: Expected O, but got Unknown
		//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("AKALI_M1", "Five Point Strike");
		LanguageAPI.Add("AKALI_M1_DESCRIPTION", "Akali unleashes kunais in a cone in the target direction, dealing <style=cIsDamage>100% damage each</style>.");
		LanguageAPI.Add("AKALI_M1_2_DESCRIPTION", "Akali unleashes <style=cIsDamage>empowered</style> kunais in a cone in the target direction, dealing <style=cIsDamage>150% damage each</style>.");
		primary = ScriptableObject.CreateInstance<SkillDef>();
		primary.activationState = new SerializableEntityStateType(typeof(Primary));
		primary.activationStateMachineName = "Weapon";
		primary.baseMaxStock = 0;
		primary.baseRechargeInterval = 0f;
		primary.beginSkillCooldownOnSkillEnd = true;
		primary.canceledFromSprinting = false;
		primary.fullRestockOnAssign = true;
		primary.interruptPriority = (InterruptPriority)0;
		primary.isCombatSkill = true;
		primary.mustKeyPress = false;
		primary.cancelSprintingOnActivation = true;
		primary.rechargeStock = 0;
		primary.requiredStock = 0;
		primary.stockToConsume = 0;
		primary.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("primary");
		primary.skillDescriptionToken = "AKALI_M1_DESCRIPTION";
		primary.skillName = "AKALI_M1";
		primary.skillNameToken = "AKALI_M1";
		ContentAddition.AddSkillDef(primary);
		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 = primary
		};
		((Variant)(ref val2)).viewableNode = new Node(primary.skillNameToken, false, (Node)null);
		variants[0] = val2;
		ContentAddition.AddSkillFamily(skillFamily);
	}

	private void SecondarySetup()
	{
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00af: 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_01b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ba: Expected O, but got Unknown
		//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("AKALI_M2", "Shuriken Flip");
		LanguageAPI.Add("AKALI_M2_DESCRIPTION", "Akali flips backward and throws several shuriken in the target direction that deal <style=cIsDamage>150% damage each</style>.");
		LanguageAPI.Add("AKALI_M2_2_DESCRIPTION", "Akali flips backward and throws several <style=cIsDamage>empowered</style> shuriken in the target direction that deal <style=cIsDamage>225% damage each</style>.");
		secondary = ScriptableObject.CreateInstance<SkillDef>();
		secondary.activationState = new SerializableEntityStateType(typeof(Secondary));
		secondary.activationStateMachineName = "Body";
		secondary.baseMaxStock = 1;
		secondary.baseRechargeInterval = 4f;
		secondary.beginSkillCooldownOnSkillEnd = true;
		secondary.canceledFromSprinting = false;
		secondary.fullRestockOnAssign = false;
		secondary.interruptPriority = (InterruptPriority)0;
		secondary.isCombatSkill = true;
		secondary.mustKeyPress = false;
		secondary.cancelSprintingOnActivation = false;
		secondary.rechargeStock = 1;
		secondary.requiredStock = 1;
		secondary.stockToConsume = 1;
		secondary.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("secondary");
		secondary.skillDescriptionToken = "AKALI_M2_DESCRIPTION";
		secondary.skillName = "AKALI_M2";
		secondary.skillNameToken = "AKALI_M2";
		ContentAddition.AddSkillDef(secondary);
		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 = secondary
		};
		((Variant)(ref val2)).viewableNode = new Node(secondary.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_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("AKALI_UTIL", "Twilight Shroud");
		LanguageAPI.Add("AKALI_UTIL_DESCRIPTION", "Akali blinks to the target location, creating a circular shroud lasting for <style=cIsUtility>3s</style>.");
		SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(Utility));
		val.activationStateMachineName = "PoppyBomb";
		val.baseMaxStock = 1;
		val.baseRechargeInterval = 5f;
		val.beginSkillCooldownOnSkillEnd = true;
		val.canceledFromSprinting = false;
		val.fullRestockOnAssign = false;
		val.interruptPriority = (InterruptPriority)0;
		val.isCombatSkill = false;
		val.mustKeyPress = true;
		val.cancelSprintingOnActivation = false;
		val.rechargeStock = 1;
		val.requiredStock = 1;
		val.stockToConsume = 1;
		val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("utility");
		val.skillDescriptionToken = "AKALI_UTIL_DESCRIPTION";
		val.skillName = "AKALI_UTIL";
		val.skillNameToken = "AKALI_UTIL";
		ContentAddition.AddSkillDef(val);
		component.utility = characterPrefab.AddComponent<GenericSkill>();
		SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>();
		val2.variants = (Variant[])(object)new Variant[1];
		Reflection.SetFieldValue<SkillFamily>((object)component.utility, "_skillFamily", val2);
		SkillFamily skillFamily = component.utility.skillFamily;
		Variant[] variants = skillFamily.variants;
		Variant val3 = new Variant
		{
			skillDef = val
		};
		((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null);
		variants[0] = val3;
		ContentAddition.AddSkillFamily(skillFamily);
	}

	private void SpecialSetup()
	{
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00af: 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_01b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ba: Expected O, but got Unknown
		//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_023b: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("AKALI_SPEC", "Perfect Execution");
		LanguageAPI.Add("AKALI_SPEC_DESCRIPTION", "Akali dashes to the target enemy, dealing <style=cIsDamage>900% damage</style>. She can dash again, but this time in the target direction dealing the same amount to all enemies she passes through. Enemies hit with health lower than <style=cIsDamage>8%</style> are instantly <style=cIsHealth>executed</style>.");
		LanguageAPI.Add("AKALI_SPEC_2_DESCRIPTION", "Akali executes a powerful dash to the target direction, dealing <style=cIsDamage>1350% damage</style>. She can dash again, but this time in the target direction dealing the same amount to all enemies she passes through. Enemies hit with health lower than <style=cIsDamage>15%</style> are instantly <style=cIsHealth>executed</style>.");
		special = (SkillDef)(object)ScriptableObject.CreateInstance<AkaliSkillDef>();
		special.activationState = new SerializableEntityStateType(typeof(Special));
		special.activationStateMachineName = "Body";
		special.baseMaxStock = 1;
		special.baseRechargeInterval = 12f;
		special.beginSkillCooldownOnSkillEnd = true;
		special.canceledFromSprinting = false;
		special.fullRestockOnAssign = false;
		special.interruptPriority = (InterruptPriority)0;
		special.isCombatSkill = true;
		special.mustKeyPress = true;
		special.cancelSprintingOnActivation = false;
		special.rechargeStock = 1;
		special.requiredStock = 1;
		special.stockToConsume = 1;
		special.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("special");
		special.skillDescriptionToken = "AKALI_SPEC_DESCRIPTION";
		special.skillName = "AKALI_SPEC";
		special.skillNameToken = "AKALI_SPEC";
		ContentAddition.AddSkillDef(special);
		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 = special
		};
		((Variant)(ref val2)).viewableNode = new Node(special.skillNameToken, false, (Node)null);
		variants[0] = val2;
		ContentAddition.AddSkillFamily(skillFamily);
		specialCast = ScriptableObject.CreateInstance<SkillDef>();
		specialCast.activationState = new SerializableEntityStateType(typeof(SpecialSecondCast));
		specialCast.activationStateMachineName = "Body";
		specialCast.baseMaxStock = 1;
		specialCast.baseRechargeInterval = 0f;
		specialCast.beginSkillCooldownOnSkillEnd = true;
		specialCast.canceledFromSprinting = false;
		specialCast.fullRestockOnAssign = false;
		specialCast.interruptPriority = (InterruptPriority)0;
		specialCast.isCombatSkill = true;
		specialCast.mustKeyPress = true;
		specialCast.cancelSprintingOnActivation = false;
		specialCast.rechargeStock = 0;
		specialCast.requiredStock = 0;
		specialCast.stockToConsume = 0;
		specialCast.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("special2");
		specialCast.skillDescriptionToken = "AKALI_SPEC_2_DESCRIPTION";
		specialCast.skillName = "AKALI_SPEC";
		specialCast.skillNameToken = "AKALI_SPEC";
	}
}
internal class Prefabs
{
	internal static GameObject kunaiBaseProjectileGhost;

	internal static GameObject kunaiBaseProjectile;

	internal static GameObject kunaiSkin04ProjectileGhost;

	internal static GameObject kunaiSkin04Projectile;

	internal static GameObject kunaiSkin12ProjectileGhost;

	internal static GameObject kunaiSkin12Projectile;

	internal static GameObject kunaiSkin15ProjectileGhost;

	internal static GameObject kunaiSkin15Projectile;

	internal static GameObject kunaiSkin16ProjectileGhost;

	internal static GameObject kunaiSkin16Projectile;

	internal static GameObject shurikenBaseProjectileGhost;

	internal static GameObject shurikenBaseProjectile;

	internal static GameObject shurikenSkin04ProjectileGhost;

	internal static GameObject shurikenSkin04Projectile;

	internal static GameObject shurikenSkin12ProjectileGhost;

	internal static GameObject shurikenSkin12Projectile;

	internal static GameObject shurikenSkin15ProjectileGhost;

	internal static GameObject shurikenSkin15Projectile;

	internal static GameObject shurikenSkin16ProjectileGhost;

	internal static GameObject shurikenSkin16Projectile;

	internal static GameObject akaliIndicator;

	internal static GameObject akaliSkin04Indicator;

	internal static GameObject akaliSkin12Indicator;

	internal static GameObject akaliSkin15Indicator;

	internal static GameObject akaliSkin16Indicator;

	internal static GameObject baseImpactEffect;

	internal static GameObject skin12ImpactEffect;

	internal static GameObject skin15ImpactEffect;

	internal static GameObject skin16ImpactEffect;

	internal static GameObject baseUltImpactEffect;

	internal static GameObject skin12UltImpactEffect;

	internal static GameObject skin15UltImpactEffect;

	internal static GameObject skin16UltImpactEffect;

	internal static GameObject baseExecuteImpactEffect;

	internal static GameObject skin12ExecuteImpactEffect;

	internal static GameObject skin15ExecuteImpactEffect;

	internal static GameObject skin16ExecuteImpactEffect;

	internal static GameObject basePassiveIndicator;

	internal static GameObject skin04PassiveIndicator;

	internal static GameObject skin12PassiveIndicator;

	internal static GameObject skin15PassiveIndicator;

	internal static GameObject skin16PassiveIndicator;

	internal static GameObject baseSmokeEffect;

	internal static GameObject skin04SmokeEffect;

	internal static GameObject skin12SmokeEffect;

	internal static GameObject skin15SmokeEffect;

	internal static GameObject skin16SmokeEffect;

	internal static GameObject baseUltSmokeEffect;

	internal static GameObject skin04UltSmokeEffect;

	internal static GameObject skin12UltSmokeEffect;

	internal static GameObject skin15UltSmokeEffect;

	internal static GameObject skin16UltSmokeEffect;

	internal static GameObject baseUltMuzzleFlash;

	internal static GameObject skin04UltMuzzleFlash;

	internal static GameObject skin12UltMuzzleFlash;

	internal static GameObject skin15UltMuzzleFlash;

	internal static GameObject skin16UltMuzzleFlash;

	internal static GameObject basePassiveProcEffect;

	internal static GameObject skin04PassiveProcEffect;

	internal static GameObject skin12PassiveProcEffect;

	internal static GameObject skin15PassiveProcEffect;

	internal static GameObject skin16PassiveProcEffect;

	internal static GameObject basePassiveBuffEffect;

	internal static GameObject skin04PassiveBuffEffect;

	internal static GameObject skin12PassiveBuffEffect;

	internal static GameObject skin15PassiveBuffEffect;

	internal static GameObject skin16PassiveBuffEffect;

	internal static ModdedDamageType kunai;

	internal static BuffDef invis;

	internal static BuffDef temp;

	internal static BuffDef passive { get; set; }

	internal static BuffDef passiveEmpower { get; set; }

	internal static void CreatePrefabs()
	{
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_0084: Unknown result type (might be due to invalid IL or missing references)
		//IL_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0119: Unknown result type (might be due to invalid IL or missing references)
		//IL_011e: Unknown result type (might be due to invalid IL or missing references)
		//IL_061e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0623: Unknown result type (might be due to invalid IL or missing references)
		//IL_0657: Unknown result type (might be due to invalid IL or missing references)
		//IL_065c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0690: Unknown result type (might be due to invalid IL or missing references)
		//IL_0695: 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_06ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_0702: Unknown result type (might be due to invalid IL or missing references)
		//IL_0707: Unknown result type (might be due to invalid IL or missing references)
		//IL_073b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0740: Unknown result type (might be due to invalid IL or missing references)
		//IL_0774: Unknown result type (might be due to invalid IL or missing references)
		//IL_0779: 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)
		//IL_07b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_07e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_07eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_081f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0824: Unknown result type (might be due to invalid IL or missing references)
		//IL_0858: Unknown result type (might be due to invalid IL or missing references)
		//IL_085d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0891: Unknown result type (might be due to invalid IL or missing references)
		//IL_0896: Unknown result type (might be due to invalid IL or missing references)
		//IL_08ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_08cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_0936: Unknown result type (might be due to invalid IL or missing references)
		//IL_0940: Unknown result type (might be due to invalid IL or missing references)
		//IL_0960: Unknown result type (might be due to invalid IL or missing references)
		//IL_0965: Unknown result type (might be due to invalid IL or missing references)
		//IL_09cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_09d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_09f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_09fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a62: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a6c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a8c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a91: Unknown result type (might be due to invalid IL or missing references)
		//IL_0af8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b02: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b22: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b27: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b8e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b98: Unknown result type (might be due to invalid IL or missing references)
		temp = ScriptableObject.CreateInstance<BuffDef>();
		temp.isHidden = true;
		ContentAddition.AddBuffDef(temp);
		invis = ScriptableObject.CreateInstance<BuffDef>();
		invis.buffColor = Color.white;
		invis.iconSprite = Assets.MainAssetBundle.LoadAsset<Sprite>("utility");
		invis.canStack = false;
		invis.isDebuff = false;
		ContentAddition.AddBuffDef(invis);
		passive = ScriptableObject.CreateInstance<BuffDef>();
		passive.buffColor = Color.white;
		passive.iconSprite = Assets.MainAssetBundle.LoadAsset<Sprite>("passive");
		passive.canStack = true;
		passive.isDebuff = false;
		ContentAddition.AddBuffDef(passive);
		passiveEmpower = ScriptableObject.CreateInstance<BuffDef>();
		passiveEmpower.buffColor = Color.white;
		passiveEmpower.iconSprite = null;
		passiveEmpower.canStack = false;
		passiveEmpower.isDebuff = false;
		passiveEmpower.isHidden = true;
		ContentAddition.AddBuffDef(passiveEmpower);
		kunai = DamageAPI.ReserveDamageType();
		akaliIndicator = Utils.NewIndicator("trackerIcon");
		akaliSkin04Indicator = Utils.NewIndicator("skin04TrackerIcon");
		akaliSkin12Indicator = Utils.NewIndicator("skin12TrackerIcon");
		akaliSkin15Indicator = Utils.NewIndicator("skin15TrackerIcon");
		akaliSkin16Indicator = Utils.NewIndicator("skin16TrackerIcon");
		kunaiBaseProjectileGhost = Utils.NewProjectileGhost("baseWeapon");
		kunaiSkin04ProjectileGhost = Utils.NewProjectileGhost("skin04Weapon");
		kunaiSkin12ProjectileGhost = Utils.NewProjectileGhost("skin12Weapon");
		kunaiSkin15ProjectileGhost = Utils.NewProjectileGhost("skin15Weapon");
		kunaiSkin16ProjectileGhost = Utils.NewProjectileGhost("skin16Weapon");
		baseSmokeEffect = Utils.NewSmokeIndicator("baseSmokeEffect");
		skin04SmokeEffect = Utils.NewSmokeIndicator("skin04SmokeEffect");
		skin12SmokeEffect = Utils.NewSmokeIndicator("skin12SmokeEffect");
		skin15SmokeEffect = Utils.NewSmokeIndicator("skin15SmokeEffect");
		skin16SmokeEffect = Utils.NewSmokeIndicator("skin16SmokeEffect");
		baseUltSmokeEffect = Assets.MainAssetBundle.LoadAsset<GameObject>("baseUltSmoke");
		skin04UltSmokeEffect = Assets.MainAssetBundle.LoadAsset<GameObject>("skin04UltSmoke");
		skin12UltSmokeEffect = Assets.MainAssetBundle.LoadAsset<GameObject>("skin12UltSmoke");
		skin15UltSmokeEffect = Assets.MainAssetBundle.LoadAsset<GameObject>("skin15UltSmoke");
		skin16UltSmokeEffect = Assets.MainAssetBundle.LoadAsset<GameObject>("skin16UltSmoke");
		baseUltMuzzleFlash = Utils.RegisterEffect(Assets.MainAssetBundle.LoadAsset<GameObject>("baseUltMuzzleFlash"), 1f);
		skin04UltMuzzleFlash = Utils.RegisterEffect(Assets.MainAssetBundle.LoadAsset<GameObject>("skin04UltMuzzleFlash"), 1f);
		skin12UltMuzzleFlash = Utils.RegisterEffect(Assets.MainAssetBundle.LoadAsset<GameObject>("skin12UltMuzzleFlash"), 1f);
		skin15UltMuzzleFlash = Utils.RegisterEffect(Assets.MainAssetBundle.LoadAsset<GameObject>("skin15UltMuzzleFlash"), 1f);
		skin16UltMuzzleFlash = Utils.RegisterEffect(Assets.MainAssetBundle.LoadAsset<GameObject>("skin16UltMuzzleFlash"), 1f);
		basePassiveProcEffect = Utils.RegisterEffect(Assets.MainAssetBundle.LoadAsset<GameObject>("basePassiveProcEffect"), 1f);
		skin04PassiveProcEffect = Utils.RegisterEffect(Assets.MainAssetBundle.LoadAsset<GameObject>("skin04PassiveProcEffect"), 1f);
		skin12PassiveProcEffect = Utils.RegisterEffect(Assets.MainAssetBundle.LoadAsset<GameObject>("skin12PassiveProcEffect"), 1f);
		skin15PassiveProcEffect = Utils.RegisterEffect(Assets.MainAssetBundle.LoadAsset<GameObject>("skin15PassiveProcEffect"), 1f);
		skin16PassiveProcEffect = Utils.RegisterEffect(Assets.MainAssetBundle.LoadAsset<GameObject>("skin16PassiveProcEffect"), 1f);
		basePassiveBuffEffect = Assets.MainAssetBundle.LoadAsset<GameObject>("basePassiveBuffEffect");
		skin04PassiveBuffEffect = Assets.MainAssetBundle.LoadAsset<GameObject>("skin04PassiveBuffEffect");
		skin12PassiveBuffEffect = Assets.MainAssetBundle.LoadAsset<GameObject>("skin12PassiveBuffEffect");
		skin15PassiveBuffEffect = Assets.MainAssetBundle.LoadAsset<GameObject>("skin15PassiveBuffEffect");
		skin16PassiveBuffEffect = Assets.MainAssetBundle.LoadAsset<GameObject>("skin16PassiveBuffEffect");
		kunaiBaseProjectile = Utils.NewProjectile(kunaiBaseProjectileGhost, "KunaiBaseProjectile");
		kunaiBaseProjectile.GetComponent<ProjectileSingleTargetImpact>().impactEffect = baseImpactEffect;
		kunaiSkin04Projectile = Utils.NewProjectile(kunaiSkin04ProjectileGhost, "KunaiSkin04Projectile");
		kunaiSkin04Projectile.GetComponent<ProjectileSingleTargetImpact>().impactEffect = baseImpactEffect;
		kunaiSkin12Projectile = Utils.NewProjectile(kunaiSkin12ProjectileGhost, "KunaiSkin12Projectile");
		kunaiSkin12Projectile.GetComponent<ProjectileSingleTargetImpact>().impactEffect = skin12ImpactEffect;
		kunaiSkin15Projectile = Utils.NewProjectile(kunaiSkin15ProjectileGhost, "KunaiSkin15Projectile");
		kunaiSkin15Projectile.GetComponent<ProjectileSingleTargetImpact>().impactEffect = skin15ImpactEffect;
		kunaiSkin16Projectile = Utils.NewProjectile(kunaiSkin16ProjectileGhost, "KunaiSkin16Projectile");
		kunaiSkin16Projectile.GetComponent<ProjectileSingleTargetImpact>().impactEffect = skin16ImpactEffect;
		shurikenBaseProjectileGhost = Utils.NewShurikenProjectileGhost("baseShuriken");
		shurikenSkin04ProjectileGhost = Utils.NewShurikenProjectileGhost("skin04Shuriken");
		shurikenSkin12ProjectileGhost = Utils.NewShurikenProjectileGhost("skin12Shuriken");
		shurikenSkin15ProjectileGhost = Utils.NewShurikenProjectileGhost("skin15Shuriken");
		shurikenSkin16ProjectileGhost = Utils.NewShurikenProjectileGhost("skin16Shuriken");
		shurikenBaseProjectile = Utils.NewShurikenProjectile(shurikenBaseProjectileGhost, "ShurikenBaseProjectile");
		shurikenBaseProjectile.GetComponent<ProjectileSingleTargetImpact>().impactEffect = baseImpactEffect;
		shurikenSkin04Projectile = Utils.NewShurikenProjectile(shurikenSkin04ProjectileGhost, "ShurikenSkin04Projectile");
		shurikenSkin04Projectile.GetComponent<ProjectileSingleTargetImpact>().impactEffect = baseImpactEffect;
		shurikenSkin12Projectile = Utils.NewShurikenProjectile(shurikenSkin12ProjectileGhost, "ShurikenSkin12Projectile");
		shurikenSkin12Projectile.GetComponent<ProjectileSingleTargetImpact>().impactEffect = skin12ImpactEffect;
		shurikenSkin15Projectile = Utils.NewShurikenProjectile(shurikenSkin15ProjectileGhost, "ShurikenSkin15Projectile");
		shurikenSkin15Projectile.GetComponent<ProjectileSingleTargetImpact>().impactEffect = skin15ImpactEffect;
		shurikenSkin16Projectile = Utils.NewShurikenProjectile(shurikenSkin16ProjectileGhost, "ShurikenSkin16Projectile");
		shurikenSkin16Projectile.GetComponent<ProjectileSingleTargetImpact>().impactEffect = skin16ImpactEffect;
		baseImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFX.prefab").WaitForCompletion(), "AkaliBaseProjectileImpact", true);
		Utils.RegisterEffect(baseImpactEffect, 1f, "Play_Akali_Base_Q_Hit");
		skin12ImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFX.prefab").WaitForCompletion(), "AkaliSkin12ProjectileImpact", true);
		Utils.RegisterEffect(skin12ImpactEffect, 1f, "Play_Akali_Skin12_Q_Hit");
		skin15ImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFX.prefab").WaitForCompletion(), "AkaliSkin15ProjectileImpact", true);
		Utils.RegisterEffect(skin15ImpactEffect, 1f, "Play_Akali_Skin15_Q_Hit");
		skin16ImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFX.prefab").WaitForCompletion(), "AkaliSkin16ProjectileImpact", true);
		Utils.RegisterEffect(skin16ImpactEffect, 1f, "Play_Akali_Skin16_Q_Hit");
		baseUltImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFXLarge.prefab").WaitForCompletion(), "AkaliBaseUltImpactEffect", true);
		Utils.RegisterEffect(baseUltImpactEffect, 1f, "Play_Akali_Base_R_Hit");
		skin12UltImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFXLarge.prefab").WaitForCompletion(), "AkaliSkin12UltImpactEffect", true);
		Utils.RegisterEffect(skin12UltImpactEffect, 1f, "Play_Akali_Skin12_R_Hit");
		skin15UltImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFXLarge.prefab").WaitForCompletion(), "AkaliSkin15UltImpactEffect", true);
		Utils.RegisterEffect(skin15UltImpactEffect, 1f, "Play_Akali_Skin15_R_Hit");
		skin16UltImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFXLarge.prefab").WaitForCompletion(), "AkaliSkin16UltImpactEffect", true);
		Utils.RegisterEffect(skin16UltImpactEffect, 1f, "Play_Akali_Skin16_R_Hit");
		baseExecuteImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/CritsparkHeavy.prefab").WaitForCompletion(), "AkaliBaseExecuteImpactEffect", true);
		Utils.RegisterEffect(baseExecuteImpactEffect, 1f, "Play_Akali_Base_Execute");
		skin12ExecuteImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/CritsparkHeavy.prefab").WaitForCompletion(), "AkaliSkin12ExecuteImpactEffect", true);
		Utils.RegisterEffect(skin12ExecuteImpactEffect, 1f, "Play_Akali_Skin12_Execute");
		skin15ExecuteImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/CritsparkHeavy.prefab").WaitForCompletion(), "AkaliSkin15ExecuteImpactEffect", true);
		Utils.RegisterEffect(skin15ExecuteImpactEffect, 1f, "Play_Akali_Skin15_Execute");
		skin16ExecuteImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/CritsparkHeavy.prefab").WaitForCompletion(), "AkaliSkin16ExecuteImpactEffect", true);
		Utils.RegisterEffect(skin16ExecuteImpactEffect, 1f, "Play_Akali_Skin16_Execute");
		basePassiveIndicator = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab").WaitForCompletion(), "AkaliBasePassiveAreaIndicator", false);
		((Component)Array.Find(basePassiveIndicator.GetComponentsInChildren<MeshRenderer>(), (MeshRenderer element) => ((Object)element).name == "Sphere")).gameObject.SetActive(false);
		basePassiveIndicator.AddComponent<RadialIndicatorRotationBehaviour>();
		basePassiveIndicator.transform.localScale = Vector3.one * 45f;
		Utils.NewIndicatorSprite(basePassiveIndicator, "base_passive_indicator");
		skin04PassiveIndicator = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab").WaitForCompletion(), "AkaliSkin04PassiveAreaIndicator", false);
		((Component)Array.Find(skin04PassiveIndicator.GetComponentsInChildren<MeshRenderer>(), (MeshRenderer element) => ((Object)element).name == "Sphere")).gameObject.SetActive(false);
		skin04PassiveIndicator.AddComponent<RadialIndicatorRotationBehaviour>();
		skin04PassiveIndicator.transform.localScale = Vector3.one * 45f;
		Utils.NewIndicatorSprite(skin04PassiveIndicator, "skin04_passive_indicator");
		skin12PassiveIndicator = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab").WaitForCompletion(), "AkaliSkin12PassiveAreaIndicator", false);
		((Component)Array.Find(skin12PassiveIndicator.GetComponentsInChildren<MeshRenderer>(), (MeshRenderer element) => ((Object)element).name == "Sphere")).gameObject.SetActive(false);
		skin12PassiveIndicator.AddComponent<RadialIndicatorRotationBehaviour>();
		skin12PassiveIndicator.transform.localScale = Vector3.one * 45f;
		Utils.NewIndicatorSprite(skin12PassiveIndicator, "skin12_passive_indicator");
		skin15PassiveIndicator = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab").WaitForCompletion(), "AkaliSkin15PassiveAreaIndicator", false);
		((Component)Array.Find(skin15PassiveIndicator.GetComponentsInChildren<MeshRenderer>(), (MeshRenderer element) => ((Object)element).name == "Sphere")).gameObject.SetActive(false);
		skin15PassiveIndicator.AddComponent<RadialIndicatorRotationBehaviour>();
		skin15PassiveIndicator.transform.localScale = Vector3.one * 45f;
		Utils.NewIndicatorSprite(skin15PassiveIndicator, "skin15_passive_indicator");
		skin16PassiveIndicator = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab").WaitForCompletion(), "AkaliSkin16PassiveAreaIndicator", false);
		((Component)Array.Find(skin16PassiveIndicator.GetComponentsInChildren<MeshRenderer>(), (MeshRenderer element) => ((Object)element).name == "Sphere")).gameObject.SetActive(false);
		skin16PassiveIndicator.AddComponent<RadialIndicatorRotationBehaviour>();
		skin16PassiveIndicator.transform.localScale = Vector3.one * 45f;
		Utils.NewIndicatorSprite(skin16PassiveIndicator, "skin16_passive_indicator");
	}
}
internal class AkaliBaseState : BaseSkillState
{
	public GameObject kunaiPrefab;

	public GameObject shurikenPrefab;

	public AkaliBehaviour akaliBehaviour;

	public AkaliTrackerBehaviour behaviour;

	public uint primaryCastID;

	public uint secondaryCastID;

	public uint jumpCastID;

	public uint utilityCastID;

	public uint specialCastID;

	public uint special2CastID;

	public GameObject projectileImpactEffect;

	public GameObject ultImpactEffect;

	public GameObject executeImpactEffect;

	public GameObject ultDashEffect;

	public GameObject ultDashMuzzleFlash;

	public GameObject ultDashEffectInstance;

	public GameObject utilitySmokeEffect;

	public override void OnEnter()
	{
		((BaseState)this).OnEnter();
		behaviour = ((EntityState)this).GetComponent<AkaliTrackerBehaviour>();
		akaliBehaviour = ((EntityState)this).GetComponent<AkaliBehaviour>();
		switch (((EntityState)this).characterBody.skinIndex)
		{
		default:
			kunaiPrefab = Prefabs.kunaiBaseProjectile;
			shurikenPrefab = Prefabs.shurikenBaseProjectile;
			primaryCastID = Sounds.Play_Akali_Base_Q_Cast;
			secondaryCastID = Sounds.Play_Akali_Base_E_Mis;
			jumpCastID = Sounds.Play_Akali_Base_E_Cast;
			utilityCastID = Sounds.Play_Akali_Base_W_Cast;
			specialCastID = Sounds.Play_Akali_Base_R1_Cast;
			special2CastID = Sounds.Play_Akali_Base_R2_Cast;
			projectileImpactEffect = Prefabs.baseImpactEffect;
			ultImpactEffect = Prefabs.baseUltImpactEffect;
			executeImpactEffect = Prefabs.baseExecuteImpactEffect;
			ultDashEffect = Prefabs.baseUltSmokeEffect;
			ultDashMuzzleFlash = Prefabs.baseUltMuzzleFlash;
			utilitySmokeEffect = Prefabs.baseSmokeEffect;
			break;
		case 4u:
			kunaiPrefab = Prefabs.kunaiSkin04Projectile;
			shurikenPrefab = Prefabs.shurikenSkin04Projectile;
			ultDashEffect = Prefabs.skin04UltSmokeEffect;
			ultDashMuzzleFlash = Prefabs.skin04UltMuzzleFlash;
			utilitySmokeEffect = Prefabs.skin04SmokeEffect;
			break;
		case 12u:
			kunaiPrefab = Prefabs.kunaiSkin12Projectile;
			shurikenPrefab = Prefabs.shurikenSkin12Projectile;
			primaryCastID = Sounds.Play_Akali_Skin12_Q_Cast;
			secondaryCastID = Sounds.Play_Akali_Skin12_E_Mis;
			jumpCastID = Sounds.Play_Akali_Skin12_E_Cast;
			utilityCastID = Sounds.Play_Akali_Skin12_W_Cast;
			specialCastID = Sounds.Play_Akali_Skin12_R1_Cast;
			special2CastID = Sounds.Play_Akali_Skin12_R2_Cast;
			projectileImpactEffect = Prefabs.skin12ImpactEffect;
			ultImpactEffect = Prefabs.skin12UltImpactEffect;
			executeImpactEffect = Prefabs.skin12ExecuteImpactEffect;
			ultDashEffect = Prefabs.skin12UltSmokeEffect;
			ultDashMuzzleFlash = Prefabs.skin12UltMuzzleFlash;
			utilitySmokeEffect = Prefabs.skin12SmokeEffect;
			break;
		case 9u:
		case 10u:
		case 15u:
			kunaiPrefab = Prefabs.kunaiSkin15Projectile;
			shurikenPrefab = Prefabs.shurikenSkin15Projectile;
			primaryCastID = Sounds.Play_Akali_Skin15_Q_Cast;
			secondaryCastID = Sounds.Play_Akali_Skin15_E_Mis;
			jumpCastID = Sounds.Play_Akali_Skin15_E_Cast;
			utilityCastID = Sounds.Play_Akali_Skin15_W_Cast;
			specialCastID = Sounds.Play_Akali_Skin15_R1_Cast;
			special2CastID = Sounds.Play_Akali_Skin15_R2_Cast;
			projectileImpactEffect = Prefabs.skin15ImpactEffect;
			ultImpactEffect = Prefabs.skin15UltImpactEffect;
			executeImpactEffect = Prefabs.skin15ExecuteImpactEffect;
			ultDashEffect = Prefabs.skin15UltSmokeEffect;
			ultDashMuzzleFlash = Prefabs.skin15UltMuzzleFlash;
			utilitySmokeEffect = Prefabs.skin15SmokeEffect;
			break;
		case 16u:
			kunaiPrefab = Prefabs.kunaiSkin16Projectile;
			shurikenPrefab = Prefabs.shurikenSkin16Projectile;
			primaryCastID = Sounds.Play_Akali_Skin16_Q_Cast;
			secondaryCastID = Sounds.Play_Akali_Skin16_E_Mis;
			jumpCastID = Sounds.Play_Akali_Skin16_E_Cast;
			utilityCastID = Sounds.Play_Akali_Skin16_W_Cast;
			specialCastID = Sounds.Play_Akali_Skin16_R1_Cast;
			special2CastID = Sounds.Play_Akali_Skin16_R2_Cast;
			projectileImpactEffect = Prefabs.skin16ImpactEffect;
			ultImpactEffect = Prefabs.skin16UltImpactEffect;
			executeImpactEffect = Prefabs.skin16ExecuteImpactEffect;
			ultDashEffect = Prefabs.skin16UltSmokeEffect;
			ultDashMuzzleFlash = Prefabs.skin16UltMuzzleFlash;
			utilitySmokeEffect = Prefabs.skin16SmokeEffect;
			break;
		}
	}

	public void SpawnUltDashEffect()
	{
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		ultDashEffectInstance = Object.Instantiate<GameObject>(ultDashEffect, ((BaseState)this).FindModelChild("effectMuzzle"));
		ultDashEffectInstance.transform.localPosition = Vector3.zero;
	}

	public void DestroyUltDashEffect()
	{
		if (Object.op_Implicit((Object)(object)ultDashEffectInstance))
		{
			EntityState.Destroy((Object)(object)ultDashEffectInstance);
		}
	}
}
internal class AkaliSkillDef : SkillDef
{
	private class InstanceData : BaseSkillInstanceData
	{
		public AkaliTrackerBehaviour behaviour;
	}

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

	internal static bool IsExecutable([NotNull] GenericSkill skillSlot)
	{
		AkaliTrackerBehaviour behaviour = ((InstanceData)(object)skillSlot.skillInstanceData).behaviour;
		return behaviour.target && !skillSlot.HasSkillOverrideOfPriority((SkillOverridePriority)4);
	}

	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 CharacterMain : GenericCharacterMain
{
	private Sprite primary = Assets.MainAssetBundle.LoadAsset<Sprite>("primary");

	private Sprite primary2 = Assets.MainAssetBundle.LoadAsset<Sprite>("primary2");

	private Sprite secondary = Assets.MainAssetBundle.LoadAsset<Sprite>("secondary");

	private Sprite secondary2 = Assets.MainAssetBundle.LoadAsset<Sprite>("secondary2");

	private Sprite special = Assets.MainAssetBundle.LoadAsset<Sprite>("special");

	private Sprite specialCast = Assets.MainAssetBundle.LoadAsset<Sprite>("special2");

	private Sprite special2 = Assets.MainAssetBundle.LoadAsset<Sprite>("specialEx");

	private Sprite specialCast2 = Assets.MainAssetBundle.LoadAsset<Sprite>("special2Ex");

	private bool hasBuff => ((EntityState)this).characterBody.HasBuff(Prefabs.passiveEmpower);

	public override void FixedUpdate()
	{
		((GenericCharacterMain)this).FixedUpdate();
		if (((EntityState)this).characterBody.hasEffectiveAuthority)
		{
			if (hasBuff)
			{
				MainPlugin.primary.icon = primary2;
				MainPlugin.secondary.icon = secondary2;
				MainPlugin.special.icon = special2;
				MainPlugin.specialCast.icon = specialCast2;
			}
			else
			{
				MainPlugin.primary.icon = primary;
				MainPlugin.secondary.icon = secondary;
				MainPlugin.special.icon = special;
				MainPlugin.specialCast.icon = specialCast;
			}
		}
	}
}
internal class Primary : AkaliBaseState
{
	public float duration;

	public float baseDuration = 0.55f;

	public float delay;

	public float baseDelay = 0.15f;

	public float damageCoefficient = 1f;

	public bool hasFired;

	public string layer = "FullBody, Override";

	public string state = "Primary";

	public string param = "M1";

	public int additionalProjectileCount;

	public float hopVelocity = 2.5f;

	public float spread = 4f;

	public override void OnEnter()
	{
		base.OnEnter();
		if (((EntityState)this).characterBody.HasBuff(Prefabs.passiveEmpower))
		{
			damageCoefficient = 1.5f;
		}
		akaliBehaviour.RemoveBuff();
		additionalProjectileCount = Mathf.CeilToInt(3f * ((BaseState)this).attackSpeedStat);
		((BaseState)this).StartAimMode(2f, false);
		duration = baseDuration / ((BaseState)this).attackSpeedStat;
		delay = baseDelay / ((BaseState)this).attackSpeedStat;
		((EntityState)this).PlayAnimation(layer, state, param, duration, 0f);
		((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity);
	}

	protected virtual void PlaySound()
	{
		AkSoundEngine.PostEvent(primaryCastID, ((EntityState)this).gameObject);
	}

	public override void FixedUpdate()
	{
		((EntityState)this).FixedUpdate();
		((EntityState)this).characterBody.isSprinting = false;
		if (((EntityState)this).fixedAge >= delay && !hasFired)
		{
			hasFired = true;
			FireProjectiles();
		}
		if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
	}

	private void FireProjectiles()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Expected O, but got Unknown
		//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_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_004f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_005c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_0062: Unknown result type (might be due to invalid IL or missing references)
		//IL_0067: Unknown result type (might be due to invalid IL or missing references)
		//IL_0088: 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_0091: Unknown result type (might be due to invalid IL or missing references)
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		//IL_009f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
		PlaySound();
		EffectData val = new EffectData
		{
			scale = 0.3f,
			rotation = Quaternion.Euler(90f, -15f, 0f)
		};
		if (((EntityState)this).isAuthority)
		{
			Ray aimRay = ((BaseState)this).GetAimRay();
			Vector3 val2 = Vector3.Cross(Vector3.up, ((Ray)(ref aimRay)).direction);
			Vector3 val3 = Vector3.Cross(((Ray)(ref aimRay)).direction, val2);
			float num = spread;
			float num2 = num / (float)(additionalProjectileCount - 1);
			Vector3 val4 = Quaternion.AngleAxis((0f - num) * 0.5f, val3) * ((Ray)(ref aimRay)).direction;
			Quaternion val5 = Quaternion.AngleAxis(num2, val3);
			Ray val6 = default(Ray);
			((Ray)(ref val6))..ctor(((Ray)(ref aimRay)).origin, val4);
			for (int i = 0; i < additionalProjectileCount; i++)
			{
				NewProjectile(((Ray)(ref val6)).direction, aimRay);
				((Ray)(ref val6)).direction = val5 * ((Ray)(ref val6)).direction;
			}
		}
	}

	protected virtual void NewProjectile(Vector3 direction, Ray aimRay)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		ProjectileManager.instance.FireProjectile(kunaiPrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(direction), ((EntityState)this).gameObject, ((EntityState)this).characterBody.damage * damageCoefficient, 120f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f);
	}

	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 Secondary : Primary
{
	public float speedCoefficient = 120f;

	public Vector3 direction;

	private uint ID;

	public override void OnEnter()
	{
		//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
		state = "Secondary";
		param = layer;
		baseDuration = 0.4f;
		baseDelay = 0.1f;
		hopVelocity = 18f;
		spread = 12f;
		base.OnEnter();
		if (((EntityState)this).characterBody.HasBuff(Prefabs.passiveEmpower))
		{
			damageCoefficient = 2.25f;
		}
		else
		{
			damageCoefficient = 1.5f;
		}
		akaliBehaviour.RemoveBuff();
		duration = baseDuration;
		delay = baseDelay;
		additionalProjectileCount = 5;
		direction = -((EntityState)this).inputBank.aimDirection;
		AkSoundEngine.PostEvent(jumpCastID, ((EntityState)this).gameObject);
	}

	protected override void PlaySound()
	{
		ID = AkSoundEngine.PostEvent(jumpCastID, ((EntityState)this).gameObject);
	}

	protected override void NewProjectile(Vector3 direction, Ray aimRay)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		ProjectileManager.instance.FireProjectile(shurikenPrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(direction), ((EntityState)this).gameObject, ((EntityState)this).characterBody.damage * damageCoefficient, 120f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 220f);
	}

	public override void FixedUpdate()
	{
		//IL_0043: 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_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_006b: 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)
		base.FixedUpdate();
		if (((EntityState)this).fixedAge <= duration - delay && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).inputBank))
		{
			((EntityState)this).characterMotor.velocity = Vector3.zero;
			CharacterMotor characterMotor = ((EntityState)this).characterMotor;
			characterMotor.rootMotion += direction * (speedCoefficient * Time.fixedDeltaTime);
		}
	}

	public override void OnExit()
	{
		base.OnExit();
		AkSoundEngine.StopPlayingID(ID);
	}

	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 SpecialDash : AkaliBaseState
{
	public float duration = 0.25f;

	public Vector3 dashVector;

	public float speedCoefficient = 360f;

	public override void OnEnter()
	{
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
		base.OnEnter();
		((EntityState)this).PlayAnimation("Ult, Override", "special", "Special", duration, 0f);
		((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal;
		if (NetworkServer.active)
		{
			((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility);
		}
		if (((EntityState)this).isAuthority)
		{
			((BaseState)this).SmallHop(((EntityState)this).characterMotor, 12f);
		}
		if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams))
		{
		}
		EffectManager.SimpleEffect(ultDashMuzzleFlash, ((EntityState)this).characterBody.corePosition, Util.QuaternionSafeLookRotation(((EntityState)this).characterDirection.forward, Vector3.up), false);
		SpawnUltDashEffect();
	}

	public override void FixedUpdate()
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: 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_003c: 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_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0062: 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_00c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: 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(dashVector);
			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;
			}
		}
		if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
		if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
		{
			CharacterMotor characterMotor = ((EntityState)this).characterMotor;
			characterMotor.rootMotion += dashVector * (speedCoefficient * Time.fixedDeltaTime);
		}
	}

	public override void OnExit()
	{
		((EntityState)this).OnExit();
		DestroyUltDashEffect();
		if (NetworkServer.active)
		{
			((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility);
			((EntityState)this).characterBody.RemoveBuff(Prefabs.passiveEmpower);
		}
		((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal;
	}
}
internal class Special : SpecialDash
{
	private HurtBox target;

	private float damageCoefficient;

	private bool hasHit = false;

	public override void OnEnter()
	{
		//IL_0081: Unknown result type (might be due to invalid IL or missing references)
		//IL_008c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0091: Unknown result type (might be due to invalid IL or missing references)
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		base.OnEnter();
		if (((EntityState)this).characterBody.HasBuff(Prefabs.passiveEmpower))
		{
			damageCoefficient = 13.5f;
		}
		else
		{
			damageCoefficient = 9f;
		}
		akaliBehaviour.RemoveBuff();
		if (Object.op_Implicit((Object)(object)behaviour) && behaviour.target)
		{
			target = ((HuntressTracker)behaviour).GetTrackingTarget();
			Vector3 val = ((Component)target).transform.position - ((EntityState)this).transform.position;
			dashVector = ((Vector3)(ref val)).normalized;
		}
		AkSoundEngine.PostEvent(specialCastID, ((EntityState)this).gameObject);
	}

	public override void FixedUpdate()
	{
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0100: Unknown result type (might be due to invalid IL or missing references)
		//IL_0101: Unknown result type (might be due to invalid IL or missing references)
		//IL_0108: Expected O, but got Unknown
		//IL_0138: 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_0151: Unknown result type (might be due to invalid IL or missing references)
		//IL_0165: Unknown result type (might be due to invalid IL or missing references)
		//IL_0166: Unknown result type (might be due to invalid IL or missing references)
		//IL_016e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0176: Unknown result type (might be due to invalid IL or missing references)
		//IL_017b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0182: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
		base.FixedUpdate();
		if (Object.op_Implicit((Object)(object)target) && Object.op_Implicit((Object)(object)target.healthComponent) && Object.op_Implicit((Object)(object)target.healthComponent.body) && Vector3.Distance(((EntityState)this).characterBody.corePosition, target.healthComponent.body.corePosition) <= 10f && !hasHit)
		{
			hasHit = true;
			if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.special) && !((EntityState)this).skillLocator.special.HasSkillOverrideOfPriority((SkillOverridePriority)4))
			{
				((EntityState)this).skillLocator.special.SetSkillOverride((object)((EntityState)this).gameObject, MainPlugin.specialCast, (SkillOverridePriority)4);
			}
			if (NetworkServer.active)
			{
				Vector3 corePosition = target.healthComponent.body.corePosition;
				DamageInfo val = new DamageInfo();
				val.damage = ((BaseState)this).damageStat * damageCoefficient;
				val.attacker = ((EntityState)this).gameObject;
				val.inflictor = ((EntityState)this).gameObject;
				val.force = Vector3.zero;
				val.crit = false;
				val.procChainMask = default(ProcChainMask);
				val.procCoefficient = 0f;
				val.position = corePosition;
				val.damageColorIndex = (DamageColorIndex)5;
				val.damageType = DamageTypeCombo.op_Implicit((DamageType)0);
				DamageAPI.AddModdedDamageType(val, Prefabs.kunai);
				target.healthComponent.TakeDamage(val);
				EffectManager.SimpleEffect(ultImpactEffect, corePosition, Quaternion.identity, true);
			}
		}
	}

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

	private float damageCoefficient;

	public override void OnEnter()
	{
		//IL_0067: Unknown result type (might be due to invalid IL or missing references)
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		//IL_006f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		base.OnEnter();
		if (((EntityState)this).characterBody.HasBuff(Prefabs.passiveEmpower))
		{
			damageCoefficient = 13.5f;
			executePercent = 0.15f;
		}
		else
		{
			damageCoefficient = 9f;
			executePercent = 0.08f;
		}
		akaliBehaviour.RemoveBuff();
		speedCoefficient = 480f;
		Ray aimRay = ((BaseState)this).GetAimRay();
		dashVector = ((Ray)(ref aimRay)).direction;
		AkSoundEngine.PostEvent(special2CastID, ((EntityState)this).gameObject);
	}

	public override void FixedUpdate()
	{
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_0184: Unknown result type (might be due to invalid IL or missing references)
		//IL_0189: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0113: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fa: Expected O, but got Unknown
		//IL_022a: Unknown result type (might be due to invalid IL or missing references)
		//IL_022f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0243: Unknown result type (might be due to invalid IL or missing references)
		//IL_0257: Unknown result type (might be due to invalid IL or missing references)
		//IL_0259: Unknown result type (might be due to invalid IL or missing references)
		//IL_0261: Unknown result type (might be due to invalid IL or missing references)
		//IL_0269: Unknown result type (might be due to invalid IL or missing references)
		//IL_026e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0275: Unknown result type (might be due to invalid IL or missing references)
		//IL_0295: Unknown result type (might be due to invalid IL or missing references)
		//IL_0297: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01de: Unknown