Oryx.dll

Decompiled 3 days ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using EntityStates;
using EntityStates.Merc;
using HG.BlendableTypes;
using KinematicCharacterController;
using On.RoR2;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.CharacterAI;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;

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

	[SerializeField]
	public float speedX = 0f;

	[SerializeField]
	public float speedY = -0.6f;

	[SerializeField]
	public bool xAxis;

	[SerializeField]
	public bool yAxis;

	public Material mat;

	public float offsetX;

	public float offsetY;

	public float stopwatch;

	public float baseDuration;

	private void Start()
	{
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		Renderer component = ((Component)this).GetComponent<Renderer>();
		if (Object.op_Implicit((Object)(object)component))
		{
			mat = component.material;
			mat.SetTextureOffset("_MainTex", new Vector2(0f, 0f));
		}
	}

	private void Update()
	{
		//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		if (reset)
		{
			stopwatch += Time.deltaTime;
			if (stopwatch >= baseDuration)
			{
				stopwatch = 0f;
				mat.SetTextureOffset("_MainTex", new Vector2(0f, 0f));
			}
		}
		if (Object.op_Implicit((Object)(object)mat))
		{
			offsetX += speedX * Time.deltaTime;
			offsetY += speedY * Time.deltaTime;
			mat.SetTextureOffset("_MainTex", new Vector2(offsetX, offsetY));
		}
	}
}
namespace Spearman.SkillStates
{
	internal class MeleeSkillState : BaseSkillState
	{
		internal float hitPauseDuration;

		internal float hopVelocity = Assaulter.smallHopVelocity;

		internal string animParameter = "";

		internal float hitPauseTimer;

		internal bool isInHitPause;

		internal HitStopCachedState hitStopCachedState;

		internal Animator animator;

		internal float stopwatch;

		internal OverlapAttack attack;

		internal bool hitCallback;

		internal float damage;

		internal GameObject hitEffectPrefab;

		internal HitBoxGroup hitBoxGroup;

		internal DamageType damageType = (DamageType)0;

		internal DamageColorIndex damageColor = (DamageColorIndex)0;

		internal Vector3 forceVector = Vector3.back * 100f;

		internal float attackStopwatch;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			animator = ((EntityState)this).GetModelAnimator();
			isInHitPause = false;
			hitPauseDuration = GroundLight.hitPauseDuration / ((BaseState)this).attackSpeedStat;
		}

		internal OverlapAttack NewOverlapAttack()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_000d: 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_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			OverlapAttack val = new OverlapAttack();
			val.procChainMask = default(ProcChainMask);
			val.procCoefficient = 1f;
			val.attacker = ((EntityState)this).gameObject;
			val.inflictor = ((EntityState)this).gameObject;
			val.teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex;
			val.damage = ((EntityState)this).characterBody.damage * damage;
			val.forceVector = forceVector;
			val.hitEffectPrefab = hitEffectPrefab;
			val.isCrit = ((EntityState)this).characterBody.RollCrit();
			val.damageColorIndex = damageColor;
			val.damageType = DamageTypeCombo.op_Implicit(damageType);
			val.maximumOverlapTargets = 100;
			val.hitBoxGroup = hitBoxGroup;
			return val;
		}

		public override void FixedUpdate()
		{
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			hitPauseTimer -= Time.fixedDeltaTime;
			if (hitCallback && !isInHitPause)
			{
				if (!((BaseState)this).isGrounded)
				{
					((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity);
				}
				if (!Utility.IsNullOrWhiteSpace(animParameter))
				{
					hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, animParameter);
				}
				hitPauseTimer = hitPauseDuration / ((BaseState)this).attackSpeedStat;
				isInHitPause = true;
			}
			if (!Utility.IsNullOrWhiteSpace(animParameter) && hitPauseTimer <= 0f && isInHitPause)
			{
				((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator);
				isInHitPause = false;
			}
			if (!isInHitPause)
			{
				attackStopwatch += Time.fixedDeltaTime;
				stopwatch += Time.fixedDeltaTime;
				if (Object.op_Implicit((Object)(object)animator))
				{
					animator.speed = 1f;
				}
			}
			else if (Object.op_Implicit((Object)(object)animator))
			{
				animator.speed = 0f;
			}
		}
	}
}
namespace Oryx
{
	internal class Assets
	{
		public static AssetBundle MainAssetBundle;

		public static void PopulateAssets()
		{
			if ((Object)(object)MainAssetBundle == (Object)null)
			{
				using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Oryx.oryxassets");
				MainAssetBundle = AssetBundle.LoadFromStream(stream);
			}
			using Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("Oryx.Oryx.bnk");
			byte[] array = new byte[stream2.Length];
			stream2.Read(array, 0, array.Length);
			SoundBanks.Add(array);
		}
	}
	internal class IntroParticle : MonoBehaviour
	{
		private ChildLocator childLocator;

		private static GameObject particleInstance;

		private float stopwatch;

		public static uint soundID;

		private void Start()
		{
			childLocator = ((Component)this).GetComponentInChildren<ChildLocator>();
			soundID = AkSoundEngine.PostEvent(Sounds.Play_Oryx_Select, ((Component)this).gameObject);
		}

		private void FixedUpdate()
		{
			//IL_0068: 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)
			stopwatch += Time.fixedDeltaTime;
			if (stopwatch >= 2.6f && !Object.op_Implicit((Object)(object)particleInstance))
			{
				particleInstance = Object.Instantiate<GameObject>(Assets.MainAssetBundle.LoadAsset<GameObject>("IntroTakeFX"), childLocator.FindChild("handMuzzleL"));
				particleInstance.transform.localPosition = Vector3.zero;
				particleInstance.transform.localRotation = Quaternion.Euler(310f, 180f, 180f);
			}
		}

		private void OnDisable()
		{
			AkSoundEngine.StopPlayingID(soundID);
		}
	}
	internal class OryxBlightBehaviour : MonoBehaviour
	{
		private TeamComponent teamComponent;

		private SphereSearch sphereSearch = new SphereSearch();

		private float radius = MainPlugin.passiveRadius.Value;

		private float stopwatch;

		private float stunStopwatch;

		private float searchInterval = 1f;

		private float stunInterval = MainPlugin.passiveStunInterval.Value;

		private float stunDuration = 1f;

		private static GameObject indicatorInstance;

		private void Start()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: 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_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			teamComponent = ((Component)this).GetComponent<TeamComponent>();
			sphereSearch.origin = ((Component)this).transform.position;
			sphereSearch.radius = radius;
			sphereSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask;
			indicatorInstance = Object.Instantiate<GameObject>(Prefabs.blightAreaIndicator, ((Component)((Component)this).GetComponent<ModelLocator>().modelTransform).GetComponent<ChildLocator>().FindChild("collider"));
			indicatorInstance.transform.localPosition = Vector3.zero;
			indicatorInstance.transform.localScale = Vector3.one * radius;
		}

		private void FixedUpdate()
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			stopwatch += Time.fixedDeltaTime;
			stunStopwatch += Time.fixedDeltaTime;
			sphereSearch.origin = ((Component)this).transform.position;
			if (!(stopwatch >= searchInterval) || !Object.op_Implicit((Object)(object)teamComponent))
			{
				return;
			}
			stopwatch = 0f;
			HurtBox[] hurtBoxes = sphereSearch.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(teamComponent.teamIndex)).OrderCandidatesByDistance()
				.FilterCandidatesByDistinctHurtBoxEntities()
				.GetHurtBoxes();
			for (int i = 0; i < hurtBoxes.Length; i++)
			{
				if (Object.op_Implicit((Object)(object)hurtBoxes[i]) && Object.op_Implicit((Object)(object)hurtBoxes[i].healthComponent))
				{
					if (stunStopwatch >= stunInterval)
					{
						stunStopwatch = 0f;
						SetStateOnHurt.SetStunOnObject(((Component)hurtBoxes[i].healthComponent).gameObject, stunDuration);
					}
					BlightDotBehaviour.SetDotOnObject(((Component)hurtBoxes[i].healthComponent).gameObject, ((Component)this).GetComponent<CharacterBody>());
				}
			}
		}
	}
	internal class BlightDotBehaviour : MonoBehaviour
	{
		internal CharacterBody inflictor;

		private static CharacterBody victim;

		private HealthComponent healthComponent;

		private float stopwatch;

		private float dotInterval = 1f;

		private float damageCoefficient = MainPlugin.passiveDamage.Value;

		private float dotDuration = 6f;

		private float dotStopwatch;

		private float stacks
		{
			get
			{
				if (Object.op_Implicit((Object)(object)victim))
				{
					victim.GetBuffCount(Prefabs.blightDebuff);
				}
				return 1f;
			}
		}

		internal static void SetDotOnObject(GameObject target, CharacterBody inflictor)
		{
			if (Object.op_Implicit((Object)(object)inflictor))
			{
				BlightDotBehaviour component = target.GetComponent<BlightDotBehaviour>();
				if (Object.op_Implicit((Object)(object)component))
				{
					component.AddStack();
				}
				else
				{
					target.AddComponent<BlightDotBehaviour>().inflictor = inflictor;
				}
			}
		}

		internal void AddStack()
		{
			dotStopwatch = 0f;
			if (Object.op_Implicit((Object)(object)victim) && NetworkServer.active)
			{
				victim.AddBuff(Prefabs.blightDebuff);
			}
		}

		private void OnEnable()
		{
			victim = ((Component)this).GetComponent<CharacterBody>();
			AddStack();
			healthComponent = ((Component)this).GetComponent<HealthComponent>();
		}

		private void FixedUpdate()
		{
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Expected O, but got Unknown
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			stopwatch += Time.fixedDeltaTime;
			dotStopwatch += Time.fixedDeltaTime;
			if (Object.op_Implicit((Object)(object)victim) && Object.op_Implicit((Object)(object)inflictor) && Object.op_Implicit((Object)(object)victim.teamComponent) && Object.op_Implicit((Object)(object)inflictor.teamComponent))
			{
				if (victim.teamComponent.teamIndex != inflictor.teamComponent.teamIndex)
				{
					if (stopwatch >= dotInterval && Object.op_Implicit((Object)(object)victim) && Object.op_Implicit((Object)(object)healthComponent) && Object.op_Implicit((Object)(object)inflictor.healthComponent) && Object.op_Implicit((Object)(object)inflictor) && NetworkServer.active)
					{
						stopwatch = 0f;
						DamageInfo val = new DamageInfo
						{
							attacker = ((Component)inflictor).gameObject,
							inflictor = ((Component)inflictor).gameObject,
							damage = inflictor.damage * damageCoefficient * stacks,
							procCoefficient = 0f,
							crit = false,
							damageType = DamageTypeCombo.op_Implicit((DamageType)0),
							damageColorIndex = (DamageColorIndex)3,
							position = ((Component)victim.mainHurtBox).transform.position,
							rejected = false
						};
						healthComponent.TakeDamage(val);
						inflictor.healthComponent.Heal(val.damage, default(ProcChainMask), true);
						EffectManager.SimpleEffect(Prefabs.blightHitFX, ((Component)victim.mainHurtBox).transform.position, Quaternion.identity, true);
					}
				}
				else
				{
					if (NetworkServer.active)
					{
						victim.ClearTimedBuffs(Prefabs.blightDebuff);
					}
					Object.Destroy((Object)(object)this);
				}
			}
			if (dotStopwatch >= dotDuration)
			{
				Object.Destroy((Object)(object)this);
			}
		}

		private void OnDisable()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)victim) && NetworkServer.active)
			{
				victim.SetBuffCount(Prefabs.blightDebuff.buffIndex, 0);
			}
		}
	}
	internal class OryxSiphonController : MonoBehaviour
	{
		private SphereSearch sphereSearch = new SphereSearch();

		private CharacterBody body;

		private float stopwatch;

		private float searchInterval = 0.5f;

		private float radius = 8f;

		private float damageCoefficient = MainPlugin.secondaryDamage.Value;

		private uint soundID;

		private void Start()
		{
			//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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			soundID = AkSoundEngine.PostEvent(Sounds.Play_Oryx_Blight_Loop, ((Component)this).gameObject);
			ProjectileController component = ((Component)this).GetComponent<ProjectileController>();
			if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.owner))
			{
				body = component.owner.GetComponent<CharacterBody>();
			}
			sphereSearch.origin = ((Component)this).transform.position;
			sphereSearch.radius = radius;
			sphereSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask;
			Dot();
		}

		private void FixedUpdate()
		{
			stopwatch += Time.fixedDeltaTime;
			if (stopwatch >= searchInterval && Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.teamComponent) && Object.op_Implicit((Object)(object)body.healthComponent))
			{
				stopwatch = 0f;
				Dot();
			}
		}

		private void Dot()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: 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_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Expected O, but got Unknown
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			HurtBox[] hurtBoxes = sphereSearch.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(body.teamComponent.teamIndex)).OrderCandidatesByDistance()
				.FilterCandidatesByDistinctHurtBoxEntities()
				.GetHurtBoxes();
			for (int i = 0; i < hurtBoxes.Length; i++)
			{
				if (Object.op_Implicit((Object)(object)hurtBoxes[i]) && Object.op_Implicit((Object)(object)hurtBoxes[i].healthComponent) && NetworkServer.active)
				{
					DamageInfo val = new DamageInfo
					{
						attacker = ((Component)body).gameObject,
						inflictor = ((Component)body).gameObject,
						damage = body.damage * damageCoefficient,
						procCoefficient = 0f,
						damageType = DamageTypeCombo.GenericSecondary,
						damageColorIndex = (DamageColorIndex)3,
						position = ((Component)hurtBoxes[i]).transform.position,
						rejected = false
					};
					hurtBoxes[i].healthComponent.TakeDamage(val);
					body.healthComponent.Heal(val.damage, default(ProcChainMask), true);
					EffectManager.SimpleEffect(Prefabs.blightHitFX, hurtBoxes[i].healthComponent.body.corePosition, Quaternion.identity, true);
				}
			}
		}

		private void OnDisable()
		{
			AkSoundEngine.StopPlayingID(soundID);
			AkSoundEngine.PostEvent(Sounds.Play_Oryx_Blight_End, ((Component)this).gameObject);
		}
	}
	internal class Hook
	{
		internal static void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
			GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal;
			CharacterMaster.OnBodyDeath += new hook_OnBodyDeath(CharacterMaster_OnBodyDeath);
		}

		private static void CharacterMaster_OnBodyDeath(orig_OnBodyDeath orig, CharacterMaster self, CharacterBody body)
		{
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, body);
			if (((Object)body).name.Contains("OryxBody") && NetworkServer.active && body.GetBuffCount(Prefabs.graspBuff) >= MainPlugin.utilityMinStacks.Value)
			{
				((MonoBehaviour)self).Invoke("RespawnExtraLife", 2f);
				((MonoBehaviour)self).Invoke("PlayExtraLifeSFX", 1f);
				body.SetBuffCount(Prefabs.graspBuff.buffIndex, 0);
				if (Object.op_Implicit((Object)(object)body.skillLocator) && Object.op_Implicit((Object)(object)body.skillLocator.utility))
				{
					body.skillLocator.utility.Reset();
				}
			}
		}

		private static void GlobalEventManager_onCharacterDeathGlobal(DamageReport damageReport)
		{
			//IL_0031: 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_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_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			if (NetworkServer.active && Object.op_Implicit((Object)(object)damageReport.attackerBody) && Object.op_Implicit((Object)(object)damageReport.victimBody))
			{
				bool flag = DamageTypeCombo.op_Implicit(damageReport.damageInfo.damageType) != DamageTypeCombo.op_Implicit(DamageTypeCombo.op_Implicit((DamageType)64) | DamageTypeCombo.GenericPrimary);
				if (damageReport.victimBody.HasBuff(Prefabs.blightDebuff) && !flag)
				{
					OryxConsumeOrb oryxConsumeOrb = new OryxConsumeOrb();
					((Orb)oryxConsumeOrb).origin = damageReport.victimBody.corePosition;
					((Orb)oryxConsumeOrb).target = damageReport.attackerBody.mainHurtBox;
					oryxConsumeOrb.speed = 15f;
					oryxConsumeOrb.owner = ((Component)damageReport.attackerBody).gameObject;
					OrbManager.instance.AddOrb((Orb)(object)oryxConsumeOrb);
				}
				if (((Object)damageReport.attackerBody).name.Contains("OryxBody") && flag && Object.op_Implicit((Object)(object)damageReport.attackerBody.inventory))
				{
					damageReport.attackerBody.inventory.GiveItem(Prefabs.dmgBuff, 1);
				}
			}
		}

		internal static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
		{
			if (Object.op_Implicit((Object)(object)sender.inventory))
			{
				int itemCount = sender.inventory.GetItemCount(Prefabs.dmgBuff);
				int itemCount2 = sender.inventory.GetItemCount(Prefabs.hpBuff);
				args.baseDamageAdd += MainPlugin.primaryBuff.Value * (float)itemCount;
				args.baseHealthAdd += MainPlugin.secondaryBuff.Value * (float)itemCount2;
			}
			int buffCount = sender.GetBuffCount(Prefabs.takenBuff);
			if (buffCount > 0)
			{
				args.damageMultAdd += MainPlugin.specialDamageBuff.Value * (float)buffCount;
				args.moveSpeedMultAdd += MainPlugin.specialMovementSpeedBuff.Value * (float)buffCount;
			}
			buffCount = sender.GetBuffCount(Prefabs.minionBuff);
			if (buffCount > 0)
			{
				args.baseHealthAdd += MainPlugin.specialHPBuff.Value * (float)buffCount;
			}
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.Dragonyck.Oryx", "Oryx", "1.2.0")]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	public class MainPlugin : BaseUnityPlugin
	{
		public const string MODUID = "com.Dragonyck.Oryx";

		public const string MODNAME = "Oryx";

		public const string VERSION = "1.2.0";

		public const string SURVIVORNAME = "Oryx";

		public const string SURVIVORNAMEKEY = "ORYX";

		public const string TAKEN = "<color=#0f0f0f>Taken</color> ";

		public static GameObject characterPrefab;

		private static readonly Color characterColor = new Color(0.37f, 0.37f, 0.37f);

		internal static ConfigEntry<float> passiveRadius;

		internal static ConfigEntry<float> passiveStunInterval;

		internal static ConfigEntry<float> primaryBuff;

		internal static ConfigEntry<int> secondaryStock;

		internal static ConfigEntry<float> secondaryCD;

		internal static ConfigEntry<float> secondaryBuff;

		internal static ConfigEntry<int> utilityStock;

		internal static ConfigEntry<float> utilityCD;

		internal static ConfigEntry<int> utilityMinStacks;

		internal static ConfigEntry<int> specialStock;

		internal static ConfigEntry<float> specialCD;

		internal static ConfigEntry<float> specialDamageBuff;

		internal static ConfigEntry<float> specialHPBuff;

		internal static ConfigEntry<float> specialMovementSpeedBuff;

		internal static ConfigEntry<float> passiveDamage;

		internal static ConfigEntry<float> primaryDamage;

		internal static ConfigEntry<float> secondaryDamage;

		private void Awake()
		{
			passiveDamage = ((BaseUnityPlugin)this).Config.Bind<float>("Passive", "Damage", 1.15f, (ConfigDescription)null);
			passiveRadius = ((BaseUnityPlugin)this).Config.Bind<float>("Passive", "Radius", 10f, (ConfigDescription)null);
			passiveStunInterval = ((BaseUnityPlugin)this).Config.Bind<float>("Passive", "Stun Interval", 5f, (ConfigDescription)null);
			primaryDamage = ((BaseUnityPlugin)this).Config.Bind<float>("Primary", "Damage", 1.8f, (ConfigDescription)null);
			primaryBuff = ((BaseUnityPlugin)this).Config.Bind<float>("Primary", "Buff Amount", 0.05f, (ConfigDescription)null);
			secondaryDamage = ((BaseUnityPlugin)this).Config.Bind<float>("Secondary", "Damage", 1.2f, (ConfigDescription)null);
			secondaryBuff = ((BaseUnityPlugin)this).Config.Bind<float>("Secondary", "Buff Amount", 1f, (ConfigDescription)null);
			secondaryStock = ((BaseUnityPlugin)this).Config.Bind<int>("Secondary", "Base Stocks", 1, (ConfigDescription)null);
			secondaryCD = ((BaseUnityPlugin)this).Config.Bind<float>("Secondary", "Base Cooldown", 12f, (ConfigDescription)null);
			utilityStock = ((BaseUnityPlugin)this).Config.Bind<int>("Utility", "Base Stocks", 1, (ConfigDescription)null);
			utilityCD = ((BaseUnityPlugin)this).Config.Bind<float>("Utility", "Base Cooldown", 80f, (ConfigDescription)null);
			utilityMinStacks = ((BaseUnityPlugin)this).Config.Bind<int>("Utility", "Min Stacks", 50, (ConfigDescription)null);
			specialDamageBuff = ((BaseUnityPlugin)this).Config.Bind<float>("Special", "Damage Buff", 0.05f, (ConfigDescription)null);
			specialHPBuff = ((BaseUnityPlugin)this).Config.Bind<float>("Special", "HP Buff", 3f, (ConfigDescription)null);
			specialMovementSpeedBuff = ((BaseUnityPlugin)this).Config.Bind<float>("Special", "Movement Speed Buff", 0.2f, (ConfigDescription)null);
			specialStock = ((BaseUnityPlugin)this).Config.Bind<int>("Special", "Base Stocks", 1, (ConfigDescription)null);
			specialCD = ((BaseUnityPlugin)this).Config.Bind<float>("Special", "Base Cooldown", 170f, (ConfigDescription)null);
			new TexScroll();
			Assets.PopulateAssets();
			Prefabs.CreatePrefabs();
			CreatePrefab();
			RegisterStates();
			RegisterCharacter();
			Hook.Hooks();
		}

		internal static void CreatePrefab()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Expected O, but got Unknown
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0250: Unknown result type (might be due to invalid IL or missing references)
			//IL_0381: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03da: Unknown result type (might be due to invalid IL or missing references)
			//IL_043e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0443: Unknown result type (might be due to invalid IL or missing references)
			//IL_046a: Unknown result type (might be due to invalid IL or missing references)
			//IL_046f: Unknown result type (might be due to invalid IL or missing references)
			//IL_048a: Unknown result type (might be due to invalid IL or missing references)
			//IL_048f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0494: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0639: Unknown result type (might be due to invalid IL or missing references)
			//IL_064a: Unknown result type (might be due to invalid IL or missing references)
			//IL_065e: Unknown result type (might be due to invalid IL or missing references)
			//IL_068a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0697: Unknown result type (might be due to invalid IL or missing references)
			//IL_0699: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_06dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_06de: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0707: Unknown result type (might be due to invalid IL or missing references)
			//IL_0714: Unknown result type (might be due to invalid IL or missing references)
			//IL_0716: Unknown result type (might be due to invalid IL or missing references)
			//IL_071f: Unknown result type (might be due to invalid IL or missing references)
			//IL_074c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0759: 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_0764: 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_0789: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_07cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_07de: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_082c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0839: Unknown result type (might be due to invalid IL or missing references)
			//IL_083b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0844: Unknown result type (might be due to invalid IL or missing references)
			//IL_0871: Unknown result type (might be due to invalid IL or missing references)
			//IL_087e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0880: Unknown result type (might be due to invalid IL or missing references)
			//IL_0889: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_08fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_08fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0907: Unknown result type (might be due to invalid IL or missing references)
			//IL_0918: Unknown result type (might be due to invalid IL or missing references)
			//IL_092c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0958: Unknown result type (might be due to invalid IL or missing references)
			//IL_0965: Unknown result type (might be due to invalid IL or missing references)
			//IL_0967: Unknown result type (might be due to invalid IL or missing references)
			//IL_0971: Unknown result type (might be due to invalid IL or missing references)
			//IL_099e: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_09f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a1d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a2a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a2c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ad6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b0f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b35: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b37: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b40: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b68: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b71: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b97: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b99: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ba2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bc8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bd3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bf9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bfb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c04: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c2a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c2c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c35: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c5b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c5d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c8c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c8e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c97: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cbd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cbf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cc9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cf1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cfb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d21: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d23: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d2d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d53: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d55: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d5f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d85: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d87: Unknown result type (might be due to invalid IL or missing references)
			//IL_0deb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0df6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e2f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e55: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e57: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e60: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e86: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e88: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e91: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eb7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eb9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ec2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ee8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ef3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f19: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f1b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f24: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f4a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f4c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f55: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f7b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f7d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f86: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fac: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fae: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fb7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fdd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fdf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fe9: Unknown result type (might be due to invalid IL or missing references)
			//IL_100f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1011: Unknown result type (might be due to invalid IL or missing references)
			//IL_101b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1041: Unknown result type (might be due to invalid IL or missing references)
			//IL_1043: Unknown result type (might be due to invalid IL or missing references)
			//IL_104d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1073: Unknown result type (might be due to invalid IL or missing references)
			//IL_1075: Unknown result type (might be due to invalid IL or missing references)
			//IL_107f: Unknown result type (might be due to invalid IL or missing references)
			//IL_10a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_10a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_110b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1116: Unknown result type (might be due to invalid IL or missing references)
			//IL_114f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1175: Unknown result type (might be due to invalid IL or missing references)
			//IL_1177: Unknown result type (might be due to invalid IL or missing references)
			//IL_1180: Unknown result type (might be due to invalid IL or missing references)
			//IL_11a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_11a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_11b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_11d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_11d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_11e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_1208: Unknown result type (might be due to invalid IL or missing references)
			//IL_120a: Unknown result type (might be due to invalid IL or missing references)
			//IL_1213: Unknown result type (might be due to invalid IL or missing references)
			//IL_1239: Unknown result type (might be due to invalid IL or missing references)
			//IL_123b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1244: Unknown result type (might be due to invalid IL or missing references)
			//IL_126a: Unknown result type (might be due to invalid IL or missing references)
			//IL_126c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1275: Unknown result type (might be due to invalid IL or missing references)
			//IL_129b: Unknown result type (might be due to invalid IL or missing references)
			//IL_129d: Unknown result type (might be due to invalid IL or missing references)
			//IL_12a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_12cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_12ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_12d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_12fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_12ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_1309: Unknown result type (might be due to invalid IL or missing references)
			//IL_132f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1331: Unknown result type (might be due to invalid IL or missing references)
			//IL_133b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1361: Unknown result type (might be due to invalid IL or missing references)
			//IL_1363: Unknown result type (might be due to invalid IL or missing references)
			//IL_136d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1393: Unknown result type (might be due to invalid IL or missing references)
			//IL_1395: Unknown result type (might be due to invalid IL or missing references)
			//IL_139f: Unknown result type (might be due to invalid IL or missing references)
			//IL_13c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_13c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_142b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1640: Unknown result type (might be due to invalid IL or missing references)
			//IL_1716: Unknown result type (might be due to invalid IL or missing references)
			//IL_171b: Unknown result type (might be due to invalid IL or missing references)
			//IL_173e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1743: Unknown result type (might be due to invalid IL or missing references)
			//IL_1771: Unknown result type (might be due to invalid IL or missing references)
			//IL_1776: Unknown result type (might be due to invalid IL or missing references)
			//IL_179f: Unknown result type (might be due to invalid IL or missing references)
			//IL_17a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_17b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_17ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_17e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_17e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_17f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_17fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_185c: Unknown result type (might be due to invalid IL or missing references)
			characterPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoBody.prefab").WaitForCompletion(), "OryxBody", true);
			characterPrefab.GetComponent<NetworkIdentity>().localPlayerAuthority = true;
			characterPrefab.AddComponent<OryxBlightBehaviour>();
			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 val = Assets.MainAssetBundle.LoadAsset<GameObject>("oryx");
			GameObject val2 = new GameObject("ModelBase");
			val2.transform.parent = characterPrefab.transform;
			val2.transform.localPosition = new Vector3(0f, -0.94f, 0f);
			val2.transform.localRotation = Quaternion.identity;
			val2.transform.localScale = new Vector3(1f, 1f, 1f);
			GameObject val3 = new GameObject("AimOrigin");
			val3.transform.parent = val2.transform;
			val3.transform.localPosition = new Vector3(0f, 3.4f, 0f);
			val3.transform.localRotation = Quaternion.identity;
			val3.transform.localScale = Vector3.one;
			Transform transform = val.transform;
			transform.parent = val2.transform;
			transform.localPosition = Vector3.zero;
			transform.localScale = new Vector3(1f, 1f, 1f);
			transform.localRotation = Quaternion.identity;
			CharacterDirection component = characterPrefab.GetComponent<CharacterDirection>();
			component.moveVector = Vector3.zero;
			component.targetTransform = val2.transform;
			component.overrideAnimatorForwardTransform = null;
			component.rootMotionAccumulator = null;
			component.modelAnimator = val.GetComponentInChildren<Animator>();
			component.driveFromRootRotation = false;
			component.turnSpeed = 720f;
			CharacterBody component2 = characterPrefab.GetComponent<CharacterBody>();
			((Object)component2).name = "OryxBody";
			component2.baseNameToken = "ORYX_NAME";
			component2.subtitleNameToken = "ORYX_SUBTITLE";
			component2.bodyFlags = (BodyFlags)16;
			component2.rootMotionInMainState = false;
			component2.mainRootSpeed = 0f;
			component2.baseMaxHealth = 210f;
			component2.levelMaxHealth = 35f;
			component2.baseRegen = 1f;
			component2.levelRegen = 0.33f;
			component2.baseMaxShield = 0f;
			component2.levelMaxShield = 0f;
			component2.baseMoveSpeed = 7f;
			component2.levelMoveSpeed = 0f;
			component2.baseAcceleration = 110f;
			component2.baseJumpPower = 15f;
			component2.levelJumpPower = 0f;
			component2.baseDamage = 8f;
			component2.levelDamage = 2.4f;
			component2.baseAttackSpeed = 1f;
			component2.levelAttackSpeed = 0f;
			component2.baseCrit = 1f;
			component2.levelCrit = 0f;
			component2.baseArmor = 0f;
			component2.levelArmor = 0f;
			component2.baseJumpCount = 1;
			component2.sprintingSpeedMultiplier = 1.45f;
			component2.wasLucky = false;
			component2.hideCrosshair = false;
			component2.aimOriginTransform = val3.transform;
			component2.hullClassification = (HullClassification)0;
			component2.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait").texture;
			component2.isChampion = false;
			component2.currentVehicle = null;
			component2.skinIndex = 0u;
			component2.preferredPodPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Toolbot/RoboCratePod.prefab").WaitForCompletion();
			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;
			InputBankTest component4 = characterPrefab.GetComponent<InputBankTest>();
			component4.moveVector = Vector3.zero;
			CharacterCameraParams val4 = Object.Instantiate<CharacterCameraParams>(characterPrefab.GetComponent<CameraTargetParams>().cameraParams);
			val4.data.pivotVerticalOffset = BlendableFloat.op_Implicit(3.3f);
			val4.data.idealLocalCameraPos = BlendableVector3.op_Implicit(new Vector3(0f, 0f, -18f));
			CameraTargetParams component5 = characterPrefab.GetComponent<CameraTargetParams>();
			component5.cameraParams = val4;
			component5.cameraPivotTransform = null;
			component5.recoil = Vector2.zero;
			component5.dontRaycastToPivot = false;
			ModelLocator component6 = characterPrefab.GetComponent<ModelLocator>();
			component6.modelTransform = transform;
			component6.modelBaseTransform = val2.transform;
			component6.dontReleaseModelOnDeath = false;
			component6.autoUpdateModelTransform = true;
			component6.dontDetatchFromParent = false;
			component6.noCorpse = false;
			component6.normalizeToFloor = false;
			component6.preserveModel = false;
			ChildLocator component7 = val.GetComponent<ChildLocator>();
			SkinnedMeshRenderer componentInChildren = ((Component)component7.FindChild("defaultBody")).GetComponentInChildren<SkinnedMeshRenderer>();
			SkinnedMeshRenderer componentInChildren2 = ((Component)component7.FindChild("defaultCloth")).GetComponentInChildren<SkinnedMeshRenderer>();
			SkinnedMeshRenderer componentInChildren3 = ((Component)component7.FindChild("defaultEyes")).GetComponentInChildren<SkinnedMeshRenderer>();
			SkinnedMeshRenderer componentInChildren4 = ((Component)component7.FindChild("defaultWings")).GetComponentInChildren<SkinnedMeshRenderer>();
			SkinnedMeshRenderer componentInChildren5 = ((Component)component7.FindChild("sword")).GetComponentInChildren<SkinnedMeshRenderer>();
			SkinnedMeshRenderer componentInChildren6 = ((Component)component7.FindChild("echoBody")).GetComponentInChildren<SkinnedMeshRenderer>();
			SkinnedMeshRenderer componentInChildren7 = ((Component)component7.FindChild("echoCloth")).GetComponentInChildren<SkinnedMeshRenderer>();
			SkinnedMeshRenderer componentInChildren8 = ((Component)component7.FindChild("echoEyes")).GetComponentInChildren<SkinnedMeshRenderer>();
			SkinnedMeshRenderer componentInChildren9 = ((Component)component7.FindChild("echoWings")).GetComponentInChildren<SkinnedMeshRenderer>();
			SkinnedMeshRenderer componentInChildren10 = ((Component)component7.FindChild("raidBody")).GetComponentInChildren<SkinnedMeshRenderer>();
			SkinnedMeshRenderer componentInChildren11 = ((Component)component7.FindChild("raidCloth")).GetComponentInChildren<SkinnedMeshRenderer>();
			SkinnedMeshRenderer componentInChildren12 = ((Component)component7.FindChild("raidEyes")).GetComponentInChildren<SkinnedMeshRenderer>();
			SkinnedMeshRenderer componentInChildren13 = ((Component)component7.FindChild("raidWings")).GetComponentInChildren<SkinnedMeshRenderer>();
			CharacterModel val5 = val.AddComponent<CharacterModel>();
			val5.body = component2;
			val5.baseRendererInfos = (RendererInfo[])(object)new RendererInfo[13]
			{
				new RendererInfo
				{
					renderer = (Renderer)(object)componentInChildren,
					defaultMaterial = Utils.InstantiateMaterial(Color.white, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("default_body_d"), Color.black, 0f, null, 1f, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("default_body_n")),
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				},
				new RendererInfo
				{
					renderer = (Renderer)(object)componentInChildren2,
					defaultMaterial = Utils.ShaderSwap(Assets.MainAssetBundle.LoadAsset<Material>("defaultCloth")),
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				},
				new RendererInfo
				{
					renderer = (Renderer)(object)componentInChildren3,
					defaultMaterial = ((Renderer)componentInChildren3).material,
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				},
				new RendererInfo
				{
					renderer = (Renderer)(object)componentInChildren4,
					defaultMaterial = Utils.ShaderSwap(Assets.MainAssetBundle.LoadAsset<Material>("defaultWings")),
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				},
				new RendererInfo
				{
					renderer = (Renderer)(object)componentInChildren5,
					defaultMaterial = Utils.InstantiateMaterial(Color.white, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("swordout"), Color.black, 0f, null, 1f, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("sword_nout")),
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				},
				new RendererInfo
				{
					renderer = (Renderer)(object)componentInChildren6,
					defaultMaterial = Utils.InstantiateMaterial(Color.white, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("bodyout"), Color.white, 0.4f, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("glowout"), 1f, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("body_nout")),
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				},
				new RendererInfo
				{
					renderer = (Renderer)(object)componentInChildren7,
					defaultMaterial = Utils.ShaderSwap(Assets.MainAssetBundle.LoadAsset<Material>("echoCloth")),
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				},
				new RendererInfo
				{
					renderer = (Renderer)(object)componentInChildren8,
					defaultMaterial = ((Renderer)componentInChildren8).material,
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				},
				new RendererInfo
				{
					renderer = (Renderer)(object)componentInChildren9,
					defaultMaterial = Utils.ShaderSwap(Assets.MainAssetBundle.LoadAsset<Material>("echoWings")),
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				},
				new RendererInfo
				{
					renderer = (Renderer)(object)componentInChildren10,
					defaultMaterial = Utils.InstantiateMaterial(Color.white, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("raid_body_d"), Color.black, 0f, null, 1f, (Texture)(object)Assets.MainAssetBundle.LoadAsset<Texture2D>("raid_body_n")),
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				},
				new RendererInfo
				{
					renderer = (Renderer)(object)componentInChildren11,
					defaultMaterial = Utils.ShaderSwap(Assets.MainAssetBundle.LoadAsset<Material>("raidCloth")),
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				},
				new RendererInfo
				{
					renderer = (Renderer)(object)componentInChildren12,
					defaultMaterial = ((Renderer)componentInChildren12).material,
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				},
				new RendererInfo
				{
					renderer = (Renderer)(object)componentInChildren13,
					defaultMaterial = Utils.ShaderSwap(Assets.MainAssetBundle.LoadAsset<Material>("raidWings")),
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				}
			};
			val5.autoPopulateLightInfos = true;
			val5.invisibilityCount = 0;
			val5.temporaryOverlays = new List<TemporaryOverlayInstance>();
			Reflection.SetFieldValue<SkinnedMeshRenderer>((object)val5, "mainSkinnedMeshRenderer", ((Component)val5.baseRendererInfos[0].renderer).gameObject.GetComponent<SkinnedMeshRenderer>());
			GameObject gameObject = ((Component)characterPrefab.GetComponentInChildren<ModelLocator>().modelTransform).gameObject;
			ModelSkinController val6 = gameObject.AddComponent<ModelSkinController>();
			ChildLocator component8 = gameObject.GetComponent<ChildLocator>();
			LanguageAPI.Add("ORYXBODY_DEFAULT_SKIN_NAME", "Default");
			LanguageAPI.Add("ORYXBODY_ECHO_SKIN_NAME", "Echo");
			LanguageAPI.Add("ORYXBODY_RAID_SKIN_NAME", "Raid");
			SkinDefInfo val7 = default(SkinDefInfo);
			val7.BaseSkins = Array.Empty<SkinDef>();
			val7.MinionSkinReplacements = (MinionSkinReplacement[])(object)new MinionSkinReplacement[0];
			val7.ProjectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[0];
			val7.GameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[13]
			{
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("defaultBody")).gameObject,
					shouldActivate = true
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("defaultCloth")).gameObject,
					shouldActivate = true
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("defaultEyes")).gameObject,
					shouldActivate = true
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("defaultWings")).gameObject,
					shouldActivate = true
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("sword")).gameObject,
					shouldActivate = true
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("echoBody")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("echoCloth")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("echoEyes")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("echoWings")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("raidBody")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("raidCloth")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("raidEyes")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("raidWings")).gameObject,
					shouldActivate = false
				}
			};
			val7.Icon = Assets.MainAssetBundle.LoadAsset<Sprite>("skin1");
			val7.MeshReplacements = (MeshReplacement[])(object)new MeshReplacement[0];
			val7.Name = "ORYXBODY_DEFAULT_SKIN_NAME";
			val7.NameToken = "ORYXBODY_DEFAULT_SKIN_NAME";
			val7.RendererInfos = val5.baseRendererInfos;
			val7.RootObject = gameObject;
			val7.UnlockableDef = null;
			SkinDef val8 = Skins.CreateNewSkinDef(val7);
			SkinDefInfo val9 = default(SkinDefInfo);
			val9.BaseSkins = Array.Empty<SkinDef>();
			val9.MinionSkinReplacements = (MinionSkinReplacement[])(object)new MinionSkinReplacement[0];
			val9.ProjectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[0];
			val9.GameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[13]
			{
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("defaultBody")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("defaultCloth")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("defaultEyes")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("defaultWings")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("sword")).gameObject,
					shouldActivate = true
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("echoBody")).gameObject,
					shouldActivate = true
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("echoCloth")).gameObject,
					shouldActivate = true
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("echoEyes")).gameObject,
					shouldActivate = true
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("echoWings")).gameObject,
					shouldActivate = true
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("raidBody")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("raidCloth")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("raidEyes")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("raidWings")).gameObject,
					shouldActivate = false
				}
			};
			val9.Icon = Assets.MainAssetBundle.LoadAsset<Sprite>("skin2");
			val9.MeshReplacements = (MeshReplacement[])(object)new MeshReplacement[0];
			val9.Name = "ORYXBODY_ECHO_SKIN_NAME";
			val9.NameToken = "ORYXBODY_ECHO_SKIN_NAME";
			val9.RendererInfos = val5.baseRendererInfos;
			val9.RootObject = gameObject;
			val9.UnlockableDef = null;
			SkinDef val10 = Skins.CreateNewSkinDef(val9);
			SkinDefInfo val11 = default(SkinDefInfo);
			val11.BaseSkins = Array.Empty<SkinDef>();
			val11.MinionSkinReplacements = (MinionSkinReplacement[])(object)new MinionSkinReplacement[0];
			val11.ProjectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[0];
			val11.GameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[13]
			{
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("defaultBody")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("defaultCloth")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("defaultEyes")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("defaultWings")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("sword")).gameObject,
					shouldActivate = true
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("echoBody")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("echoCloth")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("echoEyes")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("echoWings")).gameObject,
					shouldActivate = false
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("raidBody")).gameObject,
					shouldActivate = true
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("raidCloth")).gameObject,
					shouldActivate = true
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("raidEyes")).gameObject,
					shouldActivate = true
				},
				new GameObjectActivation
				{
					gameObject = ((Component)component8.FindChild("raidWings")).gameObject,
					shouldActivate = true
				}
			};
			val11.Icon = Assets.MainAssetBundle.LoadAsset<Sprite>("skin3");
			val11.MeshReplacements = (MeshReplacement[])(object)new MeshReplacement[0];
			val11.Name = "ORYXBODY_RAID_SKIN_NAME";
			val11.NameToken = "ORYXBODY_RAID_SKIN_NAME";
			val11.RendererInfos = val5.baseRendererInfos;
			val11.RootObject = gameObject;
			val11.UnlockableDef = null;
			SkinDef val12 = Skins.CreateNewSkinDef(val11);
			val6.skins = (SkinDef[])(object)new SkinDef[3] { val8, val10, val12 };
			TeamComponent val13 = null;
			val13 = ((!((Object)(object)characterPrefab.GetComponent<TeamComponent>() != (Object)null)) ? characterPrefab.GetComponent<TeamComponent>() : characterPrefab.GetComponent<TeamComponent>());
			val13.hideAllyCardDisplay = false;
			val13.teamIndex = (TeamIndex)(-1);
			HealthComponent component9 = characterPrefab.GetComponent<HealthComponent>();
			component9.health = 110f;
			component9.shield = 0f;
			component9.barrier = 0f;
			component9.magnetiCharge = 0f;
			characterPrefab.GetComponent<Interactor>().maxInteractionDistance = 3f;
			characterPrefab.GetComponent<InteractionDriver>().highlightInteractor = true;
			SfxLocator component10 = characterPrefab.GetComponent<SfxLocator>();
			component10.deathSound = "Play_ui_player_death";
			component10.barkSound = "";
			component10.openSound = "";
			component10.landingSound = "Play_char_land";
			component10.fallDamageSound = "Play_char_land_fall_damage";
			component10.aliveLoopStart = "";
			component10.aliveLoopStop = "";
			Rigidbody component11 = characterPrefab.GetComponent<Rigidbody>();
			component11.mass = 100f;
			component11.drag = 0f;
			component11.angularDrag = 0f;
			component11.useGravity = false;
			component11.isKinematic = true;
			component11.interpolation = (RigidbodyInterpolation)0;
			component11.collisionDetectionMode = (CollisionDetectionMode)0;
			component11.constraints = (RigidbodyConstraints)0;
			CapsuleCollider component12 = ((Component)component7.FindChild("collider")).GetComponent<CapsuleCollider>();
			((Collider)component12).isTrigger = false;
			((Collider)component12).material = null;
			KinematicCharacterMotor component13 = characterPrefab.GetComponent<KinematicCharacterMotor>();
			component13.CharacterController = (ICharacterController)(object)component3;
			component13.Capsule = component12;
			component13.playerCharacter = true;
			HurtBoxGroup val14 = val.AddComponent<HurtBoxGroup>();
			HurtBox val15 = ((Component)component12).gameObject.AddComponent<HurtBox>();
			((Component)val15).gameObject.layer = LayerIndex.entityPrecise.intVal;
			val15.healthComponent = component9;
			val15.isBullseye = true;
			val15.damageModifier = (DamageModifier)0;
			val15.hurtBoxGroup = val14;
			val15.indexInGroup = 0;
			val14.hurtBoxes = (HurtBox[])(object)new HurtBox[1] { val15 };
			val14.mainHurtBox = val15;
			val14.bullseyeCount = 1;
			AimAnimator val16 = val.AddComponent<AimAnimator>();
			val16.inputBank = component4;
			val16.directionComponent = component;
			val16.pitchRangeMax = 55f;
			val16.pitchRangeMin = -50f;
			val16.yawRangeMin = -44f;
			val16.yawRangeMax = 44f;
			val16.pitchGiveupRange = 30f;
			val16.yawGiveupRange = 10f;
			val16.giveupDuration = 8f;
			FootstepHandler val17 = val.AddComponent<FootstepHandler>();
			val17.baseFootstepString = "Play_player_footstep";
			val17.sprintFootstepOverrideString = "";
			val17.enableFootstepDust = true;
			val17.footstepDustPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/GenericFootstepDust.prefab").WaitForCompletion();
			EntityStateMachine component14 = ((Component)component2).GetComponent<EntityStateMachine>();
			component14.mainStateType = new SerializableEntityStateType(typeof(CharacterMain));
			CharacterDeathBehavior component15 = characterPrefab.GetComponent<CharacterDeathBehavior>();
			component15.deathStateMachine = characterPrefab.GetComponent<EntityStateMachine>();
			component15.deathState = new SerializableEntityStateType(typeof(DeathState));
			EntityStateMachine val18 = characterPrefab.AddComponent<EntityStateMachine>();
			val18.customName = "Dox";
			val18.initialStateType = new SerializableEntityStateType(typeof(Idle));
			val18.mainStateType = new SerializableEntityStateType(typeof(Idle));
			EntityStateMachine val19 = characterPrefab.AddComponent<EntityStateMachine>();
			val19.customName = "Take";
			val19.initialStateType = new SerializableEntityStateType(typeof(Idle));
			val19.mainStateType = new SerializableEntityStateType(typeof(Idle));
			NetworkStateMachine component16 = ((Component)component2).GetComponent<NetworkStateMachine>();
			List<EntityStateMachine> list = component16.stateMachines.ToList();
			list.Add(val18);
			list.Add(val19);
			component16.stateMachines = list.ToArray();
			Utils.CreateHitbox("Slash", component7.FindChild("swordMuzzle"), new Vector3(8.5f, 8.5f, 9f));
			ContentAddition.AddBody(characterPrefab);
		}

		private void RegisterCharacter()
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = PrefabAPI.InstantiateClone(((Component)characterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "OryxDisplay", true);
			val.transform.localScale = Vector3.one * 0.45f;
			val.AddComponent<NetworkIdentity>();
			val.AddComponent<IntroParticle>();
			string text = "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > ";
			string text2 = "..and so he left.";
			string text3 = "..and so he vanished.";
			LanguageAPI.Add("ORYX_NAME", "Oryx");
			LanguageAPI.Add("ORYX_DESCRIPTION", text);
			LanguageAPI.Add("ORYX_SUBTITLE", "Taken King");
			LanguageAPI.Add("ORYX_OUTRO", text2);
			LanguageAPI.Add("ORYX_FAIL", text3);
			SurvivorDef val2 = ScriptableObject.CreateInstance<SurvivorDef>();
			val2.cachedName = "ORYX_NAME";
			val2.unlockableDef = null;
			val2.descriptionToken = "ORYX_DESCRIPTION";
			val2.primaryColor = characterColor;
			val2.bodyPrefab = characterPrefab;
			val2.displayPrefab = val;
			val2.outroFlavorToken = "ORYX_OUTRO";
			val2.desiredSortPosition = 9f;
			val2.mainEndingEscapeFailureFlavorToken = "ORYX_FAIL";
			ContentAddition.AddSurvivorDef(val2);
			SkillSetup();
			GameObject val3 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoMonsterMaster.prefab").WaitForCompletion(), "OryxMaster", true);
			ContentAddition.AddMaster(val3);
			CharacterMaster component = val3.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)
			bool flag = default(bool);
			ContentAddition.AddEntityState<Primary>(ref flag);
			ContentAddition.AddEntityState<PrimaryEnd>(ref flag);
			ContentAddition.AddEntityState<SecondaryStart>(ref flag);
			ContentAddition.AddEntityState<Secondary>(ref flag);
			ContentAddition.AddEntityState<SecondaryEnd>(ref flag);
			ContentAddition.AddEntityState<Utility>(ref flag);
			ContentAddition.AddEntityState<UtilityFire>(ref flag);
			ContentAddition.AddEntityState<Special>(ref flag);
			ContentAddition.AddEntityState<CharacterMain>(ref flag);
			OrbAPI.AddOrb(typeof(OryxConsumeOrb));
		}

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

		private void PassiveSetup()
		{
			SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
			LanguageAPI.Add("ORYX_PASSIVE_NAME", "King's Decree");
			LanguageAPI.Add("ORYX_PASSIVE_DESCRIPTION", "All Enemies within a <style=cIsUtility>" + passiveRadius.Value + "m</style> radius are <style=cIsDamage>suppressed</style>, being <style=cIsDamage>stunned</style> and afflicted by <style=cKeywordName><style=cIsDamage>Blight</style></style><style=cSub> every <style=cIsUtility>" + passiveStunInterval.Value + "s</style>.");
			LanguageAPI.Add("ORYX_PASSIVE_KEYWORD", "<style=cKeywordName><style=cIsDamage>Blight</style></style><style=cSub>Deals <style=cIsDamage>" + passiveDamage.Value + "% damage</style> every second and heals Oryx for the same amount.");
			component.passiveSkill.enabled = true;
			component.passiveSkill.skillNameToken = "ORYX_PASSIVE_NAME";
			component.passiveSkill.skillDescriptionToken = "ORYX_PASSIVE_DESCRIPTION";
			component.passiveSkill.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("passive");
			component.passiveSkill.keywordToken = "ORYX_PASSIVE_KEYWORD";
		}

		private void PrimarySetup()
		{
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Expected O, but got Unknown
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
			LanguageAPI.Add("ORYX_M1", "Willbreaker");
			LanguageAPI.Add("ORYX_M1_DESCRIPTION", "Oryx slashes his sword dealing <style=cIsDamage>" + primaryDamage.Value * 100f + "% damage</style> to all enemies in a 45 degree range. Kills with his sword add a permanent buff increasing damage by " + primaryBuff.Value * 100f + "% per kill.");
			SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
			val.activationState = new SerializableEntityStateType(typeof(Primary));
			val.activationStateMachineName = "Weapon";
			val.baseMaxStock = 0;
			val.baseRechargeInterval = 0f;
			val.beginSkillCooldownOnSkillEnd = true;
			val.canceledFromSprinting = false;
			val.fullRestockOnAssign = true;
			val.interruptPriority = (InterruptPriority)0;
			val.isCombatSkill = true;
			val.mustKeyPress = false;
			val.cancelSprintingOnActivation = true;
			val.rechargeStock = 0;
			val.requiredStock = 0;
			val.stockToConsume = 0;
			val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("m1");
			val.skillDescriptionToken = "ORYX_M1_DESCRIPTION";
			val.skillName = "ORYX_M1";
			val.skillNameToken = "ORYX_M1";
			ContentAddition.AddSkillDef(val);
			component.primary = characterPrefab.AddComponent<GenericSkill>();
			SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>();
			val2.variants = (Variant[])(object)new Variant[1];
			Reflection.SetFieldValue<SkillFamily>((object)component.primary, "_skillFamily", val2);
			SkillFamily skillFamily = component.primary.skillFamily;
			Variant[] variants = skillFamily.variants;
			Variant val3 = new Variant
			{
				skillDef = val
			};
			((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null);
			variants[0] = val3;
			ContentAddition.AddSkillFamily(skillFamily);
		}

		private void SecondarySetup()
		{
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Expected O, but got Unknown
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
			LanguageAPI.Add("ORYX_M2", "Taken Blight");
			LanguageAPI.Add("ORYX_M2_DESCRIPTION", "Oryx spawns a taken blight, Debuffs all enemies with Blight, siphons HP from enemies within the AOE of the blight and convert it to <style=cIsHealing>heals</style> for oryx. Enemies are sucked into the blight when in close proximity. All Enemies Killed in the blight adds a permanent buff increasing <style=cIsHealth>health</style> by " + secondaryBuff.Value + " per kill.");
			SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
			val.activationState = new SerializableEntityStateType(typeof(SecondaryStart));
			val.activationStateMachineName = "Weapon";
			val.baseMaxStock = secondaryStock.Value;
			val.baseRechargeInterval = secondaryCD.Value;
			val.beginSkillCooldownOnSkillEnd = true;
			val.canceledFromSprinting = false;
			val.fullRestockOnAssign = false;
			val.interruptPriority = (InterruptPriority)0;
			val.isCombatSkill = true;
			val.mustKeyPress = true;
			val.cancelSprintingOnActivation = false;
			val.rechargeStock = 1;
			val.requiredStock = 1;
			val.stockToConsume = 1;
			val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("m2");
			val.skillDescriptionToken = "ORYX_M2_DESCRIPTION";
			val.skillName = "ORYX_M2";
			val.skillNameToken = "ORYX_M2";
			ContentAddition.AddSkillDef(val);
			component.secondary = characterPrefab.AddComponent<GenericSkill>();
			SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>();
			val2.variants = (Variant[])(object)new Variant[1];
			Reflection.SetFieldValue<SkillFamily>((object)component.secondary, "_skillFamily", val2);
			SkillFamily skillFamily = component.secondary.skillFamily;
			Variant[] variants = skillFamily.variants;
			Variant val3 = new Variant
			{
				skillDef = val
			};
			((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null);
			variants[0] = val3;
			ContentAddition.AddSkillFamily(skillFamily);
		}

		private void UtilitySetup()
		{
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Expected O, but got Unknown
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
			LanguageAPI.Add("ORYX_UTIL", "Doxology");
			LanguageAPI.Add("ORYX_UTIL_DESCRIPTION", "Oryx drains the life of all enemies in the phase and inflicts an irrevocable <style=cDeath>death</style> upon them all. All enemies killed by this ability grant Grasp of the King. At <style=cIsUtilityh>" + utilityMinStacks.Value + "</style> stacks of Grasp Of the King, deny death, <style=cIsHealing>reviving</style> himself at full <style=cIsHealth>health</style>, and <style=cIsUtilityh>resets the cooldown</style> of Doxology. Stacks reset upon leaving the stage.");
			SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
			val.activationState = new SerializableEntityStateType(typeof(Utility));
			val.activationStateMachineName = "Weapon";
			val.baseMaxStock = utilityStock.Value;
			val.baseRechargeInterval = utilityCD.Value;
			val.beginSkillCooldownOnSkillEnd = true;
			val.canceledFromSprinting = false;
			val.fullRestockOnAssign = false;
			val.interruptPriority = (InterruptPriority)0;
			val.isCombatSkill = false;
			val.mustKeyPress = true;
			val.cancelSprintingOnActivation = false;
			val.rechargeStock = 1;
			val.requiredStock = 1;
			val.stockToConsume = 1;
			val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("utility");
			val.skillDescriptionToken = "ORYX_UTIL_DESCRIPTION";
			val.skillName = "ORYX_UTIL";
			val.skillNameToken = "ORYX_UTIL";
			ContentAddition.AddSkillDef(val);
			component.utility = characterPrefab.AddComponent<GenericSkill>();
			SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>();
			val2.variants = (Variant[])(object)new Variant[1];
			Reflection.SetFieldValue<SkillFamily>((object)component.utility, "_skillFamily", val2);
			SkillFamily skillFamily = component.utility.skillFamily;
			Variant[] variants = skillFamily.variants;
			Variant val3 = new Variant
			{
				skillDef = val
			};
			((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null);
			variants[0] = val3;
			ContentAddition.AddSkillFamily(skillFamily);
		}

		private void SpecialSetup()
		{
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Expected O, but got Unknown
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
			SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
			LanguageAPI.Add("ORYX_SPEC", "Take");
			LanguageAPI.Add("ORYX_SPEC_DESCRIPTION", "Erases other beings from existence and brings them back empowered and possessed by the darkness, totally subservient to the will of Oryx. For every enemy he consumes, he gains <style=cIsHealth>" + specialHPBuff.Value + " health</style>. For every use, he gains <style=cIsDamage>" + specialDamageBuff.Value * 100f + "%</style> damage and <style=cIsDamage>" + specialMovementSpeedBuff.Value * 100f + "%</style> movement speed. Stacks reset upon leaving the stage.");
			SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
			val.activationState = new SerializableEntityStateType(typeof(Special));
			val.activationStateMachineName = "Weapon";
			val.baseMaxStock = specialStock.Value;
			val.baseRechargeInterval = specialCD.Value;
			val.beginSkillCooldownOnSkillEnd = true;
			val.canceledFromSprinting = false;
			val.fullRestockOnAssign = false;
			val.interruptPriority = (InterruptPriority)0;
			val.isCombatSkill = true;
			val.mustKeyPress = true;
			val.cancelSprintingOnActivation = false;
			val.rechargeStock = 1;
			val.requiredStock = 1;
			val.stockToConsume = 1;
			val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("special");
			val.skillDescriptionToken = "ORYX_SPEC_DESCRIPTION";
			val.skillName = "ORYX_SPEC";
			val.skillNameToken = "ORYX_SPEC";
			ContentAddition.AddSkillDef(val);
			component.special = characterPrefab.AddComponent<GenericSkill>();
			SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>();
			val2.variants = (Variant[])(object)new Variant[1];
			Reflection.SetFieldValue<SkillFamily>((object)component.special, "_skillFamily", val2);
			SkillFamily skillFamily = component.special.skillFamily;
			Variant[] variants = skillFamily.variants;
			Variant val3 = new Variant
			{
				skillDef = val
			};
			((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null);
			variants[0] = val3;
			ContentAddition.AddSkillFamily(skillFamily);
		}
	}
	internal class Prefabs
	{
		internal static BuffDef takenBuff;

		internal static BuffDef blightDebuff;

		internal static BuffDef graspBuff;

		internal static BuffDef minionBuff;

		internal static GameObject slashRFX;

		internal static GameObject slashLFX;

		internal static GameObject orbConsumeVFX;

		internal static GameObject echoVFX;

		internal static GameObject graspKillVFX;

		internal static GameObject explosionFX;

		internal static GameObject chargeFX;

		internal static GameObject takeFX;

		internal static GameObject doxologyExplosionFX;

		internal static GameObject swingHitFX;

		internal static GameObject blightOrb;

		internal static GameObject blightHitFX;

		internal static GameObject blightAreaIndicator;

		internal static ItemDef dmgBuff { get; set; }

		internal static ItemDef hpBuff { get; set; }

		internal static void CreatePrefabs()
		{
			//IL_0021: 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_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_021f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Expected O, but got Unknown
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_027e: Expected O, but got Unknown
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			//IL_0283: Expected O, but got Unknown
			//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d0: Expected O, but got Unknown
			//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0300: Expected O, but got Unknown
			//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0305: Expected O, but got Unknown
			//IL_035d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0362: 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_03cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0404: 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_0427: Unknown result type (might be due to invalid IL or missing references)
			//IL_042c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0451: Unknown result type (might be due to invalid IL or missing references)
			//IL_0456: Unknown result type (might be due to invalid IL or missing references)
			//IL_0499: Unknown result type (might be due to invalid IL or missing references)
			//IL_04aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0533: Unknown result type (might be due to invalid IL or missing references)
			//IL_053d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0578: Unknown result type (might be due to invalid IL or missing references)
			//IL_057d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0616: Unknown result type (might be due to invalid IL or missing references)
			//IL_061b: Unknown result type (might be due to invalid IL or missing references)
			//IL_066b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0670: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_070e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0713: Unknown result type (might be due to invalid IL or missing references)
			blightDebuff = ScriptableObject.CreateInstance<BuffDef>();
			((Object)blightDebuff).name = "Blight";
			blightDebuff.buffColor = Color.white;
			blightDebuff.canStack = true;
			blightDebuff.iconSprite = Assets.MainAssetBundle.LoadAsset<Sprite>("blightDebuff");
			blightDebuff.isCooldown = false;
			blightDebuff.isDebuff = true;
			blightDebuff.isHidden = false;
			blightDebuff.startSfx = null;
			ContentAddition.AddBuffDef(blightDebuff);
			graspBuff = ScriptableObject.CreateInstance<BuffDef>();
			((Object)graspBuff).name = "Grasp of the King";
			graspBuff.buffColor = new Color(0.25f, 0.25f, 0.25f);
			graspBuff.canStack = true;
			graspBuff.iconSprite = null;
			graspBuff.isCooldown = false;
			graspBuff.isDebuff = false;
			graspBuff.isHidden = false;
			graspBuff.startSfx = null;
			ContentAddition.AddBuffDef(graspBuff);
			minionBuff = ScriptableObject.CreateInstance<BuffDef>();
			((Object)minionBuff).name = "Echo";
			minionBuff.buffColor = Color.black;
			minionBuff.canStack = false;
			minionBuff.iconSprite = null;
			minionBuff.isCooldown = false;
			minionBuff.isDebuff = false;
			minionBuff.isHidden = false;
			minionBuff.startSfx = null;
			ContentAddition.AddBuffDef(minionBuff);
			takenBuff = ScriptableObject.CreateInstance<BuffDef>();
			((Object)takenBuff).name = "The Taken King";
			takenBuff.buffColor = Color.black;
			takenBuff.canStack = true;
			takenBuff.iconSprite = null;
			takenBuff.isCooldown = false;
			takenBuff.isDebuff = false;
			takenBuff.isHidden = false;
			takenBuff.startSfx = null;
			ContentAddition.AddBuffDef(takenBuff);
			dmgBuff = ScriptableObject.CreateInstance<ItemDef>();
			dmgBuff.canRemove = false;
			dmgBuff.deprecatedTier = (ItemTier)5;
			dmgBuff.hidden = true;
			((Object)dmgBuff).name = "ORYX_DMGBUFFITEM";
			dmgBuff.pickupModelPrefab = new GameObject();
			ItemDef obj = dmgBuff;
			ItemTag[] array = new ItemTag[5];
			RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			obj.tags = (ItemTag[])(object)array;
			ItemAPI.Add(new CustomItem(dmgBuff, new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>())));
			hpBuff = ScriptableObject.CreateInstance<ItemDef>();
			hpBuff.canRemove = false;
			hpBuff.deprecatedTier = (ItemTier)5;
			hpBuff.hidden = true;
			((Object)hpBuff).name = "ORYX_HPBUFFITEM";
			hpBuff.pickupModelPrefab = new GameObject();
			ItemDef obj2 = hpBuff;
			ItemTag[] array2 = new ItemTag[5];
			RuntimeHelpers.InitializeArray(array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			obj2.tags = (ItemTag[])(object)array2;
			ItemAPI.Add(new CustomItem(hpBuff, new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>())));
			slashRFX = Assets.MainAssetBundle.LoadAsset<GameObject>("SlashFXR");
			Utils.RegisterEffect(slashRFX, 1f);
			slashLFX = Assets.MainAssetBundle.LoadAsset<GameObject>("SlashFXL");
			Utils.RegisterEffect(slashLFX, 1f);
			blightHitFX = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidBarnacle/VoidBarnacleImpactExplosion.prefab").WaitForCompletion(), "OryxBlightHitFX", false);
			Utils.RegisterEffect(blightHitFX, 1f, "Play_Oryx_Dot");
			swingHitFX = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/OmniImpactVFXHuntress.prefab").WaitForCompletion(), "OryxHitFX", false);
			Utils.RegisterEffect(swingHitFX, 1f, "Play_Oryx_SwingHit");
			GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/moon2/BloodSiphonNearbyAttachment.prefab").WaitForCompletion();
			blightOrb = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab").WaitForCompletion(), "OryxBlightOrb", true);
			Utils.CopyComponent<SphereCollider>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Blackhole/GravSphere.prefab").WaitForCompletion().GetComponent<SphereCollider>(), blightOrb);
			TetherVfxOrigin val2 = Utils.CopyComponent<TetherVfxOrigin>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Blackhole/GravSphere.prefab").WaitForCompletion().GetComponent<TetherVfxOrigin>(), blightOrb);
			val2.tetherPrefab = null;
			Utils.CopyComponent<RadialForce>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Blackhole/GravSphere.prefab").WaitForCompletion().GetComponent<RadialForce>(), blightOrb).tetherVfxOrigin = val2;
			GameObject val3 = Object.Instantiate<GameObject>(Assets.MainAssetBundle.LoadAsset<GameObject>("orbVFX"), blightOrb.transform);
			val3.transform.localPosition = Vector3.zero;
			val3.transform.localScale = Vector3.one * 2f;
			Transform[] componentsInChildren = val3.GetComponentsInChildren<Transform>();
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				((Component)componentsInChildren[i]).gameObject.AddComponent<TexScroll>();
			}
			Object.Destroy((Object)(object)blightOrb.GetComponentInChildren<MeshRenderer>());
			blightOrb.AddComponent<NetworkIdentity>();
			blightOrb.AddComponent<ProjectileController>();
			blightOrb.AddComponent<ProjectileSimple>().lifetime = 8f;
			blightOrb.transform.localScale = Vector3.one * 8f;
			OryxSiphonController oryxSiphonController = blightOrb.AddComponent<OryxSiphonController>();
			ContentAddition.AddProjectile(blightOrb);
			orbConsumeVFX = Assets.MainAssetBundle.LoadAsset<GameObject>("takeConsumeVFX");
			Utils.CopyComponent<OrbEffect>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/NovaOnHeal/DevilOrbEffect.prefab").WaitForCompletion().GetComponent<OrbEffect>(), orbConsumeVFX);
			Utils.RegisterEffect(orbConsumeVFX, 99f);
			echoVFX = Assets.MainAssetBundle.LoadAsset<GameObject>("echoVFX");
			Utils.RegisterEffect(echoVFX, 2.2f);
			graspKillVFX = Assets.MainAssetBundle.LoadAsset<GameObject>("graspKillVFX");
			Utils.RegisterEffect(graspKillVFX, 2f);
			doxologyExplosionFX = Assets.MainAssetBundle.LoadAsset<GameObject>("doxologyExplosion");
			Utils.CopyComponent<ShakeEmitter>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Brother/BrotherDashEffect.prefab").WaitForCompletion().GetComponent<ShakeEmitter>(), doxologyExplosionFX).duration = 99f;
			Utils.RegisterEffect(doxologyExplosionFX, 1.25f);
			explosionFX = Assets.MainAssetBundle.LoadAsset<GameObject>("OrbExplosionFX");
			Utils.CopyComponent<ShakeEmitter>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Brother/BrotherDashEffect.prefab").WaitForCompletion().GetComponent<ShakeEmitter>(), explosionFX).duration = 99f;
			Utils.RegisterEffect(explosionFX, 0.75f);
			chargeFX = Assets.MainAssetBundle.LoadAsset<GameObject>("ChargeOrbFX");
			takeFX = Assets.MainAssetBundle.LoadAsset<GameObject>("TakeFX");
			blightAreaIndicator = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab").WaitForCompletion(), "OryxBlightAreaIndicator", false);
			MeshRenderer[] componentsInChildren2 = blightAreaIndicator.GetComponentsInChildren<MeshRenderer>();
			for (int j = 0; j < componentsInChildren2.Length; j++)
			{
				((Renderer)componentsInChildren2[j]).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/VoidMegaCrab/matVoidCrabAntiMatterAreaIndicator.mat").WaitForCompletion();
			}
		}
	}
	internal class DeathState : GenericCharacterDeath
	{
		public override void OnEnter()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			((GenericCharacterDeath)this).OnEnter();
			((EntityState)this).PlayAnimation("Gesture, O