Zeri.dll

Decompiled 3 months 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 JetBrains.Annotations;
using KinematicCharacterController;
using On.RoR2;
using On.RoR2.UI;
using R2API;
using R2API.Utils;
using Rewired.ComponentControls.Effects;
using RoR2;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using TMPro;
using ThreeEyedGames;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.UI;

[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.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("Zeri")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Zeri")]
[assembly: AssemblyTitle("Zeri")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Zeri;

internal class Assets
{
	public static AssetBundle MainAssetBundle;

	public static T Load<T>(string name) where T : Object
	{
		return MainAssetBundle.LoadAsset<T>(name);
	}

	public static void PopulateAssets()
	{
		if ((Object)(object)MainAssetBundle == (Object)null)
		{
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Zeri.zeriassets");
			MainAssetBundle = AssetBundle.LoadFromStream(stream);
		}
		using Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("Zeri.Zeri.bnk");
		byte[] array = new byte[stream2.Length];
		stream2.Read(array, 0, array.Length);
		SoundBanks.Add(array);
	}
}
internal class OrbEffectParent : MonoBehaviour
{
	public Transform startTransform;

	private OrbEffect orb;

	public float duration = 0.3f;

	private void Awake()
	{
		orb = ((Component)this).GetComponent<OrbEffect>();
	}

	private void Update()
	{
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)orb) && Object.op_Implicit((Object)(object)startTransform))
		{
			orb.duration = duration;
			orb.startPosition = startTransform.position;
		}
	}
}
internal class ZeriBehaviour : HuntressTracker
{
	private Animator animator;

	private CharacterBody body;

	private SkillLocator skillLocator;

	private SkillDef primary;

	public static SkillDef zap;

	private GameObject chargeBar;

	private TextMeshProUGUI currentCharge;

	private TextMeshProUGUI fullCharge;

	private Image barImage;

	[SerializeField]
	private float chargeValue = 0f;

	private float maxChargeValue = 1f;

	private bool barSetupDone;

	public bool canExecute = true;

	public float passiveChargeTime = 12f;

	public bool dashing;

	private ChildLocator childLocator;

	private SkateSparks skate;

	internal bool maxCharge => chargeValue >= maxChargeValue;

	public float currentChargeValue => chargeValue;

	public void AddCharge(float value)
	{
		if (chargeValue >= 1f)
		{
			return;
		}
		if (value + chargeValue >= 1f)
		{
			chargeValue = 1f;
			if (Object.op_Implicit((Object)(object)zap) && Object.op_Implicit((Object)(object)body))
			{
				body.skillLocator.primary.SetSkillOverride((object)this, zap, (SkillOverridePriority)4);
				AkSoundEngine.PostEvent(Sounds.Play_Zeri_Zap_Gain, ((Component)this).gameObject);
			}
		}
		chargeValue += value;
	}

	public void RemoveCharge(float value)
	{
		chargeValue -= value;
	}

	private void OnEnable()
	{
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Expected O, but got Unknown
		((HuntressTracker)this).OnEnable();
		base.maxTrackingDistance = 70f;
		body = ((Component)this).GetComponent<CharacterBody>();
		skillLocator = body.skillLocator;
		HUD.Update += new hook_Update(HUD_Update);
	}

	private void HUD_Update(orig_Update orig, HUD self)
	{
		//IL_02c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_0664: Unknown result type (might be due to invalid IL or missing references)
		orig.Invoke(self);
		if (Object.op_Implicit((Object)(object)body) && !PauseManager.isPaused)
		{
			if (!Object.op_Implicit((Object)(object)skate) && Object.op_Implicit((Object)(object)body.modelLocator) && Object.op_Implicit((Object)(object)body.modelLocator.modelTransform))
			{
				childLocator = ((Component)body.modelLocator.modelTransform).GetComponent<ChildLocator>();
				skate = ((Component)body.modelLocator.modelTransform).GetComponent<SkateSparks>();
			}
			if (Object.op_Implicit((Object)(object)skate) && Object.op_Implicit((Object)(object)animator))
			{
				bool flag = body.isSprinting || dashing || animator.GetFloat("ultSpeed") == 1f;
				((Component)skate.leftParticleSystem).gameObject.SetActive(flag);
				((Component)skate.rightParticleSystem).gameObject.SetActive(flag);
				((Behaviour)skate).enabled = flag;
			}
			if (!Object.op_Implicit((Object)(object)animator) && Object.op_Implicit((Object)(object)body.modelLocator) && Object.op_Implicit((Object)(object)body.modelLocator.modelTransform))
			{
				animator = ((Component)body.modelLocator.modelTransform).GetComponent<Animator>();
			}
			else
			{
				bool flag2 = body.HasBuff(Prefabs.ult);
				animator.SetFloat("ultSpeed", (float)(flag2 ? 1 : 0));
			}
			if (!Object.op_Implicit((Object)(object)skillLocator))
			{
				skillLocator = body.skillLocator;
			}
			else if (!Object.op_Implicit((Object)(object)primary))
			{
				primary = skillLocator.primary.defaultSkillDef;
			}
			if (Object.op_Implicit((Object)(object)primary))
			{
				bool flag3 = body.HasBuff(Prefabs.ult);
				bool flag4 = body.HasBuff(Prefabs.dash);
				primary.icon = ((!flag3) ? (body.HasBuff(Prefabs.dash) ? Prefabs.burst2 : Prefabs.burst) : (flag4 ? Prefabs.burstR2 : Prefabs.burstR));
			}
			if (Object.op_Implicit((Object)(object)skillLocator))
			{
				base.indicator.active = (Object)(object)skillLocator.primary.skillDef == (Object)(object)zap;
			}
			if (dashing || (body.inputBank.moveVector != Vector3.zero && body.moveSpeed > Mathf.Epsilon))
			{
				AddCharge(maxChargeValue / passiveChargeTime * Time.deltaTime);
			}
		}
		chargeValue = Mathf.Clamp(chargeValue, 0f, maxChargeValue);
		if (Object.op_Implicit((Object)(object)barImage))
		{
			barImage.fillAmount = chargeValue / maxChargeValue;
		}
		if (Object.op_Implicit((Object)(object)currentCharge) && ((TMP_Text)currentCharge).text != chargeValue.ToString())
		{
			((TMP_Text)currentCharge).text = Mathf.CeilToInt(chargeValue * 100f).ToString();
		}
		if (!Object.op_Implicit((Object)(object)self.targetBodyObject) || !((Object)(object)self.targetBodyObject == (Object)(object)((Component)this).gameObject) || !Object.op_Implicit((Object)(object)self.mainUIPanel) || !Util.HasEffectiveAuthority(self.targetBodyObject.GetComponent<NetworkIdentity>()) || Object.op_Implicit((Object)(object)chargeBar))
		{
			return;
		}
		HealthBar componentInChildren = self.mainUIPanel.GetComponentInChildren<HealthBar>();
		if (!Object.op_Implicit((Object)(object)componentInChildren) || !Object.op_Implicit((Object)(object)((Component)componentInChildren).gameObject))
		{
			return;
		}
		Image[] componentsInChildren = ((Component)componentInChildren).gameObject.GetComponentsInChildren<Image>();
		if (!barSetupDone)
		{
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				if (componentsInChildren.Length == 5)
				{
					barSetupDone = true;
				}
			}
		}
		if (!barSetupDone)
		{
			return;
		}
		chargeBar = Object.Instantiate<GameObject>(((Component)componentInChildren).gameObject, ((Component)componentInChildren).gameObject.transform.parent);
		((Object)chargeBar).name = "ChargeBar";
		Object.Destroy((Object)(object)chargeBar.GetComponent<HealthBar>());
		TextMeshProUGUI[] componentsInChildren2 = chargeBar.GetComponentsInChildren<TextMeshProUGUI>();
		for (int j = 0; j < componentsInChildren2.Length; j++)
		{
			if (Object.op_Implicit((Object)(object)componentsInChildren2[j]) && Object.op_Implicit((Object)(object)((Component)componentsInChildren2[j]).gameObject))
			{
				if (((Object)((Component)componentsInChildren2[j]).gameObject).name == "CurrentHealthText")
				{
					currentCharge = componentsInChildren2[j];
					((TMP_Text)currentCharge).text = "0";
				}
				if (((Object)((Component)componentsInChildren2[j]).gameObject).name == "FullHealthText")
				{
					fullCharge = componentsInChildren2[j];
					((TMP_Text)fullCharge).text = "100";
				}
			}
		}
		Image[] componentsInChildren3 = chargeBar.GetComponentsInChildren<Image>();
		for (int k = 0; k < componentsInChildren3.Length; k++)
		{
			if (Object.op_Implicit((Object)(object)componentsInChildren3[k]) && Object.op_Implicit((Object)(object)((Component)componentsInChildren3[k]).gameObject))
			{
				if ((Object)(object)componentsInChildren3[k] != (Object)(object)componentsInChildren3[3] && (Object)(object)componentsInChildren3[k] != (Object)(object)componentsInChildren3[0])
				{
					Object.Destroy((Object)(object)((Component)componentsInChildren3[k]).gameObject);
				}
				if ((Object)(object)componentsInChildren3[k] == (Object)(object)componentsInChildren3[3])
				{
					barImage = componentsInChildren3[k];
					((Graphic)barImage).color = new Color(0.8156863f, 0.6313726f, 0.972549f);
					barImage.type = (Type)3;
					barImage.fillMethod = (FillMethod)0;
					barImage.fillCenter = false;
				}
			}
		}
	}

	private void OnDisable()
	{
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Expected O, but got Unknown
		((HuntressTracker)this).OnDisable();
		HUD.Update -= new hook_Update(HUD_Update);
		if (Object.op_Implicit((Object)(object)chargeBar))
		{
			Object.Destroy((Object)(object)chargeBar);
		}
	}
}
internal class ZeriModelBehaviour : MonoBehaviour
{
	private uint ID;

	public GameObject props;

	public void Footslide()
	{
		AkSoundEngine.PostEvent(Sounds.Play_Zeri_SlideStep, ((Component)this).gameObject);
	}

	public void PlayRecall()
	{
		ID = AkSoundEngine.PostEvent(Sounds.Play_Zeri_Recall, ((Component)this).gameObject);
	}

	public void HideProps()
	{
		props.SetActive(false);
	}

	private void OnDisable()
	{
		AkSoundEngine.StopPlayingID(ID);
	}
}
internal class ZeriProjectileBehaviour : MonoBehaviour, IProjectileImpactBehavior
{
	private ProjectileController projectileController;

	private ProjectileDamage projectileDamage;

	private void Awake()
	{
		projectileController = ((Component)this).GetComponent<ProjectileController>();
		projectileDamage = ((Component)this).GetComponent<ProjectileDamage>();
	}

	public void OnProjectileImpact(ProjectileImpactInfo impactInfo)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0152: Unknown result type (might be due to invalid IL or missing references)
		//IL_0157: Unknown result type (might be due to invalid IL or missing references)
		//IL_015e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0169: Unknown result type (might be due to invalid IL or missing references)
		//IL_016f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0174: Unknown result type (might be due to invalid IL or missing references)
		//IL_017f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0186: Unknown result type (might be due to invalid IL or missing references)
		//IL_018b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0192: Expected O, but got Unknown
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_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_006c: 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_0080: 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_0093: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00af: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c5: 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_00f3: 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_0105: Unknown result type (might be due to invalid IL or missing references)
		//IL_0110: Unknown result type (might be due to invalid IL or missing references)
		//IL_0120: Unknown result type (might be due to invalid IL or missing references)
		//IL_0127: Unknown result type (might be due to invalid IL or missing references)
		//IL_0132: Unknown result type (might be due to invalid IL or missing references)
		//IL_013d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0144: Unknown result type (might be due to invalid IL or missing references)
		//IL_0146: Unknown result type (might be due to invalid IL or missing references)
		Collider collider = impactInfo.collider;
		if (Object.op_Implicit((Object)(object)collider) && !Object.op_Implicit((Object)(object)((Component)collider).GetComponent<HurtBox>()))
		{
			float num = 180f;
			CharacterBody component = projectileController.owner.GetComponent<CharacterBody>();
			if (Object.op_Implicit((Object)(object)component) && component.hasEffectiveAuthority)
			{
				new BulletAttack
				{
					stopperMask = LayerMask.op_Implicit(0),
					maxDistance = num,
					owner = ((Component)component).gameObject,
					weapon = ((Component)component).gameObject,
					origin = ((Component)this).transform.position,
					aimVector = ((Component)this).transform.forward,
					minSpread = 0f,
					maxSpread = 0f,
					bulletCount = 1u,
					damage = (Object.op_Implicit((Object)(object)component) ? (component.damage * 3.6f) : projectileDamage.damage),
					force = 1550f,
					tracerEffectPrefab = null,
					muzzleName = "gunMuzzle",
					hitEffectPrefab = Prefabs.Load<GameObject>("RoR2/Base/Common/VFX/OmniImpactVFX.prefab"),
					isCrit = true,
					radius = 2.5f,
					procCoefficient = 1f,
					smartCollision = true,
					damageType = (DamageType)8
				}.Fire();
			}
			EffectData val = new EffectData
			{
				origin = ((Component)this).transform.position + ((Component)this).transform.forward * num,
				start = ((Component)this).transform.position
			};
			EffectManager.SpawnEffect(Prefabs.beamTracer, val, false);
		}
	}
}
internal class Hook
{
	internal static void Hooks()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Expected O, but got Unknown
		RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
		HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
	}

	private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
	{
		int buffCount = sender.GetBuffCount(Prefabs.haste);
		if (buffCount > 0)
		{
			args.moveSpeedMultAdd += 0.05f * (float)buffCount;
		}
		if (sender.HasBuff(Prefabs.ult))
		{
			args.attackSpeedMultAdd += 0.3f;
			args.moveSpeedMultAdd += 0.15f;
		}
	}

	private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Invalid comparison between Unknown and I4
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Invalid comparison between Unknown and I4
		//IL_0069: 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_0071: Unknown result type (might be due to invalid IL or missing references)
		//IL_016d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0172: Unknown result type (might be due to invalid IL or missing references)
		//IL_017e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0183: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_020f: Unknown result type (might be due to invalid IL or missing references)
		orig.Invoke(self, damageInfo);
		bool flag = (int)damageInfo.damageType == 64;
		bool flag2 = (int)damageInfo.damageType == 524352;
		if (!(Object.op_Implicit((Object)(object)damageInfo.attacker) && Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<ZeriBehaviour>()) && flag) && (!flag2 || ((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)3)))
		{
			return;
		}
		damageInfo.damageType = (DamageType)(damageInfo.damageType & -65);
		CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
		if (!Object.op_Implicit((Object)(object)component) || !component.HasBuff(Prefabs.ult))
		{
			return;
		}
		if (flag2 && Object.op_Implicit((Object)(object)component.healthComponent) && component.healthComponent.alive)
		{
			if (self.shield > 0f)
			{
				component.healthComponent.AddBarrier(self.Networkshield);
				self.Networkshield = 0f;
			}
			if (self.barrier > 0f)
			{
				component.healthComponent.AddBarrier(self.Networkbarrier);
				self.Networkbarrier = 0f;
			}
		}
		int num = 3;
		int itemCount = component.inventory.GetItemCount(Items.EquipmentMagazineVoid);
		if (itemCount > 0)
		{
			num += 2 + (itemCount - 1);
		}
		float damageValue = damageInfo.damage / (float)num;
		TeamIndex teamIndex = component.teamComponent.teamIndex;
		ZapOrb zapOrb = new ZapOrb();
		((Orb)zapOrb).origin = damageInfo.position;
		zapOrb.damageValue = damageValue;
		zapOrb.isCrit = damageInfo.crit;
		zapOrb.bouncesRemaining = num;
		zapOrb.teamIndex = teamIndex;
		zapOrb.attacker = damageInfo.attacker;
		zapOrb.bouncedObjects = new List<HealthComponent> { self };
		zapOrb.procChainMask = damageInfo.procChainMask;
		((ProcChainMask)(ref zapOrb.procChainMask)).AddProc((ProcType)3);
		zapOrb.procCoefficient = 0f;
		zapOrb.damageColorIndex = (DamageColorIndex)0;
		zapOrb.range = 20f;
		HurtBox val = zapOrb.PickNextTarget(damageInfo.position);
		if (Object.op_Implicit((Object)(object)val))
		{
			((Orb)zapOrb).target = val;
		}
		OrbManager.instance.AddOrb((Orb)(object)zapOrb);
		int num2 = ((!damageInfo.crit) ? 1 : 3);
		for (int i = 0; i < num2; i++)
		{
			component.AddTimedBuff(Prefabs.haste, 4f, (int)Mathf.Clamp(component.level, 4f, 99f));
			component.AddTimedBuff(Prefabs.ult, 4f);
		}
		if (flag2 && self.combinedHealth / self.fullCombinedHealth <= 0.15f)
		{
			self.Suicide(damageInfo.attacker, damageInfo.attacker, (DamageType)0);
		}
	}
}
[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.Zeri", "Zeri", "1.0.2")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
public class MainPlugin : BaseUnityPlugin
{
	public const string MODUID = "com.Dragonyck.Zeri";

	public const string MODNAME = "Zeri";

	public const string VERSION = "1.0.2";

	public const string SURVIVORNAME = "Zeri";

	public const string SURVIVORNAMEKEY = "ZERI";

	public static GameObject characterPrefab;

	public static readonly Color characterColor = new Color(0.8156863f, 0.6313726f, 0.972549f);

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

	private void Update()
	{
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)Prefabs.skateMat))
		{
			Prefabs.skateMat.SetTextureOffset("_MainTex", new Vector2(Time.time * -4f, 0f));
		}
	}

	internal static void CreatePrefab()
	{
		//IL_0114: 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_013e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0205: Unknown result type (might be due to invalid IL or missing references)
		//IL_020f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0230: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ba: Expected O, but got Unknown
		//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_031a: Unknown result type (might be due to invalid IL or missing references)
		//IL_032a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0331: Expected O, but got Unknown
		//IL_035b: Unknown result type (might be due to invalid IL or missing references)
		//IL_036d: Unknown result type (might be due to invalid IL or missing references)
		//IL_037f: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_03bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_03cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_03e5: Unknown result type (might be due to invalid IL or missing references)
		//IL_03ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_0463: Unknown result type (might be due to invalid IL or missing references)
		//IL_0595: Unknown result type (might be due to invalid IL or missing references)
		//IL_05cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_05d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_0638: Unknown result type (might be due to invalid IL or missing references)
		//IL_063d: Unknown result type (might be due to invalid IL or missing references)
		//IL_066a: Unknown result type (might be due to invalid IL or missing references)
		//IL_066f: Unknown result type (might be due to invalid IL or missing references)
		//IL_070f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0820: Unknown result type (might be due to invalid IL or missing references)
		//IL_075e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0775: Unknown result type (might be due to invalid IL or missing references)
		//IL_0782: Unknown result type (might be due to invalid IL or missing references)
		//IL_0961: 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_0a1e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a23: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a51: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a56: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = Prefabs.Load<GameObject>("RoR2/Base/Commando/CommandoBody.prefab");
		characterPrefab = PrefabAPI.InstantiateClone(val, "ZeriBody", true);
		characterPrefab.AddComponent<ZeriBehaviour>();
		characterPrefab.GetComponent<NetworkIdentity>().localPlayerAuthority = true;
		Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("ModelBase")).gameObject);
		Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("CameraPivot")).gameObject);
		Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("AimOrigin")).gameObject);
		GameObject val2 = Assets.MainAssetBundle.LoadAsset<GameObject>("Zeri");
		ChildLocator component = val2.GetComponent<ChildLocator>();
		val2.AddComponent<ZeriModelBehaviour>().props = ((Component)component.FindChild("props")).gameObject;
		GameObject val3 = PrefabAPI.InstantiateClone(((Component)((Component)Prefabs.Load<GameObject>("RoR2/Base/Toolbot/ToolbotBody.prefab").GetComponent<ModelLocator>().modelTransform).GetComponent<SkateSparks>().leftParticleSystem).gameObject, "ZeriSprintSparks", false);
		val3.transform.SetParent(component.FindChild("foot.r"));
		val3.transform.localPosition = Vector3.right * -0.1f;
		val3.transform.localRotation = Quaternion.Euler(-90f, 90f, 0f);
		((Renderer)val3.GetComponent<ParticleSystemRenderer>()).material = Prefabs.Load<Material>("RoR2/Base/Bandit2/matBandit2SlashBlade.mat");
		TrailRenderer val4 = val3.AddComponent<TrailRenderer>();
		val4.time = 0.12f;
		val4.widthMultiplier = 0.4f;
		val4.endWidth = 0f;
		Prefabs.skateMat = Object.Instantiate<Material>(Prefabs.Load<Material>("RoR2/Base/artifactworld/matArtifactShellTrail.mat"));
		Prefabs.skateMat.SetFloat("_Boost", 6f);
		Prefabs.skateMat.SetTexture("_RemapTex", (Texture)(object)Prefabs.Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampArchWisp.png"));
		((Renderer)val4).material = Prefabs.skateMat;
		GameObject val5 = Object.Instantiate<GameObject>(val3);
		val5.transform.SetParent(component.FindChild("foot.l"));
		val5.transform.localPosition = Vector3.right * 0.1f;
		val5.transform.localRotation = Quaternion.Euler(90f, 90f, 0f);
		SkateSparks val6 = val2.AddComponent<SkateSparks>();
		val6.maxStress = 16f;
		val6.minStressForEmission = 4f;
		val6.overspeedStressCoefficient = 40f;
		val6.accelerationStressCoefficient = 8f;
		val6.perpendicularTravelStressCoefficient = 22f;
		val6.maxEmissionRate = 400f;
		val6.landingStress = 4;
		val6.rightParticleSystem = val3.GetComponent<ParticleSystem>();
		val6.leftParticleSystem = val5.GetComponent<ParticleSystem>();
		GameObject val7 = new GameObject("ModelBase");
		val7.transform.parent = characterPrefab.transform;
		val7.transform.localPosition = new Vector3(0f, -0.94f, 0f);
		val7.transform.localRotation = Quaternion.identity;
		val7.transform.localScale = new Vector3(1f, 1f, 1f);
		GameObject val8 = new GameObject("AimOrigin");
		val8.transform.parent = val7.transform;
		val8.transform.localPosition = new Vector3(0f, 1.4f, 0f);
		val8.transform.localRotation = Quaternion.identity;
		val8.transform.localScale = Vector3.one;
		Transform transform = val2.transform;
		transform.parent = val7.transform;
		transform.localPosition = Vector3.zero;
		transform.localScale = new Vector3(1f, 1f, 1f);
		transform.localRotation = Quaternion.identity;
		CharacterDirection component2 = characterPrefab.GetComponent<CharacterDirection>();
		component2.moveVector = Vector3.zero;
		component2.targetTransform = val7.transform;
		component2.overrideAnimatorForwardTransform = null;
		component2.rootMotionAccumulator = null;
		component2.modelAnimator = val2.GetComponentInChildren<Animator>();
		component2.driveFromRootRotation = false;
		component2.turnSpeed = 720f;
		CharacterBody component3 = characterPrefab.GetComponent<CharacterBody>();
		((Object)component3).name = "ZeriBody";
		component3.baseNameToken = "ZERI_NAME";
		component3.subtitleNameToken = "ZERI_SUBTITLE";
		component3.bodyFlags = (BodyFlags)16;
		component3.rootMotionInMainState = false;
		component3.mainRootSpeed = 0f;
		component3.baseMaxHealth = 100f;
		component3.levelMaxHealth = 35f;
		component3.baseRegen = 1f;
		component3.levelRegen = 0.33f;
		component3.baseMaxShield = 0f;
		component3.levelMaxShield = 0f;
		component3.baseMoveSpeed = 7f;
		component3.levelMoveSpeed = 0f;
		component3.baseAcceleration = 110f;
		component3.baseJumpPower = 15f;
		component3.levelJumpPower = 0f;
		component3.baseDamage = 12f;
		component3.levelDamage = 2.4f;
		component3.baseAttackSpeed = 1f;
		component3.levelAttackSpeed = 0f;
		component3.baseCrit = 1f;
		component3.levelCrit = 0f;
		component3.baseArmor = 0f;
		component3.levelArmor = 0f;
		component3.baseJumpCount = 1;
		component3.sprintingSpeedMultiplier = 1.45f;
		component3.wasLucky = false;
		component3.hideCrosshair = false;
		component3.aimOriginTransform = val8.transform;
		component3.hullClassification = (HullClassification)0;
		component3.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait").texture;
		component3.isChampion = false;
		component3.currentVehicle = null;
		component3.skinIndex = 0u;
		component3.bodyColor = characterColor;
		CharacterMotor component4 = characterPrefab.GetComponent<CharacterMotor>();
		component4.walkSpeedPenaltyCoefficient = 1f;
		component4.characterDirection = component2;
		component4.muteWalkMotion = false;
		component4.mass = 160f;
		component4.airControl = 0.25f;
		component4.disableAirControlUntilCollision = false;
		component4.generateParametersOnAwake = true;
		InputBankTest component5 = characterPrefab.GetComponent<InputBankTest>();
		component5.moveVector = Vector3.zero;
		CameraTargetParams component6 = characterPrefab.GetComponent<CameraTargetParams>();
		component6.cameraParams = val.GetComponent<CameraTargetParams>().cameraParams;
		component6.cameraPivotTransform = null;
		component6.recoil = Vector2.zero;
		component6.dontRaycastToPivot = false;
		ModelLocator component7 = characterPrefab.GetComponent<ModelLocator>();
		component7.modelTransform = transform;
		component7.modelBaseTransform = val7.transform;
		component7.dontReleaseModelOnDeath = false;
		component7.autoUpdateModelTransform = true;
		component7.dontDetatchFromParent = false;
		component7.noCorpse = false;
		component7.normalizeToFloor = false;
		component7.preserveModel = false;
		CharacterModel val9 = val2.GetComponent<CharacterModel>();
		if (!Object.op_Implicit((Object)(object)val9))
		{
			val9 = val2.AddComponent<CharacterModel>();
		}
		SkinnedMeshRenderer[] componentsInChildren = val2.GetComponentsInChildren<SkinnedMeshRenderer>(true);
		List<RendererInfo> list = new List<RendererInfo>();
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			list.Add(new RendererInfo
			{
				renderer = (Renderer)(object)componentsInChildren[i],
				defaultMaterial = ((((Object)componentsInChildren[i]).name == "ult_hair") ? Utils.InstantiateMaterial(((Renderer)componentsInChildren[i]).material.mainTexture, characterColor, 2f) : Utils.InstantiateMaterial(((Renderer)componentsInChildren[i]).material.mainTexture)),
				defaultShadowCastingMode = (ShadowCastingMode)1,
				ignoreOverlays = false
			});
		}
		RendererInfo[] array = list.ToArray();
		val9.body = component3;
		val9.baseRendererInfos = array;
		val9.autoPopulateLightInfos = true;
		val9.invisibilityCount = 0;
		val9.temporaryOverlays = new List<TemporaryOverlay>();
		val9.mainSkinnedMeshRenderer = componentsInChildren[0];
		GameObject gameObject = ((Component)transform).gameObject;
		ModelSkinController val10 = gameObject.AddComponent<ModelSkinController>();
		LanguageAPI.Add("ZERIBODY_DEFAULT_SKIN_NAME", "Withered Rose");
		val10.skins = (SkinDef[])(object)new SkinDef[1] { LoadoutAPI.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "ZERIBODY_DEFAULT_SKIN_NAME", "base", array)) };
		HealthComponent component8 = characterPrefab.GetComponent<HealthComponent>();
		component8.health = component3.baseMaxHealth;
		component8.shield = 0f;
		component8.barrier = 0f;
		component8.magnetiCharge = 0f;
		component8.body = null;
		component8.dontShowHealthbar = false;
		component8.globalDeathEventChanceCoefficient = 1f;
		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 = "";
		characterPrefab.GetComponent<Rigidbody>().mass = 100f;
		Collider[] componentsInChildren2 = val2.GetComponentsInChildren<Collider>();
		HurtBoxGroup val11 = val2.AddComponent<HurtBoxGroup>();
		List<HurtBox> list2 = new List<HurtBox>();
		Collider[] array2 = componentsInChildren2;
		foreach (Collider val12 in array2)
		{
			HurtBox val13 = ((Component)val12).gameObject.AddComponent<HurtBox>();
			((Component)val13).gameObject.layer = LayerIndex.entityPrecise.intVal;
			val13.healthComponent = component8;
			val13.isBullseye = true;
			val13.damageModifier = (DamageModifier)0;
			val13.hurtBoxGroup = val11;
			val13.indexInGroup = 0;
			val11.mainHurtBox = val13;
			val11.bullseyeCount = 1;
			list2.Add(val13);
		}
		val11.hurtBoxes = list2.ToArray();
		KinematicCharacterMotor component10 = characterPrefab.GetComponent<KinematicCharacterMotor>();
		component10.CharacterController = (BaseCharacterController)(object)component4;
		FootstepHandler val14 = val2.AddComponent<FootstepHandler>();
		val14.baseFootstepString = "Play_player_footstep";
		val14.sprintFootstepOverrideString = "";
		val14.enableFootstepDust = true;
		val14.footstepDustPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/GenericFootstepDust.prefab").WaitForCompletion();
		EntityStateMachine component11 = ((Component)component3).GetComponent<EntityStateMachine>();
		component11.mainStateType = new SerializableEntityStateType(typeof(CharacterMain));
		CharacterDeathBehavior component12 = characterPrefab.GetComponent<CharacterDeathBehavior>();
		component12.deathStateMachine = characterPrefab.GetComponent<EntityStateMachine>();
		component12.deathState = new SerializableEntityStateType(typeof(GenericCharacterDeath));
		Utils.NewStateMachine<Idle>(characterPrefab, "Ult");
		NetworkStateMachine component13 = ((Component)component3).GetComponent<NetworkStateMachine>();
		component13.stateMachines = ((Component)component3).GetComponents<EntityStateMachine>();
		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("ZERI_NAME", "Zeri");
		LanguageAPI.Add("ZERI_DESCRIPTION", text);
		LanguageAPI.Add("ZERI_SUBTITLE", "");
		LanguageAPI.Add("ZERI_OUTRO", text2);
		LanguageAPI.Add("ZERI_FAIL", text3);
		SurvivorDef val = ScriptableObject.CreateInstance<SurvivorDef>();
		val.cachedName = "ZERI_NAME";
		val.unlockableDef = null;
		val.descriptionToken = "ZERI_DESCRIPTION";
		val.primaryColor = characterColor;
		val.bodyPrefab = characterPrefab;
		val.displayPrefab = Utils.NewDisplayModel(((Component)characterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "ZeriDisplay");
		val.outroFlavorToken = "ZERI_OUTRO";
		val.desiredSortPosition = 0.2f;
		val.mainEndingEscapeFailureFlavorToken = "ZERI_FAIL";
		ContentAddition.AddSurvivorDef(val);
		SkillSetup();
		GameObject val2 = PrefabAPI.InstantiateClone(Prefabs.Load<GameObject>("RoR2/Base/Commando/CommandoMonsterMaster.prefab"), "ZeriMaster", 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<BaseZeriState>(ref flag);
		ContentAddition.AddEntityState<CharacterMain>(ref flag);
		ContentAddition.AddEntityState<Primary>(ref flag);
		ContentAddition.AddEntityState<Zap>(ref flag);
		ContentAddition.AddEntityState<Secondary>(ref flag);
		ContentAddition.AddEntityState<Utility>(ref flag);
		ContentAddition.AddEntityState<UtilityEnd>(ref flag);
		ContentAddition.AddEntityState<Special>(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("ZERI_PASSIVE_NAME", "Living Battery");
		LanguageAPI.Add("ZERI_PASSIVE_DESCRIPTION", "Zeri builds up <color=#d0a1f8>charge</color> while moving, and <color=#d0a1f8>10 charge</color> every time she casts <style=cIsDamage>Burst Fire</style>. At full charge, Zeri's next attack is empowered to Zap. Zap deals <style=cIsDamage>340% damage</style> to a targetted enemy, instantly killing them if their health is below <style=cIsDamage>15%</style>. Additionally, Zap <style=cIsHealing>steals</style> barrier as well as shield granting barrier instead.");
		component.passiveSkill.enabled = true;
		component.passiveSkill.skillNameToken = "ZERI_PASSIVE_NAME";
		component.passiveSkill.skillDescriptionToken = "ZERI_PASSIVE_DESCRIPTION";
		component.passiveSkill.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("zerip");
	}

	private void PrimarySetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_011f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0124: Unknown result type (might be due to invalid IL or missing references)
		//IL_015d: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("ZERI_M1", "Burst Fire");
		LanguageAPI.Add("ZERI_M1_DESCRIPTION", "Zeri fires a burst of 7 rounds in the target direction that deal <style=cIsDamage>280% damage</style>.");
		SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(Primary));
		val.activationStateMachineName = "Weapon";
		val.baseMaxStock = 0;
		val.baseRechargeInterval = 0f;
		val.beginSkillCooldownOnSkillEnd = true;
		val.canceledFromSprinting = false;
		val.fullRestockOnAssign = true;
		val.interruptPriority = (InterruptPriority)0;
		val.isCombatSkill = true;
		val.mustKeyPress = false;
		val.cancelSprintingOnActivation = false;
		val.rechargeStock = 0;
		val.requiredStock = 0;
		val.stockToConsume = 0;
		val.icon = Prefabs.burst;
		val.skillDescriptionToken = "ZERI_M1_DESCRIPTION";
		val.skillName = "ZERI_M1";
		val.skillNameToken = "ZERI_M1";
		ContentAddition.AddSkillDef(val);
		component.primary = Utils.NewGenericSkill(characterPrefab, val);
		LanguageAPI.Add("ZERI_M1_ZAP", "Zap");
		LanguageAPI.Add("ZERI_M1_ZAP_DESCRIPTION", "Zap deals <style=cIsDamage>340% damage</style> to a targetted enemy, instantly killing them if their health is below <style=cIsDamage>15%</style>. Additionally, Zap <style=cIsHealing>steals</style> barrier as well as shield granting barrier instead.");
		val = (SkillDef)(object)ScriptableObject.CreateInstance<ZapSkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(Zap));
		val.activationStateMachineName = "Weapon";
		val.baseMaxStock = 0;
		val.baseRechargeInterval = 0f;
		val.beginSkillCooldownOnSkillEnd = true;
		val.canceledFromSprinting = false;
		val.fullRestockOnAssign = true;
		val.interruptPriority = (InterruptPriority)0;
		val.isCombatSkill = true;
		val.mustKeyPress = false;
		val.cancelSprintingOnActivation = false;
		val.rechargeStock = 0;
		val.requiredStock = 0;
		val.stockToConsume = 0;
		val.icon = Prefabs.snap2;
		val.skillDescriptionToken = "ZERI_M1_DESCRIPTION";
		val.skillName = "ZERI_M1";
		val.skillNameToken = "ZERI_M1";
		ZeriBehaviour.zap = val;
	}

	private void SecondarySetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("ZERI_M2", "Ultrashock Laser");
		LanguageAPI.Add("ZERI_M2_DESCRIPTION", "Zeri fires an electric pulse in the target direction that deals <style=cIsDamage>500% damage</style> to the first enemy hit and <style=cIsDamage>slows</style>. If it hits terrain or is cast near terrain or enemies, it transforms into a large beam and deals <style=cIsDamage>critical</style> damage.");
		SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(Secondary));
		val.activationStateMachineName = "Weapon";
		val.baseMaxStock = 1;
		val.baseRechargeInterval = 5f;
		val.beginSkillCooldownOnSkillEnd = true;
		val.canceledFromSprinting = false;
		val.fullRestockOnAssign = false;
		val.interruptPriority = (InterruptPriority)1;
		val.isCombatSkill = true;
		val.mustKeyPress = true;
		val.cancelSprintingOnActivation = false;
		val.rechargeStock = 1;
		val.requiredStock = 1;
		val.stockToConsume = 1;
		val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("zeriw");
		val.skillDescriptionToken = "ZERI_M2_DESCRIPTION";
		val.skillName = "ZERI_M2";
		val.skillNameToken = "ZERI_M2";
		ContentAddition.AddSkillDef(val);
		component.secondary = Utils.NewGenericSkill(characterPrefab, val);
	}

	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)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("ZERI_UTIL", "Spark Surge");
		LanguageAPI.Add("ZERI_UTIL_DESCRIPTION", "Zeri dashes in the target direction, going up any walls that don't have sharp angles. Press again to cancel. Zeri gains Spark Surge buff for <style=cIsUtility>5s</style>, refreshing during the dash, it makes <style=cIsDamage>Burst Fire</style> fire <style=cIsDamage>piercing</style> rounds, and <style=cIsDamage>Ultrashock Laser</style> will always fire beams instead.");
		SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(Utility));
		val.activationStateMachineName = "Slide";
		val.baseMaxStock = 1;
		val.baseRechargeInterval = 6f;
		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 = Prefabs.dashSprite;
		val.skillDescriptionToken = "ZERI_UTIL_DESCRIPTION";
		val.skillName = "ZERI_UTIL";
		val.skillNameToken = "ZERI_UTIL";
		ContentAddition.AddSkillDef(val);
		component.utility = Utils.NewGenericSkill(characterPrefab, val);
	}

	private void SpecialSetup()
	{
		//IL_005d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0062: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("ZERI_OVERCHARGED_KEYWORD", "<style=cKeywordName>[OVERCHARGED]</style><style=cSub><style=cIsDamage>+30% attack speed</style>, <style=cIsDamage>+15% movement speed</style>.");
		LanguageAPI.Add("ZERI_HYPERCHARGED_KEYWORD", "<style=cKeywordName>[HYPERCHARGED]</style><style=cSub><style=cIsDamage>+5% movement speed</style>. Stacks up to a minimum of 4 and a maximum of the player's <style=cIsDamage>level</style>.");
		LanguageAPI.Add("ZERI_SPEC", "Lightning Crash");
		LanguageAPI.Add("ZERI_SPEC_DESCRIPTION", "Zeri discharges an electric nova that deals <style=cIsDamage>700% damage</style> to nearby enemies, also receiving <style=cIsDamage>OVERCHARGED</style> for <style=cIsUtility>8s</style>. During <style=cIsDamage>OVERCHARGED</style>, <style=cIsDamage>Burst Fire</style> and <style=cIsDamage>Zap</style> are empowered to chain their hits to up to 4 subsequential targets dealing <style=cIsDamage>25%</style> of their damage to each target. <style=cIsDamage>Burst Fire</style> also gets <style=cIsDamage>+20%</style> fire rate and instead fire 3 rounds. Chain hits grant <style=cIsDamage>HYPERCHARGED</style> stacks.");
		SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(Special));
		val.activationStateMachineName = "Ult";
		val.baseMaxStock = 1;
		val.baseRechargeInterval = 12f;
		val.beginSkillCooldownOnSkillEnd = true;
		val.canceledFromSprinting = false;
		val.fullRestockOnAssign = false;
		val.interruptPriority = (InterruptPriority)1;
		val.isCombatSkill = true;
		val.mustKeyPress = true;
		val.cancelSprintingOnActivation = false;
		val.rechargeStock = 1;
		val.requiredStock = 1;
		val.stockToConsume = 1;
		val.icon = Prefabs.ultSprite;
		val.skillDescriptionToken = "ZERI_SPEC_DESCRIPTION";
		val.skillName = "ZERI_SPEC";
		val.skillNameToken = "ZERI_SPEC";
		val.keywordTokens = new string[2] { "ZERI_OVERCHARGED_KEYWORD", "ZERI_HYPERCHARGED_KEYWORD" };
		ContentAddition.AddSkillDef(val);
		component.special = Utils.NewGenericSkill(characterPrefab, val);
	}
}
internal class Prefabs
{
	internal static GameObject projectile;

	internal static GameObject projectileGhost;

	internal static GameObject tracer;

	internal static GameObject tracerEmp;

	internal static GameObject zapImpact;

	internal static GameObject shotHitEffect;

	internal static GameObject shotHitEffectEmp;

	internal static GameObject chainImpact;

	internal static GameObject zapOrbEffect;

	internal static GameObject zapCastEffect;

	internal static GameObject ultExplosion;

	internal static BuffDef haste;

	internal static BuffDef dash;

	internal static BuffDef ult;

	internal static Sprite snap;

	internal static Sprite snap2;

	internal static Sprite burst;

	internal static Sprite burst2;

	internal static Sprite burstR;

	internal static Sprite burstR2;

	internal static Sprite dashSprite;

	internal static Sprite ultSprite;

	internal static Material skateMat;

	internal static GameObject beamTracer { get; set; }

	internal static T Load<T>(string path)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		return Addressables.LoadAssetAsync<T>((object)path).WaitForCompletion();
	}

	internal static void CreatePrefabs()
	{
		//IL_009a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0114: Unknown result type (might be due to invalid IL or missing references)
		//IL_0369: Unknown result type (might be due to invalid IL or missing references)
		//IL_0373: Expected O, but got Unknown
		//IL_041c: 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_0498: Unknown result type (might be due to invalid IL or missing references)
		//IL_049f: Expected O, but got Unknown
		//IL_04c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_04fc: Unknown result type (might be due to invalid IL or missing references)
		//IL_051b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0522: Expected O, but got Unknown
		//IL_053d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0559: Unknown result type (might be due to invalid IL or missing references)
		//IL_059f: Unknown result type (might be due to invalid IL or missing references)
		//IL_05a6: Expected O, but got Unknown
		//IL_05b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_05d7: Unknown result type (might be due to invalid IL or missing references)
		//IL_05dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0612: Unknown result type (might be due to invalid IL or missing references)
		//IL_0621: Unknown result type (might be due to invalid IL or missing references)
		//IL_064a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0686: Unknown result type (might be due to invalid IL or missing references)
		//IL_06af: Unknown result type (might be due to invalid IL or missing references)
		//IL_06b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_06c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_06e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_06e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_072c: Unknown result type (might be due to invalid IL or missing references)
		//IL_079d: Unknown result type (might be due to invalid IL or missing references)
		//IL_07a4: Expected O, but got Unknown
		//IL_07ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_07de: 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_07f2: Expected O, but got Unknown
		//IL_07f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_07fe: 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_082c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0833: Expected O, but got Unknown
		//IL_0858: Unknown result type (might be due to invalid IL or missing references)
		//IL_0874: Unknown result type (might be due to invalid IL or missing references)
		//IL_023a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0244: Unknown result type (might be due to invalid IL or missing references)
		OrbAPI.AddOrb(typeof(ZapOrb));
		snap = Assets.Load<Sprite>("zeriqpassive");
		snap2 = Assets.Load<Sprite>("zeriqpassivecharged");
		burst = Assets.Load<Sprite>("zeriq");
		burst2 = Assets.Load<Sprite>("zeriqe");
		burstR = Assets.Load<Sprite>("zeriqr");
		burstR2 = Assets.Load<Sprite>("zeriqre");
		dashSprite = Assets.Load<Sprite>("zerie");
		ultSprite = Assets.Load<Sprite>("zerir");
		haste = Utils.NewBuffDef("HYPERCHARGED", stack: true, hidden: false, Assets.Load<Sprite>("zeriphaste"), Color.white);
		dash = Utils.NewBuffDef("Lightning Rounds", stack: false, hidden: false, dashSprite, Color.white);
		ult = Utils.NewBuffDef("OVERCHARGED", stack: false, hidden: false, ultSprite, Color.white);
		ultExplosion = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Loader/LoaderGroundSlam.prefab"), "ZeriUltExplosion", false);
		Light componentInChildren = ultExplosion.GetComponentInChildren<Light>();
		componentInChildren.color = new Color(1f, 0f, 1f);
		componentInChildren.range = 25f;
		Material val = Assets.Load<Material>("lightningMatBG 3");
		Material val2 = Assets.Load<Material>("lightningMatBG 4");
		Material val3 = Assets.Load<Material>("lightningMatBG 5");
		Material material = Assets.Load<Material>("Point12cg 3");
		Material[] materials = (Material[])(object)new Material[4] { val, val2, val3, val2 };
		ParticleSystemRenderer[] componentsInChildren = ultExplosion.GetComponentsInChildren<ParticleSystemRenderer>();
		foreach (ParticleSystemRenderer val4 in componentsInChildren)
		{
			string name = ((Object)val4).name;
			if (name == "Sphere, Expanding")
			{
				((Renderer)val4).materials = materials;
			}
			if (name == "Debris" || name == "Sparks, Single")
			{
				((Renderer)val4).material = material;
			}
			if (name == "Ring")
			{
				((Renderer)val4).materials = materials;
			}
			if (name == "Omni, Directional")
			{
				((Renderer)val4).material = Load<Material>("RoR2/DLC1/ChainLightningVoid/matLightningVoid.mat");
				val4.lengthScale = 22f;
				((Component)val4).transform.localPosition = Vector3.up * 0.3f;
			}
			if (name == "Flash Center")
			{
				((Renderer)val4).material = Load<Material>("RoR2/Base/Gravekeeper/matOmniRing1ArchWisp.mat");
			}
		}
		ContentAddition.AddEffect(ultExplosion);
		zapCastEffect = PrefabAPI.InstantiateClone(Assets.Load<GameObject>("beamCharge"), "ZeriCastEffect", false);
		Utils.RegisterEffect(zapCastEffect, 0.5f);
		zapImpact = PrefabAPI.InstantiateClone(Assets.Load<GameObject>("beamHit"), "ZeriZapImpactEffect", false);
		Utils.RegisterEffect(zapImpact, 0.5f);
		chainImpact = PrefabAPI.InstantiateClone(zapImpact, "ZeriChainImpactEffect", false);
		Utils.RegisterEffect(chainImpact, 1f, "Play_Zeri_R_Chain_Hit");
		zapOrbEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/ChainLightning/ChainLightningOrbEffect.prefab"), "ZeriZapOrbEffect", false);
		zapOrbEffect.AddComponent<OrbEffectParent>();
		zapOrbEffect.GetComponent<OrbEffect>().endEffect = chainImpact;
		((UnityEventBase)zapOrbEffect.GetComponent<OrbEffect>().onArrival).m_PersistentCalls = new PersistentCallGroup();
		LineRenderer componentInChildren2 = zapOrbEffect.GetComponentInChildren<LineRenderer>();
		((Renderer)componentInChildren2).materials = (Material[])(object)new Material[3]
		{
			Assets.Load<Material>("lightningMatBG 1"),
			Assets.Load<Material>("lightningMatBG"),
			Assets.Load<Material>("lightningMatBG 2")
		};
		componentInChildren2.textureMode = (LineTextureMode)0;
		ContentAddition.AddEffect(zapOrbEffect);
		Texture2D val5 = Assets.Load<Texture2D>("thorns");
		Material val6 = Load<Material>("RoR2/DLC1/VoidRaidCrab/matVoidRaidCrabTripleBeam1.mat");
		Material val7 = Load<Material>("RoR2/DLC1/VoidRaidCrab/matVoidRaidCrabTripleBeam2.mat");
		beamTracer = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/DLC1/VoidRaidCrab/TracerVoidRaidCrabTripleBeam.prefab"), "ZeriBeamTracer", false);
		((Component)beamTracer.transform.GetChild(0)).transform.localPosition = Vector3.forward * 18f;
		beamTracer.GetComponent<Tracer>().startTransform = beamTracer.transform.GetChild(1);
		((Renderer)beamTracer.GetComponentInChildren<LineRenderer>()).enabled = false;
		Object.Destroy((Object)(object)((Component)beamTracer.GetComponentInChildren<Decal>()).gameObject);
		beamTracer.GetComponent<DestroyOnTimer>().duration = 0.3f;
		ParticleSystemRenderer[] componentsInChildren2 = beamTracer.GetComponentsInChildren<ParticleSystemRenderer>();
		Material val8 = new Material(val6);
		val8.SetTexture("_MainTex", (Texture)(object)val5);
		val8.SetColor("_TintColor", new Color(0.682352f, 0f, 0.498039f, 0.603921f));
		val8.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/DLC1/Common/ColorRamps/texRampPortalVoid.png"));
		val8.SetTextureScale("_MainTex", new Vector2(0.5f, 5f));
		val8.SetFloat("_Boost", 15f);
		Material val9 = new Material(val8);
		val9.SetColor("_TintColor", new Color(1f, 1f, 1f, 0.741176f));
		val9.SetTextureScale("_MainTex", new Vector2(-0.5f, -5f));
		val9.SetFloat("_Boost", 20f);
		((Renderer)componentsInChildren2[0]).materials = (Material[])(object)new Material[3] { val8, val8, val9 };
		Material val10 = new Material(Assets.Load<Material>("petal"));
		val10.color = new Color(0.498039f, 0f, 1f);
		((Renderer)componentsInChildren2[1]).material = val10;
		TextureSheetAnimationModule textureSheetAnimation = ((Component)componentsInChildren2[1]).GetComponent<ParticleSystem>().textureSheetAnimation;
		((TextureSheetAnimationModule)(ref textureSheetAnimation)).enabled = true;
		((TextureSheetAnimationModule)(ref textureSheetAnimation)).numTilesX = 2;
		((TextureSheetAnimationModule)(ref textureSheetAnimation)).numTilesY = 2;
		((TextureSheetAnimationModule)(ref textureSheetAnimation)).animation = (ParticleSystemAnimationType)1;
		((TextureSheetAnimationModule)(ref textureSheetAnimation)).rowMode = (ParticleSystemAnimationRowMode)1;
		((TextureSheetAnimationModule)(ref textureSheetAnimation)).frameOverTime = new MinMaxCurve(1f);
		MinMaxCurve startFrame = default(MinMaxCurve);
		((MinMaxCurve)(ref startFrame)).mode = (ParticleSystemCurveMode)0;
		((MinMaxCurve)(ref startFrame)).constantMin = 0f;
		((MinMaxCurve)(ref startFrame)).constantMax = 2f;
		((TextureSheetAnimationModule)(ref textureSheetAnimation)).startFrame = startFrame;
		GameObject val11 = Object.Instantiate<GameObject>(((Component)componentsInChildren2[1]).gameObject, ((Component)componentsInChildren2[1]).transform.parent);
		val11.transform.localScale = new Vector3(2f, 1f, 1f);
		val11.GetComponent<Renderer>().material = Assets.Load<Material>("HPL2cg");
		MainModule main = val11.GetComponent<ParticleSystem>().main;
		((MainModule)(ref main)).startLifetime = new MinMaxCurve(0.05f, 0.1f);
		((MainModule)(ref main)).startSizeMultiplier = 0.25f;
		TextureSheetAnimationModule textureSheetAnimation2 = val11.GetComponent<ParticleSystem>().textureSheetAnimation;
		((TextureSheetAnimationModule)(ref textureSheetAnimation2)).numTilesX = 3;
		((TextureSheetAnimationModule)(ref textureSheetAnimation2)).numTilesY = 3;
		((TextureSheetAnimationModule)(ref textureSheetAnimation2)).animation = (ParticleSystemAnimationType)0;
		((TextureSheetAnimationModule)(ref textureSheetAnimation2)).timeMode = (ParticleSystemAnimationTimeMode)0;
		((TextureSheetAnimationModule)(ref textureSheetAnimation2)).frameOverTime = new MinMaxCurve(1f, AnimationCurve.Linear(0f, 0f, 1f, 0.2f));
		Object.Instantiate<GameObject>(val11, val11.transform.parent).GetComponent<Renderer>().material = Assets.Load<Material>("Point12cg 2");
		LineRenderer[] componentsInChildren3 = beamTracer.GetComponentsInChildren<LineRenderer>();
		((Renderer)componentsInChildren3[2]).enabled = false;
		componentsInChildren3[1].widthMultiplier = 5f;
		componentsInChildren3[1].textureMode = (LineTextureMode)0;
		((Renderer)componentsInChildren3[1]).sortingOrder = 1;
		Material val12 = new Material(val6);
		val12.SetTexture("_MainTex", (Texture)(object)val5);
		val12.SetTextureScale("_MainTex", Vector2.one);
		val12.SetFloat("_AlphaBoost", 1.8f);
		val12.SetColor("_TintColor", Color.white);
		Material val13 = new Material(val12);
		val13.SetTextureScale("_MainTex", -Vector2.one);
		val13.SetColor("_TintColor", new Color(0.2f, 0f, 0.564705f));
		Material val14 = new Material(val7);
		val14.SetTexture("_MainTex", (Texture)(object)val5);
		val14.SetColor("_TintColor", new Color(1f, 0.305882f, 0f));
		val14.SetTextureScale("_MainTex", new Vector2(-1f, 1f));
		((Renderer)componentsInChildren3[1]).materials = (Material[])(object)new Material[3] { val12, val13, val14 };
		Utils.RegisterEffect(beamTracer, -1f, "Play_Zeri_W_Beam");
		shotHitEffect = PrefabAPI.InstantiateClone(Assets.Load<GameObject>("hitEffect"), "ZeriShotHitEffect", false);
		Utils.RegisterEffect(shotHitEffect, 0.5f, "Play_Zeri_Q_Hit");
		shotHitEffectEmp = PrefabAPI.InstantiateClone(Assets.Load<GameObject>("hitEffectEmp"), "ZeriShotHitEffectEmp", false);
		Utils.RegisterEffect(shotHitEffectEmp, 0.5f, "Play_Zeri_Q_Hit");
		Material val15 = Object.Instantiate<Material>(Load<Material>("RoR2/Base/ClayBruiser/matClayMinigunTracer.mat"));
		val15.SetFloat("_Boost", 5f);
		val15.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampLaserTurbine.png"));
		tracer = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/ClayBruiser/TracerClayBruiserMinigun.prefab"), "ZeriTracer", false);
		LineRenderer[] componentsInChildren4 = tracer.GetComponentsInChildren<LineRenderer>();
		((Renderer)componentsInChildren4[0]).material = val15;
		((Renderer)componentsInChildren4[1]).material = Load<Material>("RoR2/Base/Nullifier/matNullifierStarTrail.mat");
		componentsInChildren4[1].widthMultiplier = 1f;
		componentsInChildren4[1].endWidth = 0f;
		BeamPointsFromTransforms[] componentsInChildren5 = tracer.GetComponentsInChildren<BeamPointsFromTransforms>();
		componentsInChildren5[1].pointTransforms = (Transform[])(object)new Transform[2]
		{
			componentsInChildren5[0].pointTransforms[1],
			componentsInChildren5[0].pointTransforms[0]
		};
		ContentAddition.AddEffect(tracer);
		Material val16 = Object.Instantiate<Material>(val15);
		val16.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampGateway.png"));
		tracerEmp = PrefabAPI.InstantiateClone(tracer, "ZeriTracerEmp", false);
		LineRenderer[] componentsInChildren6 = tracerEmp.GetComponentsInChildren<LineRenderer>();
		((Renderer)componentsInChildren6[0]).material = val16;
		componentsInChildren6[0].widthMultiplier = 1f;
		componentsInChildren6[1].widthMultiplier = 1f;
		ContentAddition.AddEffect(tracerEmp);
		projectileGhost = PrefabAPI.InstantiateClone(Assets.Load<GameObject>("beamProjectile"), "ZeriProjectileGhost", false);
		projectileGhost.AddComponent<ProjectileGhostController>();
		GameObject gameObject = ((Component)projectileGhost.transform.GetChild(0)).gameObject;
		Utils.AddRotationComponent(gameObject, 1440f, (RotationAxis)2);
		Utils.AddScaleComponent(gameObject, 0.05f);
		projectile = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Vulture/WindbladeProjectile.prefab"), "ZeriProjectile", true);
		projectile.AddComponent<ZeriProjectileBehaviour>();
		projectile.GetComponent<ProjectileController>().ghostPrefab = projectileGhost;
		projectile.GetComponent<ProjectileSingleTargetImpact>().impactEffect = zapImpact;
		ContentAddition.AddProjectile(projectile);
	}
}
internal class BaseZeriState : BaseSkillState
{
	public ZeriBehaviour behaviour;

	public HurtBox target;

	public Animator animator;

	public bool hasDash;

	public bool hasUlt;

	public override void OnEnter()
	{
		((BaseState)this).OnEnter();
		hasUlt = ((EntityState)this).characterBody.HasBuff(Prefabs.ult);
		hasDash = ((EntityState)this).characterBody.HasBuff(Prefabs.dash);
		animator = ((EntityState)this).GetModelAnimator();
		behaviour = ((EntityState)this).GetComponent<ZeriBehaviour>();
		target = ((HuntressTracker)behaviour).trackingTarget;
	}
}
internal class CharacterMain : GenericCharacterMain
{
	private EntityStateMachine slide;

	private Texture2D t;

	public override void OnEnter()
	{
		((GenericCharacterMain)this).OnEnter();
		t = Assets.Load<Texture2D>("thorns");
		slide = Array.Find(((EntityState)this).gameObject.GetComponents<EntityStateMachine>(), (EntityStateMachine x) => x.customName == "Slide");
	}

	public override void HandleMovements()
	{
		if (((EntityState)this).characterBody.HasBuff(Prefabs.dash))
		{
		}
		((GenericCharacterMain)this).HandleMovements();
	}

	public override void ProcessJump()
	{
		Utility utility;
		if (!Object.op_Implicit((Object)(object)slide) || (utility = slide.state as Utility) == null)
		{
			((GenericCharacterMain)this).ProcessJump();
		}
	}
}
internal class Zap : BaseZeriState
{
	private float duration;

	private float endDuration;

	private float baseDuration = 0.25f;

	private float baseEndDuration = 0.15f;

	private float damageCoefficient = 3.4f;

	private bool hasFired;

	public override void OnEnter()
	{
		base.OnEnter();
		duration = baseDuration / ((BaseState)this).attackSpeedStat;
		endDuration = baseEndDuration / ((BaseState)this).attackSpeedStat;
		((EntityState)this).PlayAnimation("Gesture, Override", "Snap" + RoR2Application.rng.RangeInt(0, 3), "M1", duration);
		((Component)((BaseState)this).FindModelChild("zapMuzzleFlash")).GetComponent<ParticleSystem>().Play(true);
	}

	public override void FixedUpdate()
	{
		((EntityState)this).FixedUpdate();
		if (((EntityState)this).fixedAge >= duration && !hasFired)
		{
			hasFired = true;
			Fire();
		}
		if (((EntityState)this).fixedAge >= duration + endDuration && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
	}

	private void Fire()
	{
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0092: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0110: Unknown result type (might be due to invalid IL or missing references)
		//IL_011b: Unknown result type (might be due to invalid IL or missing references)
		if (!Object.op_Implicit((Object)(object)target) && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextStateToMain();
			return;
		}
		behaviour.RemoveCharge(1f);
		AkSoundEngine.PostEvent(Sounds.Play_Zeri_Zap_Cast, ((EntityState)this).gameObject);
		AkSoundEngine.PostEvent(Sounds.Play_Zeri_Zap_Hit, ((Component)target).gameObject);
		Transform val = ((BaseState)this).FindModelChild("handMuzzle");
		if (NetworkServer.active)
		{
			ZapOrb zapOrb = new ZapOrb();
			zapOrb.startTransform = val;
			((Orb)zapOrb).origin = val.position;
			zapOrb.isCrit = ((BaseState)this).RollCrit();
			zapOrb.bouncesRemaining = 0;
			zapOrb.damageValue = ((BaseState)this).damageStat * damageCoefficient;
			zapOrb.bouncedObjects = new List<HealthComponent> { target.healthComponent };
			zapOrb.teamIndex = ((EntityState)this).teamComponent.teamIndex;
			zapOrb.attacker = ((EntityState)this).gameObject;
			zapOrb.procChainMask = default(ProcChainMask);
			zapOrb.procCoefficient = 1f;
			zapOrb.damageColorIndex = (DamageColorIndex)5;
			zapOrb.damageType = (DamageType)524352;
			zapOrb.range = 20f;
			((Orb)zapOrb).target = target;
			OrbManager.instance.AddOrb((Orb)(object)zapOrb);
		}
	}

	public override void OnExit()
	{
		if (hasFired && Object.op_Implicit((Object)(object)behaviour))
		{
			((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)behaviour, ZeriBehaviour.zap, (SkillOverridePriority)4);
		}
		((EntityState)this).OnExit();
	}

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

	private float endDuration;

	private float baseDuration = 0.55f;

	private float baseEndDuration = 0.25f;

	private float shotCount = 7f;

	private float fireStopwatch;

	private float fireTime = 0.7f;

	private float damageCoefficient;

	private ParticleSystem particles;

	public override void OnEnter()
	{
		base.OnEnter();
		if (hasUlt)
		{
			shotCount = 3f;
		}
		damageCoefficient = 2.8f / shotCount;
		behaviour.AddCharge(0.1f);
		duration = baseDuration / (((BaseState)this).attackSpeedStat + (hasUlt ? 0.4f : 0f));
		endDuration = baseEndDuration / ((BaseState)this).attackSpeedStat;
		((EntityState)this).PlayAnimation("Gesture, Override", hasDash ? "PrimaryEmpowered" : ("Primary" + RoR2Application.rng.RangeInt(0, 2)), "M1", duration);
		AkSoundEngine.PostEvent(hasUlt ? Sounds.Play_Zeri_Q_Cast_Emp : Sounds.Play_Zeri_Q_Cast, ((EntityState)this).gameObject);
		particles = ((Component)((BaseState)this).FindModelChild((hasDash || hasUlt) ? "muzzleFlashEmp" : "muzzleFlash")).GetComponent<ParticleSystem>();
	}

	public override void FixedUpdate()
	{
		((EntityState)this).FixedUpdate();
		if (((EntityState)this).fixedAge <= duration)
		{
			fireStopwatch += Time.fixedDeltaTime;
		}
		if (fireStopwatch >= duration * fireTime / shotCount)
		{
			fireStopwatch = 0f;
			Fire();
		}
		if (((EntityState)this).fixedAge >= duration + endDuration && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
	}

	private void Fire()
	{
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0075: Unknown result type (might be due to invalid IL or missing references)
		//IL_008f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_0094: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a5: 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_00b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00be: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c1: 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_00d7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0107: Unknown result type (might be due to invalid IL or missing references)
		//IL_0129: Unknown result type (might be due to invalid IL or missing references)
		//IL_0134: Unknown result type (might be due to invalid IL or missing references)
		//IL_0156: Unknown result type (might be due to invalid IL or missing references)
		//IL_0162: Unknown result type (might be due to invalid IL or missing references)
		//IL_017c: Unknown result type (might be due to invalid IL or missing references)
		//IL_018e: 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_01ad: Unknown result type (might be due to invalid IL or missing references)
		particles.Play(true);
		if (((EntityState)this).isAuthority)
		{
			float num = 0.8f;
			((BaseState)this).AddRecoil(-1f * num, -1.5f * num, -0.25f * num, 0.25f * num);
			Ray aimRay = ((BaseState)this).GetAimRay();
			if (((EntityState)this).isAuthority)
			{
				new BulletAttack
				{
					maxDistance = (hasUlt ? 50 : 40),
					stopperMask = (hasDash ? ((LayerIndex)(ref LayerIndex.world)).mask : ((LayerIndex)(ref LayerIndex.entityPrecise)).mask),
					owner = ((EntityState)this).gameObject,
					weapon = ((EntityState)this).gameObject,
					origin = ((Ray)(ref aimRay)).origin,
					aimVector = ((Ray)(ref aimRay)).direction,
					minSpread = 0f,
					maxSpread = 0.4f,
					bulletCount = 1u,
					damage = ((BaseState)this).damageStat * damageCoefficient,
					force = 155f,
					tracerEffectPrefab = ((hasDash || hasUlt) ? Prefabs.tracerEmp : Prefabs.tracer),
					muzzleName = "gunMuzzle",
					hitEffectPrefab = ((hasDash || hasUlt) ? Prefabs.shotHitEffectEmp : Prefabs.shotHitEffect),
					isCrit = ((BaseState)this).RollCrit(),
					radius = (hasUlt ? 0.17f : 0.12f),
					procCoefficient = 1f / shotCount,
					smartCollision = true,
					damageType = (DamageType)(((EntityState)this).characterBody.HasBuff(Prefabs.ult) ? 64 : 0)
				}.Fire();
			}
		}
	}

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

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

	private float endDuration;

	private float baseDuration = 0.55f;

	private float baseEndDuration = 0.15f;

	private bool hasFired;

	private float damageCoefficient = 5f;

	public override void OnEnter()
	{
		base.OnEnter();
		duration = baseDuration / ((BaseState)this).attackSpeedStat;
		endDuration = baseEndDuration / ((BaseState)this).attackSpeedStat;
		((EntityState)this).PlayAnimation("Gesture, Override", hasDash ? "SecondaryDash" : "Secondary", "M1", duration);
		AkSoundEngine.PostEvent(Sounds.Play_Zeri_W_Cast, ((EntityState)this).gameObject);
		((Component)((BaseState)this).FindModelChild("beamCastEffect")).GetComponent<ParticleSystem>().Play(true);
	}

	public override void FixedUpdate()
	{
		((EntityState)this).FixedUpdate();
		if (((EntityState)this).fixedAge >= duration && !hasFired)
		{
			hasFired = true;
			Fire();
		}
		if (((EntityState)this).fixedAge >= duration + endDuration && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
	}

	private void Fire()
	{
		//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_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0079: Unknown result type (might be due to invalid IL or missing references)
		//IL_0088: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0235: Unknown result type (might be due to invalid IL or missing references)
		//IL_0257: Unknown result type (might be due to invalid IL or missing references)
		//IL_025c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0268: Unknown result type (might be due to invalid IL or missing references)
		//IL_027e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0283: Unknown result type (might be due to invalid IL or missing references)
		//IL_0288: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_02bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_018f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0194: Unknown result type (might be due to invalid IL or missing references)
		//IL_0197: Unknown result type (might be due to invalid IL or missing references)
		//IL_019e: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b7: 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_01c3: Expected O, but got Unknown
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00de: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0105: Unknown result type (might be due to invalid IL or missing references)
		//IL_0110: Unknown result type (might be due to invalid IL or missing references)
		//IL_011b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0122: Unknown result type (might be due to invalid IL or missing references)
		//IL_0135: Unknown result type (might be due to invalid IL or missing references)
		//IL_0140: Unknown result type (might be due to invalid IL or missing references)
		//IL_014b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0152: Unknown result type (might be due to invalid IL or missing references)
		//IL_015d: 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_016f: Unknown result type (might be due to invalid IL or missing references)
		//IL_017a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0181: Unknown result type (might be due to invalid IL or missing references)
		//IL_0183: Unknown result type (might be due to invalid IL or missing references)
		float num = 5f;
		((BaseState)this).AddRecoil(-1f * num, -1.5f * num, -0.25f * num, 0.25f * num);
		((Component)((BaseState)this).FindModelChild("beamEffect")).GetComponent<ParticleSystem>().Play(true);
		Ray aimRay = ((BaseState)this).GetAimRay();
		float num2 = 18f;
		float num3 = 0f;
		RaycastHit val = default(RaycastHit);
		if (behaviour.dashing || Physics.Raycast(CameraRigController.ModifyAimRayIfApplicable(aimRay, ((EntityState)this).gameObject, ref num3), ref val, num2 + num3, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)))
		{
			if (((EntityState)this).isAuthority)
			{
				new BulletAttack
				{
					stopperMask = LayerMask.op_Implicit(0),
					maxDistance = 180f,
					owner = ((EntityState)this).gameObject,
					weapon = ((EntityState)this).gameObject,
					origin = ((Ray)(ref aimRay)).origin,
					aimVector = ((Ray)(ref aimRay)).direction,
					minSpread = 0f,
					maxSpread = 0f,
					bulletCount = 1u,
					damage = ((BaseState)this).damageStat * damageCoefficient,
					force = 1550f,
					muzzleName = "fingerMuzzle",
					tracerEffectPrefab = null,
					hitEffectPrefab = Prefabs.zapImpact,
					isCrit = true,
					radius = 2.5f,
					procCoefficient = 1f,
					smartCollision = true,
					damageType = (DamageType)8
				}.Fire();
			}
			EffectData val2 = new EffectData
			{
				origin = ((Ray)(ref aimRay)).origin + ((Ray)(ref aimRay)).direction * num2,
				start = ((Ray)(ref aimRay)).origin
			};
			EffectManager.SpawnEffect(Prefabs.beamTracer, val2, false);
		}
		else
		{
			AkSoundEngine.PostEvent(Sounds.Play_Zeri_W_Fire, ((EntityState)this).gameObject);
			if (((EntityState)this).isAuthority)
			{
				FireProjectileInfo val3 = default(FireProjectileInfo);
				val3.crit = ((BaseState)this).RollCrit();
				val3.damage = ((EntityState)this).characterBody.damage * damageCoefficient;
				val3.damageTypeOverride = (DamageType)0;
				val3.damageColorIndex = (DamageColorIndex)0;
				val3.force = 500f;
				val3.owner = ((EntityState)this).gameObject;
				val3.position = ((Ray)(ref aimRay)).origin;
				val3.procChainMask = default(ProcChainMask);
				val3.projectilePrefab = Prefabs.projectile;
				val3.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction);
				val3.useFuseOverride = false;
				val3.useSpeedOverride = true;
				((FireProjectileInfo)(ref val3)).speedOverride = 180f;
				val3.target = null;
				FireProjectileInfo val4 = val3;
				ProjectileManager.instance.FireProjectile(val4);
			}
		}
	}

	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 Special : BaseSkillState
{
	private float blastDelay = 0.3f;

	private bool hasFired;

	private float blastDamageCoefficient = 7f;

	private ChildLocator childLocator;

	private GameObject hair;

	private GameObject ultHair;

	private GameObject ultEffect;

	private uint ID;

	public override void OnEnter()
	{
		((BaseState)this).OnEnter();
		childLocator = ((EntityState)this).GetModelChildLocator();
		hair = ((Component)childLocator.FindChild("hair")).gameObject;
		ultHair = ((Component)childLocator.FindChild("ultHair")).gameObject;
		ultEffect = ((Component)childLocator.FindChild("ultEffect")).gameObject;
		hair.SetActive(false);
		ultHair.SetActive(true);
		ultEffect.SetActive(true);
		((EntityState)this).PlayAnimation("FullBody, Override", "Special", "Special", 0.25f);
		AkSoundEngine.PostEvent(Sounds.Play_Zeri_R_Cast, ((EntityState)this).gameObject);
		if (NetworkServer.active)
		{
			((EntityState)this).characterBody.AddTimedBuff(Prefabs.ult, 8f);
		}
	}

	public override void FixedUpdate()
	{
		//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_0058: 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_0074: Expected O, but got Unknown
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_0088: Unknown result type (might be due to invalid IL or missing references)
		//IL_0094: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00be: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0100: Unknown result type (might be due to invalid IL or missing references)
		//IL_0105: Unknown result type (might be due to invalid IL or missing references)
		//IL_010a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0111: Unknown result type (might be due to invalid IL or missing references)
		//IL_0116: Unknown result type (might be due to invalid IL or missing references)
		//IL_011b: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).FixedUpdate();
		if (((EntityState)this).fixedAge >= blastDelay && !hasFired)
		{
			hasFired = true;
			ID = AkSoundEngine.PostEvent(Sounds.Play_Zeri_R_Buff_Loop, ((EntityState)this).gameObject);
			EffectManager.SpawnEffect(Prefabs.ultExplosion, new EffectData
			{
				origin = ((EntityState)this).characterBody.footPosition,
				scale = 18f
			}, false);
			if (((EntityState)this).isAuthority)
			{
				new BlastAttack
				{
					attacker = ((EntityState)this).gameObject,
					baseDamage = ((BaseState)this).damageStat * blastDamageCoefficient,
					baseForce = 12000f,
					crit = ((BaseState)this).RollCrit(),
					damageType = (DamageType)8,
					falloffModel = (FalloffModel)0,
					procCoefficient = 1f,
					radius = 18f,
					position = ((EntityState)this).characterBody.footPosition,
					attackerFiltering = (AttackerFiltering)2,
					impactEffect = EffectCatalog.FindEffectIndexFromPrefab(Prefabs.zapImpact),
					teamIndex = ((EntityState)this).teamComponent.teamIndex
				}.Fire();
			}
		}
		if (((EntityState)this).fixedAge > 8f && !((EntityState)this).characterBody.HasBuff(Prefabs.ult) && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
	}

	public override void OnExit()
	{
		AkSoundEngine.StopPlayingID(ID);
		AkSoundEngine.PostEvent(Sounds.Play_Zeri_R_Buff_End, ((EntityState)this).gameObject);
		hair.SetActive(true);
		ultHair.SetActive(false);
		ultEffect.SetActive(false);
		((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)6;
	}
}
internal class Utility : BaseZeriState
{
	private float duration = 2.5f;

	private Vector3 direction;

	private float speedCoefficient = 8f;

	private float buffStopwatch;

	private AnimationCurve curveLinear = AnimationCurve.Linear(0f, 1f, 1f, 0f);

	private uint ID;

	public override void OnEnter()
	{
		//IL_0086: 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_008d: Unknown result type (might be due to invalid IL or missing references)
		base.OnEnter();
		AkSoundEngine.PostEvent(Sounds.Play_Zeri_Vault, ((EntityState)this).gameObject);
		ID = AkSoundEngine.PostEvent(Sounds.Play_Zeri_Vault_Loop, ((EntityState)this).gameObject);
		behaviour.dashing = true;
		if (NetworkServer.active)
		{
			((EntityState)this).characterBody.AddTimedBuff(Prefabs.dash, 5f);
		}
		animator.SetBool("skip", false);
		((EntityState)this).PlayAnimation("FullBody, Override", "Dash");
		CharacterBody characterBody = ((EntityState)this).characterBody;
		characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1);
	}

	public override void FixedUpdate()
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		//IL_008e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d3: 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_00ff: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f4: 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_0157: Unknown result type (might be due to invalid IL or missing references)
		//IL_015c: Unknown result type (might be due to invalid IL or missing references)
		//IL_015d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0181: Unknown result type (might be due to invalid IL or missing references)
		//IL_018c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0192: Unknown result type (might be due to invalid IL or missing references)
		//IL_019c: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a1: 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)
		((EntityState)this).FixedUpdate();
		((EntityState)this).characterBody.isSprinting = true;
		((EntityState)this).characterMotor.velocity = Vector3.zero;
		if (NetworkServer.active)
		{
			buffStopwatch += Time.fixedDeltaTime;
			if (buffStopwatch >= 0.5f)
			{
				((EntityState)this).characterBody.AddTimedBuff(Prefabs.dash, 5f);
			}
		}
		direction = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector);
		Vector3 val = -((EntityState)this).transform.up;
		RaycastHit val2 = default(RaycastHit);
		val = ((!Physics.Raycast(((EntityState)this).transform.position, direction, ref val2, 2f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) ? (val * 1f) : (val * -1f));
		float num = 1f;
		if (((EntityState)this).fixedAge >= duration * 0.75f)
		{
			num = curveLinear.Evaluate(((EntityState)this).fixedAge / duration * 0.25f);
		}
		CharacterMotor characterMotor = ((EntityState)this).characterMotor;
		characterMotor.rootMotion += (direction + val) * Util.Remap(((BaseState)this).moveSpeedStat, 3f, 30f, 1f, 8f) * speedCoefficient * num * Time.fixedDeltaTime;
		if (((EntityState)this).isAuthority && (((EntityState)this).fixedAge >= duration || (((EntityState)this).fixedAge >= 0.2f && ((ButtonState)(ref ((EntityState)this).inputBank.skill3)).justPressed)))
		{
			((EntityState)this).outer.SetNextState((EntityState)(object)new UtilityEnd());
		}
	}

	public override void OnExit()
	{
		AkSoundEngine.StopPlayingID(ID);
		((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 UtilityEnd : BaseZeriState
{
	public override void OnEnter()
	{
		//IL_001b: 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_0023: Unknown result type (might be due to invalid IL or missing references)
		base.OnEnter();
		behaviour.dashing = false;
		CharacterBody characterBody = ((EntityState)this).characterBody;
		characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2);
		animator.SetBool("skip", true);
	}

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

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		return (InterruptPriority)2;
	}
}
internal class Sounds
{
	public static readonly uint Play_Zeri_W_Hit = 502496202u;

	public static readonly uint Play_Zeri_Vault = 513469639u;

	public static readonly uint Play_Zeri_W_Beam = 595767546u;

	public static readonly uint Play_Zeri_Q_Cast_Emp = 1114467683u;

	public static readonly uint Play_Zeri_Q_Cast = 1131720492u;

	public static readonly uint Play_Zeri_R_Chain_Hit = 1671415021u;

	public static readonly uint Play_Zeri_R_Cast = 2423159305u;

	public static readonly uint Play_Zeri_Recall = 2496843474u;

	public static readonly uint Play_Zeri_SlideStep = 2716309762u;

	public static readonly uint Play_Zeri_Zap_Hit = 3027015552u;

	public static readonly uint Play_Zeri_R_Buff_Loop = 3119151764u;

	public static readonly uint Play_Zeri_Zap_Cast = 3204731648u;

	public static readonly uint Play_Zeri_W_Cast = 3375703230u;

	public static readonly uint Play_Zeri_Q_Hit = 3754734020u;

	public static readonly uint Play_Zeri_W_Fire = 3871464959u;

	public static readonly uint Play_Zeri_Zap_Gain = 3962344328u;

	public static readonly uint Play_Zeri_R_Buff_End = 4051415217u;

	public static readonly uint Play_Zeri_Vault_Loop = 4061293372u;
}
internal static class Extensions
{
	public static GameObject NewSyringe(this GameObject g, params Material[] m)
	{
		((Renderer)g.GetComponentsInChildren<MeshRenderer>(false)[0]).material = m[0];
		((Renderer)g.GetComponent<TrailRenderer>()).material = m[1];
		((Renderer)g.GetComponent<ParticleSystemRenderer>()).material = m[2];
		return g;
	}

	public static Material SwapTexture(this Material m, Texture2D t)
	{
		m.mainTexture = (Texture)(object)t;
		return m;
	}

	public static GameObject SwapMaterials(this GameObject g, Material[] m)
	{
		Renderer[] componentsInChildren = g.GetComponentsInChildren<Renderer>();
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			if (Object.op_Implicit((Object)(object)m[i]))
			{
				componentsInChildren[i].material = m[i];
			}
		}
		return g;
	}

	public static float Mult(this float f, float mult = 100f)
	{
		return f * mult;
	}

	public static Color ToRGB255(this Color c, string title, string body)
	{
		//IL_0001: 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_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		return new Color(c.r / 255f, c.g / 255f, c.b / 255f);
	}

	public static void SetStrings(this TooltipProvider t, string title, string body)
	{
		t.overrideTitleText = title;
		t.overrideBodyText = body;
	}
}
internal class Utils
{
	public static EntityStateMachine NewStateMachine<T>(GameObject obj, string customName) where T : EntityState
	{
		//IL_0021: 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_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		SerializableEntityStateType val = default(SerializableEntityStateType);
		((SerializableEntityStateType)(ref val))..ctor(typeof(T));
		EntityStateMachine val2 = obj.AddComponent<EntityStateMachine>();
		val2.customName = customName;
		val2.initialStateType = val;
		val2.mainStateType = val;
		return val2;
	}

	public static GenericSkill NewGenericSkill(GameObject obj, SkillDef skill)
	{
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Expected O, but got Unknown
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		GenericSkill val = obj.AddComponent<GenericSkill>();
		SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>();
		val2.variants = (Variant[])(object)new Variant[1];
		val._skillFamily = val2;
		SkillFamily skillFamily = val.skillFamily;
		Variant[] variants = skillFamily.variants;
		Variant val3 = new Variant
		{
			skillDef = skill
		};
		((Variant)(ref val3)).viewableNode = new Node(skill.skillNameToken, false, (Node)null);
		variants[0] = val3;
		ContentAddition.AddSkillFamily(skillFamily);
		return val;
	}

	public static void AddAlt(SkillFamily skillFamily, SkillDef SkillDef)
	{
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Expected O, but got Unknown
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
		Variant[] variants = skillFamily.variants;
		int num = skillFamily.variants.Length - 1;
		Variant val = new Variant
		{
			skillDef = SkillDef
		};
		((Variant)(ref val)).viewableNode = new Node(SkillDef.skillNameToken, false, (Node)null);
		variants[num] = val;
	}

	public static BuffDef NewBuffDef(string name, bool stack, bool hidden, Sprite sprite, Color color)
	{
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		BuffDef val = ScriptableObject.CreateInstance<BuffDef>();
		((Object)val).name = name;
		val.canStack = stack;
		val.isHidden = hidden;
		val.iconSprite = sprite;
		val.buffColor = color;
		ContentAddition.AddBuffDef(val);
		return val;
	}

	public static ObjectScaleCurve AddScaleComponent(GameObject target, float timeMax)
	{
		ObjectScaleCurve val = target.AddComponent<ObjectScaleCurve>();
		val.useOverallCurveOnly = true;
		val.timeMax = timeMax;
		val.overallCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f);
		return val;
	}

	public static RotateAroundAxis AddRotationComponent(GameObject target, float speed, RotationAxis axis)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		RotateAroundAxis val = target.AddComponent<RotateAroundAxis>();
		val.speed = (Speed)2;
		val.fastRotationSpeed = speed;
		val.rotateAroundAxis = axis;
		return val;
	}

	public static GameObject NewDisplayModel(GameObject model, string name)
	{
		//IL_0065: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = PrefabAPI.InstantiateClone(model, name, false);
		((Component)val.GetComponentInChildren<ChildLocator>().FindChild("props")).gameObject.SetActive(true);
		val.GetComponentInChildren<Animator>().runtimeAnimatorController = Assets.Load<RuntimeAnimatorController>("displayAnimator");
		((Behaviour)val.GetComponentInChildren<CharacterModel>()).enabled = false;
		SkinnedMeshRenderer[] componentsInChildren = val.GetComponentsInChildren<SkinnedMeshRenderer>();
		foreach (S