Decompiled source of EggsSkills v2.4.4

plugins/Eggs Skills.dll

Decompiled 3 months ago
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AncientScepter;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EggsSkills.Config;
using EggsSkills.EntityStates;
using EggsSkills.EntityStates.TeslaMine.MineStates.ArmingStates;
using EggsSkills.EntityStates.TeslaMine.MineStates.MainStates;
using EggsSkills.ModCompats;
using EggsSkills.Orbs;
using EggsSkills.Properties;
using EggsSkills.Resources;
using EggsSkills.SkillDefs;
using EggsSkills.Skills.Engi_Skills.MicroMissiles;
using EggsSkills.Stats;
using EggsSkills.Unlocks;
using EggsUtils.Buffs;
using EggsUtils.Config;
using EggsUtils.Helpers;
using EggsUtils.Properties;
using EntityStates;
using EntityStates.Bandit2.Weapon;
using EntityStates.Captain.Weapon;
using EntityStates.Croco;
using EntityStates.Engi.Mine;
using EntityStates.Merc;
using EntityStates.Treebot.Weapon;
using EntityStates.VoidSurvivor;
using EntityStates.VoidSurvivor.CorruptMode;
using JetBrains.Annotations;
using KinematicCharacterController;
using On.EntityStates.Captain.Weapon;
using On.EntityStates.VoidSurvivor;
using On.EntityStates.VoidSurvivor.CorruptMode;
using On.RoR2;
using PlasmaCoreSpikestripContent.Content.Skills;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.Stats;
using SkillsPlusPlus;
using SkillsPlusPlus.Modifiers;
using TILER2;
using ThinkInvisible.ClassicItems;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;

[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 = ".NET Standard 2.0")]
[assembly: AssemblyCompany("Eggs Skills")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Eggs Skills")]
[assembly: AssemblyTitle("Eggs Skills")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace EggsSkills
{
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.Egg.EggsSkills", "Eggs Skills", "2.4.4")]
	internal class EggsSkills : BaseUnityPlugin
	{
		public const string MODNAME = "com.Egg.EggsSkills";

		public const string MODTITLE = "Eggs Skills";

		public const string MODVERS = "2.4.4";

		public const string API_NAME = "com.bepis.r2api";

		public const string SKILLSPLUS_NAME = "com.cwmlolzlz.skills";

		public const string AUTOSPRINT_NAME = "com.johnedwa.RTAutoSprintEx";

		public const string CLASSICITEMS_NAME = "com.ThinkInvisible.ClassicItems";

		public const string STANDALONESCEPTER_NAME = "com.DestroyedClone.AncientScepter";

		public const string PLASMACORESPIKESTRIP_NAME = "com.plasmacore.PlasmaCoreSpikestripContent";

		public static bool skillsPlusLoaded;

		public static bool classicItemsLoaded;

		public static bool standaloneScepterLoaded;

		public static bool plasmacoreSpikestripLoaded;

		private void Awake()
		{
			Log.Init(((BaseUnityPlugin)this).Logger);
			skillsPlusLoaded = Chainloader.PluginInfos.ContainsKey("com.cwmlolzlz.skills");
			classicItemsLoaded = Chainloader.PluginInfos.ContainsKey("com.ThinkInvisible.ClassicItems");
			standaloneScepterLoaded = Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter");
			plasmacoreSpikestripLoaded = Chainloader.PluginInfos.ContainsKey("com.plasmacore.PlasmaCoreSpikestripContent");
			Log.LogMessage("Thanks SOM for the icon work <3");
			AutosprintAgonyEngage();
			Configuration.LoadConfig();
			Assets.LoadResources();
			UnlocksRegistering.RegisterUnlockables();
			if (classicItemsLoaded || standaloneScepterLoaded)
			{
				ScepterCompatibility();
			}
			SkillsLoader.RegisterSkills();
			if (classicItemsLoaded)
			{
				SkillsLoader.SetScepterReplacements();
			}
			else if (standaloneScepterLoaded)
			{
				SkillsLoader.SetStandaloneScepterReplacements();
			}
			if (skillsPlusLoaded)
			{
				SkillsPlusPlusCompatibility();
			}
			Log.LogMessage("EggsSkills fully loaded!");
		}

		[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
		private void SkillsPlusPlusCompatibility()
		{
			SkillModifierManager.LoadSkillModifiers();
		}

		private void ScepterCompatibility()
		{
			SkillsLoader.skillsToHandle = new Dictionary<string, SkillsLoader.SkillUpgradeContainer>();
		}

		private void AutosprintAgonyEngage()
		{
			if (Chainloader.PluginInfos.ContainsKey("com.johnedwa.RTAutoSprintEx"))
			{
				((Component)this).SendMessage("RT_SprintDisableMessage", (object)"EggsSkills.EntityStates.DirectiveRoot");
				((Component)this).SendMessage("RT_AnimationDelayMessage", (object)"EggsSkills.EntityStates.CombatShotgunEntity");
				((Component)this).SendMessage("RT_AnimationDelayMessage", (object)"EggsSkills.EntityStates.TeslaMineFireState");
			}
		}
	}
	internal static class Log
	{
		internal static ManualLogSource _logSource;

		internal static void Init(ManualLogSource logSource)
		{
			_logSource = logSource;
		}

		internal static void LogDebug(object data)
		{
			_logSource.LogDebug(data);
		}

		internal static void LogError(object data)
		{
			_logSource.LogError(data);
		}

		internal static void LogFatal(object data)
		{
			_logSource.LogFatal(data);
		}

		internal static void LogInfo(object data)
		{
			_logSource.LogInfo(data);
		}

		internal static void LogMessage(object data)
		{
			_logSource.LogMessage(data);
		}

		internal static void LogWarning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
	internal class SkillsLoader
	{
		internal struct SkillUpgradeContainer
		{
			internal string body;

			internal SkillDef normalSkillDef;

			internal SkillDef upgradedSkillDef;

			internal SkillSlot slot;

			internal int index;
		}

		internal static GameObject artificerRef = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mage/MageBody.prefab").WaitForCompletion();

		internal static GameObject mercenaryRef = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/MercBody.prefab").WaitForCompletion();

		internal static GameObject commandoRef = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoBody.prefab").WaitForCompletion();

		internal static GameObject engineerRef = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Engi/EngiBody.prefab").WaitForCompletion();

		internal static GameObject rexRef = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Treebot/TreebotBody.prefab").WaitForCompletion();

		internal static GameObject loaderRef = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Loader/LoaderBody.prefab").WaitForCompletion();

		internal static GameObject acridRef = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Croco/CrocoBody.prefab").WaitForCompletion();

		internal static GameObject captainRef = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Captain/CaptainBody.prefab").WaitForCompletion();

		internal static GameObject banditRef = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/Bandit2Body.prefab").WaitForCompletion();

		internal static GameObject multRef = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Toolbot/ToolbotBody.prefab").WaitForCompletion();

		internal static GameObject huntressRef = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressBody.prefab").WaitForCompletion();

		internal static GameObject railgunnerRef = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/Railgunner/RailgunnerBody.prefab").WaitForCompletion();

		internal static GameObject voidFiendRef = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorBody.prefab").WaitForCompletion();

		internal static List<SkillDef> defList = new List<SkillDef>();

		internal static Dictionary<string, SkillUpgradeContainer> skillsToHandle;

		internal static void RegisterSkills()
		{
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableMageSkills))
				{
					RegisterArtificerSkills();
				}
			}
			catch
			{
				Log.LogError("Failed to load Artificer skills");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableMercSkills))
				{
					RegisterMercenarySkills();
				}
			}
			catch
			{
				Log.LogError("Failed to load Mercenary skills");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableCommandoSkills))
				{
					RegisterCommandoSkills();
				}
			}
			catch
			{
				Log.LogError("Failed to load Commando skills");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableEngiSkills))
				{
					RegisterEngiSkills();
				}
			}
			catch
			{
				Log.LogError("Failed to load Engineer skills");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableCrocoSkills))
				{
					RegisterAcridSkills();
				}
			}
			catch
			{
				Log.LogError("Failed to load Acrid skills");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableLoaderSkills))
				{
					RegisterLoaderSkills();
				}
			}
			catch
			{
				Log.LogError("Failed to load Loader skills");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableCaptainSkills))
				{
					RegisterCaptainSkills();
				}
			}
			catch
			{
				Log.LogError("Failed to load Captain skills");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableTreebotSkills))
				{
					RegisterRexSkills();
				}
			}
			catch
			{
				Log.LogError("Failed to load REX skills");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableBanditSkills))
				{
					RegisterBanditSkills();
				}
			}
			catch
			{
				Log.LogError("Failed to load Bandit skills");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableHuntressSkills))
				{
					RegisterHuntressSkills();
				}
			}
			catch
			{
				Log.LogError("Failed to laod Huntress skills");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableToolbotSkills))
				{
					RegisterMultSkills();
				}
			}
			catch
			{
				Log.LogError("Failed to load MUL-T skills");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableRailgunnerSkills))
				{
					RegisterRailgunnerSkills();
				}
			}
			catch
			{
				Log.LogError("Failed to load Railgunner skills");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableVoidfiendSkills))
				{
					RegisterVoidfiendSkills();
				}
			}
			catch
			{
				Log.LogError("Failed to load Void Fiend skills");
			}
			try
			{
				if (EggsSkills.classicItemsLoaded)
				{
					RegisterScepterSkills();
				}
			}
			catch
			{
				Log.LogError("Failed to load one or more scepter replacements");
			}
			try
			{
				RegisterExtraStates();
			}
			catch
			{
				Log.LogError("Failed to load one or more extra entity-states");
			}
			if (defList.Count > 0)
			{
				foreach (SkillDef def in defList)
				{
					try
					{
						ContentAddition.AddSkillDef(def);
						Log.LogMessage("Skill: " + def.skillName + " Registered");
					}
					catch
					{
						Log.LogError("Skilldef failed to be registered");
					}
				}
				return;
			}
			Log.LogMessage("Did you really install my mod just to disable all the skills :(");
		}

		private static void RegisterAcridSkills()
		{
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Expected O, but got Unknown
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01be: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b1: Expected O, but got Unknown
			//IL_02b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			SkillLocator component = acridRef.GetComponent<SkillLocator>();
			SkillFamily skillFamily = component.special.skillFamily;
			SkillFamily skillFamily2 = component.primary.skillFamily;
			AcridPurgeDef acridPurgeDef = ScriptableObject.CreateInstance<AcridPurgeDef>();
			((SkillDef)acridPurgeDef).activationState = new SerializableEntityStateType(typeof(AcridPurgeEntity));
			((SkillDef)acridPurgeDef).activationStateMachineName = "Body";
			((SkillDef)acridPurgeDef).baseMaxStock = 1;
			((SkillDef)acridPurgeDef).baseRechargeInterval = 16f;
			((SkillDef)acridPurgeDef).beginSkillCooldownOnSkillEnd = false;
			((SkillDef)acridPurgeDef).fullRestockOnAssign = false;
			((SkillDef)acridPurgeDef).interruptPriority = (InterruptPriority)1;
			((SkillDef)acridPurgeDef).isCombatSkill = true;
			((SkillDef)acridPurgeDef).mustKeyPress = true;
			((SkillDef)acridPurgeDef).canceledFromSprinting = false;
			((SkillDef)acridPurgeDef).cancelSprintingOnActivation = false;
			((SkillDef)acridPurgeDef).forceSprintDuringState = false;
			((SkillDef)acridPurgeDef).rechargeStock = 1;
			((SkillDef)acridPurgeDef).requiredStock = 1;
			((SkillDef)acridPurgeDef).stockToConsume = 1;
			((SkillDef)acridPurgeDef).icon = Sprites.acridpurgeIconS;
			((SkillDef)acridPurgeDef).skillDescriptionToken = "ES_CROCO_SPECIAL_PURGE_DESCRIPTION";
			string skillName = (((Object)acridPurgeDef).name = "ESPurge");
			((SkillDef)acridPurgeDef).skillName = skillName;
			((SkillDef)acridPurgeDef).skillNameToken = "ES_CROCO_SPECIAL_PURGE_NAME";
			defList.Add((SkillDef)(object)acridPurgeDef);
			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)(object)acridPurgeDef,
				unlockableDef = UnlocksRegistering.acridPurgeUnlockDef
			};
			((Variant)(ref val)).viewableNode = new Node(((SkillDef)acridPurgeDef).skillNameToken, false, (Node)null);
			variants[num] = val;
			bool flag = default(bool);
			ContentAddition.AddEntityState<AcridPurgeEntityUpgrade>(ref flag);
			if (EggsSkills.classicItemsLoaded)
			{
				skillsToHandle.Add(((SkillDef)acridPurgeDef).skillName, new SkillUpgradeContainer
				{
					normalSkillDef = (SkillDef)(object)acridPurgeDef,
					body = "Croco",
					slot = (SkillSlot)3,
					index = skillFamily.variants.Length - 1
				});
			}
			SkillDef val2 = ScriptableObject.CreateInstance<SkillDef>();
			val2.activationState = new SerializableEntityStateType(typeof(PoisonBreath));
			val2.activationStateMachineName = "Weapon";
			val2.beginSkillCooldownOnSkillEnd = true;
			val2.interruptPriority = (InterruptPriority)0;
			val2.isCombatSkill = true;
			val2.mustKeyPress = false;
			val2.canceledFromSprinting = false;
			val2.cancelSprintingOnActivation = true;
			val2.forceSprintDuringState = false;
			val2.stockToConsume = 0;
			val2.icon = Sprites.placeholderIconS;
			val2.skillDescriptionToken = "ES_CROCO_PRIMARY_POISONBREATH_DESCRIPTION";
			skillName = (((Object)val2).name = "ESPoisonBreath");
			val2.skillName = skillName;
			val2.skillNameToken = "ES_CROCO_PRIMARY_POISONBREATH_NAME";
			defList.Add(val2);
			Array.Resize(ref skillFamily2.variants, skillFamily2.variants.Length + 1);
			Variant[] variants2 = skillFamily2.variants;
			int num2 = skillFamily2.variants.Length - 1;
			val = new Variant
			{
				skillDef = val2,
				unlockableDef = UnlocksRegistering.acridPoisonbreathUnlockDef
			};
			((Variant)(ref val)).viewableNode = new Node(val2.skillNameToken, false, (Node)null);
			variants2[num2] = val;
		}

		private static void RegisterArtificerSkills()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: 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_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Expected O, but got Unknown
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			SkillLocator component = artificerRef.GetComponent<SkillLocator>();
			SkillFamily skillFamily = component.utility.skillFamily;
			SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
			val.activationState = new SerializableEntityStateType(typeof(ZapportChargeEntity));
			val.activationStateMachineName = "Weapon";
			val.baseMaxStock = 2;
			val.baseRechargeInterval = 10f;
			val.beginSkillCooldownOnSkillEnd = true;
			val.fullRestockOnAssign = false;
			val.interruptPriority = (InterruptPriority)2;
			val.isCombatSkill = true;
			val.mustKeyPress = false;
			val.canceledFromSprinting = false;
			val.cancelSprintingOnActivation = true;
			val.forceSprintDuringState = false;
			val.rechargeStock = 1;
			val.requiredStock = 1;
			val.stockToConsume = 1;
			val.icon = Sprites.zapportIconS;
			val.skillDescriptionToken = "ES_MAGE_UTILITY_ZAPPORT_DESCRIPTION";
			string skillName = (((Object)val).name = "ESZapport");
			val.skillName = skillName;
			val.skillNameToken = "ES_MAGE_UTILITY_ZAPPORT_NAME";
			val.keywordTokens = new string[2] { "KEYWORD_STUNNING", "ES_KEYWORD_ENHANCING" };
			defList.Add(val);
			Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
			Variant[] variants = skillFamily.variants;
			int num = skillFamily.variants.Length - 1;
			Variant val2 = new Variant
			{
				skillDef = val,
				unlockableDef = UnlocksRegistering.artificerZapportUnlockDef
			};
			((Variant)(ref val2)).viewableNode = new Node(val.skillNameToken, false, (Node)null);
			variants[num] = val2;
			bool flag = default(bool);
			ContentAddition.AddEntityState<ZapportChargeEntity>(ref flag);
		}

		private static void RegisterBanditSkills()
		{
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Expected O, but got Unknown
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: 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_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)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_0273: Expected O, but got Unknown
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_0276: Unknown result type (might be due to invalid IL or missing references)
			//IL_027d: Unknown result type (might be due to invalid IL or missing references)
			SkillLocator component = banditRef.GetComponent<SkillLocator>();
			SkillFamily skillFamily = component.utility.skillFamily;
			SkillFamily skillFamily2 = component.primary.skillFamily;
			InvisOnSprintSkillDef invisOnSprintSkillDef = ScriptableObject.CreateInstance<InvisOnSprintSkillDef>();
			((SkillDef)invisOnSprintSkillDef).activationState = new SerializableEntityStateType(typeof(InvisDummyState));
			((SkillDef)invisOnSprintSkillDef).activationStateMachineName = "Body";
			((SkillDef)invisOnSprintSkillDef).baseMaxStock = 1;
			((SkillDef)invisOnSprintSkillDef).baseRechargeInterval = 6f;
			((SkillDef)invisOnSprintSkillDef).fullRestockOnAssign = false;
			((SkillDef)invisOnSprintSkillDef).rechargeStock = 1;
			((SkillDef)invisOnSprintSkillDef).requiredStock = 1;
			((SkillDef)invisOnSprintSkillDef).stockToConsume = 1;
			((SkillDef)invisOnSprintSkillDef).icon = Sprites.invisSprintIconS;
			((SkillDef)invisOnSprintSkillDef).skillDescriptionToken = "ES_BANDIT2_UTILITY_INVISSPRINT_DESCRIPTION";
			string skillName = (((Object)invisOnSprintSkillDef).name = "ESInvisSprint");
			((SkillDef)invisOnSprintSkillDef).skillName = skillName;
			((SkillDef)invisOnSprintSkillDef).skillNameToken = "ES_BANDIT2_UTILITY_INVISSPRINT_NAME";
			defList.Add((SkillDef)(object)invisOnSprintSkillDef);
			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)(object)invisOnSprintSkillDef,
				unlockableDef = UnlocksRegistering.banditInvisSprintUnlockDef
			};
			((Variant)(ref val)).viewableNode = new Node(((SkillDef)invisOnSprintSkillDef).skillNameToken, false, (Node)null);
			variants[num] = val;
			ReloadSkillDef val2 = ScriptableObject.CreateInstance<ReloadSkillDef>();
			((SkillDef)val2).activationState = new SerializableEntityStateType(typeof(MagicBulletEntity));
			val2.reloadState = new SerializableEntityStateType(typeof(EnterReload));
			((SkillDef)val2).activationStateMachineName = "Weapon";
			((SkillDef)val2).baseMaxStock = 4;
			val2.graceDuration = 0.8f;
			((SkillDef)val2).beginSkillCooldownOnSkillEnd = true;
			((SkillDef)val2).fullRestockOnAssign = false;
			((SkillDef)val2).isCombatSkill = true;
			((SkillDef)val2).mustKeyPress = true;
			val2.reloadInterruptPriority = (InterruptPriority)0;
			((SkillDef)val2).canceledFromSprinting = true;
			((SkillDef)val2).cancelSprintingOnActivation = true;
			((SkillDef)val2).forceSprintDuringState = false;
			((SkillDef)val2).baseRechargeInterval = 0f;
			((SkillDef)val2).rechargeStock = 0;
			((SkillDef)val2).requiredStock = 1;
			((SkillDef)val2).stockToConsume = 1;
			((SkillDef)val2).icon = Sprites.magicBulletIconS;
			((SkillDef)val2).skillDescriptionToken = "ES_BANDIT2_PRIMARY_MAGICBULLET_DESCRIPTION";
			skillName = (((Object)val2).name = "ESMagicBullet");
			((SkillDef)val2).skillName = skillName;
			((SkillDef)val2).skillNameToken = "ES_BANDIT2_PRIMARY_MAGICBULLET_NAME";
			defList.Add((SkillDef)(object)val2);
			Array.Resize(ref skillFamily2.variants, skillFamily2.variants.Length + 1);
			Variant[] variants2 = skillFamily2.variants;
			int num2 = skillFamily2.variants.Length - 1;
			val = new Variant
			{
				skillDef = (SkillDef)(object)val2,
				unlockableDef = UnlocksRegistering.banditMagicBulletUnlockDef
			};
			((Variant)(ref val)).viewableNode = new Node(((SkillDef)val2).skillNameToken, false, (Node)null);
			variants2[num2] = val;
			bool flag = default(bool);
			ContentAddition.AddEntityState<MagicBulletEntity>(ref flag);
		}

		private static void RegisterCaptainSkills()
		{
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Expected O, but got Unknown
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0242: Unknown result type (might be due to invalid IL or missing references)
			//IL_0268: Unknown result type (might be due to invalid IL or missing references)
			//IL_0272: Expected O, but got Unknown
			//IL_0273: Unknown result type (might be due to invalid IL or missing references)
			//IL_0275: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			SkillLocator component = captainRef.GetComponent<SkillLocator>();
			SkillFamily skillFamily = component.secondary.skillFamily;
			SkillFamily skillFamily2 = component.primary.skillFamily;
			SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
			val.activationState = new SerializableEntityStateType(typeof(DebuffGrenadeEntity));
			val.activationStateMachineName = "Weapon";
			val.baseMaxStock = 1;
			val.baseRechargeInterval = 10f;
			val.beginSkillCooldownOnSkillEnd = true;
			val.fullRestockOnAssign = false;
			val.interruptPriority = (InterruptPriority)1;
			val.isCombatSkill = true;
			val.mustKeyPress = false;
			val.canceledFromSprinting = false;
			val.cancelSprintingOnActivation = true;
			val.forceSprintDuringState = false;
			val.rechargeStock = 1;
			val.requiredStock = 1;
			val.stockToConsume = 1;
			val.icon = Sprites.debuffNadeIconS;
			val.skillDescriptionToken = "ES_CAPTAIN_SECONDARY_DEBUFFNADE_DESCRIPTION";
			string skillName = (((Object)val).name = "ESDebuffNade");
			val.skillName = skillName;
			val.skillNameToken = "ES_CAPTAIN_SECONDARY_DEBUFFNADE_NAME";
			val.keywordTokens = new string[1] { "ES_KEYWORD_MARKING" };
			defList.Add(val);
			Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
			Variant[] variants = skillFamily.variants;
			int num = skillFamily.variants.Length - 1;
			Variant val2 = new Variant
			{
				skillDef = val,
				unlockableDef = UnlocksRegistering.captainDebuffnadeUnlockDef
			};
			((Variant)(ref val2)).viewableNode = new Node(val.skillNameToken, false, (Node)null);
			variants[num] = val2;
			bool flag = default(bool);
			ContentAddition.AddEntityState<DebuffGrenadeEntity>(ref flag);
			CaptainAutoshotgunSkilldef captainAutoshotgunSkilldef = ScriptableObject.CreateInstance<CaptainAutoshotgunSkilldef>();
			((SkillDef)captainAutoshotgunSkilldef).activationState = new SerializableEntityStateType(typeof(CaptainAutoShotgunEntity));
			((SkillDef)captainAutoshotgunSkilldef).activationStateMachineName = "Weapon";
			((SkillDef)captainAutoshotgunSkilldef).beginSkillCooldownOnSkillEnd = true;
			((SkillDef)captainAutoshotgunSkilldef).interruptPriority = (InterruptPriority)0;
			((SkillDef)captainAutoshotgunSkilldef).isCombatSkill = true;
			((SkillDef)captainAutoshotgunSkilldef).mustKeyPress = false;
			((SkillDef)captainAutoshotgunSkilldef).canceledFromSprinting = false;
			((SkillDef)captainAutoshotgunSkilldef).cancelSprintingOnActivation = true;
			((SkillDef)captainAutoshotgunSkilldef).forceSprintDuringState = false;
			((SkillDef)captainAutoshotgunSkilldef).stockToConsume = 0;
			((SkillDef)captainAutoshotgunSkilldef).icon = Sprites.placeholderIconS;
			((SkillDef)captainAutoshotgunSkilldef).skillDescriptionToken = "ES_CAPTAIN_PRIMARY_AUTOSHOTGUN_DESCRIPTION";
			skillName = (((Object)captainAutoshotgunSkilldef).name = "ESAutoShotgun");
			((SkillDef)captainAutoshotgunSkilldef).skillName = skillName;
			((SkillDef)captainAutoshotgunSkilldef).skillNameToken = "ES_CAPTAIN_PRIMARY_AUTOSHOTGUN_NAME";
			defList.Add((SkillDef)(object)captainAutoshotgunSkilldef);
			Array.Resize(ref skillFamily2.variants, skillFamily2.variants.Length + 1);
			Variant[] variants2 = skillFamily2.variants;
			int num2 = skillFamily2.variants.Length - 1;
			val2 = new Variant
			{
				skillDef = (SkillDef)(object)captainAutoshotgunSkilldef,
				unlockableDef = UnlocksRegistering.captainAutoshotgunUnlockDef
			};
			((Variant)(ref val2)).viewableNode = new Node(((SkillDef)captainAutoshotgunSkilldef).skillNameToken, false, (Node)null);
			variants2[num2] = val2;
			ContentAddition.AddEntityState<CombatShotgunEntity>(ref flag);
		}

		private static void RegisterCommandoSkills()
		{
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Expected O, but got Unknown
			//IL_0124: 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_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0275: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Expected O, but got Unknown
			//IL_0280: Unknown result type (might be due to invalid IL or missing references)
			//IL_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_0289: Unknown result type (might be due to invalid IL or missing references)
			SkillLocator component = commandoRef.GetComponent<SkillLocator>();
			SkillFamily skillFamily = component.primary.skillFamily;
			SkillFamily skillFamily2 = component.utility.skillFamily;
			SteppedSkillDef val = ScriptableObject.CreateInstance<SteppedSkillDef>();
			((SkillDef)val).activationState = new SerializableEntityStateType(typeof(CombatShotgunEntity));
			((SkillDef)val).activationStateMachineName = "Weapon";
			((SkillDef)val).beginSkillCooldownOnSkillEnd = true;
			((SkillDef)val).fullRestockOnAssign = true;
			((SkillDef)val).interruptPriority = (InterruptPriority)0;
			((SkillDef)val).isCombatSkill = true;
			((SkillDef)val).mustKeyPress = false;
			((SkillDef)val).canceledFromSprinting = false;
			((SkillDef)val).cancelSprintingOnActivation = true;
			((SkillDef)val).forceSprintDuringState = false;
			((SkillDef)val).stockToConsume = 0;
			((SkillDef)val).icon = Sprites.shotgunIconS;
			((SkillDef)val).skillDescriptionToken = "ES_COMMANDO_PRIMARY_COMBATSHOTGUN_DESCRIPTION";
			string skillName = (((Object)val).name = "ESCombatShotgun");
			((SkillDef)val).skillName = skillName;
			((SkillDef)val).skillNameToken = "ES_COMMANDO_PRIMARY_COMBATSHOTGUN_NAME";
			defList.Add((SkillDef)(object)val);
			Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
			Variant[] variants = skillFamily.variants;
			int num = skillFamily.variants.Length - 1;
			Variant val2 = new Variant
			{
				skillDef = (SkillDef)(object)val,
				unlockableDef = UnlocksRegistering.commandoShotgunUnlockDef
			};
			((Variant)(ref val2)).viewableNode = new Node(((SkillDef)val).skillNameToken, false, (Node)null);
			variants[num] = val2;
			bool flag = default(bool);
			ContentAddition.AddEntityState<CombatShotgunEntity>(ref flag);
			SkillDef val3 = ScriptableObject.CreateInstance<SkillDef>();
			val3.activationState = new SerializableEntityStateType(typeof(CommandoDashEntity));
			val3.activationStateMachineName = "Body";
			val3.baseMaxStock = 2;
			val3.baseRechargeInterval = 10f;
			val3.beginSkillCooldownOnSkillEnd = true;
			val3.fullRestockOnAssign = false;
			val3.interruptPriority = (InterruptPriority)2;
			val3.isCombatSkill = false;
			val3.mustKeyPress = true;
			val3.canceledFromSprinting = false;
			val3.cancelSprintingOnActivation = false;
			val3.forceSprintDuringState = true;
			val3.stockToConsume = 1;
			val3.requiredStock = 1;
			val3.rechargeStock = 1;
			val3.icon = Sprites.dashIconS;
			val3.skillDescriptionToken = "ES_COMMANDO_UTILITY_DASH_DESCRIPTION";
			skillName = (((Object)val3).name = "ESDash");
			val3.skillName = skillName;
			val3.skillNameToken = "ES_COMMANDO_UTILITY_DASH_NAME";
			val3.keywordTokens = new string[1] { "ES_KEYWORD_PREPARE" };
			defList.Add(val3);
			Array.Resize(ref skillFamily2.variants, skillFamily2.variants.Length + 1);
			Variant[] variants2 = skillFamily2.variants;
			int num2 = skillFamily2.variants.Length - 1;
			val2 = new Variant
			{
				skillDef = val3,
				unlockableDef = UnlocksRegistering.commandoDashUnlockDef
			};
			((Variant)(ref val2)).viewableNode = new Node(val3.skillNameToken, false, (Node)null);
			variants2[num2] = val2;
			ContentAddition.AddEntityState<CommandoDashEntity>(ref flag);
		}

		private static void RegisterEngiSkills()
		{
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: 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_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Expected O, but got Unknown
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: 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_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_0270: Expected O, but got Unknown
			//IL_0271: Unknown result type (might be due to invalid IL or missing references)
			//IL_0273: Unknown result type (might be due to invalid IL or missing references)
			//IL_027a: Unknown result type (might be due to invalid IL or missing references)
			SkillLocator component = engineerRef.GetComponent<SkillLocator>();
			SkillFamily skillFamily = component.secondary.skillFamily;
			SkillFamily skillFamily2 = component.primary.skillFamily;
			SkillDef val = (SkillDef)(object)ScriptableObject.CreateInstance<SteppedSkillDef>();
			val.activationState = new SerializableEntityStateType(typeof(MicroMissileEntity));
			val.activationStateMachineName = "Weapon";
			val.beginSkillCooldownOnSkillEnd = true;
			val.interruptPriority = (InterruptPriority)0;
			val.isCombatSkill = true;
			val.mustKeyPress = false;
			val.canceledFromSprinting = false;
			val.cancelSprintingOnActivation = true;
			val.forceSprintDuringState = false;
			val.stockToConsume = 0;
			val.icon = Sprites.placeholderIconS;
			val.skillDescriptionToken = "ES_ENGI_PRIMARY_MICROMISSILES_DESCRIPTION";
			string skillName = (((Object)val).name = "EsMicroMissiles");
			val.skillName = skillName;
			val.skillNameToken = "ES_ENGI_PRIMARY_MICROMISSILES_NAME";
			defList.Add(val);
			Array.Resize(ref skillFamily2.variants, skillFamily2.variants.Length + 1);
			Variant[] variants = skillFamily2.variants;
			int num = skillFamily2.variants.Length - 1;
			Variant val2 = new Variant
			{
				skillDef = val,
				unlockableDef = UnlocksRegistering.engiMicromissileUnlockDef
			};
			((Variant)(ref val2)).viewableNode = new Node(val.skillNameToken, false, (Node)null);
			variants[num] = val2;
			SkillDef val3 = ScriptableObject.CreateInstance<SkillDef>();
			val3.activationState = new SerializableEntityStateType(typeof(TeslaMineFireState));
			val3.activationStateMachineName = "Weapon";
			val3.baseMaxStock = 4;
			val3.baseRechargeInterval = 8f;
			val3.beginSkillCooldownOnSkillEnd = false;
			val3.fullRestockOnAssign = false;
			val3.interruptPriority = (InterruptPriority)1;
			val3.isCombatSkill = true;
			val3.mustKeyPress = false;
			val3.canceledFromSprinting = false;
			val3.cancelSprintingOnActivation = true;
			val3.forceSprintDuringState = false;
			val3.rechargeStock = 1;
			val3.requiredStock = 1;
			val3.stockToConsume = 1;
			val3.icon = Sprites.teslaMineIconS;
			val3.skillDescriptionToken = "ES_ENGI_SECONDARY_TESLAMINE_DESCRIPTION";
			skillName = (((Object)val3).name = "ESTeslaMine");
			val3.skillName = skillName;
			val3.skillNameToken = "ES_ENGI_SECONDARY_TESLAMINE_NAME";
			val3.keywordTokens = new string[1] { "KEYWORD_STUNNING" };
			defList.Add(val3);
			Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
			Variant[] variants2 = skillFamily.variants;
			int num2 = skillFamily.variants.Length - 1;
			val2 = new Variant
			{
				skillDef = val3,
				unlockableDef = UnlocksRegistering.engiTeslaUnlockDef
			};
			((Variant)(ref val2)).viewableNode = new Node(val3.skillNameToken, false, (Node)null);
			variants2[num2] = val2;
			bool flag = default(bool);
			ContentAddition.AddEntityState<TeslaMineFireState>(ref flag);
		}

		private static void RegisterHuntressSkills()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: 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_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Expected O, but got Unknown
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			SkillLocator component = huntressRef.GetComponent<SkillLocator>();
			SkillFamily skillFamily = component.secondary.skillFamily;
			HuntressTrackingSkillDef val = ScriptableObject.CreateInstance<HuntressTrackingSkillDef>();
			((SkillDef)val).activationState = new SerializableEntityStateType(typeof(ClusterBombArrow));
			((SkillDef)val).activationStateMachineName = "Weapon";
			((SkillDef)val).baseMaxStock = 1;
			((SkillDef)val).baseRechargeInterval = 8f;
			((SkillDef)val).beginSkillCooldownOnSkillEnd = false;
			((SkillDef)val).fullRestockOnAssign = false;
			((SkillDef)val).interruptPriority = (InterruptPriority)1;
			((SkillDef)val).isCombatSkill = true;
			((SkillDef)val).mustKeyPress = false;
			((SkillDef)val).canceledFromSprinting = false;
			((SkillDef)val).cancelSprintingOnActivation = false;
			((SkillDef)val).forceSprintDuringState = false;
			((SkillDef)val).rechargeStock = 1;
			((SkillDef)val).requiredStock = 1;
			((SkillDef)val).stockToConsume = 1;
			((SkillDef)val).icon = Sprites.clusterArrowIconS;
			((SkillDef)val).skillDescriptionToken = "ES_HUNTRESS_SECONDARY_CLUSTERARROW_DESCRIPTION";
			string skillName = (((Object)val).name = "ESClusterArrow");
			((SkillDef)val).skillName = skillName;
			((SkillDef)val).skillNameToken = "ES_HUNTRESS_SECONDARY_CLUSTERARROW_NAME";
			((SkillDef)val).keywordTokens = new string[1] { "KEYWORD_AGILE" };
			defList.Add((SkillDef)(object)val);
			Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
			Variant[] variants = skillFamily.variants;
			int num = skillFamily.variants.Length - 1;
			Variant val2 = new Variant
			{
				skillDef = (SkillDef)(object)val,
				unlockableDef = UnlocksRegistering.huntressClusterarrowUnlockDef
			};
			((Variant)(ref val2)).viewableNode = new Node(((SkillDef)val).skillNameToken, false, (Node)null);
			variants[num] = val2;
			bool flag = default(bool);
			ContentAddition.AddEntityState<ClusterBombArrow>(ref flag);
		}

		private static void RegisterLoaderSkills()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: 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_0107: 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_0135: Expected O, but got Unknown
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			SkillLocator component = loaderRef.GetComponent<SkillLocator>();
			SkillFamily skillFamily = component.special.skillFamily;
			ShieldsplosionDef shieldsplosionDef = ScriptableObject.CreateInstance<ShieldsplosionDef>();
			((SkillDef)shieldsplosionDef).activationState = new SerializableEntityStateType(typeof(ShieldSplosionEntity));
			((SkillDef)shieldsplosionDef).activationStateMachineName = "Body";
			((SkillDef)shieldsplosionDef).baseMaxStock = 1;
			((SkillDef)shieldsplosionDef).baseRechargeInterval = 8f;
			((SkillDef)shieldsplosionDef).beginSkillCooldownOnSkillEnd = false;
			((SkillDef)shieldsplosionDef).fullRestockOnAssign = false;
			((SkillDef)shieldsplosionDef).interruptPriority = (InterruptPriority)1;
			((SkillDef)shieldsplosionDef).isCombatSkill = true;
			((SkillDef)shieldsplosionDef).mustKeyPress = true;
			((SkillDef)shieldsplosionDef).canceledFromSprinting = false;
			((SkillDef)shieldsplosionDef).cancelSprintingOnActivation = false;
			((SkillDef)shieldsplosionDef).forceSprintDuringState = false;
			((SkillDef)shieldsplosionDef).rechargeStock = 1;
			((SkillDef)shieldsplosionDef).requiredStock = 1;
			((SkillDef)shieldsplosionDef).stockToConsume = 1;
			((SkillDef)shieldsplosionDef).icon = Sprites.shieldsplosionIconS;
			((SkillDef)shieldsplosionDef).skillDescriptionToken = "ES_LOADER_SPECIAL_SHIELDSPLOSION_DESCRIPTION";
			string skillName = (((Object)shieldsplosionDef).name = "ESShieldSplosion");
			((SkillDef)shieldsplosionDef).skillName = skillName;
			((SkillDef)shieldsplosionDef).skillNameToken = "ES_LOADER_SPECIAL_SHIELDSPLOSION_NAME";
			defList.Add((SkillDef)(object)shieldsplosionDef);
			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)(object)shieldsplosionDef,
				unlockableDef = UnlocksRegistering.loaderShieldsplosionUnlockDef
			};
			((Variant)(ref val)).viewableNode = new Node(((SkillDef)shieldsplosionDef).skillNameToken, false, (Node)null);
			variants[num] = val;
			bool flag = default(bool);
			ContentAddition.AddEntityState<ShieldSplosionEntity>(ref flag);
		}

		private static void RegisterMercenarySkills()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: 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_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Expected O, but got Unknown
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			SkillLocator component = mercenaryRef.GetComponent<SkillLocator>();
			SkillFamily skillFamily = component.special.skillFamily;
			MercSlashportDef mercSlashportDef = ScriptableObject.CreateInstance<MercSlashportDef>();
			((SkillDef)mercSlashportDef).activationState = new SerializableEntityStateType(typeof(SlashportEntity));
			((SkillDef)mercSlashportDef).activationStateMachineName = "Weapon";
			((SkillDef)mercSlashportDef).baseMaxStock = 1;
			((SkillDef)mercSlashportDef).baseRechargeInterval = 8f;
			((SkillDef)mercSlashportDef).beginSkillCooldownOnSkillEnd = true;
			((SkillDef)mercSlashportDef).fullRestockOnAssign = false;
			((SkillDef)mercSlashportDef).interruptPriority = (InterruptPriority)2;
			((SkillDef)mercSlashportDef).isCombatSkill = true;
			((SkillDef)mercSlashportDef).mustKeyPress = false;
			((SkillDef)mercSlashportDef).canceledFromSprinting = false;
			((SkillDef)mercSlashportDef).cancelSprintingOnActivation = false;
			((SkillDef)mercSlashportDef).forceSprintDuringState = false;
			((SkillDef)mercSlashportDef).rechargeStock = 1;
			((SkillDef)mercSlashportDef).requiredStock = 1;
			((SkillDef)mercSlashportDef).stockToConsume = 1;
			((SkillDef)mercSlashportDef).icon = Sprites.slashportIconS;
			((SkillDef)mercSlashportDef).skillDescriptionToken = "ES_MERC_SPECIAL_SLASHPORT_DESCRIPTION";
			string skillName = (((Object)mercSlashportDef).name = "ESSlashport");
			((SkillDef)mercSlashportDef).skillName = skillName;
			((SkillDef)mercSlashportDef).skillNameToken = "ES_MERC_SPECIAL_SLASHPORT_NAME";
			((SkillDef)mercSlashportDef).keywordTokens = new string[3] { "KEYWORD_EXPOSE", "KEYWORD_STUNNING", "KEYWORD_SLAYER" };
			defList.Add((SkillDef)(object)mercSlashportDef);
			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)(object)mercSlashportDef,
				unlockableDef = UnlocksRegistering.mercSlashportUnlockDef
			};
			((Variant)(ref val)).viewableNode = new Node(((SkillDef)mercSlashportDef).skillNameToken, false, (Node)null);
			variants[num] = val;
			bool flag = default(bool);
			ContentAddition.AddEntityState<SlashportEntity>(ref flag);
			if (EggsSkills.classicItemsLoaded)
			{
				skillsToHandle.Add(((SkillDef)mercSlashportDef).skillName, new SkillUpgradeContainer
				{
					normalSkillDef = (SkillDef)(object)mercSlashportDef,
					body = "Merc",
					slot = (SkillSlot)3,
					index = skillFamily.variants.Length - 1
				});
			}
		}

		private static void RegisterMultSkills()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: 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_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Expected O, but got Unknown
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			SkillLocator component = multRef.GetComponent<SkillLocator>();
			SkillFamily skillFamily = component.secondary.skillFamily;
			NanoSkilldef nanoSkilldef = ScriptableObject.CreateInstance<NanoSkilldef>();
			((SkillDef)nanoSkilldef).activationState = new SerializableEntityStateType(typeof(NanobotEntity));
			((SkillDef)nanoSkilldef).activationStateMachineName = "Weapon";
			((SkillDef)nanoSkilldef).baseMaxStock = 1;
			((SkillDef)nanoSkilldef).baseRechargeInterval = 12f;
			((SkillDef)nanoSkilldef).beginSkillCooldownOnSkillEnd = true;
			((SkillDef)nanoSkilldef).fullRestockOnAssign = false;
			((SkillDef)nanoSkilldef).interruptPriority = (InterruptPriority)1;
			((SkillDef)nanoSkilldef).isCombatSkill = true;
			((SkillDef)nanoSkilldef).mustKeyPress = true;
			((SkillDef)nanoSkilldef).canceledFromSprinting = false;
			((SkillDef)nanoSkilldef).cancelSprintingOnActivation = true;
			((SkillDef)nanoSkilldef).forceSprintDuringState = false;
			((SkillDef)nanoSkilldef).rechargeStock = 1;
			((SkillDef)nanoSkilldef).requiredStock = 1;
			((SkillDef)nanoSkilldef).stockToConsume = 1;
			((SkillDef)nanoSkilldef).icon = Sprites.nanoBotsIconS;
			((SkillDef)nanoSkilldef).skillDescriptionToken = "ES_TOOLBOT_SECONDARY_NANOBOTS_DESCRIPTION";
			string skillName = (((Object)nanoSkilldef).name = "ESNanobots");
			((SkillDef)nanoSkilldef).skillName = skillName;
			((SkillDef)nanoSkilldef).skillNameToken = "ES_TOOLBOT_SECONDARY_NANOBOTS_NAME";
			((SkillDef)nanoSkilldef).keywordTokens = new string[1] { "ES_KEYWORD_MARKING" };
			defList.Add((SkillDef)(object)nanoSkilldef);
			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)(object)nanoSkilldef,
				unlockableDef = UnlocksRegistering.multNanobeaconUnlockDef
			};
			((Variant)(ref val)).viewableNode = new Node(((SkillDef)nanoSkilldef).skillNameToken, false, (Node)null);
			variants[num] = val;
			bool flag = default(bool);
			ContentAddition.AddEntityState<NanobotEntity>(ref flag);
		}

		private static void RegisterRailgunnerSkills()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: 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_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Expected O, but got Unknown
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			SkillLocator component = railgunnerRef.GetComponent<SkillLocator>();
			SkillFamily skillFamily = component.primary.skillFamily;
			RailgunSkillDef val = ScriptableObject.CreateInstance<RailgunSkillDef>();
			((SkillDef)val).activationState = new SerializableEntityStateType(typeof(LancerRoundsEntity));
			((SkillDef)val).activationStateMachineName = "Weapon";
			((SkillDef)val).beginSkillCooldownOnSkillEnd = true;
			((SkillDef)val).fullRestockOnAssign = true;
			((SkillDef)val).interruptPriority = (InterruptPriority)0;
			((SkillDef)val).isCombatSkill = true;
			((SkillDef)val).mustKeyPress = false;
			((SkillDef)val).canceledFromSprinting = false;
			((SkillDef)val).forceSprintDuringState = false;
			((SkillDef)val).stockToConsume = 0;
			((SkillDef)val).icon = Sprites.placeholderIconS;
			((SkillDef)val).skillDescriptionToken = "ES_RAILGUNNER_PRIMARY_LANCEROUNDS_DESCRIPTION";
			string skillName = (((Object)val).name = "ESLanceRounds");
			((SkillDef)val).skillName = skillName;
			((SkillDef)val).skillNameToken = "ES_RAILGUNNER_PRIMARY_LANCEROUNDS_NAME";
			defList.Add((SkillDef)(object)val);
			Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
			Variant[] variants = skillFamily.variants;
			int num = skillFamily.variants.Length - 1;
			Variant val2 = new Variant
			{
				skillDef = (SkillDef)(object)val,
				unlockableDef = UnlocksRegistering.railgunnerLanceroundsUnlockDef
			};
			((Variant)(ref val2)).viewableNode = new Node(((SkillDef)val).skillNameToken, false, (Node)null);
			variants[num] = val2;
			bool flag = default(bool);
			ContentAddition.AddEntityState<LancerRoundsEntity>(ref flag);
		}

		private static void RegisterRexSkills()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: 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_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Expected O, but got Unknown
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			SkillLocator component = rexRef.GetComponent<SkillLocator>();
			SkillFamily skillFamily = component.special.skillFamily;
			GroundedSkillDef val = ScriptableObject.CreateInstance<GroundedSkillDef>();
			((SkillDef)val).activationState = new SerializableEntityStateType(typeof(DirectiveRoot));
			((SkillDef)val).activationStateMachineName = "Weapon";
			((SkillDef)val).baseMaxStock = 1;
			((SkillDef)val).baseRechargeInterval = 12f;
			((SkillDef)val).beginSkillCooldownOnSkillEnd = true;
			((SkillDef)val).fullRestockOnAssign = false;
			((SkillDef)val).interruptPriority = (InterruptPriority)1;
			((SkillDef)val).isCombatSkill = true;
			((SkillDef)val).mustKeyPress = true;
			((SkillDef)val).canceledFromSprinting = true;
			((SkillDef)val).cancelSprintingOnActivation = true;
			((SkillDef)val).forceSprintDuringState = false;
			((SkillDef)val).rechargeStock = 1;
			((SkillDef)val).requiredStock = 1;
			((SkillDef)val).stockToConsume = 1;
			((SkillDef)val).icon = Sprites.rexrootIconS;
			((SkillDef)val).skillDescriptionToken = "ES_TREEBOT_SPECIAL_ROOT_DESCRIPTION";
			string skillName = (((Object)val).name = "ESRoot");
			((SkillDef)val).skillName = skillName;
			((SkillDef)val).skillNameToken = "ES_TREEBOT_SPECIAL_ROOT_NAME";
			((SkillDef)val).keywordTokens = new string[2] { "KEYWORD_STUNNING", "ES_KEYWORD_ADAPTIVE" };
			defList.Add((SkillDef)(object)val);
			Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
			Variant[] variants = skillFamily.variants;
			int num = skillFamily.variants.Length - 1;
			Variant val2 = new Variant
			{
				skillDef = (SkillDef)(object)val,
				unlockableDef = UnlocksRegistering.rexRootUnlockDef
			};
			((Variant)(ref val2)).viewableNode = new Node(((SkillDef)val).skillNameToken, false, (Node)null);
			variants[num] = val2;
			bool flag = default(bool);
			ContentAddition.AddEntityState<DirectiveRoot>(ref flag);
			if (EggsSkills.classicItemsLoaded)
			{
				skillsToHandle.Add(((SkillDef)val).skillName, new SkillUpgradeContainer
				{
					normalSkillDef = (SkillDef)(object)val,
					body = "Treebot",
					slot = (SkillSlot)3,
					index = skillFamily.variants.Length - 1
				});
			}
		}

		private static void RegisterVoidfiendSkills()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: 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_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0211: Unknown result type (might be due to invalid IL or missing references)
			//IL_021b: Expected O, but got Unknown
			//IL_021c: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0225: Unknown result type (might be due to invalid IL or missing references)
			//IL_022d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			//IL_023d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0245: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Unknown result type (might be due to invalid IL or missing references)
			SkillLocator component = voidFiendRef.GetComponent<SkillLocator>();
			SkillFamily skillFamily = component.special.skillFamily;
			VoidsurvivorSkilldefFix voidsurvivorSkilldefFix = ScriptableObject.CreateInstance<VoidsurvivorSkilldefFix>();
			((SkillDef)voidsurvivorSkilldefFix).activationState = new SerializableEntityStateType(typeof(InversionChargePure));
			((SkillDef)voidsurvivorSkilldefFix).activationStateMachineName = "Weapon";
			((SkillDef)voidsurvivorSkilldefFix).baseMaxStock = 1;
			((SkillDef)voidsurvivorSkilldefFix).baseRechargeInterval = 4f;
			((SkillDef)voidsurvivorSkilldefFix).beginSkillCooldownOnSkillEnd = true;
			((SkillDef)voidsurvivorSkilldefFix).fullRestockOnAssign = true;
			((SkillDef)voidsurvivorSkilldefFix).interruptPriority = (InterruptPriority)1;
			((SkillDef)voidsurvivorSkilldefFix).isCombatSkill = true;
			((SkillDef)voidsurvivorSkilldefFix).mustKeyPress = true;
			((SkillDef)voidsurvivorSkilldefFix).canceledFromSprinting = false;
			((SkillDef)voidsurvivorSkilldefFix).cancelSprintingOnActivation = true;
			((SkillDef)voidsurvivorSkilldefFix).forceSprintDuringState = false;
			((SkillDef)voidsurvivorSkilldefFix).rechargeStock = 1;
			((SkillDef)voidsurvivorSkilldefFix).requiredStock = 1;
			((SkillDef)voidsurvivorSkilldefFix).stockToConsume = 1;
			((SkillDef)voidsurvivorSkilldefFix).icon = Sprites.inversionIconS;
			((SkillDef)voidsurvivorSkilldefFix).skillDescriptionToken = "ES_VOIDSURVIVOR_SPECIAL_INVERSION_DESCRIPTION";
			string skillName = (((Object)voidsurvivorSkilldefFix).name = "ESInversion");
			((SkillDef)voidsurvivorSkilldefFix).skillName = skillName;
			((SkillDef)voidsurvivorSkilldefFix).skillNameToken = "ES_VOIDSURVIVOR_SPECIAL_INVERSION_NAME";
			((SkillDef)voidsurvivorSkilldefFix).keywordTokens = new string[1] { "ES_VOIDSURVIVOR_SPECIAL_INVERSION_KEYWORD" };
			SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
			val.activationState = new SerializableEntityStateType(typeof(InversionChargeCorrupt));
			val.activationStateMachineName = "Weapon";
			val.baseMaxStock = 1;
			val.baseRechargeInterval = 4f;
			val.beginSkillCooldownOnSkillEnd = true;
			val.fullRestockOnAssign = true;
			val.interruptPriority = (InterruptPriority)1;
			val.isCombatSkill = true;
			val.mustKeyPress = true;
			val.canceledFromSprinting = false;
			val.cancelSprintingOnActivation = true;
			val.forceSprintDuringState = false;
			val.rechargeStock = 1;
			val.requiredStock = 1;
			val.stockToConsume = 1;
			val.icon = Sprites.inversionAltIconS;
			val.skillDescriptionToken = "ES_VOIDSURVIVOR_SPECIAL_INVERSION_DESCRIPTION_ALT";
			skillName = (((Object)val).name = "ESInversionAlt");
			val.skillName = skillName;
			val.skillNameToken = "ES_VOIDSURVIVOR_SPECIAL_INVERSION_NAME_ALT";
			voidsurvivorSkilldefFix.alt = val;
			defList.Add((SkillDef)(object)voidsurvivorSkilldefFix);
			defList.Add(val);
			Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
			Variant[] variants = skillFamily.variants;
			int num = skillFamily.variants.Length - 1;
			Variant val2 = new Variant
			{
				skillDef = (SkillDef)(object)voidsurvivorSkilldefFix,
				unlockableDef = UnlocksRegistering.voidsurvivorInversionUnlockDef
			};
			((Variant)(ref val2)).viewableNode = new Node(((SkillDef)voidsurvivorSkilldefFix).skillNameToken, false, (Node)null);
			variants[num] = val2;
			bool flag = default(bool);
			ContentAddition.AddEntityState<InversionBase>(ref flag);
			ContentAddition.AddEntityState<InversionPure>(ref flag);
			ContentAddition.AddEntityState<InversionCorrupt>(ref flag);
			ContentAddition.AddEntityState<InversionChargeBase>(ref flag);
			ContentAddition.AddEntityState<InversionChargePure>(ref flag);
			ContentAddition.AddEntityState<InversionChargeCorrupt>(ref flag);
			if (EggsSkills.classicItemsLoaded)
			{
				skillsToHandle.Add(((SkillDef)voidsurvivorSkilldefFix).skillName, new SkillUpgradeContainer
				{
					normalSkillDef = (SkillDef)(object)voidsurvivorSkilldefFix,
					body = "VoidSurvivor",
					slot = (SkillSlot)3,
					index = skillFamily.variants.Length - 1
				});
			}
		}

		private static void RegisterExtraStates()
		{
			//IL_0012: 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_003d: 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_004d: 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)
			//IL_005d: 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_006d: Unknown result type (might be due to invalid IL or missing references)
			bool flag = default(bool);
			if (Configuration.GetConfigValue<bool>(Configuration.EnableMageSkills))
			{
				ContentAddition.AddEntityState<ZapportFireEntity>(ref flag);
				Log.LogMessage("Zapport fire state loaded!");
			}
			if (Configuration.GetConfigValue<bool>(Configuration.EnableEngiSkills))
			{
				ContentAddition.AddEntityState<TeslaArmingUnarmedState>(ref flag);
				ContentAddition.AddEntityState<TeslaArmingWeakState>(ref flag);
				ContentAddition.AddEntityState<TeslaArmingFullState>(ref flag);
				ContentAddition.AddEntityState<TeslaArmState>(ref flag);
				ContentAddition.AddEntityState<TeslaWaitForStick>(ref flag);
				ContentAddition.AddEntityState<TeslaWaitForTargetState>(ref flag);
				ContentAddition.AddEntityState<TeslaPreDetState>(ref flag);
				ContentAddition.AddEntityState<TeslaDetonateState>(ref flag);
				Log.LogMessage("Tesla mine states loaded!");
			}
		}

		private static void RegisterScepterSkills()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_023d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
			AcridPurgeDef acridPurgeDef = ScriptableObject.CreateInstance<AcridPurgeDef>();
			((SkillDef)acridPurgeDef).activationState = new SerializableEntityStateType(typeof(AcridPurgeEntityUpgrade));
			((SkillDef)acridPurgeDef).activationStateMachineName = "Body";
			((SkillDef)acridPurgeDef).baseMaxStock = 1;
			((SkillDef)acridPurgeDef).baseRechargeInterval = 12f;
			((SkillDef)acridPurgeDef).beginSkillCooldownOnSkillEnd = false;
			((SkillDef)acridPurgeDef).fullRestockOnAssign = false;
			((SkillDef)acridPurgeDef).interruptPriority = (InterruptPriority)1;
			((SkillDef)acridPurgeDef).isCombatSkill = true;
			((SkillDef)acridPurgeDef).mustKeyPress = true;
			((SkillDef)acridPurgeDef).canceledFromSprinting = false;
			((SkillDef)acridPurgeDef).cancelSprintingOnActivation = false;
			((SkillDef)acridPurgeDef).forceSprintDuringState = false;
			((SkillDef)acridPurgeDef).rechargeStock = 1;
			((SkillDef)acridPurgeDef).requiredStock = 1;
			((SkillDef)acridPurgeDef).stockToConsume = 1;
			((SkillDef)acridPurgeDef).icon = Sprites.acridpurgeUpgradedIconS;
			((SkillDef)acridPurgeDef).skillDescriptionToken = "ES_CROCO_SPECIAL_PURGE_UGPRADED_DESCRIPTION";
			string skillName = (((Object)acridPurgeDef).name = "ESPurge_UG");
			((SkillDef)acridPurgeDef).skillName = skillName;
			((SkillDef)acridPurgeDef).skillNameToken = "ES_CROCO_SPECIAL_PURGE_UGPRADED_NAME";
			defList.Add((SkillDef)(object)acridPurgeDef);
			SkillUpgradeContainer value = skillsToHandle["ESPurge"];
			value.upgradedSkillDef = (SkillDef)(object)acridPurgeDef;
			skillsToHandle["ESPurge"] = value;
			bool flag = default(bool);
			ContentAddition.AddEntityState<AcridPurgeEntityUpgrade>(ref flag);
			MercSlashportDef mercSlashportDef = ScriptableObject.CreateInstance<MercSlashportDef>();
			((SkillDef)mercSlashportDef).activationState = new SerializableEntityStateType(typeof(SlashportEntityUpgrade));
			((SkillDef)mercSlashportDef).activationStateMachineName = "Weapon";
			((SkillDef)mercSlashportDef).baseMaxStock = 1;
			((SkillDef)mercSlashportDef).baseRechargeInterval = 8f;
			((SkillDef)mercSlashportDef).beginSkillCooldownOnSkillEnd = true;
			((SkillDef)mercSlashportDef).fullRestockOnAssign = false;
			((SkillDef)mercSlashportDef).interruptPriority = (InterruptPriority)2;
			((SkillDef)mercSlashportDef).isCombatSkill = true;
			((SkillDef)mercSlashportDef).mustKeyPress = false;
			((SkillDef)mercSlashportDef).canceledFromSprinting = false;
			((SkillDef)mercSlashportDef).cancelSprintingOnActivation = false;
			((SkillDef)mercSlashportDef).forceSprintDuringState = false;
			((SkillDef)mercSlashportDef).rechargeStock = 1;
			((SkillDef)mercSlashportDef).requiredStock = 1;
			((SkillDef)mercSlashportDef).stockToConsume = 1;
			((SkillDef)mercSlashportDef).icon = Sprites.slashportUpgradedIconS;
			((SkillDef)mercSlashportDef).skillDescriptionToken = "ES_MERC_SPECIAL_SLASHPORT_UPGRADED_DESCRIPTION";
			skillName = (((Object)mercSlashportDef).name = "ESSlashport_UG");
			((SkillDef)mercSlashportDef).skillName = skillName;
			((SkillDef)mercSlashportDef).skillNameToken = "ES_MERC_SPECIAL_SLASHPORT_UPGRADED_NAME";
			defList.Add((SkillDef)(object)mercSlashportDef);
			value = skillsToHandle["ESSlashport"];
			value.upgradedSkillDef = (SkillDef)(object)mercSlashportDef;
			skillsToHandle["ESSlashport"] = value;
			ContentAddition.AddEntityState<SlashportEntityUpgrade>(ref flag);
			GroundedSkillDef val = ScriptableObject.CreateInstance<GroundedSkillDef>();
			((SkillDef)val).activationState = new SerializableEntityStateType(typeof(DirectiveRootUpgraded));
			((SkillDef)val).activationStateMachineName = "Weapon";
			((SkillDef)val).baseMaxStock = 1;
			((SkillDef)val).baseRechargeInterval = 12f;
			((SkillDef)val).beginSkillCooldownOnSkillEnd = true;
			((SkillDef)val).fullRestockOnAssign = false;
			((SkillDef)val).interruptPriority = (InterruptPriority)1;
			((SkillDef)val).isCombatSkill = true;
			((SkillDef)val).mustKeyPress = true;
			((SkillDef)val).canceledFromSprinting = true;
			((SkillDef)val).cancelSprintingOnActivation = true;
			((SkillDef)val).forceSprintDuringState = false;
			((SkillDef)val).rechargeStock = 1;
			((SkillDef)val).requiredStock = 1;
			((SkillDef)val).stockToConsume = 1;
			((SkillDef)val).icon = Sprites.rexrootUpgradedIconS;
			((SkillDef)val).skillDescriptionToken = "ES_TREEBOT_SPECIAL_ROOT_UPGRADED_DESCRIPTION";
			skillName = (((Object)val).name = "ESRoot_UG");
			((SkillDef)val).skillName = skillName;
			((SkillDef)val).skillNameToken = "ES_TREEBOT_SPECIAL_ROOT_UPGRADED_NAME";
			defList.Add((SkillDef)(object)val);
			value = skillsToHandle["ESRoot"];
			value.upgradedSkillDef = (SkillDef)(object)val;
			skillsToHandle["ESRoot"] = value;
			ContentAddition.AddEntityState<DirectiveRootUpgraded>(ref flag);
		}

		[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
		internal static void SetScepterReplacements()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			foreach (KeyValuePair<string, SkillUpgradeContainer> item in skillsToHandle)
			{
				SkillUpgradeContainer value = item.Value;
				Item<Scepter>.instance.RegisterScepterSkill(value.upgradedSkillDef, value.body + "Body", value.slot, value.normalSkillDef);
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
		internal static void SetStandaloneScepterReplacements()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			foreach (KeyValuePair<string, SkillUpgradeContainer> item in skillsToHandle)
			{
				SkillUpgradeContainer value = item.Value;
				ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(value.upgradedSkillDef, value.body + "Body", value.slot, value.index);
			}
		}
	}
	internal class AcridPurgeTracker : MonoBehaviour
	{
		public CharacterBody characterBody;

		private static readonly float maxTrackingDistance = 50000f;

		private float poisonCounter;

		private float totalPoisoned;

		private static readonly float trackerUpdateFrequency = 10f;

		private float trackerUpdateStopwatch;

		public InputBankTest inputBank;

		public TeamComponent teamComponent;

		private void Start()
		{
			characterBody = ((Component)this).GetComponent<CharacterBody>();
			inputBank = ((Component)this).GetComponent<InputBankTest>();
			teamComponent = ((Component)this).GetComponent<TeamComponent>();
		}

		private void FixedUpdate()
		{
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: 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)
			trackerUpdateStopwatch += Time.fixedDeltaTime;
			if (!(trackerUpdateStopwatch >= 1f / trackerUpdateFrequency))
			{
				return;
			}
			trackerUpdateStopwatch -= 1f / trackerUpdateFrequency;
			poisonCounter = 0f;
			HurtBox[] hurtBoxes = new SphereSearch
			{
				origin = characterBody.footPosition,
				radius = maxTrackingDistance,
				mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask
			}.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(teamComponent.teamIndex)).OrderCandidatesByDistance()
				.FilterCandidatesByDistinctHurtBoxEntities()
				.GetHurtBoxes();
			foreach (HurtBox val in hurtBoxes)
			{
				CharacterBody body = val.healthComponent.body;
				body.RecalculateStats();
				if (body.HasBuff(Buffs.Poisoned) || body.HasBuff(Buffs.Blight))
				{
					poisonCounter += 1f;
				}
			}
			totalPoisoned = poisonCounter;
		}

		public float GetPoisonedCount()
		{
			return totalPoisoned;
		}
	}
	internal class InvisHandler : MonoBehaviour
	{
		public float spp_stunRadius = 0f;

		public float spp_moveSpeedBonus = 1f;

		private bool isInvis;

		private CharacterBody characterBody;

		private static readonly float baseTimeTilInvis = 0.4f;

		private static readonly float buffDuration = Configuration.GetConfigValue<float>(Configuration.BanditInvissprintBuffduration);

		private float holdTimer;

		private float timeTilInvis;

		private static readonly string enterSoundString = "Play_bandit2_shift_enter";

		private static readonly string exitSoundString = "Play_bandit2_shift_exit";

		private static readonly string muzzleString = "MuzzleSmokebomb";

		private GameObject effectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/Bandit2SmokeBomb.prefab").WaitForCompletion();

		private InputBankTest bank;

		private GenericSkill utilitySlot;

		private void Start()
		{
			timeTilInvis = baseTimeTilInvis;
			characterBody = ((Component)this).GetComponent<CharacterBody>();
			utilitySlot = characterBody.skillLocator.utility;
			isInvis = false;
			bank = ((Component)this).GetComponent<InputBankTest>();
		}

		internal void MakeInvis()
		{
			if (NetworkServer.active)
			{
				characterBody.AddBuff(Buffs.Cloak);
				characterBody.AddBuff(Buffs.CloakSpeed);
			}
			isInvis = true;
			timeTilInvis = baseTimeTilInvis;
			holdTimer = utilitySlot.rechargeStopwatch;
			PlayEffects();
			characterBody.characterMotor.walkSpeedPenaltyCoefficient = spp_moveSpeedBonus;
		}

		internal void RemoveInvis()
		{
			//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_0081: 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_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: 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_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)
			if (NetworkServer.active)
			{
				characterBody.RemoveBuff(Buffs.Cloak);
				characterBody.RemoveBuff(Buffs.CloakSpeed);
				characterBody.AddTimedBuff(BuffsLoading.buffDefCunning, buffDuration);
			}
			utilitySlot.DeductStock(1);
			isInvis = false;
			PlayEffects();
			if (spp_stunRadius > 0f)
			{
				new BlastAttack
				{
					baseDamage = 0f,
					radius = spp_stunRadius,
					attacker = null,
					inflictor = null,
					teamIndex = characterBody.teamComponent.teamIndex,
					crit = false,
					losType = (LoSType)0,
					position = characterBody.corePosition,
					damageType = (DamageType)32
				}.Fire();
			}
			characterBody.characterMotor.walkSpeedPenaltyCoefficient = 1f;
		}

		private void FixedUpdate()
		{
			if (characterBody.isSprinting && !isInvis)
			{
				if (timeTilInvis > 0f)
				{
					timeTilInvis -= Time.fixedDeltaTime;
				}
				else if (characterBody.skillLocator.utility.stock > 0)
				{
					MakeInvis();
				}
			}
			else if (!characterBody.isSprinting)
			{
				if (isInvis)
				{
					RemoveInvis();
				}
				timeTilInvis = baseTimeTilInvis;
			}
			if (isInvis)
			{
				utilitySlot.rechargeStopwatch = holdTimer;
			}
			if (bank.skill2.down && isInvis)
			{
				RemoveInvis();
			}
		}

		internal bool IsInvis()
		{
			return isInvis;
		}

		private void PlayEffects()
		{
			EffectManager.SimpleMuzzleFlash(effectPrefab, ((Component)this).gameObject, muzzleString, false);
			string text = (isInvis ? enterSoundString : exitSoundString);
			Util.PlaySound(text, ((Component)this).gameObject);
		}
	}
	internal class MicroMissileDelayedImpact : MonoBehaviour
	{
		public static float spp_radiusMult = 1f;

		private ProjectileImpactExplosion explosion;

		private ProjectileTargetComponent homing;

		private Transform tracker;

		private float delay = 0.2f;

		private void Start()
		{
			explosion = ((Component)this).GetComponent<ProjectileImpactExplosion>();
			homing = ((Component)this).GetComponent<ProjectileTargetComponent>();
			tracker = homing.target;
			((Component)this).GetComponent<MissileController>().maxVelocity = Random.Range(20f, 25f);
			((ProjectileExplosion)explosion).blastRadius = 5f * spp_radiusMult;
		}

		private void FixedUpdate()
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			homing.target = tracker;
			if ((Object)(object)homing.target == (Object)null || Vector3.Distance(homing.target.position, ((Component)this).transform.position) < 3f)
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
				((ProjectileExplosion)explosion).Detonate();
			}
			if (delay > 0f)
			{
				delay -= Time.deltaTime;
			}
			else
			{
				explosion.destroyOnEnemy = (explosion.destroyOnWorld = true);
			}
		}
	}
	internal class MicroMissileLauncher : MonoBehaviour
	{
		private static int salvoBonusCount = Configuration.GetConfigValue<int>(Configuration.EngiMicromissileSalvocount);

		private GameObject owner;

		private ProjectileDamage damage;

		private ProjectileStickOnImpact stick;

		private float delay = 0.6f;

		private bool fired = false;

		private bool hasStuck = false;

		private void Start()
		{
			stick = ((Component)this).GetComponent<ProjectileStickOnImpact>();
		}

		private void FixedUpdate()
		{
			if (delay > 0f)
			{
				delay -= Time.fixedDeltaTime;
			}
			else if (!fired)
			{
				LaunchMissiles();
				fired = true;
			}
			if (stick.stuck && !hasStuck)
			{
				hasStuck = true;
			}
			if (!stick.stuck && hasStuck)
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
			if (Object.op_Implicit((Object)(object)stick.stuckBody) && Object.op_Implicit((Object)(object)stick.stuckBody.healthComponent) && !stick.stuckBody.healthComponent.alive)
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
		}

		internal void LaunchMissiles()
		{
			//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_0064: 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_006c: Invalid comparison between Unknown and I4
			//IL_006e: 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_008a: 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)
			ProjectileController component = ((Component)this).GetComponent<ProjectileController>();
			damage = ((Component)this).GetComponent<ProjectileDamage>();
			owner = component.owner;
			FireEngi(4);
			CharacterMaster master = owner.GetComponent<CharacterBody>().master;
			if (master.deployablesList == null)
			{
				return;
			}
			foreach (DeployableInfo deployables in master.deployablesList)
			{
				if ((int)deployables.slot == 1 && Vector3.Distance(((Component)deployables.deployable).GetComponent<CharacterMaster>().GetBody().corePosition, ((Component)this).transform.position) <= 60f)
				{
					FireTurret(((Component)deployables.deployable).gameObject, 2 + salvoBonusCount);
				}
			}
		}

		private void FireEngi(int count)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			string text = "MuzzleLeft";
			for (int i = 1; i <= count; i++)
			{
				Vector3 position = owner.transform.position;
				ModelLocator component = owner.GetComponent<ModelLocator>();
				if (Object.op_Implicit((Object)(object)component))
				{
					Transform modelTransform = component.modelTransform;
					if (Object.op_Implicit((Object)(object)modelTransform))
					{
						ChildLocator component2 = ((Component)modelTransform).GetComponent<ChildLocator>();
						if (Object.op_Implicit((Object)(object)component2))
						{
							Transform val = component2.FindChild(text);
							if (Object.op_Implicit((Object)(object)val))
							{
								position = val.position;
							}
						}
					}
				}
				Fire(position);
				text = ((text == "MuzzleLeft") ? "MuzzleRight" : "MuzzleLeft");
			}
		}

		private void FireTurret(GameObject turretObject, int count)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			CharacterMaster component = turretObject.GetComponent<CharacterMaster>();
			GameObject bodyObject = component.GetBodyObject();
			ModelLocator component2 = bodyObject.GetComponent<ModelLocator>();
			Vector3 position = turretObject.transform.position;
			if (Object.op_Implicit((Object)(object)component2))
			{
				Transform modelTransform = component2.modelTransform;
				if (Object.op_Implicit((Object)(object)modelTransform))
				{
					ChildLocator component3 = ((Component)modelTransform).GetComponent<ChildLocator>();
					if (Object.op_Implicit((Object)(object)component3))
					{
						Transform val = component3.FindChild("Muzzle");
						if (Object.op_Implicit((Object)(object)val))
						{
							position = val.position;
						}
					}
				}
			}
			for (int i = 1; i <= count; i++)
			{
				Fire(position);
			}
		}

		private void Fire(Vector3 origin)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0046: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = owner.transform.forward;
			InputBankTest component = owner.GetComponent<InputBankTest>();
			if (Object.op_Implicit((Object)(object)component))
			{
				val = component.aimDirection;
			}
			if (NetworkServer.active)
			{
				ProjectileManager.instance.FireProjectile(Projectiles.micromissilePrefab, origin, Quaternion.LookRotation(val), owner, damage.damage / MicroMissileEntity.damageCoef, 0f, damage.crit, (DamageColorIndex)0, ((Component)this).gameObject, -1f);
			}
		}
	}
	[RequireComponent(typeof(CharacterBody))]
	[RequireComponent(typeof(InputBankTest))]
	[RequireComponent(typeof(TeamComponent))]
	public class MercSlashportTracker : MonoBehaviour
	{
		public BullseyeSearch search = new BullseyeSearch();

		public CharacterBody characterBody;

		public readonly float trackerUpdateFrequency = 10f;

		public float trackerUpdateStopwatch;

		public readonly float maxTrackingAngle = 15f;

		public readonly float maxTrackingDistance = 45f;

		public HurtBox trackingTarget;

		public Indicator indicator;

		public InputBankTest inputBank;

		public TeamComponent teamComponent;

		private void Start()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			indicator = new Indicator(((Component)this).gameObject, Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressTrackingIndicator.prefab").WaitForCompletion());
			characterBody = ((Component)this).GetComponent<CharacterBody>();
			inputBank = ((Component)this).GetComponent<InputBankTest>();
			teamComponent = ((Component)this).GetComponent<TeamComponent>();
		}

		public HurtBox GetTrackingTarget()
		{
			return trackingTarget;
		}

		private void FixedUpdate()
		{
			//IL_0057: 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_006d: Unknown result type (might be due to invalid IL or missing references)
			trackerUpdateStopwatch += Time.fixedDeltaTime;
			if (trackerUpdateStopwatch >= 1f / trackerUpdateFrequency)
			{
				trackerUpdateStopwatch -= 1f / trackerUpdateFrequency;
				HurtBox val = trackingTarget;
				Ray aimRay = default(Ray);
				((Ray)(ref aimRay))..ctor(inputBank.aimOrigin, inputBank.aimDirection);
				SearchForTarget(aimRay);
				indicator.targetTransform = (Object.op_Implicit((Object)(object)trackingTarget) ? ((Component)trackingTarget).transform : null);
			}
			if (characterBody.skillLocator.special.cooldownRemaining <= 0f)
			{
				indicator.active = true;
			}
			else
			{
				indicator.active = false;
			}
		}

		private void SearchForTarget(Ray aimRay)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			search.teamMaskFilter = TeamMask.GetUnprotectedTeams(teamComponent.teamIndex);
			search.filterByLoS = true;
			search.searchOrigin = ((Ray)(ref aimRay)).origin;
			search.searchDirection = ((Ray)(ref aimRay)).direction;
			search.sortMode = (SortMode)1;
			search.maxDistanceFilter = maxTrackingDistance;
			search.maxAngleFilter = maxTrackingAngle;
			search.RefreshCandidates();
			search.FilterOutGameObject(((Component)this).gameObject);
			trackingTarget = search.GetResults().FirstOrDefault();
		}
	}
	public class OnStuckCaller : MonoBehaviour
	{
		private bool flag = true;

		private bool flag2 = true;

		private static readonly float baseCountDown = 3f;

		private float countDown;

		private static readonly float radiusMax = 25f;

		private float stopwatch;

		private static readonly float stopwatchMax = 1f;

		private GameObject indicator;

		private GameObject owner;

		private GameObject areaPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab").WaitForCompletion();

		private ProjectileController controller;

		private ProjectileStickOnImpact stick;

		private void Start()
		{
			//IL_006f: 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)
			countDown = baseCountDown;
			stopwatch = stopwatchMax;
			owner = ((Component)this).GetComponent<ProjectileController>().owner;
			stick = ((Component)this).GetComponent<ProjectileStickOnImpact>();
			controller = ((Component)this).GetComponent<ProjectileController>();
			indicator = Object.Instantiate<GameObject>(areaPrefab);
			indicator.SetActive(true);
			indicator.transform.position = ((Component)this).transform.position;
			indicator.transform.localScale = Vector3.zero;
		}

		private void FixedUpdate()
		{
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			if (stick.stuck)
			{
				flag2 = false;
			}
			if (flag2)
			{
				return;
			}
			if (countDown > 0f)
			{
				MarkAffectedZone();
				countDown -= Time.fixedDeltaTime;
			}
			else if (flag)
			{
				flag = false;
				indicator.transform.localScale = Vector3.zero;
				indicator.SetActive(false);
				Object.Destroy((Object)(object)indicator);
				if (NetworkServer.active)
				{
					owner.GetComponent<SwarmComponent>()?.GetTargets(((Component)controller).transform.position);
				}
			}
		}

		private void MarkAffectedZone()
		{
			//IL_0045: 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_0066: Unknown result type (might be due to invalid IL or missing references)
			if (stopwatch >= 0f)
			{
				stopwatch -= Time.fixedDeltaTime;
			}
			else
			{
				stopwatch = stopwatchMax;
			}
			indicator.transform.position = ((Component)this).transform.position;
			indicator.transform.localScale = Vector3.one * GenerateLogScaleCurve();
		}

		private float GenerateLogScaleCurve()
		{
			float num = stopwatchMax - stopwatch;
			float num2 = Math.ConvertToRange(0f, stopwatchMax, 1f, radiusMax, num);
			float num3 = (0f - radiusMax) / Mathf.Log(1f / radiusMax);
			return Mathf.Log(num2) * num3;
		}
	}
	[RequireComponent(typeof(TeamComponent))]
	[RequireComponent(typeof(CharacterBody))]
	internal class SwarmComponent : MonoBehaviour
	{
		internal static float spp_damageMult = 1f;

		internal static int spp_swarmBonus = 0;

		internal static float spp_healMult = 1f;

		private CharacterBody ownerBody;

		private static readonly float damageCoefficient = 0.8f * spp_damageMult;

		private static readonly float healCoef = 0.015f * spp_healMult;

		private static readonly float maxQueueTimer = 0.05f;

		private static readonly float nanoProcCoef = 0.4f;

		private float queueTimer;

		private static readonly int nanoBotCount = Configuration.GetConfigValue<int>(Configuration.ToolbotNanobotCountperenemy) + spp_swarmBonus;

		private List<HurtBox> hurtBoxesList;

		private void Start()
		{
			ownerBody = ((Component)this).GetComponent<CharacterBody>();
			hurtBoxesList = new List<HurtBox>();
			queueTimer = maxQueueTimer;
		}

		private void CallSwarm(HurtBox hurtBox)
		{
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			NanobotOrb nanobotOrb = new NanobotOrb();
			((GenericDamageOrb)nanobotOrb).attacker = ((Component)this).gameObject;
			((GenericDamageOrb)nanobotOrb).damageValue = ownerBody.damage * damageCoefficient;
			nanobotOrb.healthFraction = healCoef;
			((GenericDamageOrb)nanobotOrb).isCrit = ownerBody.RollCrit();
			((Orb)nanobotOrb).origin = ownerBody.corePosition;
			((Orb)nanobotOrb).target = hurtBox.hurtBoxGroup.mainHurtBox;
			((GenericDamageOrb)nanobotOrb).procCoefficient = nanoProcCoef;
			if (NetworkServer.active)
			{
				OrbManager.instance.AddOrb((Orb)(object)nanobotOrb);
			}
		}

		internal void GetTargets(Vector3 impactPos)
		{
			//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)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			HurtBox[] hurtBoxes = new SphereSearch
			{
				origin = impactPos,
				radius = 25f,
				mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask
			}.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((Component)this).GetComponent<TeamComponent>().teamIndex)).OrderCandidatesByDistance()
				.FilterCandidatesByDistinctHurtBoxEntities()
				.GetHurtBoxes();
			foreach (HurtBox hurtBox in hurtBoxes)
			{
				AddToTargets(hurtBox);
			}
		}

		private void AddToTargets(HurtBox hurtBox)
		{
			for (int i = 0; i < nanoBotCount; i++)
			{
				hurtBoxesList.Add(hurtBox);
				List<HurtBox> list = new List<HurtBox>();
				while (hurtBoxesList.Count > 0)
				{
					int index = Random.Range(1, hurtBoxesList.Count) - 1;
					list.Add(hurtBoxesList.ElementAt(index));
					hurtBoxesList.RemoveAt(index);
				}
				hurtBoxesList = list;
			}
		}

		private void FixedUpdate()
		{
			if (hurtBoxesList.Count <= 0)
			{
				return;
			}
			if (queueTimer > 0f)
			{
				queueTimer -= Time.fixedDeltaTime;
				return;
			}
			while (!Object.op_Implicit((Object)(object)hurtBoxesList.ElementAt(0)))
			{
				hurtBoxesList.RemoveAt(0);
			}
			CallSwarm(hurtBoxesList.ElementAt(0));
			hurtBoxesList.RemoveAt(0);
			queueTimer = 0.05f;
		}
	}
}
namespace EggsSkills.Stats
{
	internal class Statdefs
	{
		internal static readonly StatDef totalCrocoDotDamage = StatDef.Register("totalCrocoDotDamage", (StatRecordType)0, (StatDataType)0, 0.01, (DisplayValueFormatterDelegate)null);

		internal static void InitStatHooks()
		{
			GlobalEventManager.onServerDamageDealt += OnDamageDealt;
		}

		private static void OnDamageDealt(DamageReport report)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Invalid comparison between Unknown and I4
			if (Object.op_Implicit((Object)(object)report.attacker))
			{
				StatSheet val = PlayerStatsComponent.FindMasterStatSheet(report.attackerMaster);
				if (val != null && report.attackerBodyIndex == StatManager.crocoBodyIndex && (report.damageInfo.damageType & 0x4000000) == 67108864)
				{
					val.PushStatValue(totalCrocoDotDamage, (ulong)report.damageDealt);
				}
			}
		}
	}
}
namespace EggsSkills.Unlocks
{
	internal static class UnlocksRegistering
	{
		private static List<UnlockableDef> unlockList = new List<UnlockableDef>();

		internal static UnlockableDef acridPurgeUnlockDef;

		internal static UnlockableDef acridPoisonbreathUnlockDef;

		internal static UnlockableDef artificerZapportUnlockDef;

		internal static UnlockableDef banditInvisSprintUnlockDef;

		internal static UnlockableDef banditMagicBulletUnlockDef;

		internal static UnlockableDef captainDebuffnadeUnlockDef;

		internal static UnlockableDef captainAutoshotgunUnlockDef;

		internal static UnlockableDef commandoDashUnlockDef;

		internal static UnlockableDef commandoShotgunUnlockDef;

		internal static UnlockableDef engiTeslaUnlockDef;

		internal static UnlockableDef engiMicromissileUnlockDef;

		internal static UnlockableDef huntressClusterarrowUnlockDef;

		internal static UnlockableDef loaderShieldsplosionUnlockDef;

		internal static UnlockableDef mercSlashportUnlockDef;

		internal static UnlockableDef multNanobeaconUnlockDef;

		internal static UnlockableDef railgunnerLanceroundsUnlockDef;

		internal static UnlockableDef rexRootUnlockDef;

		internal static UnlockableDef voidsurvivorInversionUnlockDef;

		internal static void RegisterUnlockables()
		{
			Statdefs.InitStatHooks();
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableCrocoSkills))
				{
					AcridUnlockables();
				}
			}
			catch
			{
				Log.LogError("Failed to load Acrid achivements");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableMageSkills))
				{
					ArtificerUnlockables();
				}
			}
			catch
			{
				Log.LogError("Failed to load Artificer achievements");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableBanditSkills))
				{
					BanditUnlockables();
				}
			}
			catch
			{
				Log.LogError("Failed to load Bandit achievements");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableCaptainSkills))
				{
					CaptainUnlockables();
				}
			}
			catch
			{
				Log.LogError("Failed to load Captain achivements");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableCommandoSkills))
				{
					CommandoUnlockables();
				}
			}
			catch
			{
				Log.LogError("Failed to load Commando achievements");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableEngiSkills))
				{
					EngiUnlockables();
				}
			}
			catch
			{
				Log.LogError("Failed to load Engineer achievements");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableHuntressSkills))
				{
					HuntressUnlockables();
				}
			}
			catch
			{
				Log.LogError("Failed to load Huntress achievements");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableLoaderSkills))
				{
					LoaderUnlockables();
				}
			}
			catch
			{
				Log.LogError("Failed to load Loader achievements");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableMercSkills))
				{
					MercUnlockables();
				}
			}
			catch
			{
				Log.LogError("Failed to load Mercenary achievements");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableToolbotSkills))
				{
					MulTUnlockables();
				}
			}
			catch
			{
				Log.LogError("Failed to load MUL-T achievements");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableRailgunnerSkills))
				{
					RailgunnerUnlockables();
				}
			}
			catch
			{
				Log.LogError("Failed to load Railgunner achievements");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableTreebotSkills))
				{
					RexUnlockables();
				}
			}
			catch
			{
				Log.LogError("Failed to load REX achievements");
			}
			try
			{
				if (Configuration.GetConfigValue<bool>(Configuration.EnableVoidfiendSkills))
				{
					VoidsurvivorUnlockables();
				}
			}
			catch
			{
				Log.LogError("Failed to load Void Fiend achievements");
			}
			foreach (UnlockableDef unlock in unlockList)
			{
				ContentAddition.AddUnlockableDef(unlock);
				Log.LogMessage("Unlockdef: " + unlock.cachedName + " registered!");
			}
			Log.LogMessage("Achievements registered");
		}

		internal static void AcridUnlockables()
		{
			acridPurgeUnlockDef = ScriptableObject.CreateInstance<UnlockableDef>();
			acridPurgeUnlockDef.achievementIcon = Sprites.acridpurgeIconS;
			acridPurgeUnlockDef.nameToken = "ES_CROCO_SPECIAL_PURGE_NAME";
			acridPurgeUnlockDef.cachedName = "EggsSkills.Expunge";
			acridPurgeUnlockDef.getHowToUnlockString = () => Language.GetStringFormatted("UNLOCK_VIA_ACHIEVEMENT_FORMAT", new object[2]
			{
				Language.GetString("ACHIEVEMENT_" + "CrocoManyPoisoned".ToUpper() + "_NAME"),
				Language.GetString("ACHIEVEMENT_" + "CrocoManyPoisoned".ToUpper() + "_DESCRIPTION")
			});
			acridPurgeUnlockDef.getUnlockedString = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2]
			{
				Language.GetString("ACHIEVEMENT_" + "CrocoManyPoisoned".ToUpper() + "_NAME"),
				Language.GetString("ACHIEVEMENT_" + "CrocoManyPoisoned".ToUpper() + "_DESCRIPTION")
			});
			acridPurgeUnlockDef.sortScore = 200;
			unlockList.Add(acrid