Decompiled source of Talus v1.0.0

Talus.dll

Decompiled 5 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 EntityStates.ClayBruiser.Weapon;
using KinematicCharacterController;
using R2API;
using R2API.Utils;
using Rewired.ComponentControls.Effects;
using RoR2;
using RoR2.Achievements;
using RoR2.Skills;
using RoR2.UI;
using UnityEngine;
using UnityEngine.AddressableAssets;
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("Talus")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Talus")]
[assembly: AssemblyTitle("Talus")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Talus;

public static class Achievements
{
	[RegisterAchievement("TALUS_MASTERY", "ACHIEVEMENT_TALUS_MASTERY_UNLOCKABLE_ID", null, null)]
	public class MasteryUnlockable : BasePerSurvivorClearGameMonsoonAchievement
	{
		public override BodyIndex LookUpRequiredBodyIndex()
		{
			//IL_0006: 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_000e: Unknown result type (might be due to invalid IL or missing references)
			return BodyCatalog.FindBodyIndex("TalusBody");
		}
	}

	[RegisterAchievement("TALUS_PASSIVE1", "ACHIEVEMENT_TALUS_PASSIVE1_UNLOCKABLE_ID", null, null)]
	public class Passive1Unlockable : BaseAchievement
	{
		public override BodyIndex LookUpRequiredBodyIndex()
		{
			//IL_0006: 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_000e: Unknown result type (might be due to invalid IL or missing references)
			return BodyCatalog.FindBodyIndex("TalusBody");
		}

		public override void OnBodyRequirementMet()
		{
			((BaseAchievement)this).OnBodyRequirementMet();
			Inventory.onInventoryChangedGlobal += Inventory_onInventoryChangedGlobal;
		}

		public override void OnBodyRequirementBroken()
		{
			Inventory.onInventoryChangedGlobal -= Inventory_onInventoryChangedGlobal;
			((BaseAchievement)this).OnBodyRequirementBroken();
		}

		private void Inventory_onInventoryChangedGlobal(Inventory inventory)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: 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_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			int num = 0;
			ItemIndex val = (ItemIndex)0;
			for (ItemIndex val2 = (ItemIndex)ItemCatalog.itemCount; val < val2; val = (ItemIndex)(val + 1))
			{
				if (ItemCatalog.GetItemDef(val).ContainsTag((ItemTag)3))
				{
					num += inventory.GetItemCount(val);
					if (num >= 20)
					{
						((BaseAchievement)this).Grant();
						break;
					}
				}
			}
		}
	}

	[RegisterAchievement("TALUS_PASSIVE2", "ACHIEVEMENT_TALUS_PASSIVE2_UNLOCKABLE_ID", null, null)]
	public class Passive2Unlockable : BaseAchievement
	{
		public override BodyIndex LookUpRequiredBodyIndex()
		{
			//IL_0006: 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_000e: Unknown result type (might be due to invalid IL or missing references)
			return BodyCatalog.FindBodyIndex("TalusBody");
		}

		public override void OnBodyRequirementMet()
		{
			((BaseAchievement)this).OnBodyRequirementMet();
			Run.onClientGameOverGlobal += OnClientGameOverGlobal;
			GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal;
		}

		public override void OnBodyRequirementBroken()
		{
			Run.onClientGameOverGlobal -= OnClientGameOverGlobal;
			GlobalEventManager.onCharacterDeathGlobal -= GlobalEventManager_onCharacterDeathGlobal;
			((BaseAchievement)this).OnBodyRequirementBroken();
		}

		private void GlobalEventManager_onCharacterDeathGlobal(DamageReport damageReport)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			if (damageReport.victimBodyIndex == BodyCatalog.FindBodyIndex("BrotherHurtBody"))
			{
				((BaseAchievement)this).Grant();
			}
		}

		private void OnClientGameOverGlobal(Run run, RunReport runReport)
		{
			if (Object.op_Implicit((Object)(object)runReport.gameEnding) && runReport.gameEnding.isWin && (Object)(object)runReport.gameEnding == (Object)(object)GameEndings.ObliterationEnding)
			{
				((BaseAchievement)this).Grant();
			}
		}
	}

	internal static UnlockableDef masteryUnlock;

	internal static UnlockableDef passive1Unlock;

	internal static UnlockableDef passive2Unlock;

	public static void RegisterUnlockables()
	{
		masteryUnlock = NewUnlockable<MasteryUnlockable>("MASTERY", Assets.MainAssetBundle.LoadAsset<Sprite>("skin"), "TALUS: Mastery", "As Talus, beat the game or obliterate on Monsoon.");
		passive1Unlock = NewUnlockable<Passive1Unlockable>("PASSIVE1", Assets.MainAssetBundle.LoadAsset<Sprite>("passive2"), "TALUS: Faustian Bargain", "As Talus, carry 20 Utility items in a single run.");
		passive2Unlock = NewUnlockable<Passive2Unlockable>("PASSIVE2", Assets.MainAssetBundle.LoadAsset<Sprite>("passive3"), "TALUS: Nothing Personal", "As Talus, defeat Mithrix or obliterate.");
	}

	private static UnlockableDef NewUnlockable<T>(string AchievementIdentifier, Sprite Icon, string Title, string Description) where T : BaseAchievement
	{
		string text = "ACHIEVEMENT_TALUS_";
		UnlockableDef val = ScriptableObject.CreateInstance<UnlockableDef>();
		string langName = text + AchievementIdentifier + "_NAME";
		string langDesc = text + AchievementIdentifier + "_DESCRIPTION";
		LanguageAPI.Add(langName, Title);
		LanguageAPI.Add(langDesc, Description);
		Func<string> func = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2]
		{
			Language.GetString(langName),
			Language.GetString(langDesc)
		});
		Type typeFromHandle = typeof(T);
		val.cachedName = text + AchievementIdentifier + "_UNLOCKABLE_ID";
		val.getHowToUnlockString = func;
		val.getUnlockedString = func;
		val.achievementIcon = Icon;
		val.sortScore = 200;
		val.hidden = false;
		ContentAddition.AddUnlockableDef(val);
		return val;
	}
}
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()
	{
		Assembly executingAssembly = Assembly.GetExecutingAssembly();
		if ((Object)(object)MainAssetBundle == (Object)null)
		{
			using Stream stream = executingAssembly.GetManifestResourceStream("Talus.AssetBundle." + "Talus".ToLower() + "assets");
			MainAssetBundle = AssetBundle.LoadFromStream(stream);
		}
		using Stream stream2 = executingAssembly.GetManifestResourceStream("Talus.Talus.bnk");
		byte[] array = new byte[stream2.Length];
		stream2.Read(array, 0, array.Length);
		SoundBanks.Add(array);
	}
}
internal class AnimEvent : MonoBehaviour
{
	public void PlaySound(string s)
	{
		AkSoundEngine.PostEvent(s, ((Component)this).gameObject);
	}
}
internal class EntityRevealer : MonoBehaviour
{
	public HealthComponent health;

	public TemporaryOverlay overlay;

	private void Start()
	{
		health = ((Component)this).GetComponent<HealthComponent>();
	}

	private void FixedUpdate()
	{
		if (!Object.op_Implicit((Object)(object)health))
		{
			return;
		}
		if (health.combinedHealth < health.fullCombinedHealth * 0.65f)
		{
			if (!Object.op_Implicit((Object)(object)overlay))
			{
				Transform modelTransform = health.body.modelLocator.modelTransform;
				CharacterModel component = ((Component)modelTransform).GetComponent<CharacterModel>();
				if (Object.op_Implicit((Object)(object)component))
				{
					overlay = ((Component)modelTransform).gameObject.AddComponent<TemporaryOverlay>();
					overlay.animateShaderAlpha = false;
					overlay.originalMaterial = Prefabs.revealMat;
					overlay.destroyComponentOnEnd = false;
					overlay.destroyObjectOnEnd = false;
					overlay.AddToCharacerModel(component);
				}
			}
		}
		else if (Object.op_Implicit((Object)(object)overlay))
		{
			Object.Destroy((Object)(object)overlay);
		}
	}
}
internal class TrackerBehaviour : HuntressTracker
{
	private float stopwatch;

	public OverrideRequest crosshairOverrideRequest;

	public PrintController printController;

	public int passiveIndex;

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

	private void Start()
	{
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		((HuntressTracker)this).Start();
		GenericSkill skill = ((Component)this).GetComponent<GenericSkill>();
		passiveIndex = Array.IndexOf(skill.skillFamily.variants, Array.Find(skill.skillFamily.variants, (Variant x) => (Object)(object)x.skillDef == (Object)(object)skill.skillDef));
	}

	private void FixedUpdate()
	{
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0071: Unknown result type (might be due to invalid IL or missing references)
		//IL_0076: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: 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_00a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
		base.trackerUpdateStopwatch = 0f;
		stopwatch += Time.fixedDeltaTime;
		if (stopwatch >= 1f / base.trackerUpdateFrequency)
		{
			stopwatch = 0f;
			Ray val = default(Ray);
			((Ray)(ref val))..ctor(base.inputBank.aimOrigin, base.inputBank.aimDirection);
			base.search.teamMaskFilter = TeamMask.GetUnprotectedTeams(base.teamComponent.teamIndex);
			base.search.filterByLoS = false;
			base.search.searchOrigin = ((Ray)(ref val)).origin;
			base.search.searchDirection = ((Ray)(ref val)).direction;
			base.search.sortMode = (SortMode)1;
			base.search.maxDistanceFilter = 9999f;
			base.search.maxAngleFilter = base.maxTrackingAngle;
			base.search.RefreshCandidates();
			base.search.FilterOutGameObject(((Component)this).gameObject);
			base.trackingTarget = base.search.GetResults().FirstOrDefault();
			base.indicator.targetTransform = (Object.op_Implicit((Object)(object)base.trackingTarget) ? ((Component)base.trackingTarget).transform : null);
		}
	}

	public void CrosshairOverride()
	{
		DisposeCrosshairOverride();
		crosshairOverrideRequest = CrosshairUtils.RequestOverrideForBody(base.characterBody, Prefabs.crosshair, (OverridePriority)1);
	}

	public void DisposeCrosshairOverride()
	{
		if (crosshairOverrideRequest != null)
		{
			crosshairOverrideRequest.Dispose();
		}
	}

	public void PrintOut()
	{
		printController.printCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
		((Behaviour)printController).enabled = true;
	}

	public void PrintIn()
	{
		printController.printCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f);
		((Behaviour)printController).enabled = true;
	}
}
[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.Talus", "Talus", "1.0.0")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
public class MainPlugin : BaseUnityPlugin
{
	[Serializable]
	[CompilerGenerated]
	private sealed class <>c
	{
		public static readonly <>c <>9 = new <>c();

		public static Action<CharacterBody> <>9__8_0;

		public static StatHookEventHandler <>9__8_1;

		internal void <Awake>b__8_0(CharacterBody b)
		{
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances)
			{
				CharacterMaster master = instance.master;
				CharacterBody val = (Object.op_Implicit((Object)(object)master) ? master.GetBody() : null);
				TrackerBehaviour trackerBehaviour = (Object.op_Implicit((Object)(object)val) ? ((Component)val).GetComponent<TrackerBehaviour>() : null);
				if (Object.op_Implicit((Object)(object)trackerBehaviour) && trackerBehaviour.passiveIndex == 2)
				{
					TeamMask enemyTeams = TeamMask.GetEnemyTeams(val.teamComponent.teamIndex);
					if (((TeamMask)(ref enemyTeams)).HasTeam(b.teamComponent.teamIndex) && val.hasEffectiveAuthority)
					{
						((Component)b).gameObject.AddComponent<EntityRevealer>();
					}
				}
			}
		}

		internal void <Awake>b__8_1(CharacterBody body, StatHookEventArgs args)
		{
			TrackerBehaviour component = ((Component)body).GetComponent<TrackerBehaviour>();
			if (Object.op_Implicit((Object)(object)component) && component.passiveIndex == 2)
			{
				args.specialCooldownMultAdd -= 0.15f;
			}
		}
	}

	public const string MODUID = "com.Dragonyck.Talus";

	public const string MODNAME = "Talus";

	public const string VERSION = "1.0.0";

	public const string SURVIVORNAME = "Talus";

	public const string SURVIVORNAMEKEY = "TALUS";

	public static GameObject characterPrefab;

	private static readonly Color characterColor = Color32.op_Implicit(new Color32((byte)117, (byte)44, (byte)102, byte.MaxValue));

	public static SkillDef primaryEmp;

	private void Awake()
	{
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_0065: Unknown result type (might be due to invalid IL or missing references)
		//IL_006b: Expected O, but got Unknown
		Assets.PopulateAssets();
		Achievements.RegisterUnlockables();
		Prefabs.CreatePrefabs();
		CreatePrefab();
		RegisterStates();
		RegisterCharacter();
		CharacterBody.onBodyStartGlobal += delegate(CharacterBody b)
		{
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances)
			{
				CharacterMaster master = instance.master;
				CharacterBody val2 = (Object.op_Implicit((Object)(object)master) ? master.GetBody() : null);
				TrackerBehaviour trackerBehaviour = (Object.op_Implicit((Object)(object)val2) ? ((Component)val2).GetComponent<TrackerBehaviour>() : null);
				if (Object.op_Implicit((Object)(object)trackerBehaviour) && trackerBehaviour.passiveIndex == 2)
				{
					TeamMask enemyTeams = TeamMask.GetEnemyTeams(val2.teamComponent.teamIndex);
					if (((TeamMask)(ref enemyTeams)).HasTeam(b.teamComponent.teamIndex) && val2.hasEffectiveAuthority)
					{
						((Component)b).gameObject.AddComponent<EntityRevealer>();
					}
				}
			}
		};
		object obj = <>c.<>9__8_1;
		if (obj == null)
		{
			StatHookEventHandler val = delegate(CharacterBody body, StatHookEventArgs args)
			{
				TrackerBehaviour component = ((Component)body).GetComponent<TrackerBehaviour>();
				if (Object.op_Implicit((Object)(object)component) && component.passiveIndex == 2)
				{
					args.specialCooldownMultAdd -= 0.15f;
				}
			};
			<>c.<>9__8_1 = val;
			obj = (object)val;
		}
		RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj;
	}

	internal static void CreatePrefab()
	{
		//IL_0006: 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_0127: Unknown result type (might be due to invalid IL or missing references)
		//IL_012e: Expected O, but got Unknown
		//IL_015b: 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_017f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0189: Unknown result type (might be due to invalid IL or missing references)
		//IL_0199: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a0: Expected O, but got Unknown
		//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_0212: Unknown result type (might be due to invalid IL or missing references)
		//IL_021f: Unknown result type (might be due to invalid IL or missing references)
		//IL_022c: Unknown result type (might be due to invalid IL or missing references)
		//IL_029f: Unknown result type (might be due to invalid IL or missing references)
		//IL_03d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_040b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0410: Unknown result type (might be due to invalid IL or missing references)
		//IL_0474: Unknown result type (might be due to invalid IL or missing references)
		//IL_0479: Unknown result type (might be due to invalid IL or missing references)
		//IL_04a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_0535: Unknown result type (might be due to invalid IL or missing references)
		//IL_0565: Unknown result type (might be due to invalid IL or missing references)
		//IL_0572: Unknown result type (might be due to invalid IL or missing references)
		//IL_062f: Unknown result type (might be due to invalid IL or missing references)
		//IL_064c: Unknown result type (might be due to invalid IL or missing references)
		//IL_07f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_085c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0870: Unknown result type (might be due to invalid IL or missing references)
		//IL_08bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_08c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_08e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_08ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_091a: Unknown result type (might be due to invalid IL or missing references)
		//IL_091f: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoBody.prefab").WaitForCompletion();
		characterPrefab = PrefabAPI.InstantiateClone(val, "TalusBody", true);
		TrackerBehaviour trackerBehaviour = characterPrefab.AddComponent<TrackerBehaviour>();
		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>("talusMdl");
		PrintController val3 = val2.AddComponent<PrintController>();
		((Behaviour)val3).enabled = false;
		val3.printTime = 0.6f;
		val3.disableWhenFinished = true;
		val3.startingPrintHeight = 4f;
		val3.maxPrintHeight = -1f;
		val3.startingPrintBias = 2f;
		val3.maxPrintBias = 0.95f;
		val3.printCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f);
		trackerBehaviour.printController = val3;
		GameObject val4 = new GameObject("ModelBase");
		val4.transform.parent = characterPrefab.transform;
		val4.transform.localPosition = new Vector3(0f, -0.94f, 0f);
		val4.transform.localRotation = Quaternion.identity;
		val4.transform.localScale = Vector3.one * 0.8f;
		GameObject val5 = new GameObject("AimOrigin");
		val5.transform.parent = val4.transform;
		val5.transform.localPosition = new Vector3(0f, 1.4f, 0f);
		val5.transform.localRotation = Quaternion.identity;
		val5.transform.localScale = Vector3.one;
		Transform transform = val2.transform;
		transform.parent = val4.transform;
		transform.localPosition = Vector3.zero;
		transform.localScale = Vector3.one;
		transform.localRotation = Quaternion.identity;
		CharacterDirection component = characterPrefab.GetComponent<CharacterDirection>();
		component.targetTransform = val4.transform;
		component.modelAnimator = val2.GetComponentInChildren<Animator>();
		component.turnSpeed = 720f;
		CharacterBody component2 = characterPrefab.GetComponent<CharacterBody>();
		((Object)component2).name = "TalusBody";
		component2.baseNameToken = "TALUS_NAME";
		component2.subtitleNameToken = "TALUS_SUBTITLE";
		component2.bodyFlags = (BodyFlags)16;
		component2.rootMotionInMainState = false;
		component2.mainRootSpeed = 0f;
		component2.baseMaxHealth = 110f;
		component2.levelMaxHealth = 35f;
		component2.baseRegen = 1.5f;
		component2.levelRegen = 0.2f;
		component2.baseMaxShield = 0f;
		component2.levelMaxShield = 0f;
		component2.baseMoveSpeed = 7f;
		component2.levelMoveSpeed = 0f;
		component2.baseAcceleration = 110f;
		component2.baseJumpPower = 15f;
		component2.levelJumpPower = 0f;
		component2.baseDamage = 12f;
		component2.levelDamage = 2.4f;
		component2.baseAttackSpeed = 1f;
		component2.levelAttackSpeed = 0f;
		component2.baseCrit = 1f;
		component2.levelCrit = 0f;
		component2.baseArmor = 0f;
		component2.levelArmor = 0f;
		component2.baseJumpCount = 1;
		component2.sprintingSpeedMultiplier = 1.45f;
		component2.wasLucky = false;
		component2.hideCrosshair = false;
		component2.aimOriginTransform = val5.transform;
		component2.hullClassification = (HullClassification)0;
		component2.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait").texture;
		component2.isChampion = false;
		component2.currentVehicle = null;
		component2.skinIndex = 0u;
		component2.bodyColor = characterColor;
		CharacterMotor component3 = characterPrefab.GetComponent<CharacterMotor>();
		component3.walkSpeedPenaltyCoefficient = 1f;
		component3.characterDirection = component;
		component3.muteWalkMotion = false;
		component3.mass = 110f;
		component3.airControl = 0.25f;
		component3.disableAirControlUntilCollision = false;
		component3.generateParametersOnAwake = true;
		InputBankTest component4 = characterPrefab.GetComponent<InputBankTest>();
		component4.moveVector = Vector3.zero;
		CameraTargetParams component5 = characterPrefab.GetComponent<CameraTargetParams>();
		component5.cameraParams = val.GetComponent<CameraTargetParams>().cameraParams;
		component5.cameraPivotTransform = null;
		component5.recoil = Vector2.zero;
		component5.dontRaycastToPivot = false;
		ModelLocator component6 = characterPrefab.GetComponent<ModelLocator>();
		component6.modelTransform = transform;
		component6.modelBaseTransform = val4.transform;
		component6.dontReleaseModelOnDeath = false;
		component6.autoUpdateModelTransform = true;
		component6.dontDetatchFromParent = false;
		component6.noCorpse = false;
		component6.normalizeToFloor = false;
		component6.preserveModel = false;
		ChildLocator component7 = val2.GetComponent<ChildLocator>();
		CharacterModel val6 = val2.AddComponent<CharacterModel>();
		SkinnedMeshRenderer[] componentsInChildren = val2.GetComponentsInChildren<SkinnedMeshRenderer>();
		List<RendererInfo> list = new List<RendererInfo>();
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			list.Add(new RendererInfo
			{
				renderer = (Renderer)(object)componentsInChildren[i],
				defaultMaterial = Utils.InstantiateMaterial(((Renderer)componentsInChildren[i]).material.mainTexture),
				defaultShadowCastingMode = (ShadowCastingMode)1,
				ignoreOverlays = false
			});
		}
		RendererInfo[] array = list.ToArray();
		val6.body = component2;
		val6.baseRendererInfos = array;
		val6.autoPopulateLightInfos = true;
		val6.invisibilityCount = 0;
		val6.temporaryOverlays = new List<TemporaryOverlay>();
		val6.mainSkinnedMeshRenderer = componentsInChildren[0];
		GameObject gameObject = ((Component)transform).gameObject;
		CharacterModel component8 = gameObject.GetComponent<CharacterModel>();
		ModelSkinController val7 = gameObject.AddComponent<ModelSkinController>();
		ChildLocator component9 = gameObject.GetComponent<ChildLocator>();
		LanguageAPI.Add("TALUSBODY_DEFAULT_SKIN_NAME", "Default");
		LanguageAPI.Add("TALUSBODY_MASTERY_SKIN_NAME", "Mastery");
		val7.skins = (SkinDef[])(object)new SkinDef[2]
		{
			LoadoutAPI.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "TALUSBODY_DEFAULT_SKIN_NAME", "base", array)),
			LoadoutAPI.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "TALUSBODY_MASTERY_SKIN_NAME", "skin", array))
		};
		SkinnedMeshRenderer[] array2 = componentsInChildren;
		foreach (SkinnedMeshRenderer val8 in array2)
		{
			string name = ((Object)val8).name;
			if (name.Contains("skin"))
			{
				((Component)val8).gameObject.SetActive(false);
			}
		}
		HealthComponent component10 = characterPrefab.GetComponent<HealthComponent>();
		component10.health = component2.baseMaxHealth;
		component10.shield = 0f;
		component10.barrier = 0f;
		component10.magnetiCharge = 0f;
		component10.body = null;
		component10.dontShowHealthbar = false;
		characterPrefab.GetComponent<Interactor>().maxInteractionDistance = 3f;
		characterPrefab.GetComponent<InteractionDriver>().highlightInteractor = true;
		SfxLocator component11 = characterPrefab.GetComponent<SfxLocator>();
		component11.deathSound = "Play_ui_player_death";
		component11.barkSound = "";
		component11.openSound = "";
		component11.landingSound = "Play_char_land";
		component11.fallDamageSound = "Play_char_land_fall_damage";
		component11.aliveLoopStart = "";
		component11.aliveLoopStop = "";
		characterPrefab.GetComponent<Rigidbody>().mass = 110f;
		Collider[] componentsInChildren2 = val2.GetComponentsInChildren<Collider>();
		HurtBoxGroup val9 = val2.AddComponent<HurtBoxGroup>();
		List<HurtBox> list2 = new List<HurtBox>();
		Collider[] array3 = componentsInChildren2;
		foreach (Collider val10 in array3)
		{
			HurtBox val11 = ((Component)val10).gameObject.AddComponent<HurtBox>();
			((Component)val11).gameObject.layer = LayerIndex.entityPrecise.intVal;
			val11.healthComponent = component10;
			val11.isBullseye = true;
			val11.damageModifier = (DamageModifier)0;
			val11.hurtBoxGroup = val9;
			val11.indexInGroup = 0;
			val9.mainHurtBox = val11;
			val9.bullseyeCount = 1;
			list2.Add(val11);
		}
		val9.hurtBoxes = list2.ToArray();
		Utils.CreateHitbox("Punch", val2.transform, new Vector3(6f, 6f, 8f), new Vector3(0f, 0.7f, 3.5f));
		KinematicCharacterMotor component12 = characterPrefab.GetComponent<KinematicCharacterMotor>();
		component12.CharacterController = (BaseCharacterController)(object)component3;
		FootstepHandler val12 = val2.AddComponent<FootstepHandler>();
		val12.baseFootstepString = "Play_player_footstep";
		val12.sprintFootstepOverrideString = "";
		val12.enableFootstepDust = true;
		val12.footstepDustPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/GenericFootstepDust.prefab").WaitForCompletion();
		EntityStateMachine component13 = ((Component)component2).GetComponent<EntityStateMachine>();
		component13.mainStateType = new SerializableEntityStateType(typeof(CharacterMain));
		CharacterDeathBehavior component14 = characterPrefab.GetComponent<CharacterDeathBehavior>();
		component14.deathStateMachine = characterPrefab.GetComponent<EntityStateMachine>();
		component14.deathState = new SerializableEntityStateType(typeof(GenericCharacterDeath));
		NetworkStateMachine component15 = ((Component)component2).GetComponent<NetworkStateMachine>();
		component15.stateMachines = ((Component)component2).GetComponents<EntityStateMachine>();
		ContentAddition.AddBody(characterPrefab);
	}

	private void RegisterCharacter()
	{
		//IL_007d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0082: Unknown result type (might be due to invalid IL or missing references)
		string text = "Talus is an Agile Survivor implemented from the game Paladins, his gameplay focuses on escaping fate and overcharging his primary to do more damage.<style=cSub>\r\n\r\n< ! > If you wait a few seconds after reloading, you will get full capacity of Veracharger back again! Useful if you are running low on Ammo!\r\n\r\n< ! > If you are having a hard time getting to a chest, use your Blitz Upper in it's direction to move yourself closer to it!\r\n\r\n< ! > Remember to use your Rune of Travel, it may be annoying teleporting back to where you previously were, but there is no shame in a tactical retreat!\r\n\r\n< ! > You can use your True Power to move yourself from one end of the map to another, giving yourself a temporary invulnerability and overcharging your primary!\r\n\r\n< ! > Experiment with the passives as you unlock them to see which ones you find most fitting!\r\n\r\n";
		string text2 = "..and so he left.";
		string text3 = "..and so he vanished.";
		LanguageAPI.Add("TALUS_NAME", "Talus");
		LanguageAPI.Add("TALUS_DESCRIPTION", text);
		LanguageAPI.Add("TALUS_SUBTITLE", "");
		LanguageAPI.Add("TALUS_OUTRO", text2);
		LanguageAPI.Add("TALUS_FAIL", text3);
		SurvivorDef val = ScriptableObject.CreateInstance<SurvivorDef>();
		val.cachedName = "TALUS_NAME";
		val.unlockableDef = null;
		val.descriptionToken = "TALUS_DESCRIPTION";
		val.primaryColor = characterColor;
		val.bodyPrefab = characterPrefab;
		val.displayPrefab = Utils.NewDisplayModel(((Component)characterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "TalusDisplay");
		val.outroFlavorToken = "TALUS_OUTRO";
		val.desiredSortPosition = 18f;
		val.mainEndingEscapeFailureFlavorToken = "TALUS_FAIL";
		ContentAddition.AddSurvivorDef(val);
		SkillSetup();
		GameObject val2 = PrefabAPI.InstantiateClone(Prefabs.Load<GameObject>("RoR2/Base/Commando/CommandoMonsterMaster.prefab"), "TalusMaster", true);
		ContentAddition.AddMaster(val2);
		CharacterMaster component = val2.GetComponent<CharacterMaster>();
		component.bodyPrefab = characterPrefab;
	}

	private void RegisterStates()
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		bool flag = default(bool);
		ContentAddition.AddEntityState<Primary>(ref flag);
		ContentAddition.AddEntityState<Secondary>(ref flag);
		ContentAddition.AddEntityState<SecondaryPunch>(ref flag);
		ContentAddition.AddEntityState<Utility>(ref flag);
		ContentAddition.AddEntityState<UtilityTeleport>(ref flag);
		ContentAddition.AddEntityState<Special>(ref flag);
		ContentAddition.AddEntityState<SpecialTeleport>(ref flag);
		ContentAddition.AddEntityState<CharacterMain>(ref flag);
		ContentAddition.AddEntityState<Reload>(ref flag);
		ContentAddition.AddEntityState<PrimaryReloadWait>(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()
	{
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b0: 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_0137: Unknown result type (might be due to invalid IL or missing references)
		//IL_0170: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0236: Unknown result type (might be due to invalid IL or missing references)
		LanguageAPI.Add("TALUS_PASSIVE1_NAME", "Inner Strength");
		LanguageAPI.Add("TALUS_PASSIVE1_DESCRIPTION", "Resets <style=cIsDamage>Veracharger</style> stocks and <style=cIsDamage>Blitz Upper</style> cooldown when you <style=cIsUtility>teleport</style> using <style=cIsDamage>Rune of Travel</style>.");
		LanguageAPI.Add("TALUS_PASSIVE2_NAME", "Faustian Bargain");
		LanguageAPI.Add("TALUS_PASSIVE2_DESCRIPTION", "<style=cIsDamage>Rune of Travel</style> no longer automatically activates, and if the Rune is not used the <style=cIsUtility>cooldown</style> is reset.");
		LanguageAPI.Add("TALUS_PASSIVE3_NAME", "Nothing Personal");
		LanguageAPI.Add("TALUS_PASSIVE3_DESCRIPTION", "Reduces <style=cIsDamage>True Power</style> cooldown by <style=cIsUtility>15%</style>, and enemies at or below <style=cIsHealth>65% Max HP</style> are <style=cIsDamage>revealed</style> to you.");
		SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(Idle));
		val.activationStateMachineName = "";
		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 = true;
		val.rechargeStock = 0;
		val.requiredStock = 0;
		val.stockToConsume = 0;
		val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("passive1");
		val.skillDescriptionToken = "TALUS_PASSIVE1_DESCRIPTION";
		val.skillName = "TALUS_PASSIVE1_NAME";
		val.skillNameToken = "TALUS_PASSIVE1_NAME";
		GenericSkill val2 = Utils.NewGenericSkill(characterPrefab, val);
		val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(Idle));
		val.activationStateMachineName = "";
		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 = true;
		val.rechargeStock = 0;
		val.requiredStock = 0;
		val.stockToConsume = 0;
		val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("passive2");
		val.skillDescriptionToken = "TALUS_PASSIVE2_DESCRIPTION";
		val.skillName = "TALUS_PASSIVE2_NAME";
		val.skillNameToken = "TALUS_PASSIVE2_NAME";
		Utils.AddAlt(val2.skillFamily, val, Achievements.passive1Unlock);
		val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(Idle));
		val.activationStateMachineName = "";
		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 = true;
		val.rechargeStock = 0;
		val.requiredStock = 0;
		val.stockToConsume = 0;
		val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("passive3");
		val.skillDescriptionToken = "TALUS_PASSIVE3_DESCRIPTION";
		val.skillName = "TALUS_PASSIVE3_NAME";
		val.skillNameToken = "TALUS_PASSIVE3_NAME";
		Utils.AddAlt(val2.skillFamily, val, Achievements.passive2Unlock);
	}

	private void PrimarySetup()
	{
		//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_009c: Unknown result type (might be due to invalid IL or missing references)
		//IL_012a: Unknown result type (might be due to invalid IL or missing references)
		//IL_012f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0169: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("TALUS_M1", "Veracharger");
		LanguageAPI.Add("TALUS_M1_DESCRIPTION", "A fast-firing weapon for short-range engagements that deals <style=cIsDamage>110% damage</style>.");
		LanguageAPI.Add("TALUS_M1EMP", "Overcharge");
		LanguageAPI.Add("TALUS_M1EMP_DESCRIPTION", "A very fast-firing weapon for short-range engagements that deals <style=cIsDamage>2x110% damage</style>.");
		SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(Primary));
		val.activationStateMachineName = "Weapon";
		val.baseMaxStock = 35;
		val.baseRechargeInterval = 0f;
		val.beginSkillCooldownOnSkillEnd = true;
		val.canceledFromSprinting = false;
		val.fullRestockOnAssign = true;
		val.interruptPriority = (InterruptPriority)0;
		val.isCombatSkill = true;
		val.mustKeyPress = false;
		val.cancelSprintingOnActivation = true;
		val.rechargeStock = 0;
		val.requiredStock = 1;
		val.stockToConsume = 1;
		val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("primary");
		val.skillDescriptionToken = "TALUS_M1_DESCRIPTION";
		val.skillName = "TALUS_M1";
		val.skillNameToken = "TALUS_M1";
		ContentAddition.AddSkillDef(val);
		component.primary = Utils.NewGenericSkill(characterPrefab, val);
		val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(Primary));
		val.activationStateMachineName = "Weapon";
		val.baseMaxStock = 120;
		val.baseRechargeInterval = 0f;
		val.beginSkillCooldownOnSkillEnd = true;
		val.canceledFromSprinting = false;
		val.fullRestockOnAssign = true;
		val.interruptPriority = (InterruptPriority)0;
		val.isCombatSkill = true;
		val.mustKeyPress = false;
		val.cancelSprintingOnActivation = true;
		val.rechargeStock = 0;
		val.requiredStock = 2;
		val.stockToConsume = 2;
		val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("primaryEmp");
		val.skillDescriptionToken = "TALUS_M1EMP_DESCRIPTION";
		val.skillName = "TALUS_M1EMP";
		val.skillNameToken = "TALUS_M1EMP";
		ContentAddition.AddSkillDef(val);
		primaryEmp = 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("TALUS_M2", "Blitz Upper");
		LanguageAPI.Add("TALUS_M2_DESCRIPTION", "Charge forward to deal <style=cIsDamage>480%</style> damage and knock enemies straight back.");
		SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(Secondary));
		val.activationStateMachineName = "Body";
		val.baseMaxStock = 1;
		val.baseRechargeInterval = 4f;
		val.beginSkillCooldownOnSkillEnd = true;
		val.canceledFromSprinting = false;
		val.fullRestockOnAssign = false;
		val.interruptPriority = (InterruptPriority)0;
		val.isCombatSkill = true;
		val.mustKeyPress = true;
		val.cancelSprintingOnActivation = false;
		val.rechargeStock = 1;
		val.requiredStock = 1;
		val.stockToConsume = 1;
		val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("secondary");
		val.skillDescriptionToken = "TALUS_M2_DESCRIPTION";
		val.skillName = "TALUS_M2";
		val.skillNameToken = "TALUS_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("TALUS_UTIL", "Rune of Travel");
		LanguageAPI.Add("TALUS_UTIL_DESCRIPTION", "Inscribe a rune on the ground that can be used to escape back to its location after <style=cIsUtility>6s</style> and <style=cIsHealing>heal</style> you for <style=cIsHealth>15% Max HP</style>. You can reactivate the rune to teleport sooner.");
		SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(Utility));
		val.activationStateMachineName = "Slide";
		val.baseMaxStock = 1;
		val.baseRechargeInterval = 5f;
		val.beginSkillCooldownOnSkillEnd = true;
		val.canceledFromSprinting = false;
		val.fullRestockOnAssign = false;
		val.interruptPriority = (InterruptPriority)0;
		val.isCombatSkill = false;
		val.mustKeyPress = true;
		val.cancelSprintingOnActivation = false;
		val.rechargeStock = 1;
		val.requiredStock = 1;
		val.stockToConsume = 1;
		val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("utility");
		val.skillDescriptionToken = "TALUS_UTIL_DESCRIPTION";
		val.skillName = "TALUS_UTIL";
		val.skillNameToken = "TALUS_UTIL";
		ContentAddition.AddSkillDef(val);
		component.utility = Utils.NewGenericSkill(characterPrefab, val);
	}

	private void SpecialSetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("TALUS_SPEC", "True Power");
		LanguageAPI.Add("TALUS_SPEC_DESCRIPTION", "<style=cIsUtility>Teleport</style> directly to an unsuspecting enemy, dealing <style=cIsDamage>1200% damage</style> in a <style=cIsUtility>14m radius</style> and overcharges <style=cIsDamage>Veracharger</style>, firing an additional bullet and gaining <style=cIsDamage>33% fire rate</style> and <style=cIsDamage>120 stocks</style>.");
		HuntressTrackingSkillDef val = ScriptableObject.CreateInstance<HuntressTrackingSkillDef>();
		((SkillDef)val).activationState = new SerializableEntityStateType(typeof(Special));
		((SkillDef)val).activationStateMachineName = "Body";
		((SkillDef)val).baseMaxStock = 1;
		((SkillDef)val).baseRechargeInterval = 8f;
		((SkillDef)val).beginSkillCooldownOnSkillEnd = true;
		((SkillDef)val).canceledFromSprinting = false;
		((SkillDef)val).fullRestockOnAssign = false;
		((SkillDef)val).interruptPriority = (InterruptPriority)1;
		((SkillDef)val).isCombatSkill = true;
		((SkillDef)val).mustKeyPress = true;
		((SkillDef)val).cancelSprintingOnActivation = false;
		((SkillDef)val).rechargeStock = 1;
		((SkillDef)val).requiredStock = 1;
		((SkillDef)val).stockToConsume = 1;
		((SkillDef)val).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("special");
		((SkillDef)val).skillDescriptionToken = "TALUS_SPEC_DESCRIPTION";
		((SkillDef)val).skillName = "TALUS_SPEC";
		((SkillDef)val).skillNameToken = "TALUS_SPEC";
		ContentAddition.AddSkillDef((SkillDef)(object)val);
		component.special = Utils.NewGenericSkill(characterPrefab, (SkillDef)(object)val);
	}
}
internal class Prefabs
{
	internal static GameObject TPHUDIndicator;

	internal static GameObject crosshair;

	internal static GameObject ultExplosion;

	internal static GameObject fireImpactEffect;

	internal static GameObject fireTracer;

	internal static GameObject punchHit;

	internal static GameObject swingEffect;

	internal static GameObject rune;

	internal static GameObject indicator;

	internal static GameObject muzzleflash;

	internal static Material revealMat;

	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_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		//IL_0040: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Expected O, but got Unknown
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Expected O, but got Unknown
		//IL_005b: 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_0071: 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_00dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e6: Expected O, but got Unknown
		//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0102: Unknown result type (might be due to invalid IL or missing references)
		//IL_01de: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0224: Unknown result type (might be due to invalid IL or missing references)
		//IL_0229: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_02dc: Expected O, but got Unknown
		//IL_0276: Unknown result type (might be due to invalid IL or missing references)
		//IL_0280: Expected O, but got Unknown
		//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0393: Unknown result type (might be due to invalid IL or missing references)
		//IL_039d: Expected O, but got Unknown
		//IL_0448: Unknown result type (might be due to invalid IL or missing references)
		//IL_0452: Expected O, but got Unknown
		//IL_04bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_04c6: Expected O, but got Unknown
		//IL_0544: Unknown result type (might be due to invalid IL or missing references)
		//IL_054e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0566: Unknown result type (might be due to invalid IL or missing references)
		//IL_0570: Unknown result type (might be due to invalid IL or missing references)
		//IL_0591: Unknown result type (might be due to invalid IL or missing references)
		//IL_0602: Unknown result type (might be due to invalid IL or missing references)
		//IL_0609: Expected O, but got Unknown
		//IL_061d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0622: Unknown result type (might be due to invalid IL or missing references)
		//IL_0637: Unknown result type (might be due to invalid IL or missing references)
		//IL_063e: Expected O, but got Unknown
		//IL_0656: Unknown result type (might be due to invalid IL or missing references)
		//IL_065d: Expected O, but got Unknown
		//IL_066e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0673: Unknown result type (might be due to invalid IL or missing references)
		//IL_06e4: Unknown result type (might be due to invalid IL or missing references)
		//IL_06ee: Expected O, but got Unknown
		//IL_0705: Unknown result type (might be due to invalid IL or missing references)
		//IL_0712: Unknown result type (might be due to invalid IL or missing references)
		//IL_074c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0756: Expected O, but got Unknown
		//IL_077c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0781: Unknown result type (might be due to invalid IL or missing references)
		//IL_0793: Unknown result type (might be due to invalid IL or missing references)
		//IL_07f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_07f7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0844: Unknown result type (might be due to invalid IL or missing references)
		//IL_084e: Expected O, but got Unknown
		//IL_085f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0894: Unknown result type (might be due to invalid IL or missing references)
		//IL_089e: Expected O, but got Unknown
		//IL_08b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_08be: Unknown result type (might be due to invalid IL or missing references)
		//IL_090e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0918: Expected O, but got Unknown
		GameObject val = new GameObject("dontDestroyOnLoad");
		val.SetActive(false);
		Object.DontDestroyOnLoad((Object)(object)val);
		TPHUDIndicator = new GameObject("TPHUDIndicator", new Type[2]
		{
			typeof(RectTransform),
			typeof(Image)
		});
		RectTransform val2 = (RectTransform)TPHUDIndicator.transform;
		((Transform)val2).localScale = Vector3.one;
		val2.sizeDelta = Vector2.one * 180f;
		Image component = TPHUDIndicator.GetComponent<Image>();
		component.type = (Type)3;
		component.fillOrigin = 2;
		component.fillClockwise = false;
		((Graphic)component).color = Color.yellow;
		component.sprite = Load<Sprite>("RoR2/Base/UI/texCrosshairCircle.png");
		TPHUDIndicator.transform.SetParent(val.transform);
		revealMat = new Material(Load<Material>("RoR2/Base/Common/matEnergyShield.mat"));
		revealMat.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)70, (byte)0, byte.MaxValue, (byte)145)));
		revealMat.SetFloat("_AlphaBoost", 1.2f);
		revealMat.SetFloat("_OffsetAmount", 0.02f);
		revealMat.SetFloat("_ZTest", 8f);
		crosshair = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Bandit2/Bandit2Crosshair.prefab"), "TalusEmpCrosshair", false);
		((Behaviour)crosshair.GetComponent<RawImage>()).enabled = true;
		Texture2D val3 = Load<Texture2D>("RoR2/Base/Common/texRampDeathBomb.png");
		Texture2D val4 = Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampGalaxy.png");
		Texture2D val5 = Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampBanditAlt.png");
		Texture2D val6 = Load<Texture2D>("RoR2/Base/Common/VFX/texOmniHitspark1Mask.png");
		Material val7 = null;
		indicator = PrefabAPI.InstantiateClone(Assets.Load<GameObject>("indicator"), "Indicator", false);
		Utils.AddRotationComponent(indicator, 60f, (RotationAxis)2);
		indicator.transform.localScale = Vector3.one * 0.025f;
		muzzleflash = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Bandit2/MuzzleflashBandit2.prefab"), "Muzzleflash", false);
		muzzleflash.GetComponentInChildren<Light>().color = Color32.op_Implicit(new Color32((byte)127, (byte)0, byte.MaxValue, byte.MaxValue));
		ParticleSystemRenderer[] componentsInChildren = muzzleflash.GetComponentsInChildren<ParticleSystemRenderer>();
		foreach (ParticleSystemRenderer val8 in componentsInChildren)
		{
			string name = ((Object)val8).name;
			if (name == "Fire")
			{
				((Renderer)val8).material = new Material(((Renderer)val8).material);
				((Renderer)val8).material.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)214, (byte)160, byte.MaxValue, byte.MaxValue)));
				((Renderer)val8).material.SetTexture("_RemapTex", (Texture)(object)val5);
			}
			else
			{
				((Renderer)val8).material = new Material(((Renderer)val8).material);
				((Renderer)val8).material.SetTexture("_MainTex", (Texture)(object)val6);
				((Renderer)val8).material.SetTexture("_RemapTex", (Texture)(object)val5);
			}
		}
		ContentAddition.AddEffect(muzzleflash);
		punchHit = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Common/VFX/OmniImpactVFX.prefab"), "PunchHit", false);
		Object.Destroy((Object)(object)punchHit.GetComponent<OmniEffect>());
		punchHit.GetComponent<EffectComponent>().soundName = "Play_Talus_Punch_Hit";
		ParticleSystemRenderer[] componentsInChildren2 = punchHit.GetComponentsInChildren<ParticleSystemRenderer>(true);
		foreach (ParticleSystemRenderer val9 in componentsInChildren2)
		{
			((Component)val9).gameObject.SetActive(true);
			((Renderer)val9).material = new Material(((Renderer)val9).material);
			Material material = ((Renderer)val9).material;
			material.DisableKeyword("VERTEXCOLOR");
			material.SetTexture("_RemapTex", (Texture)(object)val4);
			if (!Object.op_Implicit((Object)(object)val7))
			{
				val7 = material;
			}
		}
		ContentAddition.AddEffect(punchHit);
		fireImpactEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/LunarWisp/LunarWispMinigunHitspark.prefab"), "FireImpactEffect", false);
		fireImpactEffect.GetComponent<EffectComponent>().soundName = "Play_Talus_Fire_Hit";
		ParticleSystemRenderer[] componentsInChildren3 = fireImpactEffect.GetComponentsInChildren<ParticleSystemRenderer>();
		((Renderer)componentsInChildren3[0]).material = val7;
		ParticleSystemRenderer val10 = componentsInChildren3[1];
		((Renderer)val10).material = new Material(((Renderer)val10).material);
		((Renderer)val10).material.DisableKeyword("VERTEXCOLOR");
		((Renderer)val10).material.SetTexture("_RemapTex", (Texture)(object)val4);
		ContentAddition.AddEffect(fireImpactEffect);
		swingEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Croco/CrocoSlash.prefab"), "SwingEffect", false);
		ParticleSystemRenderer[] componentsInChildren4 = swingEffect.GetComponentsInChildren<ParticleSystemRenderer>();
		ParticleSystemRenderer val11 = componentsInChildren4[0];
		((Renderer)val11).material = new Material(Load<Material>("RoR2/Base/Brother/matBrotherSwing.mat"));
		Material material2 = ((Renderer)val11).material;
		material2.SetTexture("_RemapTex", (Texture)(object)val3);
		material2.SetTexture("_Cloud1Tex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/texMagmaCloud.png"));
		material2.SetFloat("_Boost", 5f);
		material2.SetFloat("_DepthOffset", -4.666f);
		material2.SetFloat("_InvFade", 0.128f);
		material2.SetFloat("_AlphaBoost", 1.7f);
		((Component)val11).transform.localScale = Vector3.one * 2f;
		ParticleSystemRenderer val12 = componentsInChildren4[1];
		((Component)val12).transform.localScale = Vector3.one * 2f;
		((Component)val12).transform.localRotation = Quaternion.Euler(0f, 0f, 140f);
		swingEffect.AddComponent<DestroyOnTimer>().duration = 1f;
		ScaleParticleSystemDuration component2 = swingEffect.GetComponent<ScaleParticleSystemDuration>();
		component2.newDuration = 0.55f;
		component2.initialDuration = 0.55f;
		rune = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab"), "Rune", false);
		MeshRenderer componentInChildren = rune.GetComponentInChildren<MeshRenderer>();
		Material val13 = new Material(((Renderer)componentInChildren).material);
		val13.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)70, (byte)0, byte.MaxValue, byte.MaxValue)));
		Material val14 = new Material(Load<Material>("RoR2/Base/artifactworld/matArtifactShellTrail.mat"));
		val14.SetTexture("_RemapTex", (Texture)(object)val3);
		Material val15 = new Material(Load<Material>("RoR2/DLC1/LunarSun/matLunarSunProjectileTrail.mat"));
		val15.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)14, (byte)0, (byte)103, byte.MaxValue)));
		val15.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampDefault.png"));
		((Renderer)componentInChildren).materials = (Material[])(object)new Material[3] { val13, val14, val15 };
		fireTracer = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Bandit2/TracerBandit2Rifle.prefab"), "FireTracer", false);
		LineRenderer component3 = fireTracer.GetComponent<LineRenderer>();
		((Renderer)component3).material = new Material(Load<Material>("RoR2/Base/Bandit2/matBandit2SplatterOpaqueTrail.mat"));
		((Renderer)component3).material.SetTexture("_RemapTex", (Texture)(object)val5);
		component3.startColor = Color.white;
		component3.endColor = Color.white;
		component3.startWidth = 0f;
		component3.endWidth = 0.3f;
		ParticleSystemRenderer componentInChildren2 = fireTracer.GetComponentInChildren<ParticleSystemRenderer>();
		((Renderer)componentInChildren2).material = new Material(((Renderer)componentInChildren2).material);
		((Renderer)componentInChildren2).material.DisableKeyword("VERTEXCOLOR");
		((Renderer)componentInChildren2).material.SetColor("_TintColor", Color32.op_Implicit(new Color32((byte)12, (byte)0, (byte)66, (byte)106)));
		((Component)componentInChildren2).transform.localScale = Vector3.one;
		ContentAddition.AddEffect(fireTracer);
		ultExplosion = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/DLC1/ExplodeOnDeathVoid/ExplodeOnDeathVoidExplosionEffect.prefab"), "UltExplosion", false);
		ultExplosion.GetComponent<EffectComponent>().soundName = "Play_Talus_Ult_Hit";
		ultExplosion.GetComponentInChildren<Light>().color = Color32.op_Implicit(new Color32((byte)197, (byte)69, byte.MaxValue, byte.MaxValue));
		ParticleSystemRenderer[] componentsInChildren5 = ultExplosion.GetComponentsInChildren<ParticleSystemRenderer>();
		foreach (ParticleSystemRenderer val16 in componentsInChildren5)
		{
			string name2 = ((Object)val16).name;
			if (name2 == "Vacuum Stars")
			{
				((Renderer)val16).material = new Material(((Renderer)val16).material);
				Material material3 = ((Renderer)val16).material;
				material3.SetColor("_Color", Color.yellow);
				material3.DisableKeyword("VERTEXCOLOR");
			}
			if (name2 == "GravCenter")
			{
				((Renderer)val16).material = new Material(((Renderer)val16).material);
				Material material4 = ((Renderer)val16).material;
				material4.SetColor("_Color", Color32.op_Implicit(new Color32((byte)29, (byte)1, (byte)50, byte.MaxValue)));
				material4.SetTexture("_MainTex", (Texture)(object)Load<CustomRenderTexture>("RoR2/DLC1/snowyforest/crtexSFSunCaustics.asset"));
			}
			if (name2 == "ScaledHitsparks 1" || name2 == "ScaledHitsparks 2")
			{
				((Renderer)val16).material = new Material(((Renderer)val16).material);
				((Renderer)val16).material.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampCaptainAirstrike.png"));
			}
		}
		ContentAddition.AddEffect(ultExplosion);
	}
}
internal class Reload : BaseSkillState
{
	private float duration;

	private float baseDuration = 1f;

	private uint ID = 0u;

	private TrackerBehaviour tracker;

	public override void OnEnter()
	{
		((BaseState)this).OnEnter();
		tracker = ((EntityState)this).GetComponent<TrackerBehaviour>();
		((EntityState)this).GetModelAnimator().SetTrigger("trigger");
		duration = baseDuration / ((BaseState)this).attackSpeedStat;
		((EntityState)this).PlayAnimation("Gesture, Override", "Reload", "Reload", duration);
		AkSoundEngine.PostEvent(Sounds.Play_Talus_Reload_Start, ((EntityState)this).gameObject);
	}

	public override void FixedUpdate()
	{
		((EntityState)this).FixedUpdate();
		if (((EntityState)this).fixedAge >= duration * 0.65f && ID == 0)
		{
			ID = AkSoundEngine.PostEvent(Sounds.Play_Talus_Reload_Finish, ((EntityState)this).gameObject);
		}
		if (((EntityState)this).isAuthority)
		{
			if (((EntityState)this).fixedAge >= duration)
			{
				((EntityState)this).skillLocator.primary.Reset();
				((EntityState)this).outer.SetNextStateToMain();
			}
			else if (((EntityState)this).inputBank.skill1.down && ((EntityState)this).skillLocator.primary.stock > 0)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}
	}

	public override void OnExit()
	{
		if (((EntityState)this).skillLocator.primary.HasSkillOverrideOfPriority((SkillOverridePriority)4))
		{
			((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).gameObject, MainPlugin.primaryEmp, (SkillOverridePriority)4);
			((EntityState)this).GetModelAnimator().SetBool("stimmed", false);
			tracker.DisposeCrosshairOverride();
		}
		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)1;
	}
}
internal class CharacterMain : GenericCharacterMain
{
}
internal class Primary : BaseSkillState
{
	private float duration;

	private float baseDuration;

	private float damageCoefficient = 1.1f;

	private bool emp;

	private bool sound;

	public override void OnEnter()
	{
		((BaseState)this).OnEnter();
		((BaseState)this).StartAimMode(2f, false);
		emp = ((EntityState)this).skillLocator.primary.HasSkillOverrideOfPriority((SkillOverridePriority)4);
		baseDuration = (emp ? 0.07125f : 0.095f);
		duration = baseDuration / ((BaseState)this).attackSpeedStat;
		((EntityState)this).PlayAnimation("Gesture, Override", emp ? "EmpFire" : "Fire");
		Fire();
	}

	private void Fire()
	{
		//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00eb: 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_00f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0100: Unknown result type (might be due to invalid IL or missing references)
		//IL_010c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0117: 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_0128: 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_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_0158: 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_0174: Unknown result type (might be due to invalid IL or missing references)
		//IL_017b: Unknown result type (might be due to invalid IL or missing references)
		//IL_017c: 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_0186: Unknown result type (might be due to invalid IL or missing references)
		//IL_018d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0198: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bb: Expected O, but got Unknown
		AkSoundEngine.PostEvent(emp ? Sounds.Play_Talus_Fire_Emp_Single : Sounds.Play_Talus_Fire_Single, ((EntityState)this).gameObject);
		float num = 0.3f;
		((BaseState)this).AddRecoil(-1f * num, -1.5f * num, -0.25f * num, 0.25f * num);
		((EntityState)this).characterBody.AddSpreadBloom(0.35f);
		EffectManager.SimpleMuzzleFlash(Prefabs.muzzleflash, ((EntityState)this).gameObject, "weaponMuzzle1", false);
		if (emp)
		{
			EffectManager.SimpleMuzzleFlash(Prefabs.muzzleflash, ((EntityState)this).gameObject, "weaponMuzzle2", false);
		}
		if (((EntityState)this).isAuthority)
		{
			Ray aimRay = ((BaseState)this).GetAimRay();
			float num2 = 0.4f;
			BulletAttack val = new BulletAttack
			{
				bulletCount = 1u,
				aimVector = ((Ray)(ref aimRay)).direction,
				origin = ((Ray)(ref aimRay)).origin,
				damage = ((BaseState)this).damageStat * damageCoefficient,
				damageColorIndex = (DamageColorIndex)0,
				damageType = (DamageType)0,
				falloffModel = (FalloffModel)1,
				maxDistance = 250f,
				force = 30f,
				minSpread = 0f - num2,
				maxSpread = num2,
				isCrit = ((BaseState)this).RollCrit(),
				owner = ((EntityState)this).gameObject,
				muzzleName = "weaponMuzzle1",
				smartCollision = true,
				procChainMask = default(ProcChainMask),
				procCoefficient = 0.4f,
				radius = 0.07f,
				sniper = false,
				stopperMask = CommonMasks.bullet,
				weapon = null,
				tracerEffectPrefab = Prefabs.fireTracer,
				spreadPitchScale = 1f,
				spreadYawScale = 1f,
				hitEffectPrefab = Prefabs.fireImpactEffect
			};
			val.Fire();
			if (emp)
			{
				val.muzzleName = "weaponMuzzle2";
				val.Fire();
			}
		}
	}

	public override void FixedUpdate()
	{
		((EntityState)this).FixedUpdate();
		if (emp && ((EntityState)this).fixedAge >= duration * 0.15f && !sound)
		{
			sound = true;
			AkSoundEngine.PostEvent(MinigunFire.fireSound, ((EntityState)this).gameObject);
		}
		if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
		{
			if (((EntityState)this).skillLocator.primary.stock == 0)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new Reload());
			}
			else if (((EntityState)this).skillLocator.primary.HasSkillOverrideOfPriority((SkillOverridePriority)4) || ((BaseSkillState)this).IsKeyDownAuthority())
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
			else
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new PrimaryReloadWait());
			}
		}
	}

	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 PrimaryReloadWait : BaseSkillState
{
	public float duration = 3f;

	public override void FixedUpdate()
	{
		((EntityState)this).FixedUpdate();
		if (((EntityState)this).isAuthority)
		{
			if (((EntityState)this).fixedAge >= duration)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new Reload());
			}
			if (((BaseSkillState)this).IsKeyDownAuthority())
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}
	}
}
internal class Secondary : BaseSkillState
{
	private float duration = 0.3f;

	private float speedMult;

	private float speedCoeff = 15f;

	private AnimationCurve curve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f);

	private Vector3 dir;

	public override void OnEnter()
	{
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0060: 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_0082: 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_008d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0091: Unknown result type (might be due to invalid IL or missing references)
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		((BaseState)this).OnEnter();
		speedMult = Mathf.Clamp(((BaseState)this).moveSpeedStat, 7f, 18f);
		((EntityState)this).PlayAnimation("Body", "Dash", "M2", duration);
		Ray aimRay = ((BaseState)this).GetAimRay();
		dir = ((Ray)(ref aimRay)).direction;
		Vector2 val = Util.Vector3XZToVector2XY(dir);
		if (val != Vector2.zero)
		{
			((Vector2)(ref val)).Normalize();
			Vector3 val2 = new Vector3(val.x, 0f, val.y);
			Vector3 normalized = ((Vector3)(ref val2)).normalized;
			((EntityState)this).characterDirection.moveVector = normalized;
		}
		AkSoundEngine.PostEvent(Sounds.Play_Talus_Dash, ((EntityState)this).gameObject);
	}

	public override void FixedUpdate()
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_005c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_007f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0085: Unknown result type (might be due to invalid IL or missing references)
		//IL_008f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0094: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0126: Unknown result type (might be due to invalid IL or missing references)
		//IL_012b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0130: Unknown result type (might be due to invalid IL or missing references)
		//IL_0145: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).FixedUpdate();
		((EntityState)this).characterMotor.velocity = Vector3.zero;
		float num = curve.Evaluate(((EntityState)this).fixedAge / duration) * speedCoeff * speedMult;
		CharacterMotor characterMotor = ((EntityState)this).characterMotor;
		characterMotor.rootMotion += dir * num * Time.fixedDeltaTime;
		if (!((EntityState)this).isAuthority)
		{
			return;
		}
		Vector3 val = ((EntityState)this).transform.position + dir * 2f;
		LayerIndex entityPrecise = LayerIndex.entityPrecise;
		Collider[] array = Physics.OverlapSphere(val, 3f, LayerMask.op_Implicit(((LayerIndex)(ref entityPrecise)).mask));
		for (int i = 0; i < array.Length; i++)
		{
			HurtBox component = ((Component)array[i]).GetComponent<HurtBox>();
			if (Object.op_Implicit((Object)(object)component) && (Object)(object)component.healthComponent != (Object)(object)((EntityState)this).healthComponent && component.healthComponent.alive && Object.op_Implicit((Object)(object)component.healthComponent.body) && Object.op_Implicit((Object)(object)component.healthComponent.body.teamComponent))
			{
				TeamMask enemyTeams = TeamMask.GetEnemyTeams(((EntityState)this).teamComponent.teamIndex);
				if (((TeamMask)(ref enemyTeams)).HasTeam(component.healthComponent.body.teamComponent.teamIndex))
				{
					((EntityState)this).outer.SetNextState((EntityState)(object)new SecondaryPunch());
					break;
				}
			}
		}
		if (((EntityState)this).fixedAge >= duration)
		{
			((EntityState)this).outer.SetNextState((EntityState)(object)new SecondaryPunch());
		}
	}

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

	private OverlapAttack attack;

	private float damageCoefficient = 4.8f;

	private GameObject hitEffectPrefab = Prefabs.punchHit;

	public Animator animator;

	private string hitboxGroupName = "Punch";

	public override void OnEnter()
	{
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00af: Unknown result type (might be due to invalid IL or missing references)
		((BaseState)this).OnEnter();
		((BaseState)this).StartAimMode(1f, true);
		animator = ((EntityState)this).GetModelAnimator();
		((EntityState)this).PlayAnimation("Body", "Punch", "M2", 0.5f);
		AkSoundEngine.PostEvent(Sounds.Play_Talus_Punch, ((EntityState)this).gameObject);
		attack = ((BaseState)this).InitMeleeOverlap(damageCoefficient, hitEffectPrefab, ((EntityState)this).GetModelTransform(), hitboxGroupName);
		GameObject val = Object.Instantiate<GameObject>(Prefabs.swingEffect, ((BaseState)this).FindModelChild("swingMuzzle"));
		val.transform.localPosition = Vector3.zero;
		val.transform.localRotation = Quaternion.identity;
		val.transform.localScale = Vector3.one;
	}

	public override void FixedUpdate()
	{
		//IL_0039: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).FixedUpdate();
		if (((EntityState)this).isAuthority)
		{
			attack.forceVector = (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).transform.forward) * 1400f;
			attack.Fire((List<HurtBox>)null);
		}
		if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
	}

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

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

	private Vector3 pos;

	private TrackerBehaviour tracker;

	private float damageCoefficient = 12f;

	private float radius = 14f;

	private bool print;

	private HurtBoxGroup hurtBoxGroup;

	public override void OnEnter()
	{
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		((BaseState)this).OnEnter();
		tracker = ((EntityState)this).GetComponent<TrackerBehaviour>();
		if (((EntityState)this).isAuthority)
		{
			pos = ((Component)((HuntressTracker)tracker).trackingTarget).transform.position;
		}
		((EntityState)this).PlayAnimation("Body", "TP_In", "Special", duration);
		AkSoundEngine.PostEvent(Sounds.Play_Talus_Ult_Activate, ((EntityState)this).gameObject);
	}

	public override void Update()
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).Update();
		((EntityState)this).characterMotor.velocity = Vector3.zero;
	}

	public override void FixedUpdate()
	{
		//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e1: 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_00ff: Unknown result type (might be due to invalid IL or missing references)
		//IL_010b: Unknown result type (might be due to invalid IL or missing references)
		//IL_010d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0112: Unknown result type (might be due to invalid IL or missing references)
		//IL_0114: Unknown result type (might be due to invalid IL or missing references)
		//IL_0119: Unknown result type (might be due to invalid IL or missing references)
		//IL_0124: Unknown result type (might be due to invalid IL or missing references)
		//IL_0130: Unknown result type (might be due to invalid IL or missing references)
		//IL_0132: Unknown result type (might be due to invalid IL or missing references)
		//IL_0137: Unknown result type (might be due to invalid IL or missing references)
		//IL_013e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: Unknown result type (might be due to invalid IL or missing references)
		//IL_0148: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).FixedUpdate();
		if (((EntityState)this).fixedAge >= 0.5f && !print)
		{
			print = true;
			tracker.PrintOut();
			hurtBoxGroup = ((Component)((EntityState)this).GetModelTransform()).GetComponent<HurtBoxGroup>();
			int hurtBoxesDeactivatorCounter = hurtBoxGroup.hurtBoxesDeactivatorCounter + 1;
			hurtBoxGroup.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter;
			AkSoundEngine.PostEvent(Sounds.Play_Talus_Ult_Teleport, ((EntityState)this).gameObject);
		}
		if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration)
		{
			TeleportHelper.TeleportBody(((EntityState)this).characterBody, pos);
			EffectManager.SimpleEffect(Prefabs.ultExplosion, pos, Quaternion.identity, true);
			new BlastAttack
			{
				position = pos,
				attacker = ((EntityState)this).gameObject,
				baseDamage = ((BaseState)this).damageStat * damageCoefficient,
				baseForce = 2800f,
				crit = ((BaseState)this).RollCrit(),
				damageType = (DamageType)0,
				falloffModel = (FalloffModel)0,
				procCoefficient = 0.25f,
				radius = radius,
				attackerFiltering = (AttackerFiltering)2,
				teamIndex = ((EntityState)this).teamComponent.teamIndex
			}.Fire();
			((EntityState)this).outer.SetNextState((EntityState)(object)new SpecialTeleport());
		}
	}

	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 SpecialTeleport : BaseSkillState
{
	private float duration = 0.7f;

	private TrackerBehaviour tracker;

	private AimRequest request;

	public override void OnEnter()
	{
		((BaseState)this).OnEnter();
		tracker = ((EntityState)this).GetComponent<TrackerBehaviour>();
		tracker.PrintIn();
		((EntityState)this).PlayAnimation("Body", "TP_Out", "Special", duration);
		((EntityState)this).GetModelAnimator().SetBool("stimmed", true);
		((EntityState)this).skillLocator.primary.Reset();
		tracker.CrosshairOverride();
		if (((EntityState)this).isAuthority)
		{
			EntityStateMachine val = Array.Find(((EntityState)this).gameObject.GetComponents<EntityStateMachine>(), (EntityStateMachine x) => x.customName == "Weapon");
			if (Object.op_Implicit((Object)(object)val) && ((object)val.state).GetType() != typeof(Idle))
			{
				val.SetNextStateToMain();
			}
		}
		((EntityState)this).skillLocator.primary.SetSkillOverride((object)((EntityState)this).gameObject, MainPlugin.primaryEmp, (SkillOverridePriority)4);
		HurtBoxGroup component = ((Component)((EntityState)this).GetModelTransform()).GetComponent<HurtBoxGroup>();
		int hurtBoxesDeactivatorCounter = component.hurtBoxesDeactivatorCounter - 1;
		component.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter;
		request = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2);
	}

	public override void OnExit()
	{
		if (request != null)
		{
			request.Dispose();
		}
		((EntityState)this).OnExit();
	}

	public override void Update()
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).Update();
		((EntityState)this).characterMotor.velocity = Vector3.zero;
	}

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

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

	private GameObject posIndicator;

	private Image HUDIndicator;

	private Vector3 pos;

	private bool activate;

	private uint ID = 0u;

	private TrackerBehaviour behaviour;

	public override void OnEnter()
	{
		//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_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
		((BaseState)this).OnEnter();
		behaviour = ((EntityState)this).GetComponent<TrackerBehaviour>();
		activate = behaviour.passiveIndex == 1;
		if (((EntityState)this).isAuthority)
		{
			pos = ((EntityState)this).transform.position;
			posIndicator = Object.Instantiate<GameObject>(Prefabs.rune, pos, Quaternion.identity);
			posIndicator.transform.localScale = new Vector3(1.5f, 3f, 1.5f);
			ID = AkSoundEngine.PostEvent(Sounds.Play_Talus_Rune_Loop, posIndicator);
			CrosshairManager val = CrosshairManager.instancesList.Find((CrosshairManager x) => (Object)(object)x.crosshairHudElement.targetBodyObject == (Object)(object)((EntityState)this).gameObject);
			if (Object.op_Implicit((Object)(object)val))
			{
				GameObject val2 = Object.Instantiate<GameObject>(Prefabs.TPHUDIndicator, (Transform)(object)val.container);
				val2.transform.localPosition = Vector3.zero;
				HUDIndicator = val2.GetComponent<Image>();
			}
		}
		((EntityState)this).PlayAnimation("Gesture, Override", "Mark", "Utility", 0.4f);
		AkSoundEngine.PostEvent(Sounds.Play_Talus_Rune_Activate, ((EntityState)this).gameObject);
	}

	public override void FixedUpdate()
	{
		((EntityState)this).FixedUpdate();
		if (Object.op_Implicit((Object)(object)HUDIndicator))
		{
			HUDIndicator.fillAmount = (duration - ((EntityState)this).fixedAge) / duration;
		}
		if (!((EntityState)this).isAuthority)
		{
			return;
		}
		if (((EntityState)this).fixedAge >= duration)
		{
			if (activate)
			{
				((EntityState)this).skillLocator.utility.RunRecharge(99f);
				((EntityState)this).outer.SetNextStateToMain();
			}
			else
			{
				TP();
			}
		}
		if (((EntityState)this).fixedAge >= 0.3f && ((ButtonState)(ref ((EntityState)this).inputBank.skill3)).justPressed)
		{
			TP();
		}
	}

	private void TP()
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		UtilityTeleport utilityTeleport = new UtilityTeleport();
		utilityTeleport.pos = pos;
		((EntityState)this).outer.SetNextState((EntityState)(object)utilityTeleport);
	}

	public override void OnExit()
	{
		if (ID != 0)
		{
			AkSoundEngine.StopPlayingID(ID);
		}
		if (Object.op_Implicit((Object)(object)posIndicator))
		{
			EntityState.Destroy((Object)(object)posIndicator);
		}
		if (Object.op_Implicit((Object)(object)HUDIndicator))
		{
			EntityState.Destroy((Object)(object)((Component)HUDIndicator).gameObject);
		}
		((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 UtilityTeleport : BaseSkillState
{
	public Vector3 pos;

	private float duration = 0.7f;

	private TrackerBehaviour tracker;

	public override void OnEnter()
	{
		((BaseState)this).OnEnter();
		((EntityState)this).PlayAnimation("Body", "TP_Out_Util", "Utility", 1f);
		tracker = ((EntityState)this).GetComponent<TrackerBehaviour>();
		tracker.PrintOut();
		AkSoundEngine.PostEvent("Play_parent_teleport", ((EntityState)this).gameObject);
	}

	public override void Update()
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).Update();
		((EntityState)this).characterMotor.velocity = Vector3.zero;
	}

	public override void FixedUpdate()
	{
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).FixedUpdate();
		if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration)
		{
			TeleportHelper.TeleportBody(((EntityState)this).characterBody, pos);
			((EntityState)this).outer.SetNextStateToMain();
		}
	}

	public override void OnExit()
	{
		//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		tracker.PrintIn();
		AkSoundEngine.PostEvent(Sounds.Play_Talus_Teleport, ((EntityState)this).gameObject);
		((EntityState)this).PlayAnimation("Body", "Recall", "Utility", 0.5f);
		if (((EntityState)this).isAuthority && tracker.passiveIndex == 0)
		{
			((EntityState)this).skillLocator.primary.Reset();
			((EntityState)this).skillLocator.secondary.RunRecharge(99f);
		}
		if (NetworkServer.active)
		{
			((EntityState)this).healthComponent.Heal(((EntityState)this).healthComponent.fullCombinedHealth * 0.15f, default(ProcChainMask), true);
		}
		((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 Sounds
{
	public static readonly uint Play_Talus_Teleport = 91574637u;

	public static readonly uint Play_Talus_Ult_Teleport = 228381813u;

	public static readonly uint Play_Talus_Fire_Loop = 393345953u;

	public static readonly uint Play_Talus_Overcharge_Loop = 672175003u;

	public static readonly uint Play_Talus_Fire_Hit = 927830726u;

	public static readonly uint Play_Talus_Ult_Activate = 1187851719u;

	public static readonly uint Play_Talus_Rune_Activate = 1819569764u;

	public static readonly uint Play_Talus_Fire_Emp_Single = 1976325978u;

	public static readonly uint Play_Talus_Reload_Finish = 2042371399u;

	public static readonly uint Play_Talus_Punch_Hit = 2115979498u;

	public static readonly uint Play_Talus_Overcharge_Activate = 2425787482u;

	public static readonly uint Play_Talus_Fire_Single = 2834682091u;

	public static readonly uint Play_Talus_Fire_Emp_Loop = 2877483988u;

	public static readonly uint Play_Talus_Punch = 3056590580u;

	public static readonly uint Play_Talus_Rune_Loop = 3517241157u;

	public static readonly uint Play_Talus_Reload_Start = 3740918134u;

	public static readonly uint Play_Talus_Ult_Hit = 4273583411u;

	public static readonly uint Play_Talus_Dash = 662550592u;

	public static readonly uint Play_Talus_Foley1 = 684904386u;

	public static readonly uint Play_Talus_Foley2 = 684904385u;

	public static readonly uint Play_Talus_Foley3 = 684904384u;

	public static readonly uint Play_Talus_Foley4 = 684904391u;

	public static readonly uint Play_Talus_Foley5 = 684904390u;

	public static readonly uint Play_Talus_Foley_Step = 1118867858u;
}
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
{
	private static Material basemat;

	public static Color HexTo10(string hexColor)
	{
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		//IL_0039: Unknown result type (might be due to invalid IL or missing references)
		char[] array = hexColor.ToCharArray();
		return new Color((float)(array[0] + array[1]), (float)(array[2] + array[3]), (float)(array[4] + array[5]), 255f) / 255f;
	}

	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, UnlockableDef unlock = null)
	{
		//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_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)
		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);
		val.unlockableDef = unlock;
		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_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_006b: Expected O, but got Unknown
		GameObject val = PrefabAPI.InstantiateClone(model, name, false);
		Animator componentInChildren = val.GetComponentInChildren<Animator>();
		componentInChildren.runtimeAnimatorController = Assets.Load<RuntimeAnimatorController>("displayAnimator");
		((Component)componentInChildren).gameObject.AddComponent<AnimationEvents>().soundCenter = ((Component)componentInChildren).gameObject;
		((Behaviour)((Component)componentInChildren).GetComponent<CharacterModel>()).enabled = false;
		SkinnedMeshRenderer[] componentsInChildren = val.GetComponentsInChildren<SkinnedMeshRenderer>(true);
		foreach (SkinnedMeshRenderer val2 in componentsInChildren)
		{
			((Renderer)val2).material = new Material(((Renderer)val2).material);
			((Renderer)val2).material.DisableKeyword("DITHER");
		}
		return val;
	}

	public static AnimateShaderAlpha AddShaderAlphaComponent(GameObject target, float timeMax, AnimationCurve curve, bool destroyOnEnd = true, bool disableOnEnd = false)
	{
		AnimateShaderAlpha val = target.AddComponent<AnimateShaderAlpha>();
		val.timeMax = timeMax;
		val.alphaCurve = curve;
		val.destroyOnEnd = destroyOnEnd;
		val.disableOnEnd = disableOnEnd;
		return val;
	}

	internal static Sprite CreateSprite(Texture2D tex)
	{
		//IL_001a: 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)
		return Sprite.Create(tex, new Rect(0f, 0f, (float)((Texture)tex).width, (float)((Texture)tex).height), new Vector2(0.5f, 0.5f), 128f);
	}

	internal static SkinDefInfo CreateNewSkinDefInfo(SkinnedMeshRenderer[] childList, GameObject rootObject, string skinName, string objectToEnable, RendererInfo[] rendererInfos)
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0071: 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_00ee: 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)
		SkinDefInfo result = default(SkinDefInfo);
		result.BaseSkins = Array.Empty<SkinDef>();
		result.MinionSkinReplacements = (MinionSkinReplacement[])(object)new MinionSkinReplacement[0];
		result.ProjectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[0];
		List<GameObjectActivation> list = new List<GameObjectActivation>();
		foreach (SkinnedMeshRenderer val in childList)
		{
			GameObjectActivation val2 = default(GameObjectActivation);
			val2.gameObject = ((Component)val).gameObject;
			val2.shouldActivate = ((Object)val).name.Contains(objectToEnable);
			GameObjectActivation item = val2;
			list.Add(item);
		}
		result.GameObjectActivat