Decompiled source of Shyvana v1.0.3

Shyvana.dll

Decompiled 5 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
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.Croco;
using EntityStates.Huntress;
using EntityStates.LemurianBruiserMonster;
using EntityStates.Mage;
using EntityStates.Merc;
using KinematicCharacterController;
using On.RoR2;
using On.RoR2.UI;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using TMPro;
using ThreeEyedGames;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Bindings;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.UI;

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

internal class Assets
{
	public static AssetBundle MainAssetBundle;

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

	public static void PopulateAssets()
	{
		if ((Object)(object)MainAssetBundle == (Object)null)
		{
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Shyvana.shyvanaassets");
			MainAssetBundle = AssetBundle.LoadFromStream(stream);
		}
		using Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("Shyvana.Shyvana.bnk");
		byte[] array = new byte[stream2.Length];
		stream2.Read(array, 0, array.Length);
		SoundBanks.Add(array);
	}
}
internal class AnimEventsBehaviour : MonoBehaviour
{
	public void WingFlap()
	{
		AkSoundEngine.PostEvent(Sounds.Play_Shyvana_Wing_Flap, ((Component)this).gameObject);
	}
}
internal class BezierCurveLineScaler : BezierCurveLine
{
	private int size = 98;

	private void FixedUpdate()
	{
		//IL_0008: 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)
		size = Mathf.RoundToInt(Util.Remap(Vector3.Distance(((Component)this).transform.position, base.endTransform.position), 0f, 280f, 24f, 98f));
		if (((BezierCurveLine)this).lineRenderer.numPositions != size)
		{
			((BezierCurveLine)this).lineRenderer.numPositions = size;
			Array.Resize(ref base.vertexList, size + 1);
		}
	}
}
internal class DisplayAnimEventBehaviour : MonoBehaviour
{
	private uint ID;

	private GameObject wings;

	private void OnEnable()
	{
		ID = AkSoundEngine.PostEvent(Sounds.Play_Shyvana_Recall, ((Component)this).gameObject);
		wings = ((Component)((Component)this).GetComponent<ChildLocator>().FindChild("wings")).gameObject;
	}

	public void EnableWings()
	{
		wings.SetActive(true);
	}

	private void OnDisable()
	{
		AkSoundEngine.StopPlayingID(ID);
	}
}
internal class MasterBehaviour : MonoBehaviour
{
	public CharacterMaster master;

	public ShyvanaBehaviour behaviour;

	public CharacterBody body;

	public float maxPowerupValue = 2f;

	public float powerupValue = 2f;

	public float stopwatch = 0f;

	public GameObject powerupBar;

	public TextMeshProUGUI currentPowerup;

	public Image barImage;

	public bool transformed;

	public bool despawned;

	public Vector3[] positions;

	public float passivePowerupGain
	{
		get
		{
			if (MainPlugin.enableDragonDuration.Value && transformed)
			{
				return (0f - maxPowerupValue) / MainPlugin.minDragonDuration.Value;
			}
			return transformed ? (-0.04f) : 0.02f;
		}
	}

	public void AddFury(float value)
	{
		powerupValue += value;
	}

	private void Start()
	{
		master = ((Component)this).GetComponent<CharacterMaster>();
	}

	private void OnEnable()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		HUD.Update += new hook_Update(HUD_Update);
		Stage.onStageStartGlobal += delegate
		{
			powerupBar = null;
			positions = Array.Empty<Vector3>();
		};
	}

	private void OnDisable()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		HUD.Update -= new hook_Update(HUD_Update);
	}

	private void HUD_Update(orig_Update orig, HUD self)
	{
		orig.Invoke(self);
		if (!Object.op_Implicit((Object)(object)master) || !Object.op_Implicit((Object)(object)self.targetMaster) || !((Object)(object)self.targetMaster == (Object)(object)master))
		{
			return;
		}
		if (Object.op_Implicit((Object)(object)barImage) && Object.op_Implicit((Object)(object)currentPowerup))
		{
			barImage.fillAmount = powerupValue / maxPowerupValue;
			string text = Mathf.Clamp((float)Mathf.RoundToInt(powerupValue * 100f), 0f, maxPowerupValue * 100f).ToString();
			((TMP_Text)currentPowerup).text = text;
		}
		if (!Object.op_Implicit((Object)(object)self.mainUIPanel) || Object.op_Implicit((Object)(object)powerupBar))
		{
			return;
		}
		HealthBar componentInChildren = self.mainUIPanel.GetComponentInChildren<HealthBar>();
		if (Object.op_Implicit((Object)(object)componentInChildren) && Object.op_Implicit((Object)(object)((Component)componentInChildren).gameObject))
		{
			Image[] componentsInChildren = ((Component)componentInChildren).gameObject.GetComponentsInChildren<Image>();
			if (componentsInChildren.Length >= 5 && Object.op_Implicit((Object)(object)self.targetBodyObject) && Util.HasEffectiveAuthority(self.targetBodyObject))
			{
				AddBar(((Component)componentInChildren).gameObject);
			}
		}
	}

	private void AddBar(GameObject healthBar)
	{
		//IL_0199: Unknown result type (might be due to invalid IL or missing references)
		powerupBar = Object.Instantiate<GameObject>(healthBar, healthBar.transform.parent);
		((Object)powerupBar).name = "PowerupBar";
		Object.Destroy((Object)(object)powerupBar.GetComponent<HealthBar>());
		TextMeshProUGUI[] componentsInChildren = powerupBar.GetComponentsInChildren<TextMeshProUGUI>();
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			if (Object.op_Implicit((Object)(object)componentsInChildren[i]) && Object.op_Implicit((Object)(object)((Component)componentsInChildren[i]).gameObject))
			{
				if (((Object)((Component)componentsInChildren[i]).gameObject).name == "CurrentHealthText")
				{
					currentPowerup = componentsInChildren[i];
					((TMP_Text)currentPowerup).text = "0";
				}
				if (((Object)((Component)componentsInChildren[i]).gameObject).name == "FullHealthText")
				{
					((TMP_Text)componentsInChildren[i]).text = (maxPowerupValue * 100f).ToString();
				}
			}
		}
		Image[] componentsInChildren2 = powerupBar.GetComponentsInChildren<Image>();
		for (int j = 0; j < componentsInChildren2.Length; j++)
		{
			if (Object.op_Implicit((Object)(object)componentsInChildren2[j]) && Object.op_Implicit((Object)(object)((Component)componentsInChildren2[j]).gameObject))
			{
				if ((Object)(object)componentsInChildren2[j] != (Object)(object)componentsInChildren2[3] && (Object)(object)componentsInChildren2[j] != (Object)(object)componentsInChildren2[0])
				{
					Object.Destroy((Object)(object)((Component)componentsInChildren2[j]).gameObject);
				}
				if ((Object)(object)componentsInChildren2[j] == (Object)(object)componentsInChildren2[3])
				{
					barImage = componentsInChildren2[j];
					((Graphic)barImage).color = new Color(0.61176f, 0.04314f, 0.07059f);
					barImage.type = (Type)3;
					barImage.fillMethod = (FillMethod)0;
					barImage.fillCenter = false;
				}
			}
		}
	}

	private void FixedUpdate()
	{
		if (Object.op_Implicit((Object)(object)master) && !Object.op_Implicit((Object)(object)body))
		{
			body = master.GetBody();
		}
		if (Object.op_Implicit((Object)(object)master) && Object.op_Implicit((Object)(object)body))
		{
			stopwatch += Time.fixedDeltaTime;
			if (stopwatch >= 1f)
			{
				stopwatch = 0f;
				powerupValue += passivePowerupGain;
			}
			powerupValue = Mathf.Clamp(powerupValue, 0f, maxPowerupValue);
			if (Object.op_Implicit((Object)(object)body) && transformed && powerupValue <= 0f && Object.op_Implicit((Object)(object)behaviour) && behaviour.canExecute)
			{
				Detransform();
			}
		}
	}

	private void Detransform()
	{
		transformed = false;
		despawned = true;
		if (Object.op_Implicit((Object)(object)body) && body.hasEffectiveAuthority)
		{
			behaviour.CallCmdTransformBody("ShyvanaBody");
		}
	}
}
internal class ShyvanaBehaviour : NetworkBehaviour
{
	public bool canExecute = true;

	private CharacterBody body;

	private CharacterMaster master;

	public MasterBehaviour behaviour;

	public float powerupValue;

	public GameObject effect;

	public uint ID;

	private static int kCmdCmdAddFury;

	private static int kRpcRpcAddFury;

	private static int kCmdCmdTransformBody;

	public void AddFury(float value)
	{
		if (Object.op_Implicit((Object)(object)behaviour.behaviour))
		{
			behaviour.AddFury(value);
		}
	}

	[Command]
	public void CmdAddFury(float value)
	{
		if (Object.op_Implicit((Object)(object)behaviour.behaviour))
		{
			CallRpcAddFury(value);
		}
	}

	[ClientRpc]
	public void RpcAddFury(float value)
	{
		if (Object.op_Implicit((Object)(object)behaviour.behaviour))
		{
			behaviour.AddFury(value);
		}
	}

	[Command]
	public void CmdTransformBody(string bodyName)
	{
		if (Object.op_Implicit((Object)(object)master))
		{
			master.TransformBody(bodyName);
		}
	}

	private void OnEnable()
	{
		body = ((Component)this).GetComponent<CharacterBody>();
		if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.masterObject))
		{
			master = body.master;
			behaviour = body.masterObject.GetComponent<MasterBehaviour>();
			if (Object.op_Implicit((Object)(object)behaviour))
			{
				behaviour.behaviour = this;
			}
		}
	}

	private void FixedUpdate()
	{
		if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.masterObject))
		{
			if (!Object.op_Implicit((Object)(object)master))
			{
				master = body.masterObject.GetComponent<CharacterMaster>();
			}
			if (!Object.op_Implicit((Object)(object)behaviour))
			{
				behaviour = body.masterObject.GetComponent<MasterBehaviour>();
				if (!Object.op_Implicit((Object)(object)behaviour))
				{
					behaviour = body.masterObject.AddComponent<MasterBehaviour>();
					if (Object.op_Implicit((Object)(object)behaviour))
					{
						behaviour.behaviour = this;
					}
				}
			}
			else if (!Object.op_Implicit((Object)(object)behaviour.behaviour))
			{
				behaviour.behaviour = this;
			}
		}
		if (Object.op_Implicit((Object)(object)behaviour))
		{
			powerupValue = behaviour.powerupValue;
		}
	}

	private void UNetVersion()
	{
	}

	protected static void InvokeCmdCmdAddFury(NetworkBehaviour obj, NetworkReader reader)
	{
		if (!NetworkServer.active)
		{
			Debug.LogError((object)"Command CmdAddFury called on client.");
		}
		else
		{
			((ShyvanaBehaviour)(object)obj).CmdAddFury(reader.ReadSingle());
		}
	}

	protected static void InvokeCmdCmdTransformBody(NetworkBehaviour obj, NetworkReader reader)
	{
		if (!NetworkServer.active)
		{
			Debug.LogError((object)"Command CmdTransformBody called on client.");
		}
		else
		{
			((ShyvanaBehaviour)(object)obj).CmdTransformBody(reader.ReadString());
		}
	}

	public void CallCmdAddFury(float value)
	{
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		if (!NetworkClient.active)
		{
			Debug.LogError((object)"Command function CmdAddFury called on server.");
			return;
		}
		if (((NetworkBehaviour)this).isServer)
		{
			CmdAddFury(value);
			return;
		}
		NetworkWriter val = new NetworkWriter();
		val.Write((short)0);
		val.Write((short)5);
		val.WritePackedUInt32((uint)kCmdCmdAddFury);
		val.Write(((Component)this).GetComponent<NetworkIdentity>().netId);
		val.Write(value);
		((NetworkBehaviour)this).SendCommandInternal(val, 0, "CmdAddFury");
	}

	public void CallCmdTransformBody(string bodyName)
	{
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		if (!NetworkClient.active)
		{
			Debug.LogError((object)"Command function CmdTransformBody called on server.");
			return;
		}
		if (((NetworkBehaviour)this).isServer)
		{
			CmdTransformBody(bodyName);
			return;
		}
		NetworkWriter val = new NetworkWriter();
		val.Write((short)0);
		val.Write((short)5);
		val.WritePackedUInt32((uint)kCmdCmdTransformBody);
		val.Write(((Component)this).GetComponent<NetworkIdentity>().netId);
		val.Write(bodyName);
		((NetworkBehaviour)this).SendCommandInternal(val, 0, "CmdTransformBody");
	}

	protected static void InvokeRpcRpcAddFury(NetworkBehaviour obj, NetworkReader reader)
	{
		if (!NetworkClient.active)
		{
			Debug.LogError((object)"RPC RpcAddFury called on server.");
		}
		else
		{
			((ShyvanaBehaviour)(object)obj).RpcAddFury(reader.ReadSingle());
		}
	}

	public void CallRpcAddFury(float value)
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Expected O, but got Unknown
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		if (!NetworkServer.active)
		{
			Debug.LogError((object)"RPC Function RpcAddFury called on client.");
			return;
		}
		NetworkWriter val = new NetworkWriter();
		val.Write((short)0);
		val.Write((short)2);
		val.WritePackedUInt32((uint)kRpcRpcAddFury);
		val.Write(((Component)this).GetComponent<NetworkIdentity>().netId);
		val.Write(value);
		((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcAddFury");
	}

	static ShyvanaBehaviour()
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Expected O, but got Unknown
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Expected O, but got Unknown
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Expected O, but got Unknown
		kCmdCmdAddFury = 176434748;
		NetworkBehaviour.RegisterCommandDelegate(typeof(ShyvanaBehaviour), kCmdCmdAddFury, new CmdDelegate(InvokeCmdCmdAddFury));
		kCmdCmdTransformBody = 418286099;
		NetworkBehaviour.RegisterCommandDelegate(typeof(ShyvanaBehaviour), kCmdCmdTransformBody, new CmdDelegate(InvokeCmdCmdTransformBody));
		kRpcRpcAddFury = -1349243482;
		NetworkBehaviour.RegisterRpcDelegate(typeof(ShyvanaBehaviour), kRpcRpcAddFury, new CmdDelegate(InvokeRpcRpcAddFury));
		NetworkCRC.RegisterBehaviour("ShyvanaBehaviour", 0);
	}

	public override bool OnSerialize(NetworkWriter writer, bool forceAll)
	{
		bool result = default(bool);
		return result;
	}

	public override void OnDeserialize(NetworkReader reader, bool initialState)
	{
	}
}
internal class Hook
{
	private static int tick;

	internal static void Hooks()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Expected O, but got Unknown
		RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
		HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
	}

	private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		//IL_006e: Invalid comparison between Unknown and I4
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_008c: 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_00c3: Unknown result type (might be due to invalid IL or missing references)
		if (DamageAPI.HasModdedDamageType(damageInfo, Prefabs.ruin) && Object.op_Implicit((Object)(object)damageInfo.attacker))
		{
			tick++;
			HealthComponent component = damageInfo.attacker.GetComponent<HealthComponent>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.Heal(damageInfo.damage * 0.2f, default(ProcChainMask), true);
			}
		}
		if ((int)damageInfo.damageType == 131136 && Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<ShyvanaBehaviour>()))
		{
			damageInfo.damageType = (DamageType)0;
			HealthComponent component2 = damageInfo.attacker.GetComponent<HealthComponent>();
			if (Object.op_Implicit((Object)(object)component2))
			{
				component2.Heal(component2.fullHealth * 0.025f, default(ProcChainMask), true);
			}
		}
		orig.Invoke(self, damageInfo);
	}

	private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
	{
		if (sender.HasBuff(Prefabs.flameBuff))
		{
			args.armorAdd += 25f;
			args.moveSpeedMultAdd += 1.25f;
		}
	}
}
[BepInPlugin("com.Dragonyck.Shyvana", "Shyvana", "1.0.2")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInIncompatibility("com.Wolfo.WolfoQualityOfLife")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class MainPlugin : BaseUnityPlugin
{
	public const string MODUID = "com.Dragonyck.Shyvana";

	public const string MODNAME = "Shyvana";

	public const string VERSION = "1.0.2";

	public const string SURVIVORNAME = "Shyvana";

	public const string SURVIVORNAMEKEY = "SHYVANA";

	public const string DSURVIVORNAME = "Shyvana (Dragon Form)";

	public const string DSURVIVORNAMEKEY = "DRAGONSHYVANA";

	public static GameObject characterPrefab;

	public static GameObject dragonCharacterPrefab;

	public static readonly Color characterColor = new Color(0.02745f, 0.92549f, 0.61176f);

	protected internal static ConfigEntry<bool> enableDragonDuration;

	protected internal static ConfigEntry<float> minDragonDuration;

	private void Awake()
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Expected O, but got Unknown
		//IL_002c: Expected O, but got Unknown
		//IL_0041: 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_0060: Expected O, but got Unknown
		//IL_0060: Expected O, but got Unknown
		enableDragonDuration = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Dragon Form Minimum Duration", "Value"), false, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		minDragonDuration = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Minimum Dragon Form Duration", "Value"), 40f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		Assets.PopulateAssets();
		Prefabs.CreatePrefabs();
		CreatePrefab();
		CreateDragonPrefab();
		RegisterStates();
		RegisterCharacter();
		Hook.Hooks();
	}

	internal static void CreatePrefab()
	{
		//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b1: Expected O, but got Unknown
		//IL_00dc: 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_00fe: 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_0118: Unknown result type (might be due to invalid IL or missing references)
		//IL_011e: Expected O, but got Unknown
		//IL_0145: 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_0167: Unknown result type (might be due to invalid IL or missing references)
		//IL_018a: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0219: Unknown result type (might be due to invalid IL or missing references)
		//IL_034a: 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_0417: Unknown result type (might be due to invalid IL or missing references)
		//IL_041c: Unknown result type (might be due to invalid IL or missing references)
		//IL_04c1: 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_04ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_059e: Unknown result type (might be due to invalid IL or missing references)
		//IL_066a: Unknown result type (might be due to invalid IL or missing references)
		//IL_06d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_06f3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0761: Unknown result type (might be due to invalid IL or missing references)
		//IL_0766: Unknown result type (might be due to invalid IL or missing references)
		//IL_0777: Unknown result type (might be due to invalid IL or missing references)
		//IL_077c: Unknown result type (might be due to invalid IL or missing references)
		//IL_07aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_07af: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = Prefabs.Load<GameObject>("RoR2/Base/Commando/CommandoBody.prefab");
		characterPrefab = PrefabAPI.InstantiateClone(val, "ShyvanaBody", true);
		characterPrefab.AddComponent<ShyvanaBehaviour>();
		characterPrefab.GetComponent<NetworkIdentity>().localPlayerAuthority = true;
		Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("ModelBase")).gameObject);
		Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("CameraPivot")).gameObject);
		Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("AimOrigin")).gameObject);
		GameObject val2 = Assets.MainAssetBundle.LoadAsset<GameObject>("shyvana");
		GameObject val3 = new GameObject("ModelBase");
		val3.transform.parent = characterPrefab.transform;
		val3.transform.localPosition = new Vector3(0f, -0.94f, 0f);
		val3.transform.localRotation = Quaternion.identity;
		val3.transform.localScale = Vector3.one * 1.3f;
		GameObject val4 = new GameObject("AimOrigin");
		val4.transform.parent = val3.transform;
		val4.transform.localPosition = new Vector3(0f, 1.4f, 0f);
		val4.transform.localRotation = Quaternion.identity;
		val4.transform.localScale = Vector3.one;
		Transform transform = val2.transform;
		transform.parent = val3.transform;
		transform.localPosition = Vector3.zero;
		transform.localScale = new Vector3(1f, 1f, 1f);
		transform.localRotation = Quaternion.identity;
		CharacterDirection component = characterPrefab.GetComponent<CharacterDirection>();
		component.targetTransform = val3.transform;
		component.modelAnimator = val2.GetComponentInChildren<Animator>();
		CharacterBody component2 = characterPrefab.GetComponent<CharacterBody>();
		((Object)component2).name = "ShyvanaBody";
		component2.baseNameToken = "SHYVANA_NAME";
		component2.subtitleNameToken = "SHYVANA_SUBTITLE";
		component2.bodyFlags = (BodyFlags)16;
		component2.rootMotionInMainState = false;
		component2.mainRootSpeed = 0f;
		component2.baseMaxHealth = 160f;
		component2.levelMaxHealth = 48f;
		component2.baseRegen = 2.5f;
		component2.levelRegen = 0.5f;
		component2.baseMaxShield = 0f;
		component2.levelMaxShield = 0f;
		component2.baseMoveSpeed = 7f;
		component2.levelMoveSpeed = 0f;
		component2.baseAcceleration = 110f;
		component2.baseJumpPower = 15f;
		component2.levelJumpPower = 0f;
		component2.baseDamage = 12f;
		component2.levelDamage = 2.4f;
		component2.baseAttackSpeed = 1f;
		component2.levelAttackSpeed = 0f;
		component2.baseCrit = 1f;
		component2.levelCrit = 0f;
		component2.baseArmor = 20f;
		component2.levelArmor = 0f;
		component2.baseJumpCount = 1;
		component2.sprintingSpeedMultiplier = 1.45f;
		component2.wasLucky = false;
		component2.hideCrosshair = false;
		component2.aimOriginTransform = val4.transform;
		component2.hullClassification = (HullClassification)0;
		component2.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait").texture;
		component2._defaultCrosshairPrefab = Prefabs.Load<GameObject>("RoR2/Base/UI/SimpleDotCrosshair.prefab");
		component2.isChampion = false;
		component2.currentVehicle = null;
		component2.skinIndex = 0u;
		component2.bodyColor = characterColor;
		CharacterMotor component3 = characterPrefab.GetComponent<CharacterMotor>();
		component3.walkSpeedPenaltyCoefficient = 1f;
		component3.characterDirection = component;
		component3.muteWalkMotion = false;
		component3.mass = 160f;
		component3.airControl = 0.25f;
		component3.disableAirControlUntilCollision = false;
		component3.generateParametersOnAwake = true;
		CameraTargetParams component4 = characterPrefab.GetComponent<CameraTargetParams>();
		component4.cameraParams = Prefabs.Load<CharacterCameraParams>("RoR2/Base/Common/ccpStandardMelee.asset");
		component4.cameraPivotTransform = null;
		component4.recoil = Vector2.zero;
		component4.dontRaycastToPivot = false;
		ModelLocator component5 = characterPrefab.GetComponent<ModelLocator>();
		component5.modelTransform = transform;
		component5.modelBaseTransform = val3.transform;
		component5.dontReleaseModelOnDeath = false;
		component5.autoUpdateModelTransform = true;
		component5.dontDetatchFromParent = false;
		component5.noCorpse = false;
		component5.normalizeToFloor = false;
		component5.preserveModel = false;
		CharacterModel val5 = val2.AddComponent<CharacterModel>();
		SkinnedMeshRenderer[] componentsInChildren = val2.GetComponentsInChildren<SkinnedMeshRenderer>(true);
		List<RendererInfo> list = new List<RendererInfo>();
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			Material val6 = Utils.InstantiateMaterial(((Renderer)componentsInChildren[i]).material.mainTexture);
			((Renderer)componentsInChildren[i]).material = val6;
			list.Add(new RendererInfo
			{
				renderer = (Renderer)(object)componentsInChildren[i],
				defaultMaterial = val6,
				defaultShadowCastingMode = (ShadowCastingMode)1,
				ignoreOverlays = false
			});
		}
		RendererInfo[] array = list.ToArray();
		val5.body = component2;
		val5.baseRendererInfos = array;
		val5.autoPopulateLightInfos = true;
		val5.invisibilityCount = 0;
		val5.temporaryOverlays = new List<TemporaryOverlay>();
		val5.mainSkinnedMeshRenderer = componentsInChildren[0];
		((Component)val2.GetComponent<ChildLocator>().FindChild("wings")).gameObject.SetActive(false);
		GameObject gameObject = ((Component)transform).gameObject;
		ModelSkinController val7 = gameObject.AddComponent<ModelSkinController>();
		LanguageAPI.Add("SHYVANABODY_DEFAULT_SKIN_NAME", "Ruined");
		val7.skins = (SkinDef[])(object)new SkinDef[1] { LoadoutAPI.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "SHYVANABODY_DEFAULT_SKIN_NAME", array)) };
		HealthComponent component6 = characterPrefab.GetComponent<HealthComponent>();
		component6.health = component2.baseMaxHealth;
		component6.shield = 0f;
		component6.barrier = 0f;
		component6.magnetiCharge = 0f;
		component6.body = null;
		component6.dontShowHealthbar = false;
		component6.globalDeathEventChanceCoefficient = 1f;
		CapsuleCollider[] componentsInChildren2 = val2.GetComponentsInChildren<CapsuleCollider>();
		HurtBoxGroup val8 = val2.AddComponent<HurtBoxGroup>();
		List<HurtBox> list2 = new List<HurtBox>();
		CapsuleCollider[] array2 = componentsInChildren2;
		foreach (CapsuleCollider val9 in array2)
		{
			HurtBox val10 = ((Component)val9).gameObject.AddComponent<HurtBox>();
			((Component)val10).gameObject.layer = LayerIndex.entityPrecise.intVal;
			val10.healthComponent = component6;
			val10.isBullseye = true;
			val10.damageModifier = (DamageModifier)0;
			val10.hurtBoxGroup = val8;
			val10.indexInGroup = 0;
			val8.mainHurtBox = val10;
			val8.bullseyeCount = 1;
			list2.Add(val10);
		}
		val8.hurtBoxes = list2.ToArray();
		Utils.CreateHitbox("Swing", val2.transform, new Vector3(4.2f, 4.2f, 4.7f)).transform.localPosition = new Vector3(0f, 1f, 1.5f);
		KinematicCharacterMotor component7 = characterPrefab.GetComponent<KinematicCharacterMotor>();
		component7.CharacterController = (BaseCharacterController)(object)component3;
		FootstepHandler val11 = val2.AddComponent<FootstepHandler>();
		val11.baseFootstepString = "Play_player_footstep";
		val11.sprintFootstepOverrideString = "";
		val11.enableFootstepDust = true;
		val11.footstepDustPrefab = Prefabs.Load<GameObject>("RoR2/Base/Common/VFX/GenericFootstepDust.prefab");
		EntityStateMachine component8 = ((Component)component2).GetComponent<EntityStateMachine>();
		component8.initialStateType = new SerializableEntityStateType(typeof(ShyvanaSpawnState));
		component8.mainStateType = new SerializableEntityStateType(typeof(GenericCharacterMain));
		CharacterDeathBehavior component9 = characterPrefab.GetComponent<CharacterDeathBehavior>();
		component9.deathStateMachine = characterPrefab.GetComponent<EntityStateMachine>();
		component9.deathState = new SerializableEntityStateType(typeof(GenericCharacterDeath));
		Utils.NewStateMachine<Idle>(characterPrefab, "Burnout");
		NetworkStateMachine component10 = ((Component)component2).GetComponent<NetworkStateMachine>();
		component10.stateMachines = ((Component)component2).GetComponents<EntityStateMachine>();
		ContentAddition.AddBody(characterPrefab);
	}

	internal static void CreateDragonPrefab()
	{
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b8: Expected O, but got Unknown
		//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_0105: Unknown result type (might be due to invalid IL or missing references)
		//IL_010f: Unknown result type (might be due to invalid IL or missing references)
		//IL_011f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0125: Expected O, but got Unknown
		//IL_014c: Unknown result type (might be due to invalid IL or missing references)
		//IL_015d: Unknown result type (might be due to invalid IL or missing references)
		//IL_016e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0191: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_0220: Unknown result type (might be due to invalid IL or missing references)
		//IL_0352: Unknown result type (might be due to invalid IL or missing references)
		//IL_039d: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_041f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0424: Unknown result type (might be due to invalid IL or missing references)
		//IL_04c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_04f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_04ff: Unknown result type (might be due to invalid IL or missing references)
		//IL_061a: 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_06aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_072c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0731: Unknown result type (might be due to invalid IL or missing references)
		//IL_0742: Unknown result type (might be due to invalid IL or missing references)
		//IL_0747: Unknown result type (might be due to invalid IL or missing references)
		//IL_0775: Unknown result type (might be due to invalid IL or missing references)
		//IL_077a: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = Prefabs.Load<GameObject>("RoR2/Base/Commando/CommandoBody.prefab");
		dragonCharacterPrefab = PrefabAPI.InstantiateClone(val, "DragonShyvanaBody", true);
		dragonCharacterPrefab.GetComponent<NetworkIdentity>().localPlayerAuthority = true;
		dragonCharacterPrefab.AddComponent<ShyvanaBehaviour>();
		Object.Destroy((Object)(object)((Component)dragonCharacterPrefab.transform.Find("ModelBase")).gameObject);
		Object.Destroy((Object)(object)((Component)dragonCharacterPrefab.transform.Find("CameraPivot")).gameObject);
		Object.Destroy((Object)(object)((Component)dragonCharacterPrefab.transform.Find("AimOrigin")).gameObject);
		GameObject val2 = Assets.MainAssetBundle.LoadAsset<GameObject>("dragon");
		val2.AddComponent<AnimEventsBehaviour>();
		GameObject val3 = new GameObject("ModelBase");
		val3.transform.parent = dragonCharacterPrefab.transform;
		val3.transform.localPosition = new Vector3(0f, -0.94f, 0f);
		val3.transform.localRotation = Quaternion.identity;
		val3.transform.localScale = Vector3.one * 2f;
		GameObject val4 = new GameObject("AimOrigin");
		val4.transform.parent = val3.transform;
		val4.transform.localPosition = new Vector3(0f, 2.4f, 0f);
		val4.transform.localRotation = Quaternion.identity;
		val4.transform.localScale = Vector3.one;
		Transform transform = val2.transform;
		transform.parent = val3.transform;
		transform.localPosition = Vector3.zero;
		transform.localScale = new Vector3(1f, 1f, 1f);
		transform.localRotation = Quaternion.identity;
		CharacterDirection component = dragonCharacterPrefab.GetComponent<CharacterDirection>();
		component.targetTransform = val3.transform;
		component.modelAnimator = val2.GetComponentInChildren<Animator>();
		CharacterBody component2 = dragonCharacterPrefab.GetComponent<CharacterBody>();
		((Object)component2).name = "DragonShyvanaBody";
		component2.baseNameToken = "DRAGONSHYVANA_NAME";
		component2.subtitleNameToken = "DRAGONSHYVANA_SUBTITLE";
		component2.bodyFlags = (BodyFlags)16;
		component2.rootMotionInMainState = false;
		component2.mainRootSpeed = 0f;
		component2.baseMaxHealth = 410f;
		component2.levelMaxHealth = 48f;
		component2.baseRegen = 2.5f;
		component2.levelRegen = 0.5f;
		component2.baseMaxShield = 0f;
		component2.levelMaxShield = 0f;
		component2.baseMoveSpeed = 7f;
		component2.levelMoveSpeed = 0f;
		component2.baseAcceleration = 110f;
		component2.baseJumpPower = 20f;
		component2.levelJumpPower = 0f;
		component2.baseDamage = 12f;
		component2.levelDamage = 2.4f;
		component2.baseAttackSpeed = 1f;
		component2.levelAttackSpeed = 0f;
		component2.baseCrit = 1f;
		component2.levelCrit = 0f;
		component2.baseArmor = 20f;
		component2.levelArmor = 3f;
		component2.baseJumpCount = 99;
		component2.sprintingSpeedMultiplier = 1.45f;
		component2.wasLucky = false;
		component2.hideCrosshair = false;
		component2.aimOriginTransform = val4.transform;
		component2.hullClassification = (HullClassification)0;
		component2.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portraitDragon").texture;
		component2._defaultCrosshairPrefab = Prefabs.Load<GameObject>("RoR2/Base/UI/SimpleDotCrosshair.prefab");
		component2.isChampion = false;
		component2.currentVehicle = null;
		component2.skinIndex = 0u;
		component2.bodyColor = characterColor;
		CharacterMotor component3 = dragonCharacterPrefab.GetComponent<CharacterMotor>();
		component3.walkSpeedPenaltyCoefficient = 1f;
		component3.characterDirection = component;
		component3.muteWalkMotion = false;
		component3.mass = 450f;
		component3.airControl = 0.25f;
		component3.disableAirControlUntilCollision = false;
		component3.generateParametersOnAwake = true;
		CameraTargetParams component4 = dragonCharacterPrefab.GetComponent<CameraTargetParams>();
		component4.cameraParams = Prefabs.Load<CharacterCameraParams>("RoR2/Base/Common/ccpStandardMelee.asset");
		component4.cameraPivotTransform = null;
		component4.recoil = Vector2.zero;
		component4.dontRaycastToPivot = false;
		ModelLocator component5 = dragonCharacterPrefab.GetComponent<ModelLocator>();
		component5.modelTransform = transform;
		component5.modelBaseTransform = val3.transform;
		component5.dontReleaseModelOnDeath = false;
		component5.autoUpdateModelTransform = true;
		component5.dontDetatchFromParent = false;
		component5.noCorpse = false;
		component5.normalizeToFloor = false;
		component5.preserveModel = false;
		dragonCharacterPrefab.GetComponent<Interactor>().maxInteractionDistance = 6f;
		ChildLocator component6 = val2.GetComponent<ChildLocator>();
		CharacterModel val5 = val2.AddComponent<CharacterModel>();
		SkinnedMeshRenderer[] componentsInChildren = val2.GetComponentsInChildren<SkinnedMeshRenderer>(true);
		List<RendererInfo> list = new List<RendererInfo>();
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			list.Add(new RendererInfo
			{
				renderer = (Renderer)(object)componentsInChildren[i],
				defaultMaterial = Utils.InstantiateMaterial(((Renderer)componentsInChildren[i]).material.mainTexture),
				defaultShadowCastingMode = (ShadowCastingMode)1,
				ignoreOverlays = false
			});
		}
		RendererInfo[] baseRendererInfos = list.ToArray();
		val5.body = component2;
		val5.baseRendererInfos = baseRendererInfos;
		val5.autoPopulateLightInfos = true;
		val5.invisibilityCount = 0;
		val5.temporaryOverlays = new List<TemporaryOverlay>();
		val5.mainSkinnedMeshRenderer = componentsInChildren[0];
		HealthComponent component7 = dragonCharacterPrefab.GetComponent<HealthComponent>();
		component7.health = component2.baseMaxHealth;
		component7.shield = 0f;
		component7.barrier = 0f;
		component7.magnetiCharge = 0f;
		component7.body = null;
		component7.dontShowHealthbar = false;
		component7.globalDeathEventChanceCoefficient = 1f;
		CapsuleCollider[] componentsInChildren2 = val2.GetComponentsInChildren<CapsuleCollider>();
		HurtBoxGroup val6 = val2.AddComponent<HurtBoxGroup>();
		List<HurtBox> list2 = new List<HurtBox>();
		CapsuleCollider[] array = componentsInChildren2;
		foreach (CapsuleCollider val7 in array)
		{
			HurtBox val8 = ((Component)val7).gameObject.AddComponent<HurtBox>();
			((Component)val8).gameObject.layer = LayerIndex.entityPrecise.intVal;
			val8.healthComponent = component7;
			val8.isBullseye = true;
			val8.damageModifier = (DamageModifier)0;
			val8.hurtBoxGroup = val6;
			val8.indexInGroup = 0;
			val6.mainHurtBox = val8;
			val6.bullseyeCount = 1;
			list2.Add(val8);
		}
		val6.hurtBoxes = list2.ToArray();
		val2.AddComponent<AimAnimator>();
		Utils.CreateHitbox("Swing", val2.transform, new Vector3(6.2f, 6.2f, 6.7f)).transform.localPosition = new Vector3(0f, 1f, 1.5f);
		KinematicCharacterMotor component8 = dragonCharacterPrefab.GetComponent<KinematicCharacterMotor>();
		component8.CharacterController = (BaseCharacterController)(object)component3;
		dragonCharacterPrefab.GetComponent<SfxLocator>().landingSound = "Play_gravekeeper_land";
		FootstepHandler val9 = val2.AddComponent<FootstepHandler>();
		val9.baseFootstepString = "Play_parent_step";
		val9.sprintFootstepOverrideString = "";
		val9.enableFootstepDust = true;
		val9.footstepDustPrefab = Prefabs.Load<GameObject>("RoR2/Base/Common/VFX/GenericHugeFootstepDust.prefab");
		EntityStateMachine component9 = ((Component)component2).GetComponent<EntityStateMachine>();
		component9.initialStateType = new SerializableEntityStateType(typeof(DragonSpawnState));
		component9.mainStateType = new SerializableEntityStateType(typeof(CharacterMain));
		CharacterDeathBehavior component10 = dragonCharacterPrefab.GetComponent<CharacterDeathBehavior>();
		component10.deathStateMachine = dragonCharacterPrefab.GetComponent<EntityStateMachine>();
		component10.deathState = new SerializableEntityStateType(typeof(GenericCharacterDeath));
		NetworkStateMachine component11 = ((Component)component2).GetComponent<NetworkStateMachine>();
		component11.stateMachines = ((Component)component2).GetComponents<EntityStateMachine>();
		ContentAddition.AddBody(dragonCharacterPrefab);
	}

	private void RegisterCharacter()
	{
		//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0144: Unknown result type (might be due to invalid IL or missing references)
		//IL_0149: Unknown result type (might be due to invalid IL or missing references)
		string text = "<style=cSub>\r\n\r\n< ! > Fury gain from Twin Bite is a flat amount, regardless of the number of enemies hit." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > Burnout's health drain can get you out of tough situations as well as keep you healthy in the thick of fights, use it wisely." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > You have a nearly infinite amount of jumps in dragon form and you can cancel Draconic Leap into Exhale Fire, allowing for extremely versatile mobility while transformed." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > The damage per tick for Exhale Fire scales with your attack speed.";
		string text2 = "..and so she left, to decimate other lands with her ire.";
		string text3 = "..and so she vanished, her fury finally extinguished.";
		LanguageAPI.Add("SHYVANA_NAME", "Shyvana");
		LanguageAPI.Add("SHYVANA_DESCRIPTION", text);
		LanguageAPI.Add("SHYVANA_SUBTITLE", "");
		LanguageAPI.Add("SHYVANA_OUTRO", text2);
		LanguageAPI.Add("SHYVANA_FAIL", text3);
		SurvivorDef val = ScriptableObject.CreateInstance<SurvivorDef>();
		val.cachedName = "SHYVANA_NAME";
		val.unlockableDef = null;
		val.descriptionToken = "SHYVANA_DESCRIPTION";
		val.primaryColor = characterColor;
		val.bodyPrefab = characterPrefab;
		val.displayPrefab = Utils.NewDisplayModel(((Component)characterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "ShyvanaDisplay");
		val.outroFlavorToken = "SHYVANA_OUTRO";
		val.desiredSortPosition = 32f;
		val.mainEndingEscapeFailureFlavorToken = "SHYVANA_FAIL";
		ContentAddition.AddSurvivorDef(val);
		val = ScriptableObject.CreateInstance<SurvivorDef>();
		val.cachedName = "DRAGONSHYVANA_NAME";
		val.unlockableDef = null;
		val.descriptionToken = "SHYVANA_DESCRIPTION";
		val.primaryColor = characterColor;
		val.bodyPrefab = dragonCharacterPrefab;
		val.displayPrefab = Utils.NewDisplayModel(((Component)dragonCharacterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "Shyvana (Dragon Form)Display");
		val.outroFlavorToken = "SHYVANA_OUTRO";
		val.mainEndingEscapeFailureFlavorToken = "SHYVANA_FAIL";
		val.desiredSortPosition = 32.1f;
		val.hidden = true;
		ContentAddition.AddSurvivorDef(val);
		SkillSetup();
		DragonSkillSetup();
		GameObject val2 = PrefabAPI.InstantiateClone(Prefabs.Load<GameObject>("RoR2/Base/Commando/CommandoMonsterMaster.prefab"), "ShyvanaMaster", true);
		ContentAddition.AddMaster(val2);
		CharacterMaster component = val2.GetComponent<CharacterMaster>();
		component.bodyPrefab = characterPrefab;
	}

	private void RegisterStates()
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		//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)
		bool flag = default(bool);
		ContentAddition.AddEntityState<ShyvanaSpawnState>(ref flag);
		ContentAddition.AddEntityState<BaseShyvanaState>(ref flag);
		ContentAddition.AddEntityState<Primary>(ref flag);
		ContentAddition.AddEntityState<DragonPrimary>(ref flag);
		ContentAddition.AddEntityState<Secondary>(ref flag);
		ContentAddition.AddEntityState<DragonSecondary>(ref flag);
		ContentAddition.AddEntityState<DragonSecondaryEnd>(ref flag);
		ContentAddition.AddEntityState<Utility>(ref flag);
		ContentAddition.AddEntityState<DragonUtility>(ref flag);
		ContentAddition.AddEntityState<SpecialSelect>(ref flag);
		ContentAddition.AddEntityState<Special>(ref flag);
		ContentAddition.AddEntityState<DragonSpecial>(ref flag);
		ContentAddition.AddEntityState<CharacterMain>(ref flag);
		ContentAddition.AddEntityState<DragonSpawnState>(ref flag);
	}

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

	private void PassiveSetup(GameObject prefab)
	{
		SkillLocator component = prefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("DRAGONFORM_KEYWORD", "[ Dragon Form ]");
		LanguageAPI.Add("SHYVANA_PASSIVE_NAME", "Blood of the Dragonborn");
		LanguageAPI.Add("SHYVANA_PASSIVE_DESCRIPTION", "Your draconic bloodline allows you to shapeshift <color=#9C0B12>upon exceeding the Fury threshold</color>. You gain <color=#9C0B12>2 Fury</color> per second in human form and <color=#9C0B12>3 Fury</color> on hitting enemies with Twin Bite. While transformed you drain <color=#9C0B12>4 Fury</color> per second.");
		component.passiveSkill.enabled = true;
		component.passiveSkill.skillNameToken = "SHYVANA_PASSIVE_NAME";
		component.passiveSkill.skillDescriptionToken = "SHYVANA_PASSIVE_DESCRIPTION";
		component.passiveSkill.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("shyvanareinforcedscales");
	}

	private void DragonSkillSetup()
	{
		GenericSkill[] componentsInChildren = dragonCharacterPrefab.GetComponentsInChildren<GenericSkill>();
		foreach (GenericSkill val in componentsInChildren)
		{
			Object.DestroyImmediate((Object)(object)val);
		}
		PassiveSetup(dragonCharacterPrefab);
		DragonPrimarySetup();
		DragonSecondarySetup();
		DragonUtilitySetup();
		DragonSpecialSetup();
	}

	private void DragonPrimarySetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = dragonCharacterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("DRAGONSHYVANA_M1", "Twin Bite");
		LanguageAPI.Add("DRAGONSHYVANA_M1_DESCRIPTION", "Cleave enemies in front of you for <style=cIsDamage>350% damage</style>. <color=#9C0B12>Grants +2 Fury on-hit</color>.");
		ShyvSkillDef shyvSkillDef = ScriptableObject.CreateInstance<ShyvSkillDef>();
		((SkillDef)shyvSkillDef).activationState = new SerializableEntityStateType(typeof(DragonPrimary));
		((SkillDef)shyvSkillDef).activationStateMachineName = "Weapon";
		((SkillDef)shyvSkillDef).baseMaxStock = 0;
		((SkillDef)shyvSkillDef).baseRechargeInterval = 0f;
		((SkillDef)shyvSkillDef).beginSkillCooldownOnSkillEnd = true;
		((SkillDef)shyvSkillDef).canceledFromSprinting = false;
		((SkillDef)shyvSkillDef).fullRestockOnAssign = true;
		((SkillDef)shyvSkillDef).interruptPriority = (InterruptPriority)0;
		((SkillDef)shyvSkillDef).isCombatSkill = true;
		((SkillDef)shyvSkillDef).mustKeyPress = false;
		((SkillDef)shyvSkillDef).cancelSprintingOnActivation = true;
		((SkillDef)shyvSkillDef).rechargeStock = 0;
		((SkillDef)shyvSkillDef).requiredStock = 0;
		((SkillDef)shyvSkillDef).stockToConsume = 0;
		((SkillDef)shyvSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("shyvanatwinbite");
		((SkillDef)shyvSkillDef).skillDescriptionToken = "DRAGONSHYVANA_M1_DESCRIPTION";
		((SkillDef)shyvSkillDef).skillName = "DRAGONSHYVANA_M1";
		((SkillDef)shyvSkillDef).skillNameToken = "DRAGONSHYVANA_M1";
		ContentAddition.AddSkillDef((SkillDef)(object)shyvSkillDef);
		component.primary = Utils.NewGenericSkill(dragonCharacterPrefab, (SkillDef)(object)shyvSkillDef);
	}

	private void DragonSecondarySetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = dragonCharacterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("DRAGONSHYVANA_M2", "Exhale Fire");
		LanguageAPI.Add("DRAGONSHYVANA_M2_DESCRIPTION", "Breathe fire in a cone in front of you for <style=cIsDamage>50% damage</style>.");
		ShyvSkillDef shyvSkillDef = ScriptableObject.CreateInstance<ShyvSkillDef>();
		((SkillDef)shyvSkillDef).activationState = new SerializableEntityStateType(typeof(DragonSecondary));
		((SkillDef)shyvSkillDef).activationStateMachineName = "Slide";
		((SkillDef)shyvSkillDef).baseMaxStock = 1;
		((SkillDef)shyvSkillDef).baseRechargeInterval = 1f;
		((SkillDef)shyvSkillDef).beginSkillCooldownOnSkillEnd = true;
		((SkillDef)shyvSkillDef).canceledFromSprinting = false;
		((SkillDef)shyvSkillDef).fullRestockOnAssign = false;
		((SkillDef)shyvSkillDef).interruptPriority = (InterruptPriority)0;
		((SkillDef)shyvSkillDef).isCombatSkill = true;
		((SkillDef)shyvSkillDef).mustKeyPress = true;
		((SkillDef)shyvSkillDef).cancelSprintingOnActivation = true;
		((SkillDef)shyvSkillDef).rechargeStock = 1;
		((SkillDef)shyvSkillDef).requiredStock = 1;
		((SkillDef)shyvSkillDef).stockToConsume = 1;
		((SkillDef)shyvSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("Incinerate");
		((SkillDef)shyvSkillDef).skillDescriptionToken = "DRAGONSHYVANA_M2_DESCRIPTION";
		((SkillDef)shyvSkillDef).skillName = "DRAGONSHYVANA_M2";
		((SkillDef)shyvSkillDef).skillNameToken = "DRAGONSHYVANA_M2";
		ContentAddition.AddSkillDef((SkillDef)(object)shyvSkillDef);
		component.secondary = Utils.NewGenericSkill(dragonCharacterPrefab, (SkillDef)(object)shyvSkillDef);
	}

	private void DragonUtilitySetup()
	{
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = dragonCharacterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("SHYVANARUIN_KEYWORD", "<style=cKeywordName>Ruin</style><style=cSub>Ruined areas deal <style=cIsDamage>2240% damage over time</style>, <style=cIsHealing>heals 20%</style> of the damage dealt.");
		LanguageAPI.Add("DRAGONSHYVANA_UTIL", "Draconic Leap");
		LanguageAPI.Add("DRAGONSHYVANA_UTIL_DESCRIPTION", "Flap your wings and leap in a direction, dealing <style=cIsDamage>320% damage</style>, and <color=#5EE3AA>Ruining</color> an area on impact.");
		ShyvSkillDef shyvSkillDef = ScriptableObject.CreateInstance<ShyvSkillDef>();
		((SkillDef)shyvSkillDef).activationState = new SerializableEntityStateType(typeof(DragonUtility));
		((SkillDef)shyvSkillDef).activationStateMachineName = "Body";
		((SkillDef)shyvSkillDef).baseMaxStock = 1;
		((SkillDef)shyvSkillDef).baseRechargeInterval = 5f;
		((SkillDef)shyvSkillDef).beginSkillCooldownOnSkillEnd = false;
		((SkillDef)shyvSkillDef).canceledFromSprinting = false;
		((SkillDef)shyvSkillDef).fullRestockOnAssign = false;
		((SkillDef)shyvSkillDef).interruptPriority = (InterruptPriority)0;
		((SkillDef)shyvSkillDef).isCombatSkill = false;
		((SkillDef)shyvSkillDef).mustKeyPress = true;
		((SkillDef)shyvSkillDef).cancelSprintingOnActivation = false;
		((SkillDef)shyvSkillDef).rechargeStock = 1;
		((SkillDef)shyvSkillDef).requiredStock = 1;
		((SkillDef)shyvSkillDef).stockToConsume = 1;
		((SkillDef)shyvSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("Pillar_of_Flame");
		((SkillDef)shyvSkillDef).skillDescriptionToken = "DRAGONSHYVANA_UTIL_DESCRIPTION";
		((SkillDef)shyvSkillDef).skillName = "DRAGONSHYVANA_UTIL";
		((SkillDef)shyvSkillDef).skillNameToken = "DRAGONSHYVANA_UTIL";
		((SkillDef)shyvSkillDef).keywordTokens = new string[1] { "SHYVANARUIN_KEYWORD" };
		ContentAddition.AddSkillDef((SkillDef)(object)shyvSkillDef);
		component.utility = Utils.NewGenericSkill(dragonCharacterPrefab, (SkillDef)(object)shyvSkillDef);
	}

	private void DragonSpecialSetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = dragonCharacterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("DRAGONSHYVANA_SPEC", "Scorched Earth");
		LanguageAPI.Add("DRAGONSHYVANA_SPEC_DESCRIPTION", "Spit a fireball which flies in an arc and explodes for <style=cIsDamage>700% damage,</style> <color=#5EE3AA>Ruining</color> the area of impact.");
		ShyvSkillDef shyvSkillDef = ScriptableObject.CreateInstance<ShyvSkillDef>();
		((SkillDef)shyvSkillDef).activationState = new SerializableEntityStateType(typeof(DragonSpecial));
		((SkillDef)shyvSkillDef).activationStateMachineName = "Body";
		((SkillDef)shyvSkillDef).baseMaxStock = 1;
		((SkillDef)shyvSkillDef).baseRechargeInterval = 8f;
		((SkillDef)shyvSkillDef).beginSkillCooldownOnSkillEnd = true;
		((SkillDef)shyvSkillDef).canceledFromSprinting = false;
		((SkillDef)shyvSkillDef).fullRestockOnAssign = false;
		((SkillDef)shyvSkillDef).interruptPriority = (InterruptPriority)0;
		((SkillDef)shyvSkillDef).isCombatSkill = true;
		((SkillDef)shyvSkillDef).mustKeyPress = true;
		((SkillDef)shyvSkillDef).cancelSprintingOnActivation = false;
		((SkillDef)shyvSkillDef).rechargeStock = 1;
		((SkillDef)shyvSkillDef).requiredStock = 1;
		((SkillDef)shyvSkillDef).stockToConsume = 1;
		((SkillDef)shyvSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("Disintegrate");
		((SkillDef)shyvSkillDef).skillDescriptionToken = "DRAGONSHYVANA_SPEC_DESCRIPTION";
		((SkillDef)shyvSkillDef).skillName = "DRAGONSHYVANA_SPEC";
		((SkillDef)shyvSkillDef).skillNameToken = "DRAGONSHYVANA_SPEC";
		((SkillDef)shyvSkillDef).keywordTokens = new string[1] { "SHYVANARUIN_KEYWORD" };
		ContentAddition.AddSkillDef((SkillDef)(object)shyvSkillDef);
		component.special = Utils.NewGenericSkill(dragonCharacterPrefab, (SkillDef)(object)shyvSkillDef);
	}

	private void PrimarySetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("SHYVANA_M1", "Twin Bite");
		LanguageAPI.Add("SHYVANA_M1_DESCRIPTION", "Swing your gauntlets for <style=cIsDamage>285% damage</style>.  <color=#9C0B12>Grants +2 Fury on-hit</color>.");
		ShyvSkillDef shyvSkillDef = ScriptableObject.CreateInstance<ShyvSkillDef>();
		((SkillDef)shyvSkillDef).activationState = new SerializableEntityStateType(typeof(Primary));
		((SkillDef)shyvSkillDef).activationStateMachineName = "Weapon";
		((SkillDef)shyvSkillDef).baseMaxStock = 0;
		((SkillDef)shyvSkillDef).baseRechargeInterval = 0f;
		((SkillDef)shyvSkillDef).beginSkillCooldownOnSkillEnd = true;
		((SkillDef)shyvSkillDef).canceledFromSprinting = false;
		((SkillDef)shyvSkillDef).fullRestockOnAssign = true;
		((SkillDef)shyvSkillDef).interruptPriority = (InterruptPriority)0;
		((SkillDef)shyvSkillDef).isCombatSkill = true;
		((SkillDef)shyvSkillDef).mustKeyPress = false;
		((SkillDef)shyvSkillDef).cancelSprintingOnActivation = false;
		((SkillDef)shyvSkillDef).rechargeStock = 0;
		((SkillDef)shyvSkillDef).requiredStock = 0;
		((SkillDef)shyvSkillDef).stockToConsume = 0;
		((SkillDef)shyvSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("shyvanatwinbite");
		((SkillDef)shyvSkillDef).skillDescriptionToken = "SHYVANA_M1_DESCRIPTION";
		((SkillDef)shyvSkillDef).skillName = "SHYVANA_M1";
		((SkillDef)shyvSkillDef).skillNameToken = "SHYVANA_M1";
		((SkillDef)shyvSkillDef).keywordTokens = new string[3] { "DRAGONFORM_KEYWORD", "DRAGONSHYVANA_M1", "DRAGONSHYVANA_M1_DESCRIPTION" };
		ContentAddition.AddSkillDef((SkillDef)(object)shyvSkillDef);
		component.primary = Utils.NewGenericSkill(characterPrefab, (SkillDef)(object)shyvSkillDef);
	}

	private void SecondarySetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("SHYVANA_M2", "Flame Breath");
		LanguageAPI.Add("SHYVANA_M2_DESCRIPTION", "Shoot a slow-moving fireball that <style=cIsDamage>explodes</style> on impact for <style=cIsDamage>315% damage</style>, and <style=cIsDamage>ignites</style> enemies.");
		ShyvSkillDef shyvSkillDef = ScriptableObject.CreateInstance<ShyvSkillDef>();
		((SkillDef)shyvSkillDef).activationState = new SerializableEntityStateType(typeof(Secondary));
		((SkillDef)shyvSkillDef).activationStateMachineName = "Slide";
		((SkillDef)shyvSkillDef).baseMaxStock = 1;
		((SkillDef)shyvSkillDef).baseRechargeInterval = 5f;
		((SkillDef)shyvSkillDef).beginSkillCooldownOnSkillEnd = false;
		((SkillDef)shyvSkillDef).canceledFromSprinting = false;
		((SkillDef)shyvSkillDef).fullRestockOnAssign = false;
		((SkillDef)shyvSkillDef).interruptPriority = (InterruptPriority)0;
		((SkillDef)shyvSkillDef).isCombatSkill = true;
		((SkillDef)shyvSkillDef).mustKeyPress = true;
		((SkillDef)shyvSkillDef).cancelSprintingOnActivation = false;
		((SkillDef)shyvSkillDef).rechargeStock = 1;
		((SkillDef)shyvSkillDef).requiredStock = 1;
		((SkillDef)shyvSkillDef).stockToConsume = 1;
		((SkillDef)shyvSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("shyvanaflamebreath");
		((SkillDef)shyvSkillDef).skillDescriptionToken = "SHYVANA_M2_DESCRIPTION";
		((SkillDef)shyvSkillDef).skillName = "SHYVANA_M2";
		((SkillDef)shyvSkillDef).skillNameToken = "SHYVANA_M2";
		((SkillDef)shyvSkillDef).keywordTokens = new string[3] { "DRAGONFORM_KEYWORD", "DRAGONSHYVANA_M2", "DRAGONSHYVANA_M2_DESCRIPTION" };
		ContentAddition.AddSkillDef((SkillDef)(object)shyvSkillDef);
		component.secondary = Utils.NewGenericSkill(characterPrefab, (SkillDef)(object)shyvSkillDef);
	}

	private void UtilitySetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("SHYVANA_UTIL", "Burnout");
		LanguageAPI.Add("SHYVANA_UTIL_DESCRIPTION", "Wreath yourself in flames and damage enemies for <style=cIsDamage>750% damage</style> per tick, <style=cIsHealth>draining their health</style>. Gain increased movement speed while the flames are active.");
		ShyvSkillDef shyvSkillDef = ScriptableObject.CreateInstance<ShyvSkillDef>();
		((SkillDef)shyvSkillDef).activationState = new SerializableEntityStateType(typeof(Utility));
		((SkillDef)shyvSkillDef).activationStateMachineName = "Burnout";
		((SkillDef)shyvSkillDef).baseMaxStock = 1;
		((SkillDef)shyvSkillDef).baseRechargeInterval = 5f;
		((SkillDef)shyvSkillDef).beginSkillCooldownOnSkillEnd = true;
		((SkillDef)shyvSkillDef).canceledFromSprinting = false;
		((SkillDef)shyvSkillDef).fullRestockOnAssign = false;
		((SkillDef)shyvSkillDef).interruptPriority = (InterruptPriority)0;
		((SkillDef)shyvSkillDef).isCombatSkill = false;
		((SkillDef)shyvSkillDef).mustKeyPress = true;
		((SkillDef)shyvSkillDef).cancelSprintingOnActivation = false;
		((SkillDef)shyvSkillDef).rechargeStock = 1;
		((SkillDef)shyvSkillDef).requiredStock = 1;
		((SkillDef)shyvSkillDef).stockToConsume = 1;
		((SkillDef)shyvSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("shyvanascorchedearth");
		((SkillDef)shyvSkillDef).skillDescriptionToken = "SHYVANA_UTIL_DESCRIPTION";
		((SkillDef)shyvSkillDef).skillName = "SHYVANA_UTIL";
		((SkillDef)shyvSkillDef).skillNameToken = "SHYVANA_UTIL";
		((SkillDef)shyvSkillDef).keywordTokens = new string[4] { "DRAGONFORM_KEYWORD", "DRAGONSHYVANA_UTIL", "DRAGONSHYVANA_UTIL_DESCRIPTION", "SHYVANARUIN_KEYWORD" };
		ContentAddition.AddSkillDef((SkillDef)(object)shyvSkillDef);
		component.utility = Utils.NewGenericSkill(characterPrefab, (SkillDef)(object)shyvSkillDef);
	}

	private void SpecialSetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("SHYVANA_SPEC", "Dragon's Descent");
		LanguageAPI.Add("SHYVANA_SPEC_DESCRIPTION", "<color=#9C0B12>Usable at >150 Fury.</color> Leap to target location, dealing <style=cIsDamage>380% damage</style> on impact and assuming your true form, <style=cIsUtility>changing all of your abilities</style>.");
		ShyvSkillDef shyvSkillDef = ScriptableObject.CreateInstance<ShyvSkillDef>();
		((SkillDef)shyvSkillDef).activationState = new SerializableEntityStateType(typeof(SpecialSelect));
		((SkillDef)shyvSkillDef).activationStateMachineName = "Slide";
		((SkillDef)shyvSkillDef).baseMaxStock = 1;
		((SkillDef)shyvSkillDef).baseRechargeInterval = 8f;
		((SkillDef)shyvSkillDef).beginSkillCooldownOnSkillEnd = true;
		((SkillDef)shyvSkillDef).canceledFromSprinting = false;
		((SkillDef)shyvSkillDef).fullRestockOnAssign = false;
		((SkillDef)shyvSkillDef).interruptPriority = (InterruptPriority)0;
		((SkillDef)shyvSkillDef).isCombatSkill = true;
		((SkillDef)shyvSkillDef).mustKeyPress = true;
		((SkillDef)shyvSkillDef).cancelSprintingOnActivation = false;
		((SkillDef)shyvSkillDef).rechargeStock = 1;
		((SkillDef)shyvSkillDef).requiredStock = 1;
		((SkillDef)shyvSkillDef).stockToConsume = 1;
		((SkillDef)shyvSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("shyvanadragonsdescent");
		((SkillDef)shyvSkillDef).skillDescriptionToken = "SHYVANA_SPEC_DESCRIPTION";
		((SkillDef)shyvSkillDef).skillName = "SHYVANA_SPEC";
		((SkillDef)shyvSkillDef).skillNameToken = "SHYVANA_SPEC";
		((SkillDef)shyvSkillDef).keywordTokens = new string[4] { "DRAGONFORM_KEYWORD", "DRAGONSHYVANA_SPEC", "DRAGONSHYVANA_SPEC_DESCRIPTION", "SHYVANARUIN_KEYWORD" };
		ContentAddition.AddSkillDef((SkillDef)(object)shyvSkillDef);
		component.special = Utils.NewGenericSkill(characterPrefab, (SkillDef)(object)shyvSkillDef);
	}
}
internal class Prefabs
{
	internal static GameObject fireProjectile;

	internal static GameObject fireProjectileGhost;

	internal static GameObject fireProjectileExplosion;

	internal static GameObject fireBallProjectile;

	internal static GameObject fireBallProjectileGhost;

	internal static GameObject fireBallProjectileExplosion;

	internal static GameObject fireBallProjectileDotZone;

	internal static GameObject flameBreathEffect;

	internal static GameObject ringEffect;

	internal static GameObject despawnEffect;

	internal static GameObject swingHitEffect;

	internal static GameObject dragonSwingHitEffect;

	internal static GameObject dragonSlamEffect;

	internal static GameObject dragonTransformEffect;

	internal static GameObject fireImmolateHitEffect;

	internal static GameObject immolateEffect;

	internal static GameObject lineIndicator;

	internal static GameObject transformIndicator;

	internal static GameObject swingEffect;

	internal static GameObject leapEffect;

	internal static BuffDef flameBuff;

	internal static Material baseIndicatorMat;

	internal static Material redIndicatorMat;

	internal static Material baseArcMat;

	internal static Material redArcMat;

	internal static ModdedDamageType ruin;

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

	internal static void CreatePrefabs()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_0079: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b1: 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_0112: Unknown result type (might be due to invalid IL or missing references)
		//IL_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_0409: Unknown result type (might be due to invalid IL or missing references)
		//IL_0489: Unknown result type (might be due to invalid IL or missing references)
		//IL_048e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0498: Unknown result type (might be due to invalid IL or missing references)
		//IL_049f: Expected O, but got Unknown
		//IL_0570: Unknown result type (might be due to invalid IL or missing references)
		//IL_0631: Unknown result type (might be due to invalid IL or missing references)
		//IL_06c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_075b: Unknown result type (might be due to invalid IL or missing references)
		//IL_08f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0902: Unknown result type (might be due to invalid IL or missing references)
		//IL_091d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0948: Unknown result type (might be due to invalid IL or missing references)
		//IL_094d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a51: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a97: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a9c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0aa9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0aae: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ab7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ace: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b36: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b7e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c1a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d11: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d5d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d67: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d9b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0da0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0db1: Unknown result type (might be due to invalid IL or missing references)
		//IL_0db6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0dd3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ddd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0df3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0df8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0fbe: Unknown result type (might be due to invalid IL or missing references)
		//IL_1059: Unknown result type (might be due to invalid IL or missing references)
		//IL_1063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e52: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e7f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e89: Unknown result type (might be due to invalid IL or missing references)
		ruin = DamageAPI.ReserveDamageType();
		Material material = Load<Material>("RoR2/Base/Engi/matOmniExplosion1Engi.mat");
		Material material2 = Load<Material>("RoR2/Base/Engi/matEngiExplosion.mat");
		Material material3 = Load<Material>("RoR2/Base/ElitePoison/matElitePoisonDarkTrail.mat");
		Material material4 = Load<Material>("RoR2/Base/ElitePoison/matElitePoisonOverlay.mat");
		Material material5 = Load<Material>("RoR2/Base/ElitePoison/matElitePoisonParticleReplacement.mat");
		Material material6 = Load<Material>("RoR2/Base/Engi/matEngiHarpoonRing.mat");
		Material val = Load<Material>("RoR2/Base/Engi/matEngiTrailExplosion.mat");
		baseIndicatorMat = Object.Instantiate<Material>(Load<Material>("RoR2/Base/Common/VFX/matAreaIndicatorRim.mat"));
		baseIndicatorMat.SetColor("_TintColor", MainPlugin.characterColor);
		redIndicatorMat = Object.Instantiate<Material>(baseIndicatorMat);
		redIndicatorMat.SetColor("_TintColor", new Color(1f, 0f, 0f, 0.75f));
		baseArcMat = Object.Instantiate<Material>(Load<Material>("RoR2/Base/Common/VFX/matArcVisual.mat"));
		baseArcMat.SetColor("_TintColor", MainPlugin.characterColor);
		redArcMat = Object.Instantiate<Material>(baseArcMat);
		redArcMat.SetColor("_TintColor", new Color(1f, 0f, 0f, 0.75f));
		flameBuff = Utils.NewBuffDef("Burnout", stack: false, hidden: false, Assets.Load<Sprite>("shyvanaBuff"), Color.white);
		swingEffect = PrefabAPI.InstantiateClone(Assets.Load<GameObject>("SlashEffect"), "ShyvanaSlashEffect", false);
		Utils.RegisterEffect(swingEffect, 1f).applyScale = true;
		leapEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Brother/BrotherDashEffect.prefab"), "ShyvanaLeapEffect", false);
		leapEffect.transform.rotation = Quaternion.Euler(-90f, 0f, 0f);
		ParticleSystemRenderer[] componentsInChildren = leapEffect.GetComponentsInChildren<ParticleSystemRenderer>(true);
		foreach (ParticleSystemRenderer val2 in componentsInChildren)
		{
			string name = ((Object)val2).name;
			if (name == "Donut")
			{
				((Renderer)val2).materials = (Material[])(object)new Material[10] { val, val, val, val, val, val, val, val, val, val };
			}
			if (name == "Dash")
			{
				((Renderer)val2).material = material2;
			}
		}
		Utils.RegisterEffect(leapEffect, -1f);
		dragonTransformEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Grandparent/GrandParentSunSpawn.prefab"), "ShyvanaDragonTransformEffect", false);
		Object.Destroy((Object)(object)dragonTransformEffect.GetComponentInChildren<LightIntensityCurve>());
		dragonTransformEffect.GetComponentInChildren<PostProcessVolume>().profile = Load<PostProcessProfile>("RoR2/Base/title/ppLocalArtifactShellHurt.asset");
		Light componentInChildren = dragonTransformEffect.GetComponentInChildren<Light>();
		componentInChildren.intensity = 45f;
		componentInChildren.range = 50f;
		componentInChildren.colorTemperature = 5000f;
		componentInChildren.color = Color.cyan;
		ParticleSystemRenderer[] componentsInChildren2 = dragonTransformEffect.GetComponentsInChildren<ParticleSystemRenderer>(true);
		foreach (ParticleSystemRenderer val3 in componentsInChildren2)
		{
			string name2 = ((Object)val3).name;
			if (name2 == "Goo, Drip" || name2 == "Trails")
			{
				((Renderer)val3).enabled = false;
			}
			if (name2 == "Goo, Billboard Huge")
			{
				((Renderer)val3).material = material;
			}
			if (name2 == "Goo, Burst")
			{
				((Renderer)val3).material = Load<Material>("RoR2/Junk/ClayMan/matClaySwingtrail.mat");
			}
			if (name2 == "Donut")
			{
				((Renderer)val3).material = val;
			}
		}
		Utils.RegisterEffect(dragonTransformEffect, 1f);
		transformIndicator = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab"), "SphereIndicator", false);
		Material val4 = Object.Instantiate<Material>(Load<Material>("RoR2/Base/Common/VFX/matAreaIndicatorRim.mat"));
		val4.SetColor("_TintColor", MainPlugin.characterColor);
		((Renderer)transformIndicator.GetComponentInChildren<MeshRenderer>()).material = val4;
		lineIndicator = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Common/VFX/BasicThrowableVisualizer.prefab"), "LineIndicator", false);
		LineRenderer component = lineIndicator.GetComponent<LineRenderer>();
		component.widthMultiplier = 1f;
		component.textureMode = (LineTextureMode)0;
		component.numPositions = 98;
		BezierCurveLineScaler bezierCurveLineScaler = lineIndicator.AddComponent<BezierCurveLineScaler>();
		((BezierCurveLine)bezierCurveLineScaler).v0 = new Vector3(0f, 20f, 0f);
		GameObject val5 = new GameObject("EndTransform");
		val5.transform.SetParent(lineIndicator.transform);
		((BezierCurveLine)bezierCurveLineScaler).endTransform = val5.transform;
		immolateEffect = PrefabAPI.InstantiateClone(Assets.Load<GameObject>("ImmolateEffect"), "ShyvanaImmolateEffect", false);
		Utils.AddScaleComponent(((Component)immolateEffect.transform.GetChild(0)).gameObject, 0.15f).overallCurve = AnimationCurve.Linear(0f, 0.7f, 1f, 1f);
		immolateEffect.AddComponent<DestroyOnTimer>().duration = 8f;
		fireImmolateHitEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Engi/ImpactEngiTurret.prefab"), "ShyvanaDragonImmolateHitEffect", false);
		ParticleSystemRenderer[] componentsInChildren3 = fireImmolateHitEffect.GetComponentsInChildren<ParticleSystemRenderer>(true);
		foreach (ParticleSystemRenderer val6 in componentsInChildren3)
		{
			((Renderer)val6).material.SetColor("_TintColor", MainPlugin.characterColor);
		}
		Utils.RegisterEffect(fireImmolateHitEffect, 1f, "Play_Shyvana_Immolate_Hit");
		dragonSlamEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Parent/ParentSlamEffect.prefab"), "ShyvanaDragonSlamEffect", false);
		Utils.RegisterEffect(dragonSlamEffect, 1f, "Play_Shyvana_Transform_Hit");
		swingHitEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Merc/OmniImpactVFXSlashMerc.prefab"), "ShyvanaSwingHitEffect", false);
		Object.Destroy((Object)(object)swingHitEffect.GetComponent<OmniEffect>());
		ParticleSystemRenderer[] componentsInChildren4 = swingHitEffect.GetComponentsInChildren<ParticleSystemRenderer>(true);
		foreach (ParticleSystemRenderer val7 in componentsInChildren4)
		{
			((Component)val7).gameObject.SetActive(true);
			((Renderer)val7).material.SetColor("_TintColor", Color.green);
		}
		Utils.RegisterEffect(swingHitEffect, 1f, "Play_Shyvana_Auto_Hit");
		dragonSwingHitEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Merc/MercExposeConsumeEffect.prefab"), "ShyvanaDragonSwingHitEffect", false);
		Object.Destroy((Object)(object)dragonSwingHitEffect.GetComponent<OmniEffect>());
		ParticleSystemRenderer[] componentsInChildren5 = dragonSwingHitEffect.GetComponentsInChildren<ParticleSystemRenderer>(true);
		foreach (ParticleSystemRenderer val8 in componentsInChildren5)
		{
			((Component)val8).gameObject.SetActive(true);
			((Renderer)val8).material.SetColor("_TintColor", Color.green);
			if (((Object)val8).name == "PulseEffect, Ring (1)")
			{
				Material material7 = ((Renderer)val8).material;
				material7.mainTexture = (Texture)(object)Load<Texture2D>("RoR2/Base/Common/VFX/texArcaneCircleProviMask.png");
			}
		}
		Utils.RegisterEffect(dragonSwingHitEffect, 1f, "Play_Shyvana_Dragon_Auto_Hit");
		despawnEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/ImpBoss/ImpBossBlink.prefab"), "ShyvanaDespawnEffect", false);
		Object.Destroy((Object)(object)despawnEffect.GetComponent<DestroyOnParticleEnd>());
		despawnEffect.GetComponentInChildren<Light>(true).color = MainPlugin.characterColor;
		despawnEffect.GetComponentInChildren<PostProcessVolume>(true).profile = Load<PostProcessProfile>("RoR2/Base/title/ppLocalElectricWorm.asset");
		ParticleSystemRenderer[] componentsInChildren6 = despawnEffect.GetComponentsInChildren<ParticleSystemRenderer>(true);
		foreach (ParticleSystemRenderer val9 in componentsInChildren6)
		{
			string name3 = ((Object)val9).name;
			if (name3 == "Dash")
			{
				((Renderer)val9).material = material2;
			}
			if (name3 == "Dash, Bright")
			{
				((Renderer)val9).material = val;
			}
			if (name3 == "DashRings" || name3 == "Sphere" || name3 == "LongLifeNoiseTrails")
			{
				((Renderer)val9).material = material;
			}
			if (name3 == "LongLifeNoiseTrails, Bright")
			{
				((Renderer)val9).material = material5;
			}
			if (name3 == "Flash, Red")
			{
				((Renderer)val9).material = material6;
			}
		}
		Utils.RegisterEffect(despawnEffect, -1f);
		ringEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Icicle/IcicleAura.prefab"), "ShyvanaRingEffect", false);
		Object.Destroy((Object)(object)ringEffect.GetComponent<IcicleAuraController>());
		Object.Destroy((Object)(object)ringEffect.GetComponent<BuffWard>());
		Object.Destroy((Object)(object)ringEffect.GetComponent<TeamFilter>());
		Object.Destroy((Object)(object)ringEffect.GetComponent<Rigidbody>());
		Object.Destroy((Object)(object)ringEffect.GetComponent<AkGameObj>());
		ringEffect.transform.localScale = Vector3.one * 9f;
		ringEffect.transform.GetChild(0).localScale = Vector3.one;
		ParticleSystem[] componentsInChildren7 = ringEffect.GetComponentsInChildren<ParticleSystem>(true);
		foreach (ParticleSystem val10 in componentsInChildren7)
		{
			MainModule main = val10.main;
			((MainModule)(ref main)).playOnAwake = true;
			ParticleSystemRenderer component2 = ((Component)val10).GetComponent<ParticleSystemRenderer>();
			string name4 = ((Object)component2).name;
			if (name4 == "Ring, Core")
			{
				((Renderer)component2).material = material3;
			}
			if (name4 == "Ring, Outer")
			{
				((Renderer)component2).material = material4;
			}
			if (name4 == "Ring, Procced")
			{
				((Renderer)component2).material = material3;
			}
			if (name4 == "Area")
			{
				((Renderer)component2).material = material4;
			}
			if (name4 == "SpinningSharpChunks" || name4 == "  Chunks")
			{
				((Renderer)component2).enabled = false;
			}
		}
		flameBreathEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Lemurian/FlamebreathEffect.prefab"), "ShyvanaFlameBreathEffect", false);
		flameBreathEffect.GetComponentInChildren<Light>().color = new Color(0.24706f, 0.74902f, 0.5098f);
		flameBreathEffect.GetComponent<ScaleParticleSystemDuration>().newDuration = 1f;
		ParticleSystemRenderer[] componentsInChildren8 = flameBreathEffect.GetComponentsInChildren<ParticleSystemRenderer>(true);
		foreach (ParticleSystemRenderer val11 in componentsInChildren8)
		{
			ParticleSystem component3 = ((Component)val11).GetComponent<ParticleSystem>();
			MainModule main2 = component3.main;
			((MainModule)(ref main2)).loop = true;
			EmissionModule emission = component3.emission;
			((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(55f);
			((Renderer)val11).material.SetColor("_TintColor", MainPlugin.characterColor);
		}
		fireProjectileExplosion = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Engi/EngiMineExplosion.prefab"), "ShyvanaFireProjectileExplosion", false);
		Utils.RegisterEffect(fireProjectileExplosion, 1f, "Play_Shyvana_Fireball_Hit").applyScale = true;
		Material val12 = Object.Instantiate<Material>(Load<Material>("RoR2/Base/LunarExploder/matLunarExploderDeathDecal.mat"));
		val12.SetColor("_Color", MainPlugin.characterColor);
		fireBallProjectileDotZone = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/LunarExploder/LunarExploderProjectileDotZone.prefab"), "ShyvanaFireBallProjectileDotZone", true);
		fireBallProjectileDotZone.GetComponentInChildren<Decal>().Material = Load<Material>("RoR2/DLC1/AcidLarva/matAcidLarvaDeathDecal.mat");
		fireBallProjectileDotZone.GetComponentInChildren<Light>().color = Color.green;
		ParticleSystemRenderer[] componentsInChildren9 = fireBallProjectileDotZone.GetComponentsInChildren<ParticleSystemRenderer>(true);
		foreach (ParticleSystemRenderer val13 in componentsInChildren9)
		{
			string name5 = ((Object)val13).name;
			if (name5 == "Fire, Billboard" || name5 == "Fire, Stretched")
			{
				((Renderer)val13).material = material;
			}
			if (name5 == "Spores")
			{
				((Renderer)val13).material = Load<Material>("RoR2/Base/Croco/matCrocoGooLarge.mat");
			}
		}
		fireBallProjectileDotZone.AddComponent<ModdedDamageTypeHolderComponent>().Add(ruin);
		ContentAddition.AddProjectile(fireBallProjectileDotZone);
		fireBallProjectileExplosion = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/BFG/BeamSphereExplosion.prefab"), "ShyvanaFireBallProjectileExplosion", false);
		ParticleSystemRenderer[] componentsInChildren10 = fireBallProjectileExplosion.GetComponentsInChildren<ParticleSystemRenderer>(true);
		foreach (ParticleSystemRenderer val14 in componentsInChildren10)
		{
			string name6 = ((Object)val14).name;
			if (name6 == "Chunks, Sharp" || name6 == "Lightning" || name6 == "Ring")
			{
				((Renderer)val14).material = material3;
			}
			if (name6 == "Flames")
			{
				((Renderer)val14).material = material;
			}
		}
		Utils.RegisterEffect(fireBallProjectileExplosion, 2f, "Play_Shyvana_Dragon_Fireball_Hit");
		fireBallProjectileGhost = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/LunarWisp/LunarWispTrackingBombGhost.prefab"), "ShyvanaFireBallProjectileGhost", false);
		fireBallProjectileGhost.GetComponentInChildren<Light>().color = Color.green;
		ParticleSystemRenderer[] componentsInChildren11 = fireBallProjectileGhost.GetComponentsInChildren<ParticleSystemRenderer>(true);
		foreach (ParticleSystemRenderer val15 in componentsInChildren11)
		{
			string name7 = ((Object)val15).name;
			if (name7 == "BombOrb")
			{
				((Component)val15).transform.localScale = Vector3.one * 2f;
				((Renderer)val15).material = val;
			}
			if (name7 == "Trail_Ps")
			{
				ParticleSystem component4 = ((Component)val15).GetComponent<ParticleSystem>();
				MainModule main3 = component4.main;
				((MainModule)(ref main3)).startLifetimeMultiplier = 0.1f;
				ShapeModule shape = component4.shape;
				((ShapeModule)(ref shape)).radius = ((ShapeModule)(ref shape)).radius * 0.2f;
				((Component)val15).transform.localScale = Vector3.one * 8f;
				((Renderer)val15).material = material;
				((MainModule)(ref main3)).startColor = MinMaxGradient.op_Implicit(MainPlugin.characterColor);
			}
			if (name7 == "Sparks")
			{
				((Renderer)val15).enabled = false;
			}
			if (name7 == "Glow")
			{
				((Renderer)val15).material = Load<Material>("RoR2/Base/Grandparent/matGrandParentSunGlow.mat");
				((Renderer)val15).material.SetColor("_TintColor", MainPlugin.characterColor);
				Material material8 = ((Renderer)val15).material;
				material8.mainTexture = (Texture)(object)Load<Texture2D>("RoR2/Base/Common/VFX/texFluffyCloud2Mask.png");
				((Component)val15).transform.localScale = Vector3.one * 1.5f;
			}
		}
		fireBallProjectile = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Mage/MageLightningBombProjectile.prefab"), "ShyvanaFireBallProjectile", true);
		Object.Destroy((Object)(object)fireBallProjectile.GetComponent<AkEvent>());
		Object.Destroy((Object)(object)fireBallProjectile.GetComponent<AkGameObj>());
		Object.Destroy((Object)(object)fireBallProjectile.GetComponent<ProjectileProximityBeamController>());
		Object.Destroy((Object)(object)fireBallProjectile.GetComponent<AntiGravityForce>());
		fireBallProjectile.GetComponent<ProjectileController>().ghostPrefab = fireBallProjectileGhost;
		ProjectileImpactExplosion component5 = fireBallProjectile.GetComponent<ProjectileImpactExplosion>();
		component5.impactEffect = fireBallProjectileExplosion;
		((ProjectileExplosion)component5).explosionEffect = fireBallProjectileExplosion;
		((ProjectileExplosion)component5).childrenCount = 1;
		((ProjectileExplosion)component5).fireChildren = true;
		((ProjectileExplosion)component5).childrenDamageCoefficient = 1f;
		((ProjectileExplosion)component5).childrenProjectilePrefab = fireBallProjectileDotZone;
		ContentAddition.AddProjectile(fireBallProjectile);
		fireProjectileGhost = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Mage/MageFireboltGhost.prefab"), "ShyvanaFireProjectileGhost", false);
		Renderer[] componentsInChildren12 = fireProjectileGhost.GetComponentsInChildren<Renderer>(true);
		foreach (Renderer val16 in componentsInChildren12)
		{
			((Component)val16).gameObject.SetActive(true);
			val16.material.SetColor("_TintColor", MainPlugin.characterColor);
			MeshFilter component6 = ((Component)val16).GetComponent<MeshFilter>();
			if (Object.op_Implicit((Object)(object)component6))
			{
				component6.mesh = Load<GameObject>("RoR2/Base/UtilitySkillMagazine/mdlAfterburner.fbx").GetComponentInChildren<MeshFilter>().mesh;
			}
			TrailRenderer val17;
			if ((Object)(object)(val17 = (TrailRenderer)(object)((val16 is TrailRenderer) ? val16 : null)) != (Object)null)
			{
				val17.time *= 1.5f;
				val17.widthMultiplier *= 1.5f;
			}
		}
		fireProjectileGhost.transform.localScale = Vector3.one * 1.5f;
		fireProjectile = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Mage/MageFireboltBasic.prefab"), "ShyvanaFireProjectile", true);
		fireProjectile.GetComponent<ProjectileController>().ghostPrefab = fireProjectileGhost;
		ProjectileImpactExplosion component7 = fireProjectile.GetComponent<ProjectileImpactExplosion>();
		component7.impactEffect = fireProjectileExplosion;
		((ProjectileExplosion)component7).explosionEffect = fireProjectileExplosion;
		ContentAddition.AddProjectile(fireProjectile);
	}
}
internal class ShyvSkillDef : SkillDef
{
	private class InstanceData : BaseSkillInstanceData
	{
		public SkillLocator skillLocator;

		public ShyvanaBehaviour behaviour;

		public CharacterMotor motor;
	}

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

	internal static bool IsExecutable([NotNull] GenericSkill skillSlot)
	{
		InstanceData instanceData = (InstanceData)(object)skillSlot.skillInstanceData;
		ShyvanaBehaviour behaviour = instanceData.behaviour;
		SkillLocator skillLocator = instanceData.skillLocator;
		CharacterMotor motor = instanceData.motor;
		if (Object.op_Implicit((Object)(object)skillLocator) && Object.op_Implicit((Object)(object)behaviour) && Object.op_Implicit((Object)(object)behaviour.behaviour))
		{
			if ((Object)(object)skillSlot == (Object)(object)skillLocator.primary)
			{
			}
			if ((Object)(object)skillSlot == (Object)(object)skillLocator.secondary)
			{
			}
			if ((Object)(object)skillSlot == (Object)(object)skillLocator.utility)
			{
			}
			if (!behaviour.behaviour.transformed && (Object)(object)skillSlot == (Object)(object)skillLocator.special)
			{
				return behaviour.canExecute && behaviour.powerupValue >= 1.5f;
			}
			return behaviour.canExecute;
		}
		return true;
	}

	public override bool CanExecute([NotNull] GenericSkill skillSlot)
	{
		return IsExecutable(skillSlot) && ((SkillDef)this).CanExecute(skillSlot);
	}

	public override bool IsReady([NotNull] GenericSkill skillSlot)
	{
		return ((SkillDef)this).IsReady(skillSlot) && IsExecutable(skillSlot);
	}
}
internal class BaseShyvanaState : BaseSkillState
{
	public Animator animator;

	public ShyvanaBehaviour behaviour;

	public MasterBehaviour masterBehaviour;

	public CharacterMaster master;

	public override void OnEnter()
	{
		((BaseState)this).OnEnter();
		animator = ((EntityState)this).GetModelAnimator();
		behaviour = ((EntityState)this).GetComponent<ShyvanaBehaviour>();
		if (Object.op_Implicit((Object)(object)behaviour) && Object.op_Implicit((Object)(object)behaviour.behaviour))
		{
			masterBehaviour = behaviour.behaviour;
		}
		master = ((EntityState)this).characterBody.master;
	}

	public void LockSkills()
	{
		if (Object.op_Implicit((Object)(object)behaviour))
		{
			behaviour.canExecute = false;
		}
	}

	public void UnlockSkills()
	{
		if (Object.op_Implicit((Object)(object)behaviour))
		{
			behaviour.canExecute = true;
		}
	}

	public void AdjustModelForward(Vector3 dir)
	{
		//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_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		//IL_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_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: 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)
		if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && dir != Vector3.zero)
		{
			((Vector3)(ref dir)).Normalize();
			Vector3 val = new Vector3(dir.x, 0f, dir.y);
			Vector3 normalized = ((Vector3)(ref val)).normalized;
			((EntityState)this).characterDirection.moveVector = normalized;
		}
	}

	public void AdjustModelForwardAim()
	{
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: 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_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_0057: Unknown result type (might be due to invalid IL or missing references)
		//IL_005c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
		{
			Ray aimRay = ((BaseState)this).GetAimRay();
			Vector2 val = Util.Vector3XZToVector2XY(((Ray)(ref aimRay)).direction);
			if (val != Vector2.zero)
			{
				((Vector2)(ref val)).Normalize();
				Vector3 val2 = new Vector3(val.x, 0f, val.y);
				Vector3 normalized = ((Vector3)(ref val2)).normalized;
				((EntityState)this).characterDirection.moveVector = normalized;
			}
		}
	}
}
internal class ShyvanaSpawnState : SpawnTeleporterState
{
	public override void OnEnter()
	{
		//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)
		((SpawnTeleporterState)this).OnEnter();
		if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.masterObject))
		{
			MasterBehaviour component = ((EntityState)this).characterBody.masterObject.GetComponent<MasterBehaviour>();
			if (Object.op_Implicit((Object)(object)component) && component.despawned)
			{
				component.despawned = false;
				base.hasTeleported = true;
				base.duration = 0f;
				EffectManager.SimpleEffect(Prefabs.despawnEffect, ((EntityState)this).characterBody.corePosition, Quaternion.identity, false);
				AkSoundEngine.PostEvent(Sounds.Play_Shyvana_Immolate_Deactivate, ((EntityState)this).gameObject);
			}
		}
		CharacterModel characterModel = base.characterModel;
		characterModel.invisibilityCount--;
	}

	public override void OnExit()
	{
		((SpawnTeleporterState)this).OnExit();
		if (NetworkServer.active)
		{
			((EntityState)this).characterBody.ClearTimedBuffs(Buffs.HiddenInvincibility);
		}
	}
}
internal class CharacterMain : GenericCharacterMain
{
	private uint ID;

	private bool playingID;

	private ShyvanaBehaviour behaviour;

	public override void OnEnter()
	{
		((GenericCharacterMain)this).OnEnter();
		behaviour = ((EntityState)this).GetComponent<ShyvanaBehaviour>();
	}

	public override void FixedUpdate()
	{
		((GenericCharacterMain)this).FixedUpdate();
		if (((EntityState)this).characterBody.outOfCombatStopwatch >= 2f && ((EntityState)this).characterBody.outOfDangerStopwatch >= 2f && behaviour.canExecute)
		{
			if (!playingID)
			{
				playingID = true;
				ID = AkSoundEngine.PostEvent(Sounds.Play_Shyvana_Dragon_Idle, ((EntityState)this).gameObject);
			}
		}
		else if (playingID)
		{
			playingID = false;
			AkSoundEngine.StopPlayingID(ID);
		}
	}

	public override void OnExit()
	{
		((GenericCharacterMain)this).OnExit();
		AkSoundEngine.StopPlayingID(ID);
	}
}
internal class DragonPrimary : Primary
{
	public override float comboDamageCoefficient => 3.5f;

	public override bool dragonForm => true;

	public override void SetState()
	{
		DragonPrimary dragonPrimary = new DragonPrimary();
		dragonPrimary.comboState = ((comboState == 2) ? 1 : (comboState + 1));
		((EntityState)this).outer.SetNextState((EntityState)(object)dragonPrimary);
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		return (InterruptPriority)1;
	}
}
internal class DragonSecondary : BaseShyvanaState
{
	private ChildLocator childLocator;

	private Transform muzzleTransform;

	private float stopwatch;

	private float burstStopwatch;

	private float attackDelay;

	private Ray aimRay;

	private GameObject hitEffectPrefab = Prefabs.Load<GameObject>("RoR2/Base/Engi/ImpactEngiTurret.prefab");

	private float startup = 0.2f;

	public override void OnEnter()
	{
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		base.OnEnter();
		((BaseState)this).StartAimMode(2f, false);
		attackDelay = 0.125f;
		childLocator = ((EntityState)this).GetModelChildLocator();
		muzzleTransform = childLocator.FindChild("jawMuzzle");
		AkSoundEngine.PostEvent(Sounds.Play_Shyvana_Wing_Flap_Hard, ((EntityState)this).gameObject);
		aimRay = ((BaseState)this).GetAimRay();
		((EntityState)this).PlayAnimation("FullBody, Override", "Spell2");
		LockSkills();
	}

	public override void Update()
	{
		((EntityState)this).Update();
		UpdateFlamethrowerEffect();
		if (Object.op_Implicit((Object)(object)animator))
		{
			animator.SetBool("isMoving", false);
		}
	}

	public override void FixedUpdate()
	{
		//IL_008b: 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_00b0: 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_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0145: Unknown result type (might be due to invalid IL or missing references)
		//IL_014a: Unknown result type (might be due to invalid IL or missing references)
		//IL_014e: 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_0158: Unknown result type (might be due to invalid IL or missing references)
		//IL_015a: Unknown result type (might be due to invalid IL or missing references)
		//IL_015c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0175: Unknown result type (might be due to invalid IL or missing references)
		//IL_0181: Unknown result type (might be due to invalid IL or missing references)
		//IL_0188: Unknown result type (might be due to invalid IL or missing references)
		//IL_018d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0191: Unknown result type (might be due to invalid IL or missing references)
		//IL_0196: Unknown result type (might be due to invalid IL or missing references)
		//IL_019e: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
		((EntityState)this).FixedUpdate();
		if (((EntityState)this).fixedAge >= startup && !Object.op_Implicit((Object)(object)behaviour.effect))
		{
			AkSoundEngine.PostEvent(Sounds.Play_Shyvana_Dragon_Fireball_Cast, ((EntityState)this).gameObject);
			behaviour.ID = AkSoundEngine.PostEvent(Sounds.Play_Shyvana_Dragon_Flames, ((EntityState)this).gameObject);
			behaviour.effect = Object.Instantiate<GameObject>(Prefabs.flameBreathEffect, muzzleTransform);
			behaviour.effect.transform.localPosition = Vector3.zero;
			behaviour.effect.transform.localScale = Vector3.one * -1f;
		}
		((EntityState)this).characterBody.isSprinting = false;
		if (((EntityState)this).isAuthority)
		{
			float y = ((EntityState)this).characterMotor.velocity.y;
			y = Mathf.MoveTowards(y, JetpackOn.hoverVelocity, JetpackOn.hoverAcceleration / 1.75f * Time.fixedDeltaTime);
			((EntityState)this).characterMotor.velocity = new Vector3(((EntityState)this).characterMotor.velocity.x, y, ((EntityState)this).characterMotor.velocity.z);
		}
		if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
		{
			Ray val = ((BaseState)this).GetAimRay();
			Vector2 val2 = Util.Vector3XZToVector2XY(((Ray)(ref val)).direction);
			if (val2 != Vector2.zero)
			{
				((Vector2)(ref val2)).Normalize();
				Vector3 val3 = new Vector3(val2.x, 0f, val2.y);
				Vector3 normalized = ((Vector3)(ref val3)).normalized;
				((EntityState)this).characterDirection.moveVector = normalized;
			}
		}
		if (((EntityState)this).fixedAge >= startup)
		{
			stopwatch += Time.fixedDeltaTime;
			if (stopwatch >= attackDelay)
			{
				stopwatch = 0f;
				Fire();
			}
		}
		if ((((EntityState)this).isAuthority && !((EntityState)this).inputBank.skill2.down) || behaviour.powerupValue <= 0f)
		{
			((EntityState)this).outer.SetNextState((EntityState)(object)new DragonSecondaryEnd());
		}
		UpdateFlamethrowerEffect();
	}

	private void UpdateFlamethrowerEffect()
	{
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)behaviour.effect))
		{
			Transform transform = behaviour.effect.transform;
			Ray val = ((BaseState)this).GetAimRay();
			transform.forward = ((Ray)(ref val)).direction;
		}
	}

	private void Fire()
	{
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_001