Decompiled source of Insurgent v1.0.1

Sylas.dll

Decompiled 15 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using EntityStates;
using EntityStates.Barrel;
using EntityStates.BeetleQueenMonster;
using EntityStates.BrotherMonster;
using EntityStates.ClayBoss;
using EntityStates.FlyingVermin.Mode;
using EntityStates.GravekeeperBoss;
using EntityStates.Merc;
using EntityStates.RoboBallBoss;
using EntityStates.ScavBackpack;
using EntityStates.VagrantMonster;
using EntityStates.VoidMegaCrab.BackWeapon;
using EntityStates.VoidRaidCrab;
using KinematicCharacterController;
using On.RoR2;
using On.RoR2.UI;
using R2API;
using R2API.Utils;
using Rewired.ComponentControls.Effects;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.Navigation;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using TMPro;
using ThreeEyedGames;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.UI;

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

public static class Achievements
{
	[RegisterAchievement("SYLAS__MASTERY", "ACHIEVEMENT_SYLAS__MASTERY_UNLOCKABLE_ID", null, 10u, null)]
	public class MasteryUnlockable : BasePerSurvivorClearGameMonsoonAchievement
	{
		public override BodyIndex LookUpRequiredBodyIndex()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return BodyCatalog.FindBodyIndex("InsurgentBody");
		}
	}

	internal static UnlockableDef masteryUnlock;

	public static void RegisterUnlockables()
	{
		masteryUnlock = NewUnlockable<MasteryUnlockable>("MASTERY", Assets.Load<Sprite>("mastery"), "Insurgent".ToUpper() + ": Mastery", "As Insurgent, beat the game or obliterate on Monsoon.");
	}

	private static UnlockableDef NewUnlockable<T>(string AchievementIdentifier, Sprite Icon, string Title, string Description) where T : BaseAchievement
	{
		string text = "ACHIEVEMENT_SYLAS__";
		UnlockableDef val = ScriptableObject.CreateInstance<UnlockableDef>();
		string langName = text + AchievementIdentifier + "_NAME";
		string langDesc = text + AchievementIdentifier + "_DESCRIPTION";
		LanguageAPI.Add(langName, Title);
		LanguageAPI.Add(langDesc, Description);
		Func<string> func = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2]
		{
			Language.GetString(langName),
			Language.GetString(langDesc)
		});
		Type typeFromHandle = typeof(T);
		val.cachedName = text + AchievementIdentifier + "_UNLOCKABLE_ID";
		val.getHowToUnlockString = func;
		val.getUnlockedString = func;
		val.achievementIcon = Icon;
		val.sortScore = 200;
		val.hidden = false;
		ContentAddition.AddUnlockableDef(val);
		return val;
	}
}
internal class Assets
{
	public static AssetBundle MainAssetBundle;

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

	public static void PopulateAssets()
	{
		Assembly executingAssembly = Assembly.GetExecutingAssembly();
		if ((Object)(object)MainAssetBundle == (Object)null)
		{
			using Stream stream = executingAssembly.GetManifestResourceStream("Sylas.AssetBundle." + "Sylas".ToLower() + "assets");
			MainAssetBundle = AssetBundle.LoadFromStream(stream);
		}
		using Stream stream2 = executingAssembly.GetManifestResourceStream("Sylas.Sylas.bnk");
		byte[] array = new byte[stream2.Length];
		stream2.Read(array, 0, array.Length);
		SoundBanks.Add(array);
	}
}
internal class Behaviour : HuntressTracker
{
	public enum Elite
	{
		None = -1,
		Red,
		Blue,
		White,
		Earth,
		Poison,
		Haunted,
		Lunar,
		Void,
		Gilded,
		Bead,
		Collective
	}

	public float dashDuration = 0.45f;

	public float dashSpeed = 55f;

	public float dashInputWaitDuration = 1.2f;

	public GameObject chainedRoot;

	public HGTextMeshProUGUI chainedText;

	public RawImage chainedImage;

	private bool chained;

	private float chainedStopwatch;

	private float stopwatch;

	public BuffIndex lastEliteUsed;

	public GameObject crown;

	private float eliteStatusStopwatch;

	private bool elite;

	public float maxDist = 50f;

	public float maxDistAdd = 11f;

	public float minDist = 8f;

	public Vector3 hookPos;

	public bool hooked;

	public float hookDashSpeed = 105f;

	public GameObject hookProjectile;

	public bool inDashInputWait;

	public float dashAttackDistance = 15f;

	public bool enemyHook;

	public bool enemyHookAirborne;

	public float dashEndVelocity = 40f;

	public float sunSpawnUpPos = 50f;

	public float hookPush = 45f;

	public GameObject hookIndicator;

	public GameObject hookOn;

	public Color chainColor;

	private Material[] chainMaterials;

	private ModelSkinController skinController;

	public ChildLocator childLocator;

	private bool baseSkin;

	public Elite currentElite = Elite.None;

	private float timerCheckStopwatch;

	private GameObject[] orbEffects;

	public Renderer[] chainMeshFX;

	public bool hasEliteEquip;

	private float chainedDuration => hasEliteEquip ? float.MaxValue : MainPlugin.chainedDuration.Value;

	private float searchDistance => inDashInputWait ? dashAttackDistance : base.maxTrackingDistance;

	public void EnableHook()
	{
		if (Object.op_Implicit((Object)(object)hookIndicator) && Object.op_Implicit((Object)(object)hookOn))
		{
			hookIndicator.SetActive(true);
		}
	}

	public void DisableHook()
	{
		if (Object.op_Implicit((Object)(object)hookIndicator) && Object.op_Implicit((Object)(object)hookOn))
		{
			hookIndicator.SetActive(false);
		}
	}

	public void Chain(Texture2D icon)
	{
		chained = true;
		chainedStopwatch = chainedDuration;
		if (Object.op_Implicit((Object)(object)chainedImage))
		{
			chainedImage.texture = (Texture)(object)icon;
		}
		if (Object.op_Implicit((Object)(object)chainedRoot))
		{
			chainedRoot.SetActive(true);
		}
	}

	public void AddEliteStatus(int eliteIndex)
	{
		//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0111: Unknown result type (might be due to invalid IL or missing references)
		//IL_0116: Unknown result type (might be due to invalid IL or missing references)
		//IL_011b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0134: 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_013e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0156: Unknown result type (might be due to invalid IL or missing references)
		//IL_015b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0160: Unknown result type (might be due to invalid IL or missing references)
		//IL_0176: Unknown result type (might be due to invalid IL or missing references)
		//IL_017b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0180: Unknown result type (might be due to invalid IL or missing references)
		//IL_0199: Unknown result type (might be due to invalid IL or missing references)
		//IL_019e: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01df: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0202: Unknown result type (might be due to invalid IL or missing references)
		//IL_0207: Unknown result type (might be due to invalid IL or missing references)
		//IL_020c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0222: Unknown result type (might be due to invalid IL or missing references)
		//IL_0227: Unknown result type (might be due to invalid IL or missing references)
		//IL_022c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0245: Unknown result type (might be due to invalid IL or missing references)
		//IL_024a: 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)
		if (!elite)
		{
			elite = true;
			eliteStatusStopwatch = chainedDuration;
			currentElite = (Elite)eliteIndex;
			GameObject obj = crown;
			if (obj != null)
			{
				obj.SetActive(false);
			}
			ChildLocator obj2 = childLocator;
			Transform val = ((obj2 != null) ? obj2.FindChild("Crown" + eliteIndex) : null);
			if (Object.op_Implicit((Object)(object)val))
			{
				crown = ((Component)val).gameObject;
				crown.SetActive(true);
			}
			switch (currentElite)
			{
			case Elite.None:
				chainColor = Color.white;
				break;
			case Elite.Red:
				chainColor = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)55, (byte)55, byte.MaxValue));
				break;
			case Elite.Blue:
				chainColor = Color32.op_Implicit(new Color32((byte)55, (byte)73, byte.MaxValue, byte.MaxValue));
				break;
			case Elite.White:
				chainColor = Color32.op_Implicit(new Color32((byte)55, (byte)120, byte.MaxValue, byte.MaxValue));
				break;
			case Elite.Earth:
				chainColor = Color32.op_Implicit(new Color32((byte)122, (byte)189, (byte)0, byte.MaxValue));
				break;
			case Elite.Poison:
				chainColor = Color32.op_Implicit(new Color32((byte)32, (byte)99, (byte)49, byte.MaxValue));
				break;
			case Elite.Haunted:
				chainColor = Color32.op_Implicit(new Color32((byte)55, (byte)127, byte.MaxValue, byte.MaxValue));
				break;
			case Elite.Lunar:
				chainColor = Color32.op_Implicit(new Color32((byte)57, (byte)57, (byte)211, byte.MaxValue));
				break;
			case Elite.Void:
				chainColor = Color32.op_Implicit(new Color32((byte)100, (byte)57, (byte)211, byte.MaxValue));
				break;
			case Elite.Gilded:
				chainColor = Color32.op_Implicit(new Color32((byte)250, (byte)153, (byte)49, byte.MaxValue));
				break;
			case Elite.Bead:
				chainColor = Color32.op_Implicit(new Color32((byte)30, (byte)83, (byte)183, byte.MaxValue));
				break;
			case Elite.Collective:
				chainColor = Color32.op_Implicit(new Color32((byte)55, (byte)163, byte.MaxValue, byte.MaxValue));
				break;
			}
			UpdateFXColor();
		}
	}

	public Vector3 GetOrbPosition(int index)
	{
		//IL_0015: 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_001d: Unknown result type (might be due to invalid IL or missing references)
		return orbEffects[Mathf.Clamp(index, 0, 2)].transform.position;
	}

	public void OrbsSetActive(bool active)
	{
		for (int i = 0; i < orbEffects.Length; i++)
		{
			orbEffects[i].gameObject.SetActive(active);
		}
	}

	public void OrbsSetActive(bool active, int index)
	{
		orbEffects[index].gameObject.SetActive(active);
	}

	public void RemoveEliteStatus()
	{
		//IL_0068: 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)
		//IL_009a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a0: Invalid comparison between Unknown and I4
		//IL_011c: 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_00d1: Unknown result type (might be due to invalid IL or missing references)
		if (currentElite == Elite.Lunar)
		{
			OrbsSetActive(active: false);
			if (NetworkServer.active)
			{
				int buffCount = base.characterBody.GetBuffCount(Prefabs.fireballCount);
				for (int i = 0; i < buffCount; i++)
				{
					base.characterBody.RemoveBuff(Prefabs.fireballCount);
				}
			}
		}
		elite = false;
		currentElite = Elite.None;
		chainColor = Color.white;
		if (Object.op_Implicit((Object)(object)crown))
		{
			crown.SetActive(false);
		}
		if (NetworkServer.active && (int)lastEliteUsed != -1)
		{
			for (int j = 0; j < base.characterBody.timedBuffs.Count; j++)
			{
				TimedBuff val = base.characterBody.timedBuffs[j];
				if (val.buffIndex == lastEliteUsed)
				{
					val.timer = 0.5f;
					val.totalDuration = 0.5f;
				}
			}
		}
		lastEliteUsed = (BuffIndex)(-1);
		UpdateFXColor();
	}

	public void EndChain()
	{
		chained = false;
		if (Object.op_Implicit((Object)(object)chainedRoot))
		{
			chainedRoot.SetActive(false);
		}
	}

	private void Awake()
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Expected O, but got Unknown
		base.indicator = new Indicator(((Component)this).gameObject, Prefabs.indicator);
		Transform modelTransform = ((Component)this).GetComponent<ModelLocator>().modelTransform;
		childLocator = ((Component)modelTransform).GetComponent<ChildLocator>();
		skinController = ((Component)modelTransform).GetComponent<ModelSkinController>();
		chainMeshFX = (Renderer[])(object)new Renderer[2]
		{
			((Component)childLocator.FindChild("baseFX")).GetComponent<Renderer>(),
			((Component)childLocator.FindChild("skinFX")).GetComponent<Renderer>()
		};
	}

	private void Start()
	{
		((HuntressTracker)this).Start();
		skinController.onSkinApplied += Behaviour_onSkinApplied;
		EnumerableExtensions.ForEachTry<Renderer>((IEnumerable<Renderer>)((Component)childLocator.FindChild("Crown3")).GetComponentsInChildren<Renderer>(), (Action<Renderer>)delegate(Renderer x)
		{
			((Component)x).gameObject.SetActive(true);
		}, (IDictionary<Renderer, Exception>)null);
		orbEffects = (GameObject[])(object)new GameObject[3]
		{
			((Component)childLocator.FindChild("orbMuzzle1")).gameObject,
			((Component)childLocator.FindChild("orbMuzzle2")).gameObject,
			((Component)childLocator.FindChild("orbMuzzle3")).gameObject
		};
		base.characterBody.onInventoryChanged += CharacterBody_onInventoryChanged;
	}

	private void CharacterBody_onInventoryChanged()
	{
		//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_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Invalid comparison between Unknown and I4
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: 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_004f: 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_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Unknown result type (might be due to invalid IL or missing references)
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0075: Unknown result type (might be due to invalid IL or missing references)
		//IL_018b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0190: Unknown result type (might be due to invalid IL or missing references)
		//IL_0085: Unknown result type (might be due to invalid IL or missing references)
		//IL_0087: 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_0090: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_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_00d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00da: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0106: 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_010a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0111: Unknown result type (might be due to invalid IL or missing references)
		//IL_011e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0120: Unknown result type (might be due to invalid IL or missing references)
		//IL_0122: 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_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_013a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0141: 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_0151: Unknown result type (might be due to invalid IL or missing references)
		//IL_0153: Unknown result type (might be due to invalid IL or missing references)
		//IL_015a: Unknown result type (might be due to invalid IL or missing references)
		EquipmentIndex currentEquipmentIndex = base.characterBody.inventory.currentEquipmentIndex;
		EquipmentDef val = (((int)currentEquipmentIndex != -1) ? EquipmentCatalog.GetEquipmentDef(currentEquipmentIndex) : null);
		if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.passiveBuffDef))
		{
			int num = -1;
			BuffIndex buffIndex = val.passiveBuffDef.buffIndex;
			BuffIndex val2 = buffIndex;
			if (val2 == Buffs.AffixRed.buffIndex)
			{
				num = 0;
			}
			else
			{
				BuffIndex val3 = val2;
				if (val3 == Buffs.AffixBlue.buffIndex)
				{
					num = 1;
				}
				else
				{
					BuffIndex val4 = val2;
					if (val4 == Buffs.AffixWhite.buffIndex)
					{
						num = 2;
					}
					else
					{
						BuffIndex val5 = val2;
						if (val5 == Buffs.EliteEarth.buffIndex)
						{
							num = 3;
						}
						else
						{
							BuffIndex val6 = val2;
							if (val6 == Buffs.AffixPoison.buffIndex)
							{
								num = 4;
							}
							else
							{
								BuffIndex val7 = val2;
								if (val7 == Buffs.AffixHaunted.buffIndex)
								{
									num = 5;
								}
								else
								{
									BuffIndex val8 = val2;
									if (val8 == Buffs.AffixLunar.buffIndex)
									{
										num = 6;
									}
									else
									{
										BuffIndex val9 = val2;
										if (val9 == Buffs.EliteVoid.buffIndex)
										{
											num = 7;
										}
										else
										{
											BuffIndex val10 = val2;
											if (val10 == Buffs.EliteAurelionite.buffIndex)
											{
												num = 8;
											}
											else
											{
												BuffIndex val11 = val2;
												if (val11 == Buffs.EliteBead.buffIndex)
												{
													num = 9;
												}
												else
												{
													BuffIndex val12 = val2;
													if (val12 == Buffs.EliteCollective.buffIndex)
													{
														num = 10;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
			if (num != -1)
			{
				hasEliteEquip = true;
				RemoveEliteStatus();
				lastEliteUsed = val.passiveBuffDef.buffIndex;
				AddEliteStatus(num);
			}
		}
		else if (hasEliteEquip)
		{
			hasEliteEquip = false;
			RemoveEliteStatus();
		}
	}

	private void Behaviour_onSkinApplied(int index)
	{
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Expected O, but got Unknown
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Expected O, but got Unknown
		baseSkin = index == 0;
		chainMaterials = (Material[])(object)new Material[2]
		{
			new Material(baseSkin ? Prefabs.chainFXMat1 : Prefabs.chainFXMat1Mastery),
			new Material(baseSkin ? Prefabs.chainFXMat2 : Prefabs.chainFXMat2Mastery)
		};
		chainMeshFX[index].materials = (Material[])(object)new Material[2]
		{
			chainMaterials[0],
			chainMaterials[1]
		};
	}

	public void UpdateFXColor()
	{
		//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_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_0051: Unknown result type (might be due to invalid IL or missing references)
		Material val = (baseSkin ? Prefabs.chainFXMat1 : Prefabs.chainFXMat1Mastery);
		Color color = val.GetColor("_Color");
		bool flag = currentElite == Elite.None;
		Material[] array = chainMaterials;
		foreach (Material val2 in array)
		{
			if (val2 != null)
			{
				val2.SetColor("_Color", flag ? color : chainColor);
			}
		}
	}

	private void OnDisable()
	{
		((HuntressTracker)this).OnDisable();
		EndChain();
		DisableHook();
		base.characterBody.onInventoryChanged -= CharacterBody_onInventoryChanged;
		if (Object.op_Implicit((Object)(object)skinController))
		{
			skinController.onSkinApplied -= Behaviour_onSkinApplied;
		}
		for (int i = 0; i < chainMaterials.Length; i++)
		{
			Material val = chainMaterials[i];
			if (Object.op_Implicit((Object)(object)val))
			{
				Object.Destroy((Object)(object)val);
			}
		}
	}

	private void FixedUpdate()
	{
		//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0109: Unknown result type (might be due to invalid IL or missing references)
		//IL_0118: 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_0253: Unknown result type (might be due to invalid IL or missing references)
		//IL_025e: 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)
		//IL_0281: Unknown result type (might be due to invalid IL or missing references)
		//IL_028e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0293: Unknown result type (might be due to invalid IL or missing references)
		//IL_029f: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_02e2: Unknown result type (might be due to invalid IL or missing references)
		timerCheckStopwatch += Time.fixedDeltaTime;
		if (timerCheckStopwatch >= 0.1f)
		{
			timerCheckStopwatch = 0f;
			if (NetworkServer.active && currentElite == Elite.Lunar)
			{
				int buffCount = base.characterBody.GetBuffCount(Prefabs.fireballCount);
				for (int i = 0; i < 3; i++)
				{
					OrbsSetActive(buffCount >= i + 1, i);
				}
			}
		}
		base.indicator.active = base.characterBody.skillLocator.special.CanExecute() && !chained;
		if (Object.op_Implicit((Object)(object)hookIndicator))
		{
			if (hookIndicator.activeInHierarchy)
			{
				RaycastHit val = default(RaycastHit);
				hookOn.SetActive(Util.CharacterRaycast(((Component)this).gameObject, base.characterBody.inputBank.GetAimRay(), ref val, maxDist + maxDistAdd, LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)), (QueryTriggerInteraction)0));
			}
			else if (hookOn.activeInHierarchy)
			{
				hookOn.SetActive(false);
			}
		}
		if (elite)
		{
			eliteStatusStopwatch -= Time.fixedDeltaTime;
			if (eliteStatusStopwatch <= 0f)
			{
				RemoveEliteStatus();
			}
		}
		if (chained)
		{
			if (Object.op_Implicit((Object)(object)chainedText))
			{
				((TMP_Text)chainedText).text = Mathf.CeilToInt(chainedStopwatch).ToString();
			}
			chainedStopwatch -= Time.fixedDeltaTime;
			if (chainedStopwatch <= 0f)
			{
				EndChain();
			}
		}
		base.trackerUpdateStopwatch = 0f;
		stopwatch += Time.fixedDeltaTime;
		if (stopwatch >= 0.1f)
		{
			stopwatch = 0f;
			Ray val2 = default(Ray);
			((Ray)(ref val2))..ctor(base.inputBank.aimOrigin, base.inputBank.aimDirection);
			base.search.filterByLoS = true;
			base.search.searchOrigin = ((Ray)(ref val2)).origin;
			base.search.searchDirection = ((Ray)(ref val2)).direction;
			base.search.sortMode = (SortMode)1;
			base.search.maxDistanceFilter = searchDistance;
			base.search.maxAngleFilter = base.maxTrackingAngle;
			base.search.teamMaskFilter = TeamMask.GetEnemyTeams(base.characterBody.teamComponent.teamIndex);
			base.search.RefreshCandidates();
			base.search.GetBossesAndElites();
			base.trackingTarget = base.search.GetResults().FirstOrDefault();
			base.indicator.targetTransform = (Object.op_Implicit((Object)(object)base.trackingTarget) ? ((Component)base.trackingTarget).transform : null);
		}
	}
}
internal class DelayedLunarFire : MonoBehaviour
{
	public string muzzle;

	public GameObject owner;

	public GameObject target;

	public float damage;

	public bool crit;

	public float delay = 1f;

	private float stopwatch;

	private void FixedUpdate()
	{
		//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_009c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
		stopwatch += Time.fixedDeltaTime;
		if (stopwatch >= delay)
		{
			if (Object.op_Implicit((Object)(object)owner) && Object.op_Implicit((Object)(object)target))
			{
				EffectManager.SimpleMuzzleFlash(Prefabs.Load<GameObject>("RoR2/Base/Brother/MuzzleflashLunarShard.prefab"), owner, muzzle, true);
				ProjectileManager instance = ProjectileManager.instance;
				GameObject obj = Prefabs.Load<GameObject>("RoR2/Base/Brother/LunarShardProjectile.prefab");
				Vector3 position = ((Component)this).transform.position;
				Vector3 val = target.transform.position - ((Component)this).transform.position;
				instance.FireProjectile(obj, position, Quaternion.LookRotation(((Vector3)(ref val)).normalized), owner, damage, 50f, crit, (DamageColorIndex)0, target, -1f, (DamageTypeCombo?)null);
			}
			Object.Destroy((Object)(object)((Component)this).gameObject);
		}
	}
}
internal class HookBehaviour : MonoBehaviour
{
	private bool collided;

	private Behaviour behaviour;

	private GameObject owner;

	private LineRenderer line;

	private ProjectileSimple simple;

	private Rigidbody rb;

	private Collider collider;

	private uint ID;

	private Vector3 startingPos;

	public LineBetweenTransforms line0;

	public LineBetweenTransforms line1;

	private void Awake()
	{
		line = ((Component)this).GetComponent<LineRenderer>();
		simple = ((Component)this).GetComponent<ProjectileSimple>();
		rb = ((Component)this).GetComponent<Rigidbody>();
		collider = ((Component)this).GetComponent<Collider>();
	}

	private void Start()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_012f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0130: Unknown result type (might be due to invalid IL or missing references)
		//IL_0146: 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_01a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a8: 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_01bf: Unknown result type (might be due to invalid IL or missing references)
		startingPos = ((Component)this).transform.position;
		owner = ((Component)this).GetComponent<ProjectileController>().owner;
		behaviour = owner.GetComponent<Behaviour>();
		if (Object.op_Implicit((Object)(object)behaviour))
		{
			behaviour.hookProjectile = ((Component)this).gameObject;
			ChildLocator component = ((Component)owner.GetComponent<ModelLocator>().modelTransform).GetComponent<ChildLocator>();
			bool flag = ((HuntressTracker)behaviour).characterBody.skinIndex == 0;
			Color32 val = (flag ? new Color32(byte.MaxValue, (byte)55, (byte)96, byte.MaxValue) : new Color32(byte.MaxValue, (byte)145, (byte)55, byte.MaxValue));
			if (behaviour.currentElite != Behaviour.Elite.None)
			{
				val = Color32.op_Implicit(behaviour.chainColor);
			}
			line0.transformNodes = (Transform[])(object)new Transform[2]
			{
				component.FindChild("hand.l"),
				((Component)this).transform
			};
			((Renderer)line0.lineRenderer).material = (flag ? Prefabs.chainHookMat0 : Prefabs.chainHookMat1);
			line0.lineRenderer.startColor = Color32.op_Implicit(val);
			line0.lineRenderer.endColor = Color32.op_Implicit(val);
			line1.transformNodes = (Transform[])(object)new Transform[2]
			{
				component.FindChild("hand.r"),
				((Component)this).transform
			};
			((Renderer)line1.lineRenderer).material = ((Renderer)line0.lineRenderer).material;
			line1.lineRenderer.startColor = Color32.op_Implicit(val);
			line1.lineRenderer.endColor = Color32.op_Implicit(val);
			AkSoundEngine.PostEvent("Play_Sylas_Hook_Missile", ((Component)this).gameObject);
		}
	}

	private void OnDisable()
	{
		AkSoundEngine.StopPlayingID(ID);
	}

	public void RpcProjectileImpact()
	{
	}

	public void OnCollisionEnter(Collision collision)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: 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_003e: 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_0075: Unknown result type (might be due to invalid IL or missing references)
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0100: Unknown result type (might be due to invalid IL or missing references)
		//IL_0124: Unknown result type (might be due to invalid IL or missing references)
		ContactPoint[] contacts = collision.contacts;
		ProjectileImpactInfo val = new ProjectileImpactInfo
		{
			collider = collision.collider,
			estimatedPointOfImpact = ProjectileController.EstimateContactPoint(contacts, collision.collider),
			estimatedImpactNormal = ProjectileController.EstimateContactNormal(contacts)
		};
		if (!collided && Object.op_Implicit((Object)(object)val.collider))
		{
			collided = true;
			AkSoundEngine.PostEvent("Play_Sylas_Hook_Hit", ((Component)this).gameObject);
			HurtBox component = ((Component)val.collider).GetComponent<HurtBox>();
			if (Object.op_Implicit((Object)(object)component))
			{
				((Component)this).transform.parent = ((Component)val.collider).transform;
			}
			behaviour.enemyHook = Object.op_Implicit((Object)(object)component);
			behaviour.enemyHookAirborne = Object.op_Implicit((Object)(object)component) && component.healthComponent.body.isFlying;
			if (Object.op_Implicit((Object)(object)behaviour))
			{
				behaviour.hookPos = val.estimatedPointOfImpact;
				behaviour.hooked = true;
				((Behaviour)simple).enabled = false;
				rb.velocity = Vector3.zero;
			}
		}
	}

	private void FixedUpdate()
	{
		//IL_0014: 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)
		if (!Object.op_Implicit((Object)(object)owner) || Vector3.Distance(((Component)this).transform.position, startingPos) >= behaviour.maxDist)
		{
			Object.Destroy((Object)(object)((Component)this).gameObject);
		}
	}
}
internal class HUDTracker : MonoBehaviour
{
	public GameObject skillRoot;

	public MPEventSystemLocator mpLocator;

	public HUD hud;

	public Behaviour behaviour;

	private bool hadBehaviour;

	public HGTextMeshProUGUI text;

	public RawImage iconImage;

	public GameObject hookIndicator;

	public GameObject hookOn;

	private void Awake()
	{
		hud = ((Component)this).GetComponent<HUD>();
	}

	private void FixedUpdate()
	{
		if (Object.op_Implicit((Object)(object)behaviour))
		{
			return;
		}
		if (hadBehaviour && skillRoot.activeInHierarchy)
		{
			skillRoot.gameObject.SetActive(false);
		}
		if (Object.op_Implicit((Object)(object)hud) && Object.op_Implicit((Object)(object)hud.targetBodyObject) && Util.HasEffectiveAuthority(hud.targetBodyObject))
		{
			behaviour = hud.targetBodyObject.GetComponent<Behaviour>();
			if (Object.op_Implicit((Object)(object)behaviour) && Object.op_Implicit((Object)(object)skillRoot) && Object.op_Implicit((Object)(object)iconImage) && Object.op_Implicit((Object)(object)mpLocator))
			{
				hadBehaviour = true;
				mpLocator.eventSystemProvider = ((Component)hud).GetComponent<MPEventSystemProvider>();
				behaviour.chainedRoot = skillRoot;
				behaviour.chainedImage = iconImage;
				behaviour.chainedText = text;
				behaviour.hookIndicator = hookIndicator;
				behaviour.hookOn = hookOn;
			}
		}
	}
}
internal class OrbEffectTracker : MonoBehaviour
{
	public GameObject owner;

	private GameObject lineEffect;

	private void Start()
	{
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_003f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e8: 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 (!Object.op_Implicit((Object)(object)owner))
		{
			return;
		}
		Behaviour component = owner.GetComponent<Behaviour>();
		if (Object.op_Implicit((Object)(object)component))
		{
			lineEffect = Object.Instantiate<GameObject>(Prefabs.chainHookEffect, ((Component)this).transform.position, Quaternion.identity, ((Component)this).transform);
			bool flag = ((HuntressTracker)component).characterBody.skinIndex == 0;
			LineRenderer component2 = lineEffect.GetComponent<LineRenderer>();
			((Renderer)component2).material = (flag ? Prefabs.chainHookMat0 : Prefabs.chainHookMat1);
			component2.startColor = Color32.op_Implicit(flag ? new Color32(byte.MaxValue, (byte)55, (byte)96, byte.MaxValue) : new Color32(byte.MaxValue, (byte)145, (byte)55, byte.MaxValue));
			if (component.currentElite != Behaviour.Elite.None)
			{
				component2.startColor = component.chainColor;
			}
			component2.endColor = component2.startColor;
			lineEffect.GetComponent<LineBetweenTransforms>().transformNodes = (Transform[])(object)new Transform[2]
			{
				((Component)this).transform,
				component.childLocator.FindChild("hand.l")
			};
		}
	}

	private void OnDestroy()
	{
		if (Object.op_Implicit((Object)(object)lineEffect))
		{
			Object.Destroy((Object)(object)lineEffect);
		}
	}
}
internal class ShockBehaviour : MonoBehaviour
{
	public GameObject attacker;

	public float damage;

	public bool crit;

	public HurtBox target;

	private float stopwatch;

	private int hits;

	private void FixedUpdate()
	{
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_008c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Expected O, but got Unknown
		//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
		if (!Object.op_Implicit((Object)(object)target))
		{
			Object.Destroy((Object)(object)this);
			return;
		}
		stopwatch += Time.fixedDeltaTime;
		if (stopwatch >= 1f)
		{
			stopwatch = 0f;
			hits++;
			DamageInfo val = new DamageInfo
			{
				attacker = attacker,
				inflictor = attacker,
				damage = damage,
				crit = crit,
				position = ((Component)target).transform.position,
				procCoefficient = 0f,
				damageColorIndex = (DamageColorIndex)16,
				inflictedHurtbox = target
			};
			target.healthComponent.TakeDamage(val);
			EffectManager.SimpleEffect(Prefabs.Load<GameObject>("RoR2/Base/Common/VFX/OmniImpactVFXLightning.prefab"), ((Component)target).transform.position, Quaternion.identity, true);
			if (hits >= 5)
			{
				Object.Destroy((Object)(object)this);
			}
		}
	}
}
internal class CharacterBodySetup
{
	internal const bool melee = true;

	internal static GameObject baseBody = Prefabs.Load<GameObject>("RoR2/Base/Merc/MercBody.prefab");

	internal static GameObject baseMaster = Prefabs.Load<GameObject>("RoR2/Base/Merc/MercMonsterMaster.prefab");

	internal const string SURVIVORNAME = "Insurgent";

	internal const string SURVIVORNAMEKEY = "SYLAS_";

	internal static Color characterColor = Color32.op_Implicit(new Color32((byte)245, (byte)181, (byte)37, byte.MaxValue));

	internal static void CreateCharacterBodies()
	{
		RegisterStates();
		CreateSurvivorPrefab();
	}

	internal static void CreateSurvivorPrefab()
	{
		//IL_0006: 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_0143: Expected O, but got Unknown
		//IL_015d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0167: Unknown result type (might be due to invalid IL or missing references)
		//IL_0179: Unknown result type (might be due to invalid IL or missing references)
		//IL_018b: Unknown result type (might be due to invalid IL or missing references)
		//IL_019b: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a2: Expected O, but got Unknown
		//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0201: Unknown result type (might be due to invalid IL or missing references)
		//IL_0221: Unknown result type (might be due to invalid IL or missing references)
		//IL_0223: Unknown result type (might be due to invalid IL or missing references)
		//IL_022c: Unknown result type (might be due to invalid IL or missing references)
		//IL_024c: Unknown result type (might be due to invalid IL or missing references)
		//IL_024e: Unknown result type (might be due to invalid IL or missing references)
		//IL_029b: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = CreateBodyPrefab("Insurgent", characterColor, 100f);
		Behaviour behaviour = val.AddComponent<Behaviour>();
		((HuntressTracker)behaviour).maxTrackingDistance = 65f;
		CharacterBody component = val.GetComponent<CharacterBody>();
		component.mainRootSpeed = 0f;
		component.baseMaxHealth = 110f;
		component.levelMaxHealth = 23f;
		component.baseRegen = 1.55f;
		component.levelRegen = 1.66f;
		component.baseMaxShield = 0f;
		component.levelMaxShield = 0f;
		component.baseMoveSpeed = 7f;
		component.levelMoveSpeed = 0f;
		component.baseAcceleration = 110f;
		component.baseJumpPower = 15f;
		component.levelJumpPower = 0f;
		component.baseDamage = 13f;
		component.levelDamage = 3.77f;
		component.baseAttackSpeed = 1f;
		component.levelAttackSpeed = 0f;
		component.baseCrit = 1f;
		component.levelCrit = 0f;
		component.baseArmor = 10f;
		component.levelArmor = 1.22f;
		component.baseJumpCount = 1;
		component.sprintingSpeedMultiplier = 1.45f;
		val.GetComponent<HealthComponent>().health = component.baseMaxHealth;
		ChildLocator val2 = val.AddComponent<ChildLocator>();
		GameObject val3 = new GameObject("VoidlingMuzzleRoot");
		val3.transform.parent = val.transform;
		val3.transform.localPosition = Vector3.up * 1.1f;
		val3.transform.localRotation = Quaternion.identity;
		val3.transform.localScale = Vector3.one;
		GameObject val4 = new GameObject("VoidlingMuzzle");
		val4.transform.parent = val3.transform;
		val4.transform.localPosition = Vector3.forward * 8f;
		val4.transform.localRotation = Quaternion.identity;
		val4.transform.localScale = Vector3.one;
		val2.transformPairs = (NameTransformPair[])(object)new NameTransformPair[2]
		{
			new NameTransformPair
			{
				name = "VoidlingMuzzleRoot",
				transform = val3.transform
			},
			new NameTransformPair
			{
				name = "VoidlingMuzzle",
				transform = val4.transform
			}
		};
		ChildLocator component2 = ((Component)val.GetComponent<ModelLocator>().modelTransform).GetComponent<ChildLocator>();
		for (int i = 0; i < 3; i++)
		{
			string text = "orbMuzzle" + (i + 1);
			Transform val5 = component2.FindChild(text);
			GameObject val6 = Object.Instantiate<GameObject>(Prefabs.lunarMuzzleEffect, val5.position, Quaternion.identity);
			val6.transform.parent = val5;
			val6.SetActive(false);
			component2.transformPairs[component2.FindChildIndex(text)].transform = val6.transform;
		}
		CreateSurvivorDef(val);
		PassiveSetup(val);
		PrimarySetup(val);
		SecondarySetup(val);
		UtilitySetup(val);
		SpecialSetup(val);
	}

	internal static void CreateSurvivorDef(GameObject characterPrefab)
	{
		//IL_013e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: Unknown result type (might be due to invalid IL or missing references)
		CharacterBody component = characterPrefab.GetComponent<CharacterBody>();
		string text = ((Object)characterPrefab).name.Replace("Body", "");
		string text2 = text.Replace(" ", "").ToUpper();
		string text3 = " <style=cSub>\r\n\r\n< ! > \r\n\r\n< ! > \r\n\r\n< ! > \r\n\r\n< ! > \r\n\r\n";
		string text4 = "..and so he left, free at last.";
		string text5 = "..and so he vanished, salvation beyond his reach.";
		string text6 = "";
		LanguageAPI.Add("SYLAS_" + text2 + "_DESCRIPTION", text3);
		LanguageAPI.Add("SYLAS_" + text2 + "_SUBTITLE", "Unbound");
		LanguageAPI.Add("SYLAS_" + text2 + "_OUTRO", text4);
		LanguageAPI.Add("SYLAS_" + text2 + "_FAIL", text5);
		GameObject val = PrefabAPI.InstantiateClone(((Component)characterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, text + "Display", false);
		Animator componentInChildren = val.GetComponentInChildren<Animator>();
		componentInChildren.runtimeAnimatorController = Assets.Load<RuntimeAnimatorController>("displayAnimator");
		Object.Destroy((Object)(object)((Component)componentInChildren).GetComponent<HurtBoxGroup>());
		SurvivorDef val2 = ScriptableObject.CreateInstance<SurvivorDef>();
		val2.cachedName = "SYLAS_" + text2 + "_NAME";
		val2.unlockableDef = null;
		val2.descriptionToken = "SYLAS_" + text2 + "_DESCRIPTION";
		val2.primaryColor = component.bodyColor;
		val2.bodyPrefab = characterPrefab;
		val2.displayPrefab = val;
		val2.outroFlavorToken = "SYLAS_" + text2 + "_OUTRO";
		val2.desiredSortPosition = 22f;
		val2.mainEndingEscapeFailureFlavorToken = "SYLAS_" + text2 + "_FAIL";
		ContentAddition.AddSurvivorDef(val2);
		GameObject val3 = PrefabAPI.InstantiateClone(baseMaster, text + "Master", true);
		ContentAddition.AddMaster(val3);
		CharacterMaster component2 = val3.GetComponent<CharacterMaster>();
		component2.bodyPrefab = characterPrefab;
	}

	internal static void RegisterStates()
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_006b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
		bool flag = default(bool);
		ContentAddition.AddEntityState<Primary>(ref flag);
		ContentAddition.AddEntityState<Secondary>(ref flag);
		ContentAddition.AddEntityState<Utility>(ref flag);
		ContentAddition.AddEntityState<UtilityHook>(ref flag);
		ContentAddition.AddEntityState<UtilityAttack>(ref flag);
		ContentAddition.AddEntityState<UtilitySlam>(ref flag);
		ContentAddition.AddEntityState<Special>(ref flag);
		ContentAddition.AddEntityState<CharacterMain>(ref flag);
		ContentAddition.AddEntityState<MeleeSkillState>(ref flag);
		ContentAddition.AddEntityState<BasicMeleeSkillState>(ref flag);
		ContentAddition.AddEntityState<SpecialAlphaConstruct>(ref flag);
		ContentAddition.AddEntityState<SpecialBeetleQueen>(ref flag);
		ContentAddition.AddEntityState<SpecialDunestrider>(ref flag);
		ContentAddition.AddEntityState<SpecialTitan>(ref flag);
		ContentAddition.AddEntityState<SpecialGrandparent>(ref flag);
		ContentAddition.AddEntityState<SpecialGrovetender>(ref flag);
		ContentAddition.AddEntityState<SpecialImpOverlord>(ref flag);
		ContentAddition.AddEntityState<SpecialMagmaWorm>(ref flag);
		ContentAddition.AddEntityState<SpecialMithrix>(ref flag);
		ContentAddition.AddEntityState<SpecialOverloadingWorm>(ref flag);
		ContentAddition.AddEntityState<SpecialScavenger>(ref flag);
		ContentAddition.AddEntityState<BackpackOpen>(ref flag);
		ContentAddition.AddEntityState<SpecialSolusControlUnit>(ref flag);
		ContentAddition.AddEntityState<SpecialVagrant>(ref flag);
		ContentAddition.AddEntityState<SpecialVoidDevastator>(ref flag);
		ContentAddition.AddEntityState<SpecialVoidling>(ref flag);
	}

	internal static void PassiveSetup(GameObject characterPrefab)
	{
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("SYLAS__PASSIVE_NAME", "Petricite Burst");
		LanguageAPI.Add("SYLAS__PASSIVE_DESCRIPTION", "Skills are upgraded by stealing abilities from <style=cIsDamage>Bosses</style> and <style=cIsDamage>Elite</style> aspects.");
		component.passiveSkill.enabled = true;
		component.passiveSkill.skillNameToken = "SYLAS__PASSIVE_NAME";
		component.passiveSkill.skillDescriptionToken = "SYLAS__PASSIVE_DESCRIPTION";
		component.passiveSkill.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("passive");
	}

	internal static void PrimarySetup(GameObject characterPrefab)
	{
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		string text = "_M1";
		LanguageAPI.Add("SYLAS_" + text, "Chain Slash");
		LanguageAPI.Add("SYLAS_" + text + "_DESCRIPTION", "<style=cIsUtility>Agile</style>. Whip forward for <style=cIsDamage>220% damage</style>. Every 3rd hit slams the ground in the aim direction for <style=cIsDamage>340% damage</style>. <style=cIsUtility>The slam effect changes based on the chained element</style>. Recharges the <style=cIsUtility>cooldown</style> of Chain Lash on hit by <style=cIsUtility>0.5s</style>.");
		LanguageAPI.Add("SYLAS_" + text + "_KEYWORD", "<style=cKeywordName>Blazing</style><style=cSub><style=cIsDamage>Ignite</style>. Fire explosion that deals <style=cIsDamage>400% damage</style>.\r\n\r\n<style=cKeywordName>Glacial</style><style=cSub><style=cIsUtility>Freezing</style>. Ice explosion that deals <style=cIsDamage>350% damage</style>.\r\n\r\n<style=cKeywordName>Mending</style><style=cSub><style=cIsUtility>Entangle</style> enemies for <style=cIsUtility>3s</style> and <style=cIsHealing>heal</style> for <style=cIsHealing>10%</style> of the damage dealt.\r\n\r\n<style=cKeywordName>Overloading</style><style=cSub>Shock explosion that <style=cIsDamage>stuns</style> and deals <style=cIsDamage>65% damage</style> per second for <style=cIsUtility>5s</style>.\r\n\r\n<style=cKeywordName>Malachite</style><style=cSub>An explosion that deals <style=cIsDamage>200% damage</style> and releases <style=cIsDamage>4</style> spiked balls.\r\n\r\n<style=cKeywordName>Celestine</style><style=cSub>Spawn a Celestine zone that <style=cIsUtility>cloaks</style> allies. Enemies are <style=cIsUtility>slowed</style> and have their damage <style=cIsHealth>reduced</style> by <style=cIsHealth>20%</style>.\r\n\r\n<style=cKeywordName>Void</style><style=cSub><style=cIsDamage>Collapse</style> and <style=cIsUtility>entangle</style> on hit, and deals <style=cIsHealth>10%</style> of the targets <style=cIsHealth>health</style>.\r\n\r\n<style=cKeywordName>Perfected</style><style=cSub>Leave a pool of blue flames that deals <style=cIsHealth>2.5%</style> of the targets <style=cIsHealth>health</style> per second for <style=cIsUtility>10s</style>.\r\n\r\n<style=cKeywordName>Gilded</style><style=cSub>Gain <style=cIsDamage>Aurelionite’s Blessing</style> for <style=cIsUtility>5s</style>, which grants <style=cIsHealing>30 armor</style> <style=cIsDamage>+10% gold</style>.\r\n\r\n<style=cKeywordName>Twisted</style><style=cSub>Deflect nearby projectiles, dealing damage equal to <style=cIsHealth>2.5%</style> of the attackers <style=cIsHealth>health</style>.\r\n\r\n");
		SkillDef skill = Utils.NewSkillDef<SkillDef>(typeof(Primary), "Weapon", 0, 0f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: true, (InterruptPriority)0, isCombatSkill: true, mustKeyPress: false, cancelSprintingOnActivation: false, 0, 0, 0, Assets.MainAssetBundle.LoadAsset<Sprite>("primary"), "SYLAS_" + text, "SYLAS_" + text + "_DESCRIPTION", new string[2]
		{
			"KEYWORD_AGILE",
			"SYLAS_" + text + "_KEYWORD"
		});
		component.primary = Utils.NewGenericSkill(characterPrefab, skill);
	}

	internal static void SecondarySetup(GameObject characterPrefab)
	{
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		string text = "_M2";
		LanguageAPI.Add("SYLAS_" + text, "Chain Lash");
		LanguageAPI.Add("SYLAS_" + text + "_DESCRIPTION", "Whirl around, dealing <style=cIsDamage>250% damage</style>. <style=cIsUtility>The whirl effect changes based on the chained element</style>. Gain <style=cIsDamage>20 armor</style> for <style=cIsUtility>2s</style> if you have no elite aspect.");
		LanguageAPI.Add("SYLAS_" + text + "_KEYWORD", "<style=cKeywordName>Blazing</style><style=cSub>Release a fire tornado, dealing <style=cIsDamage>400% damage</style> per second for up to <style=cIsUtility>3s</style>.\r\n\r\n<style=cKeywordName>Glacial</style><style=cSub><style=cIsUtility>Freeze</style> on hit. Enemies are <style=cIsHealth>instantly killed</style> if below <style=cIsHealth>40%</style> health.\r\n\r\n<style=cKeywordName>Mending</style><style=cSub><style=cIsHealing>Heal</style> for <style=cIsHealing>10%</style> of the damage dealt and reduce the damage of enemies hit by <style=cIsDamage>50%</style>.\r\n\r\n<style=cKeywordName>Overloading</style><style=cSub>Call down a lightning strike at a nearby enemy with the highest health for <style=cIsDamage>600% damage</style>.\r\n\r\n<style=cKeywordName>Malachite</style><style=cSub>Leave a pit that deals <style=cIsDamage>150% damage</style> per second and applies <style=cIsHealth>healing disabled</style>.\r\n\r\n<style=cKeywordName>Celestine</style><style=cSub>Slow enemies hit for <style=cIsUtility>50%</style> movement speed and attack speed. Gain <style=cIsUtility>5% movement speed</style> for each hit.\r\n\r\n<style=cKeywordName>Void</style><style=cSub>Gain a bubble shield that <style=cIsUtility>blocks one hit</style> for <style=cIsUtility>4s</style>.\r\n\r\n<style=cKeywordName>Perfected</style><style=cSub>Spawn <style=cIsDamage>3</style> bomb projectiles that fire on hit for <style=cIsDamage>200% damage</style>.\r\n\r\n<style=cKeywordName>Gilded</style><style=cSub>Damage is increased by <style=cIsUtility>15%</style> of your <style=cIsUtility>gold</style>.\r\n\r\n<style=cKeywordName>Twisted</style><style=cSub>Enemies hit receive additional damage for <style=cIsHealth>5%</style> of their <style=cIsHealth>health</style>.\r\n\r\n");
		SkillDef skill = Utils.NewSkillDef<SkillDef>(typeof(Secondary), "Weapon", 1, 5f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.MainAssetBundle.LoadAsset<Sprite>("secondary"), "SYLAS_" + text, "SYLAS_" + text + "_DESCRIPTION", new string[1] { "SYLAS_" + text + "_KEYWORD" });
		component.secondary = Utils.NewGenericSkill(characterPrefab, skill);
	}

	internal static void UtilitySetup(GameObject characterPrefab)
	{
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		string text = "_UTIL";
		LanguageAPI.Add("SYLAS_" + text, "Abscond");
		LanguageAPI.Add("SYLAS_" + text + "_DESCRIPTION", "Dash forward a short distance. Can be recast to whip out the chains in the targeted direction for <style=cIsDamage>200% damage</style>, pulling yourself to the hit location. If an enemy is hit, perform Chain Lash on arrival, or knock them down if they're airborne.");
		SkillDef skill = Utils.NewSkillDef<SkillDef>(typeof(Utility), "Dash", 1, 6f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: false, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.MainAssetBundle.LoadAsset<Sprite>("utility"), "SYLAS_" + text, "SYLAS_" + text + "_DESCRIPTION", Array.Empty<string>());
		component.utility = Utils.NewGenericSkill(characterPrefab, skill);
	}

	internal static void SpecialSetup(GameObject characterPrefab)
	{
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		string text = "_SPEC";
		LanguageAPI.Add("SYLAS_" + text, "Hijack");
		LanguageAPI.Add("SYLAS_" + text + "_DESCRIPTION", "Siphon the target's <style=cIsDamage>Boss</style> ability or <style=cIsDamage>Elite</style> element for <style=cIsUtility>" + MainPlugin.chainedDuration.Value + "s</style>. <style=cIsDamage>Elite Equipment</style> grants the element permanently.");
		LanguageAPI.Add("SYLAS_" + text + "KEYWORD", "<style=cKeywordName>Beetle Queen</style><style=cSub>Spawn <style=cIsUtility>2 Beetle Guards</style> that <style=cIsUtility>inherit all you items and siphoned element</style>.\r\n\r\n<style=cKeywordName>Stone Titan</style><style=cSub>Fire a laser at the nearest enemy, dealing <style=cIsDamage>1000% damage</style> for up to <style=cIsUtility>10s</style>.\r\n\r\n<style=cKeywordName>Wandering Vagrant</style><style=cSub>Channel for <style=cIsUtility>3s</style>, then explode for <style=cIsDamage>2000% damage</style>.\r\n\r\n<style=cKeywordName>Clay Dunestrider</style><style=cSub>Channel for <style=cIsUtility>10s</style>, <style=cIsHealing>siphoning</style> nearby enemies, dealing <style=cIsDamage>200% damage</style>, applying <style=cIsDamage>tar</style>, and <style=cIsHealing>healing</style> you for <style=cIsHealing>50%</style> of the damage dealt.\r\n\r\n<style=cKeywordName>Magma Worm</style><style=cSub>Release <style=cIsDamage>5</style> waves of fireballs, dealing <style=cIsDamage>12x150% damage</style>.\r\n\r\n<style=cKeywordName>Overloading Worm</style><style=cSub>Release <style=cIsDamage>5</style> waves of lightning orbs, dealing <style=cIsDamage>8x300% damage</style>.\r\n\r\n<style=cKeywordName>Imp Overlord</style><style=cSub>Teleport to the targeted location, and then explode for <style=cIsDamage>500% damage</style> and inflicting <style=cIsDamage>bleed</style> for <style=cIsDamage>380% damage</style>.\r\n\r\n<style=cKeywordName>Grovetender</style><style=cSub>Fire chains toward nearby enemies, dealing <style=cIsDamage>300% damage</style> and pulling them towards you.\r\n\r\n<style=cKeywordName>Xi Construct</style><style=cSub>For up to <style=cIsUtility>30s</style>, killing enemies spawns an <style=cIsDamage>Alpha Construct</style> with bonus <style=cIsDamage>300% damage</style> and <style=cIsHealing>300% health</style>.\r\n\r\n<style=cKeywordName>Solus Control Unit</style><style=cSub>Spawn up to <style=cIsUtility>5 Solus Probes</style> that gain <style=cIsDamage>+100% damage</style> per <style=cIsUtility>ally on your team</style>.\r\n\r\n<style=cKeywordName>Grandparent</style><style=cSub>Create a sun on your that inflicts <style=cIsDamage>Overheat</style> over time to all nearby entities.\r\n\r\n<style=cKeywordName>Scavenger</style><style=cSub>Summon a <style=cIsUtility>bag</style> that spawns <style=cIsDamage>2</style> <style=cMono>common</style> items and <style=cIsDamage>1</style> <style=cIsHealing>uncommon</style> item.\r\n\r\n<style=cKeywordName>Mithrix</style><style=cSub>Fire <style=cIsDamage>5</style> waves of rotating pillars around you for <style=cIsDamage>8x1000% damage</style>.\r\n\r\n<style=cKeywordName>Void Devastator</style><style=cSub>Fire void missiles for <style=cIsDamage>30x150% damage</style>.\r\n\r\n<style=cKeywordName>Voidling</style><style=cSub>Fire a massive beam that circles around you, dealing <style=cIsDamage>2500% damage</style> per second.\r\n\r\n");
		SkillDef skill = Utils.NewSkillDef<HuntressTrackingSkillDef>(typeof(Special), "Ult", 1, 30f, beginSkillCooldownOnSkillEnd: true, canceledFromSprinting: false, fullRestockOnAssign: false, (InterruptPriority)1, isCombatSkill: true, mustKeyPress: true, cancelSprintingOnActivation: false, 1, 1, 1, Assets.MainAssetBundle.LoadAsset<Sprite>("special"), "SYLAS_" + text, "SYLAS_" + text + "_DESCRIPTION", new string[1] { "SYLAS_" + text + "KEYWORD" });
		component.special = Utils.NewGenericSkill(characterPrefab, skill);
	}

	internal static GameObject CreateBodyPrefab(string characterName, Color bodyColor, float mass, bool large = false, bool flying = false)
	{
		//IL_091b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0922: Expected O, but got Unknown
		//IL_094b: Unknown result type (might be due to invalid IL or missing references)
		//IL_095d: Unknown result type (might be due to invalid IL or missing references)
		//IL_096f: Unknown result type (might be due to invalid IL or missing references)
		//IL_097f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0986: Expected O, but got Unknown
		//IL_09b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_09c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_09d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_09f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a05: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a8c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0183: Unknown result type (might be due to invalid IL or missing references)
		//IL_0195: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
		//IL_021d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0267: Unknown result type (might be due to invalid IL or missing references)
		//IL_0288: Unknown result type (might be due to invalid IL or missing references)
		//IL_029a: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_02fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0310: Unknown result type (might be due to invalid IL or missing references)
		//IL_031a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0364: Unknown result type (might be due to invalid IL or missing references)
		//IL_0385: Unknown result type (might be due to invalid IL or missing references)
		//IL_0397: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_040c: Unknown result type (might be due to invalid IL or missing references)
		//IL_041e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0428: Unknown result type (might be due to invalid IL or missing references)
		//IL_047f: Unknown result type (might be due to invalid IL or missing references)
		//IL_04a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_04b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_04bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0506: Unknown result type (might be due to invalid IL or missing references)
		//IL_0527: Unknown result type (might be due to invalid IL or missing references)
		//IL_0539: Unknown result type (might be due to invalid IL or missing references)
		//IL_0543: Unknown result type (might be due to invalid IL or missing references)
		//IL_058d: Unknown result type (might be due to invalid IL or missing references)
		//IL_059f: Unknown result type (might be due to invalid IL or missing references)
		//IL_05b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_05bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0605: Unknown result type (might be due to invalid IL or missing references)
		//IL_0626: Unknown result type (might be due to invalid IL or missing references)
		//IL_0638: Unknown result type (might be due to invalid IL or missing references)
		//IL_0642: Unknown result type (might be due to invalid IL or missing references)
		//IL_068c: Unknown result type (might be due to invalid IL or missing references)
		//IL_069e: Unknown result type (might be due to invalid IL or missing references)
		//IL_06b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_06ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_0704: Unknown result type (might be due to invalid IL or missing references)
		//IL_0725: Unknown result type (might be due to invalid IL or missing references)
		//IL_0737: Unknown result type (might be due to invalid IL or missing references)
		//IL_0741: Unknown result type (might be due to invalid IL or missing references)
		//IL_078b: Unknown result type (might be due to invalid IL or missing references)
		//IL_07ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_07be: Unknown result type (might be due to invalid IL or missing references)
		//IL_07c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0801: Unknown result type (might be due to invalid IL or missing references)
		//IL_0822: Unknown result type (might be due to invalid IL or missing references)
		//IL_0843: Unknown result type (might be due to invalid IL or missing references)
		//IL_0888: Unknown result type (might be due to invalid IL or missing references)
		//IL_08a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_08bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_08c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0aa8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0aee: Unknown result type (might be due to invalid IL or missing references)
		//IL_0aef: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b75: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b7a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ba7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bac: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e4b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e72: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e95: Unknown result type (might be due to invalid IL or missing references)
		//IL_0eb8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0edb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0efe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f21: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f44: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f67: Unknown result type (might be due to invalid IL or missing references)
		//IL_0f8b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0faf: Unknown result type (might be due to invalid IL or missing references)
		//IL_0fd3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c6d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c8d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c9a: Unknown result type (might be due to invalid IL or missing references)
		//IL_1068: Unknown result type (might be due to invalid IL or missing references)
		//IL_10d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_10e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_110c: Unknown result type (might be due to invalid IL or missing references)
		//IL_1120: Unknown result type (might be due to invalid IL or missing references)
		//IL_1145: Unknown result type (might be due to invalid IL or missing references)
		//IL_1159: Unknown result type (might be due to invalid IL or missing references)
		//IL_12e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_12e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_130c: Unknown result type (might be due to invalid IL or missing references)
		//IL_1311: Unknown result type (might be due to invalid IL or missing references)
		string text = characterName.Replace(" ", "");
		string text2 = text.ToUpper();
		LanguageAPI.Add("SYLAS_" + text2 + "_NAME", characterName);
		GameObject val = PrefabAPI.InstantiateClone(baseBody, text + "Body", true);
		val.GetComponent<NetworkIdentity>().localPlayerAuthority = true;
		Object.Destroy((Object)(object)((Component)val.transform.Find("ModelBase")).gameObject);
		Object.Destroy((Object)(object)((Component)val.transform.Find("CameraPivot")).gameObject);
		Object.Destroy((Object)(object)((Component)val.transform.Find("AimOrigin")).gameObject);
		GameObject val2 = Assets.MainAssetBundle.LoadAsset<GameObject>(text + "Mdl");
		val2.AddComponent<AnimationEvents>().soundCenter = val2;
		ChildLocator component = val2.GetComponent<ChildLocator>();
		for (int i = 0; i < 11; i++)
		{
			Transform val3 = component.FindChild("Crown" + i);
			if (!Object.op_Implicit((Object)(object)val3))
			{
				continue;
			}
			GameObject val4 = null;
			GameObject val5 = null;
			switch (i)
			{
			case 0:
				val4 = Prefabs.Load<GameObject>("RoR2/Base/EliteFire/DisplayEliteHorn.prefab");
				val5 = Object.Instantiate<GameObject>(val4);
				val5.transform.parent = val3;
				val5.transform.localPosition = new Vector3(0.065f, 0.337f, 0.102f);
				val5.transform.localRotation = Quaternion.identity;
				val5.transform.localScale = Vector3.one * 0.1f;
				val5 = Object.Instantiate<GameObject>(val4);
				val5.transform.parent = val3;
				val5.transform.localPosition = new Vector3(-0.065f, 0.337f, 0.102f);
				val5.transform.localRotation = Quaternion.identity;
				val5.transform.localScale = new Vector3(-0.1f, 0.1f, 0.1f);
				break;
			case 1:
				val4 = Prefabs.Load<GameObject>("RoR2/Base/EliteLightning/DisplayEliteRhinoHorn.prefab");
				val5 = Object.Instantiate<GameObject>(val4);
				val5.transform.parent = val3;
				val5.transform.localPosition = new Vector3(0f, 0.29f, 0.122f);
				val5.transform.localRotation = Quaternion.Euler(317.16f, 3.73f, -3.66f);
				val5.transform.localScale = Vector3.one * 0.3f;
				val5 = Object.Instantiate<GameObject>(val4);
				val5.transform.parent = val3;
				val5.transform.localPosition = new Vector3(0f, 0.354f, 0.063f);
				val5.transform.localRotation = Quaternion.Euler(317.16f, 3.78f, -5.27f);
				val5.transform.localScale = Vector3.one * 0.2f;
				break;
			case 2:
				val4 = Prefabs.Load<GameObject>("RoR2/Base/EliteIce/DisplayEliteIceCrown.prefab");
				val5 = Object.Instantiate<GameObject>(val4);
				val5.transform.parent = val3;
				val5.transform.localPosition = new Vector3(0f, 0.403f, 0.031f);
				val5.transform.localRotation = Quaternion.Euler(271.56f, 0f, 0f);
				val5.transform.localScale = Vector3.one * 0.03f;
				break;
			case 3:
				val4 = Prefabs.Load<GameObject>("RoR2/DLC1/EliteEarth/DisplayEliteMendingAntlers.prefab");
				val5 = Object.Instantiate<GameObject>(val4);
				val5.transform.parent = val3;
				val5.transform.localPosition = new Vector3(0f, 0.331f, 0.089f);
				val5.transform.localRotation = Quaternion.Euler(10.05f, -6.7f, 1.08f);
				val5.transform.localScale = Vector3.one * 0.69f;
				Object.DestroyImmediate((Object)(object)val5.GetComponent<ItemDisplay>());
				break;
			case 4:
				val4 = Prefabs.Load<GameObject>("RoR2/Base/ElitePoison/DisplayEliteUrchinCrown.prefab");
				val5 = Object.Instantiate<GameObject>(val4);
				val5.transform.parent = val3;
				val5.transform.localPosition = new Vector3(0f, 0.305f, 0.039f);
				val5.transform.localRotation = Quaternion.Euler(270.01f, 1.01f, 0f);
				val5.transform.localScale = Vector3.one * 0.06f;
				break;
			case 5:
				val4 = Prefabs.Load<GameObject>("RoR2/Base/EliteHaunted/DisplayEliteStealthCrown.prefab");
				val5 = Object.Instantiate<GameObject>(val4);
				val5.transform.parent = val3;
				val5.transform.localPosition = new Vector3(0f, 0.305f, 0.039f);
				val5.transform.localRotation = Quaternion.Euler(270.01f, 1.011f, 0f);
				val5.transform.localScale = Vector3.one * 0.06f;
				break;
			case 6:
				val4 = Prefabs.Load<GameObject>("RoR2/Base/EliteLunar/DisplayEliteLunar,Eye.prefab");
				val5 = Object.Instantiate<GameObject>(val4);
				val5.transform.parent = val3;
				val5.transform.localPosition = new Vector3(0f, 0.192f, 0.257f);
				val5.transform.localRotation = Quaternion.identity;
				val5.transform.localScale = Vector3.one * 0.169f;
				break;
			case 7:
				val4 = Prefabs.Load<GameObject>("RoR2/DLC1/EliteVoid/DisplayAffixVoid.prefab");
				val5 = Object.Instantiate<GameObject>(val4);
				val5.transform.parent = val3;
				val5.transform.localPosition = new Vector3(0f, 0.192f, 0.124f);
				val5.transform.localRotation = Quaternion.Euler(89.98f, 3.2f, 0f);
				val5.transform.localScale = Vector3.one * 0.218f;
				break;
			case 8:
				val4 = Prefabs.Load<GameObject>("RoR2/DLC2/Elites/EliteAurelionite/DisplayEliteAurelioniteEquipment.prefab");
				val5 = Object.Instantiate<GameObject>(val4);
				val5.transform.parent = val3;
				val5.transform.localPosition = new Vector3(0f, 0.307f, 0.161f);
				val5.transform.localRotation = Quaternion.identity;
				val5.transform.localScale = Vector3.one * 0.399f;
				break;
			case 9:
				val4 = Prefabs.Load<GameObject>("RoR2/DLC2/Elites/EliteBead/DisplayEliteBeadSpike.prefab");
				val5 = Object.Instantiate<GameObject>(val4);
				val5.transform.parent = val3;
				val5.transform.localPosition = new Vector3(-0.073f, 0.313f, -0.017f);
				val5.transform.localRotation = Quaternion.Euler(30.32f, 228.28f, 347.63f);
				val5.transform.localScale = Vector3.one * 0.018f;
				break;
			case 10:
				val4 = Prefabs.Load<GameObject>("RoR2/DLC3/Collective/DisplayEliteCollectiveHorn.prefab");
				val5 = Object.Instantiate<GameObject>(val4);
				val5.transform.parent = val3;
				val5.transform.localPosition = new Vector3(-0.004f, -0.022f, 0.118f);
				val5.transform.localRotation = Quaternion.Euler(349.26f, 183.95f, 1.5f);
				val5.transform.localScale = Vector3.one * 0.3f;
				val5 = Object.Instantiate<GameObject>(val4);
				val5.transform.parent = val3;
				val5.transform.localPosition = new Vector3(-0.004f, -0.022f, 0.118f);
				val5.transform.localRotation = Quaternion.Euler(349.26f, 183.95f, 1.5f);
				val5.transform.localScale = new Vector3(-0.3f, 0.3f, 0.3f);
				val4 = Prefabs.Load<GameObject>("RoR2/DLC3/Collective/DisplayEliteCollectiveRing.prefab");
				val5 = Object.Instantiate<GameObject>(val4);
				val5.transform.parent = val3;
				val5.transform.localPosition = new Vector3(0.106f, 0.173f, 0.677f);
				val5.transform.localRotation = Quaternion.Euler(349.26f, 183.95f, 1.5f);
				val5.transform.localScale = Vector3.one * 0.3f;
				EnumerableExtensions.ForEachTry<Renderer>((IEnumerable<Renderer>)val5.GetComponentsInChildren<Renderer>(), (Action<Renderer>)delegate(Renderer x)
				{
					((Component)x).gameObject.SetActive(true);
				}, (IDictionary<Renderer, Exception>)null);
				break;
			}
		}
		GameObject val6 = new GameObject("ModelBase");
		val6.transform.parent = val.transform;
		val6.transform.localPosition = new Vector3(0f, -0.94f, 0f);
		val6.transform.localRotation = Quaternion.identity;
		val6.transform.localScale = Vector3.one;
		GameObject val7 = new GameObject("AimOrigin");
		val7.transform.parent = val6.transform;
		val7.transform.localPosition = new Vector3(0f, 1.4f, 0f);
		val7.transform.localRotation = Quaternion.identity;
		val7.transform.localScale = Vector3.one;
		Transform transform = val2.transform;
		transform.parent = val6.transform;
		transform.localPosition = Vector3.zero;
		transform.localRotation = Quaternion.identity;
		CharacterDirection component2 = val.GetComponent<CharacterDirection>();
		component2.targetTransform = val6.transform;
		component2.modelAnimator = val2.GetComponentInChildren<Animator>();
		component2.turnSpeed = 720f;
		CharacterBody component3 = val.GetComponent<CharacterBody>();
		((Object)component3).name = text + "Body";
		component3.baseNameToken = "SYLAS_" + text2 + "_NAME";
		component3.subtitleNameToken = "SYLAS_" + text2 + "_SUBTITLE";
		component3.bodyFlags = (BodyFlags)16;
		component3.aimOriginTransform = val7.transform;
		component3.hullClassification = (HullClassification)(large ? 1 : 0);
		Sprite val8 = Assets.MainAssetBundle.LoadAsset<Sprite>(text);
		component3.portraitIcon = (Texture)(object)(Object.op_Implicit((Object)(object)val8) ? val8.texture : null);
		component3.isChampion = false;
		component3.currentVehicle = null;
		component3.skinIndex = 0u;
		component3.bodyColor = bodyColor;
		HealthComponent component4 = val.GetComponent<HealthComponent>();
		component4.health = component3.baseMaxHealth;
		component4.shield = 0f;
		component4.barrier = 0f;
		CharacterMotor component5 = val.GetComponent<CharacterMotor>();
		component5.walkSpeedPenaltyCoefficient = 1f;
		component5.characterDirection = component2;
		component5.muteWalkMotion = false;
		component5.mass = mass;
		component5.airControl = 0.25f;
		component5.disableAirControlUntilCollision = false;
		component5.generateParametersOnAwake = true;
		InputBankTest component6 = val.GetComponent<InputBankTest>();
		component6.moveVector = Vector3.zero;
		CameraTargetParams component7 = val.GetComponent<CameraTargetParams>();
		component7.cameraParams = baseBody.GetComponent<CameraTargetParams>().cameraParams;
		component7.cameraPivotTransform = null;
		component7.recoil = Vector2.zero;
		component7.dontRaycastToPivot = false;
		ModelLocator component8 = val.GetComponent<ModelLocator>();
		component8.modelTransform = transform;
		component8.modelBaseTransform = val6.transform;
		component8.dontReleaseModelOnDeath = false;
		component8.autoUpdateModelTransform = true;
		component8.dontDetatchFromParent = false;
		component8.noCorpse = false;
		component8.normalizeToFloor = false;
		component8.preserveModel = false;
		CharacterModel val9 = val2.AddComponent<CharacterModel>();
		SkinnedMeshRenderer[] componentsInChildren = val2.GetComponentsInChildren<SkinnedMeshRenderer>(true);
		List<RendererInfo> list = new List<RendererInfo>();
		foreach (SkinnedMeshRenderer val10 in componentsInChildren)
		{
			string name = ((Object)val10).name;
			if (!name.Contains("FX"))
			{
				((Renderer)val10).material = Prefabs.InstantiateDefaultSurvivorMaterial(((Renderer)val10).material.mainTexture);
				list.Add(new RendererInfo
				{
					renderer = (Renderer)(object)val10,
					defaultMaterial = ((Renderer)val10).material,
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				});
			}
			if (!name.Contains("base"))
			{
				((Component)val10).gameObject.SetActive(false);
			}
		}
		RendererInfo[] array = list.ToArray();
		val9.body = component3;
		val9.baseRendererInfos = array;
		val9.autoPopulateLightInfos = true;
		val9.temporaryOverlays = new List<TemporaryOverlayInstance>();
		val9.mainSkinnedMeshRenderer = componentsInChildren[0];
		LanguageAPI.Add(text2 + "BODY_DEFAULT_SKIN_NAME", "Default");
		LanguageAPI.Add(text2 + "BODY_MASTERY_NAME", "Mastery");
		LanguageAPI.Add(text2 + "BODY_SKIN00_NAME", "Original");
		LanguageAPI.Add(text2 + "BODY_SKIN01_NAME", "Lunar Wraith");
		LanguageAPI.Add(text2 + "BODY_SKIN08_NAME", "Freljord");
		LanguageAPI.Add(text2 + "BODY_SKIN13_NAME", "PROJECT");
		LanguageAPI.Add(text2 + "BODY_SKIN14_NAME", "Prestige PROJECT");
		LanguageAPI.Add(text2 + "BODY_SKIN24_NAME", "Battle Wolf");
		LanguageAPI.Add(text2 + "BODY_SKIN34_NAME", "Ashen Slayer");
		LanguageAPI.Add(text2 + "BODY_SKIN36_NAME", "Winterblessed");
		LanguageAPI.Add(text2 + "BODY_SKIN46_NAME", "Dark Star");
		LanguageAPI.Add(text2 + "BODY_SKIN53_NAME", "Prestige T1");
		ModelSkinController val11 = val2.AddComponent<ModelSkinController>();
		val11.skins = (SkinDef[])(object)new SkinDef[12]
		{
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, text2 + "BODY_DEFAULT_SKIN_NAME", "base", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, text2 + "BODY_MASTERY_NAME", "mastery", array, Achievements.masteryUnlock)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, text2 + "BODY_SKIN00_NAME", "original", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, text2 + "BODY_SKIN01_NAME", "skin01", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, text2 + "BODY_SKIN08_NAME", "skin08", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, text2 + "BODY_SKIN13_NAME", "skin13", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, text2 + "BODY_SKIN14_NAME", "skin14", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, text2 + "BODY_SKIN24_NAME", "skin24", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, text2 + "BODY_SKIN34_NAME", "skin34", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, text2 + "BODY_SKIN36_NAME", "skin36", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, text2 + "BODY_SKIN46_NAME", "skin46", array)),
			Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, val2, text2 + "BODY_SKIN53_NAME", "skin53", array))
		};
		if (!MainPlugin.enableLeague.Value)
		{
			Array.Resize(ref val11.skins, 2);
		}
		Collider[] componentsInChildren2 = val2.GetComponentsInChildren<Collider>();
		HurtBoxGroup val12 = val2.AddComponent<HurtBoxGroup>();
		List<HurtBox> list2 = new List<HurtBox>();
		Collider[] array2 = componentsInChildren2;
		foreach (Collider val13 in array2)
		{
			HurtBox val14 = ((Component)val13).gameObject.AddComponent<HurtBox>();
			((Component)val14).gameObject.layer = LayerIndex.entityPrecise.intVal;
			val14.healthComponent = component4;
			val14.isBullseye = true;
			val14.damageModifier = (DamageModifier)0;
			val14.hurtBoxGroup = val12;
			val14.indexInGroup = 0;
			val12.mainHurtBox = val14;
			val12.bullseyeCount = 1;
			list2.Add(val14);
		}
		val12.hurtBoxes = list2.ToArray();
		Utils.CreateHitbox("Slash", val2.transform, new Vector3(4.5f, 5f, 7f), new Vector3(0f, 1f, 3f));
		Utils.CreateHitbox("BigSlash", val2.transform, new Vector3(5f, 6f, 9f), new Vector3(0f, 1f, 4f));
		Utils.CreateHitbox("Spin", val2.transform, new Vector3(12f, 12f, 14f), new Vector3(0f, 1f, 0f));
		KinematicCharacterMotor component9 = val.GetComponent<KinematicCharacterMotor>();
		component9.CharacterController = (ICharacterController)(object)component5;
		component9.playerCharacter = true;
		val.GetComponent<Interactor>().maxInteractionDistance = 3f;
		val.GetComponent<InteractionDriver>().highlightInteractor = true;
		SfxLocator component10 = val.GetComponent<SfxLocator>();
		component10.deathSound = "Play_ui_player_death";
		component10.barkSound = "";
		component10.openSound = "";
		component10.landingSound = (large ? "Play_gravekeeper_land" : "Play_char_land");
		component10.fallDamageSound = "Play_char_land_fall_damage";
		component10.aliveLoopStart = "";
		component10.aliveLoopStop = "";
		val.GetComponent<Rigidbody>().mass = mass;
		FootstepHandler val15 = val2.AddComponent<FootstepHandler>();
		val15.baseFootstepString = (large ? "Play_beetle_queen_step" : "Play_player_footstep");
		val15.sprintFootstepOverrideString = "";
		val15.enableFootstepDust = true;
		val15.footstepDustPrefab = Prefabs.Load<GameObject>(large ? "RoR2/Base/Common/VFX/GenericHugeFootstepDust.prefab" : "RoR2/Base/Common/VFX/GenericFootstepDust.prefab");
		GenericSkill[] componentsInChildren3 = val.GetComponentsInChildren<GenericSkill>();
		foreach (GenericSkill val16 in componentsInChildren3)
		{
			Object.DestroyImmediate((Object)(object)val16);
		}
		if (flying)
		{
			Utils.NewStateMachine<GrantFlight>(val, "Flight");
			component10.landingSound = "";
			component10.fallDamageSound = "";
		}
		Utils.NewStateMachine<Idle>(val, "Ult");
		Utils.NewStateMachine<Idle>(val, "Dash");
		EntityStateMachine component11 = ((Component)component3).GetComponent<EntityStateMachine>();
		component11.mainStateType = new SerializableEntityStateType(typeof(CharacterMain));
		CharacterDeathBehavior component12 = val.GetComponent<CharacterDeathBehavior>();
		component12.deathStateMachine = val.GetComponent<EntityStateMachine>();
		component12.deathState = new SerializableEntityStateType(typeof(GenericCharacterDeath));
		NetworkStateMachine component13 = ((Component)component3).GetComponent<NetworkStateMachine>();
		component13.stateMachines = ((Component)component3).GetComponents<EntityStateMachine>();
		ContentAddition.AddBody(val);
		return val;
	}
}
internal class Hook
{
	internal static void Hooks()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Expected O, but got Unknown
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Expected O, but got Unknown
		RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
		SurvivorCatalog.Init += new hook_Init(SurvivorCatalog_Init);
		GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal;
		GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt;
		HGButton.OnPointerEnter += new hook_OnPointerEnter(HGButton_OnPointerEnter);
	}

	private static void HGButton_OnPointerEnter(orig_OnPointerEnter orig, HGButton self, PointerEventData eventData)
	{
		//IL_00de: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0101: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_009a: 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_00b8: Unknown result type (might be due to invalid IL or missing references)
		orig.Invoke(self, eventData);
		if (!self.updateTextOnHover || !Object.op_Implicit((Object)(object)self.hoverLanguageTextMeshController))
		{
			return;
		}
		HGTextMeshProUGUI component = ((Component)self.hoverLanguageTextMeshController).GetComponent<HGTextMeshProUGUI>();
		if (Object.op_Implicit((Object)(object)component))
		{
			if (self.hoverToken.Contains("<style=cKeywordName>Blazing</style><style=cSub><style=cIsDamage>Ignite</style>. Fire explosion that deals <style=cIsDamage>400% damage</style>.") || self.hoverToken.Contains("<style=cKeywordName>Blazing</style><style=cSub>Release a fire tornado, dealing <style=cIsDamage>400% damage</style> per second for up to <style=cIsUtility>3s</style>.") || self.hoverToken.Contains("<style=cKeywordName>Beetle Queen</style><style=cSub>Spawn <style=cIsUtility>2 Beetle Guards</style> that <style=cIsUtility>inherit all you items and siphoned element</style>."))
			{
				((TMP_Text)component).fontSize = 18f;
				Vector3 localPosition = ((TMP_Text)component).transform.parent.localPosition;
				((TMP_Text)component).transform.parent.localPosition = new Vector3(localPosition.x, 360f, 0f);
			}
			else
			{
				((TMP_Text)component).fontSize = 24f;
				Vector3 localPosition2 = ((TMP_Text)component).transform.parent.localPosition;
				((TMP_Text)component).transform.parent.localPosition = new Vector3(localPosition2.x, 0f, 0f);
			}
		}
	}

	private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
	{
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		int buffCount = sender.GetBuffCount(Prefabs.movementSpeed5);
		if (buffCount > 0)
		{
			args.moveSpeedMultAdd += 0.05f * (float)buffCount;
		}
		if (sender.HasBuff(Prefabs.allyBoostDamage100))
		{
			args.damageMultAdd += (float)Mathf.Max(0, TeamComponent.GetTeamMembers(sender.teamComponent.teamIndex).Count - 1);
		}
		if (sender.HasBuff(Prefabs.armorBuff30))
		{
			args.armorAdd += 30f + (float)sender.master.money * 0.1f;
		}
		if (sender.HasBuff(Prefabs.armorBuff40))
		{
			args.armorAdd += 40f;
		}
		if (sender.HasBuff(Prefabs.movementDebuff50))
		{
			args.moveSpeedReductionMultAdd += 0.5f;
			args.moveSpeedReductionMultAdd += 0.5f;
		}
		if (sender.HasBuff(Prefabs.damageDebuff20))
		{
			args.damageMultAdd -= 0.2f;
		}
		if (sender.HasBuff(Prefabs.damageDebuff50))
		{
			args.damageMultAdd -= 0.5f;
		}
	}

	private static void GlobalEventManager_onServerDamageDealt(DamageReport damageReport)
	{
		//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_0040: 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_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0051: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Unknown result type (might be due to invalid IL or missing references)
		//IL_0067: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: 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_00a6: 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)
		//IL_00af: Expected O, but got Unknown
		//IL_013b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0110: Unknown result type (might be due to invalid IL or missing references)
		//IL_0117: Unknown result type (might be due to invalid IL or missing references)
		//IL_0122: Unknown result type (might be due to invalid IL or missing references)
		//IL_0124: Unknown result type (might be due to invalid IL or missing references)
		//IL_012b: Expected O, but got Unknown
		//IL_0164: Unknown result type (might be due to invalid IL or missing references)
		//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_029b: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e8: 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_01f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_020a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0221: Unknown result type (might be due to invalid IL or missing references)
		//IL_0228: Unknown result type (might be due to invalid IL or missing references)
		//IL_0233: Unknown result type (might be due to invalid IL or missing references)
		//IL_0236: Unknown result type (might be due to invalid IL or missing references)
		//IL_023d: Expected O, but got Unknown
		//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d7: 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)
		//IL_02f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_02fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0310: Expected O, but got Unknown
		//IL_03f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_03f7: Invalid comparison between Unknown and I4
		//IL_0366: Unknown result type (might be due to invalid IL or missing references)
		//IL_036b: Unknown result type (might be due to invalid IL or missing references)
		//IL_037c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0385: Unknown result type (might be due to invalid IL or missing references)
		//IL_038a: Unknown result type (might be due to invalid IL or missing references)
		//IL_038c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0391: Unknown result type (might be due to invalid IL or missing references)
		//IL_0395: Unknown result type (might be due to invalid IL or missing references)
		//IL_039a: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_04b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_04bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_04d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_04da: Unknown result type (might be due to invalid IL or missing references)
		//IL_04df: Unknown result type (might be due to invalid IL or missing references)
		//IL_04f5: Expected O, but got Unknown
		//IL_0591: Unknown result type (might be due to invalid IL or missing references)
		//IL_0596: Unknown result type (might be due to invalid IL or missing references)
		//IL_059d: Unknown result type (might be due to invalid IL or missing references)
		//IL_05a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_05a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_05b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_05bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_05d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_05dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_05e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_05ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_05f1: Expected O, but got Unknown
		//IL_0493: Unknown result type (might be due to invalid IL or missing references)
		//IL_0499: Unknown result type (might be due to invalid IL or missing references)
		DamageInfo damageInfo = damageReport.damageInfo;
		if (!Object.op_Implicit((Object)(object)damageReport.attackerBody) || !Object.op_Implicit((Object)(object)damageReport.victim))
		{
			return;
		}
		if (damageReport.victimBody.HasBuff(Prefabs.reflectBuff))
		{
			DamageInfo val = new DamageInfo
			{
				position = damageReport.attackerBody.corePosition,
				attacker = ((Component)damageReport.victim).gameObject,
				inflictor = ((Component)damageReport.victim).gameObject,
				damage = damageReport.attackerBody.healthComponent.fullCombinedHealth * 0.025f,
				crit = false,
				procCoefficient = 0f,
				damageColorIndex = (DamageColorIndex)5
			};
			damageReport.victim.TakeDamage(val);
		}
		if (DamageAPI.HasModdedDamageType(damageInfo, Prefabs.lunarDMG))
		{
			DamageInfo val2 = new DamageInfo
			{
				position = damageInfo.position,
				attacker = damageReport.attacker,
				inflictor = damageReport.attacker,
				damage = damageReport.victim.fullCombinedHealth * 0.025f,
				crit = false,
				procCoefficient = 0f,
				damageColorIndex = (DamageColorIndex)5
			};
			damageReport.victim.TakeDamage(val2);
		}
		if (DamageAPI.HasModdedDamageType(damageInfo, Prefabs.malachiteDMG))
		{
			damageReport.victimBody.AddTimedBuff(Buffs.HealingDisabled, 8f);
		}
		if (DamageAPI.HasModdedDamageType(damageInfo, Prefabs.overloadingDMG))
		{
			ShockBehaviour shockBehaviour = ((Component)damageReport.victim).gameObject.AddComponent<ShockBehaviour>();
			shockBehaviour.damage = damageReport.attackerBody.damage * 0.65f;
			shockBehaviour.crit = damageInfo.crit;
			shockBehaviour.attacker = damageReport.attacker;
			shockBehaviour.target = damageReport.victimBody.mainHurtBox;
		}
		if (DamageAPI.HasModdedDamageType(damageInfo, Prefabs.voidDMG))
		{
			DamageInfo val3 = new DamageInfo
			{
				position = damageInfo.position,
				attacker = damageReport.attacker,
				inflictor = damageReport.attacker,
				damage = damageReport.victim.fullCombinedHealth * 0.1f,
				crit = false,
				procCoefficient = 0f,
				damageColorIndex = (DamageColorIndex)9
			};
			damageReport.victim.TakeDamage(val3)