Decompiled source of Void Reaver v0.6.10

VoidReaver.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
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.GlobalSkills.LunarNeedle;
using EntityStates.Huntress;
using EntityStates.ImpMonster;
using EntityStates.Missions.Arena.NullWard;
using EntityStates.NullifierMonster;
using FubukiMods.Modules;
using HG.BlendableTypes;
using KinematicCharacterController;
using Microsoft.CodeAnalysis;
using On.EntityStates;
using On.RoR2.Skills;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.Projectile;
using RoR2.Skills;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("VoidReaver")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("VoidReaver")]
[assembly: AssemblyTitle("VoidReaver")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace FubukiMods
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.Fubuki.VoidReaver", "Void Reaver Survivor", "0.6.10")]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	public class MainPlugin : BaseUnityPlugin
	{
		public static GameObject voidPrimaryProjectile;

		public static GameObject voidSecondaryProjectile;

		public static GameObject voidSpecialProjectile;

		public static ConfigEntry<float> configDamage { get; set; }

		public static ConfigEntry<float> configMaxHealth { get; set; }

		public static ConfigEntry<float> configArmor { get; set; }

		public static ConfigEntry<float> configRegen { get; set; }

		public static ConfigEntry<float> configMoveSpeed { get; set; }

		public static ConfigEntry<float> configAttackSpeed { get; set; }

		public static ConfigEntry<bool> configLunarSkills { get; set; }

		public static ConfigEntry<float> configLunarPrimaryScale { get; set; }

		public static ConfigEntry<float> configLunarUtilityScale { get; set; }

		public static ConfigEntry<float> configPrimaryDamage { get; set; }

		public static ConfigEntry<int> configPrimaryBullets { get; set; }

		public static ConfigEntry<float> configAltPrimaryDamage { get; set; }

		public static ConfigEntry<float> configAltPrimaryHSpread { get; set; }

		public static ConfigEntry<float> configSecondaryDamage { get; set; }

		public static ConfigEntry<float> configSecondaryCooldown { get; set; }

		public static ConfigEntry<int> configSecondaryStock { get; set; }

		public static ConfigEntry<float> configSecondaryRadius { get; set; }

		public static ConfigEntry<float> configSpecialDamage { get; set; }

		public static ConfigEntry<float> configSpecialCooldown { get; set; }

		public static ConfigEntry<float> configSpecialSelfDamage { get; set; }

		public static ConfigEntry<bool> configSpecialProtection { get; set; }

		public void Awake()
		{
			//IL_02b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_0307: Unknown result type (might be due to invalid IL or missing references)
			//IL_034c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0351: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_041d: 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_04ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b2: Unknown result type (might be due to invalid IL or missing references)
			configDamage = ((BaseUnityPlugin)this).Config.Bind<float>("0. Base Stats", "Damage", 12f, "Base damage value.");
			configMaxHealth = ((BaseUnityPlugin)this).Config.Bind<float>("0. Base Stats", "Max Health", 160f, "Base maximum health value.");
			configArmor = ((BaseUnityPlugin)this).Config.Bind<float>("0. Base Stats", "Armor", 12f, "Base armor value.");
			configRegen = ((BaseUnityPlugin)this).Config.Bind<float>("0. Base Stats", "Regen", 1f, "Health reneration scale.");
			configMoveSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("0. Base Stats", "Move Speed", 7f, "Base movement speed.");
			configAttackSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("0. Base Stats", "Attack Speed", 1f, "Base attack speed scale.");
			configLunarSkills = ((BaseUnityPlugin)this).Config.Bind<bool>("L. Lunar Item Skills", "Enable Classic Lunar Item Skills", false, "Enables the old skills Void Reaver used before Heretic was released.");
			configPrimaryDamage = ((BaseUnityPlugin)this).Config.Bind<float>("1. Primary", "Void Impulse Damage Scale", 1f, "Damage scale.");
			configPrimaryBullets = ((BaseUnityPlugin)this).Config.Bind<int>("1. Primary", "Void Impulse Bullet Count", 3, "The starting number of bullets.");
			configAltPrimaryDamage = ((BaseUnityPlugin)this).Config.Bind<float>("1a. Alt Primary", "Void Sweep Damage Scale", 1f, "Damage scale.");
			configAltPrimaryHSpread = ((BaseUnityPlugin)this).Config.Bind<float>("1a. Alt Primary", "Void Sweep Horizontal Spread", 1f, "Horizontal spread scale.");
			configSecondaryDamage = ((BaseUnityPlugin)this).Config.Bind<float>("2. Secondary", "Void Bombs Damage Scale", 1f, "Explosion damage per bomb.");
			configSecondaryCooldown = ((BaseUnityPlugin)this).Config.Bind<float>("2. Secondary", "Void Bombs Cooldown", 5f, "Secondary skill cooldown (in seconds).");
			configSecondaryStock = ((BaseUnityPlugin)this).Config.Bind<int>("2. Secondary", "Void Bombs Stock", 6, "How many void bombs spawn per skill use.");
			configSecondaryRadius = ((BaseUnityPlugin)this).Config.Bind<float>("2. Secondary", "Void Bombs Spread", 12f, "Bomb placement radius.");
			configSpecialDamage = ((BaseUnityPlugin)this).Config.Bind<float>("4. Special", "Reave Damage Scale", 1f, "Explosion damage scale.");
			configSpecialCooldown = ((BaseUnityPlugin)this).Config.Bind<float>("4. Special", "Reave Cooldown", 30f, "Special skill cooldown (in seconds).");
			configSpecialSelfDamage = ((BaseUnityPlugin)this).Config.Bind<float>("4. Special", "Reave Self Damage Percent", 0.5f, "How much HP is removed on explosion (0.1 = 10%, 0.5 = 50%, 1 = 100%)");
			configSpecialProtection = ((BaseUnityPlugin)this).Config.Bind<bool>("4. Special", "Reave Protection", true, "Enable invincibility while in exploding animation.");
			voidPrimaryProjectile = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/LunarSkillReplacements/LunarNeedleProjectile.prefab").WaitForCompletion(), "FubukiMods/VoidPrimary", true);
			voidPrimaryProjectile.GetComponent<ProjectileController>().ghostPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorBlaster1Ghost.prefab").WaitForCompletion();
			((ProjectileExplosion)voidPrimaryProjectile.GetComponent<ProjectileImpactExplosion>()).explosionEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Nullifier/NullifierBombProjectile.prefab").WaitForCompletion();
			voidPrimaryProjectile.GetComponent<ProjectileImpactExplosion>().lifetimeAfterImpact = 0.2f;
			((ProjectileExplosion)voidPrimaryProjectile.GetComponent<ProjectileImpactExplosion>()).blastDamageCoefficient = 1f;
			ContentAddition.AddProjectile(voidPrimaryProjectile);
			voidSecondaryProjectile = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Nullifier/NullifierPreBombProjectile.prefab").WaitForCompletion(), "FubukiMods/VoidSecondary");
			((ProjectileExplosion)voidSecondaryProjectile.GetComponent<ProjectileImpactExplosion>()).blastProcCoefficient = 1f;
			((ProjectileExplosion)voidSecondaryProjectile.GetComponent<ProjectileImpactExplosion>()).blastDamageCoefficient = 1f;
			voidSecondaryProjectile.GetComponent<ProjectileController>().procCoefficient = 1f;
			voidSecondaryProjectile.GetComponent<ProjectileDamage>().damageType = DamageTypeCombo.op_Implicit((DamageType)32768);
			voidSecondaryProjectile.GetComponent<ProjectileImpactExplosion>().lifetime = 0.75f;
			voidSecondaryProjectile.GetComponent<ProjectileImpactExplosion>().lifetimeRandomOffset = 0.25f;
			ContentAddition.AddProjectile(voidSecondaryProjectile);
			voidSpecialProjectile = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Nullifier/NullifierDeathBombProjectile.prefab").WaitForCompletion(), "FubukiMods/VoidSpecial", true);
			voidSpecialProjectile.GetComponent<ProjectileExplosion>().blastAttackerFiltering = (AttackerFiltering)2;
			voidSpecialProjectile.GetComponent<ProjectileExplosion>().blastDamageCoefficient = 1f;
			voidSpecialProjectile.GetComponent<ProjectileExplosion>().blastProcCoefficient = 1f;
			voidSpecialProjectile.GetComponent<ProjectileExplosion>().totalDamageMultiplier = 1f;
			ProjectileExplosion component = voidSpecialProjectile.GetComponent<ProjectileExplosion>();
			component.blastRadius *= 0.75f;
			voidSpecialProjectile.GetComponent<ProjectileDamage>().damage = 1f;
			voidSpecialProjectile.GetComponent<ProjectileDamage>().damageColorIndex = (DamageColorIndex)9;
			voidSpecialProjectile.GetComponent<ProjectileDamage>().damageType = DamageTypeCombo.op_Implicit((DamageType)33554432);
			voidSpecialProjectile.GetComponent<ProjectileImpactExplosion>().lifetime = 2.5f;
			ContentAddition.AddProjectile(voidSpecialProjectile);
			Survivors.Init();
		}
	}
}
namespace FubukiMods.Modules
{
	internal static class Skills
	{
		public class VoidPrimary : BaseState
		{
			private GameObject projectile = MainPlugin.voidPrimaryProjectile;

			private float baseDuration = 1f;

			private float duration;

			private float spread = 0.6f;

			private float recoil = 0f;

			private int bulletIndex = 0;

			private int maxBullets = MainPlugin.configPrimaryBullets.Value;

			private float damage = 0.5f * MainPlugin.configPrimaryDamage.Value;

			public override void OnEnter()
			{
				((BaseState)this).OnEnter();
				duration = baseDuration;
				((BaseState)this).StartAimMode(2f, false);
				if (!((EntityState)this).isAuthority)
				{
					Util.PlaySound(FireLunarNeedle.fireSound, ((EntityState)this).gameObject);
				}
			}

			public override void FixedUpdate()
			{
				//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)
				//IL_0087: 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_00bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
				//IL_010a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0123: Unknown result type (might be due to invalid IL or missing references)
				//IL_015f: Unknown result type (might be due to invalid IL or missing references)
				((EntityState)this).FixedUpdate();
				if (((EntityState)this).isAuthority && (double)bulletIndex < Math.Round((float)maxBullets * base.attackSpeedStat) && (double)((EntityState)this).fixedAge >= (double)duration * (0.1 / (double)base.attackSpeedStat) * (double)bulletIndex)
				{
					float num = spread * (float)bulletIndex;
					Ray aimRay = ((BaseState)this).GetAimRay();
					((Ray)(ref aimRay)).direction = Util.ApplySpread(((Ray)(ref aimRay)).direction, 0f * num, 0.2f * num, 1f * num, 1f * num, 0f, 0f);
					FireProjectileInfo val = default(FireProjectileInfo);
					val.position = ((Ray)(ref aimRay)).origin;
					val.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction);
					val.crit = ((BaseState)this).RollCrit();
					val.damage = base.damageStat * damage;
					val.damageColorIndex = (DamageColorIndex)0;
					val.owner = ((EntityState)this).gameObject;
					val.procChainMask = default(ProcChainMask);
					val.force = 0f;
					val.useFuseOverride = false;
					val.useSpeedOverride = false;
					val.target = null;
					val.projectilePrefab = projectile;
					ProjectileManager.instance.FireProjectile(val);
					((BaseState)this).AddRecoil(-0.4f * recoil, -0.8f * recoil, -0.3f * recoil, 0.3f * recoil);
					Util.PlaySound(FireLunarNeedle.fireSound, ((EntityState)this).gameObject);
					bulletIndex++;
				}
				if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration)
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
			}

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

			public override InterruptPriority GetMinimumInterruptPriority()
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				return (InterruptPriority)1;
			}
		}

		public class VoidAltPrimary : BaseState
		{
			private GameObject projectile = MainPlugin.voidPrimaryProjectile;

			private float baseDuration = 1f;

			private float duration;

			private float damage = 0.5f * MainPlugin.configAltPrimaryDamage.Value;

			public override void OnEnter()
			{
				//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_00a6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
				//IL_0104: Unknown result type (might be due to invalid IL or missing references)
				//IL_010d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0112: Unknown result type (might be due to invalid IL or missing references)
				//IL_0117: Unknown result type (might be due to invalid IL or missing references)
				//IL_0140: Unknown result type (might be due to invalid IL or missing references)
				//IL_0159: Unknown result type (might be due to invalid IL or missing references)
				//IL_0195: Unknown result type (might be due to invalid IL or missing references)
				((BaseState)this).OnEnter();
				duration = baseDuration / base.attackSpeedStat;
				((BaseState)this).StartAimMode(2f, false);
				Util.PlayAttackSpeedSound(FireLunarNeedle.fireSound, ((EntityState)this).gameObject, 0.75f);
				Util.PlayAttackSpeedSound(FireLunarNeedle.fireSound, ((EntityState)this).gameObject, 1f);
				Util.PlayAttackSpeedSound(FireLunarNeedle.fireSound, ((EntityState)this).gameObject, 1.25f);
				if (((EntityState)this).isAuthority)
				{
					float num = -8f * MainPlugin.configAltPrimaryHSpread.Value;
					int i = 0;
					float num2 = 0.25f;
					int num3 = 1;
					for (; i < 5; i++)
					{
						Ray aimRay = ((BaseState)this).GetAimRay();
						((Ray)(ref aimRay)).direction = Util.ApplySpread(((Ray)(ref aimRay)).direction, 0f * (float)num3, 0.2f * (float)num3, 1f * (float)num3, 1f * (float)num3, num, 0f);
						num += 4f * MainPlugin.configAltPrimaryHSpread.Value;
						FireProjectileInfo val = default(FireProjectileInfo);
						val.position = ((Ray)(ref aimRay)).origin;
						val.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction);
						val.crit = ((BaseState)this).RollCrit();
						val.damage = base.damageStat * damage;
						val.damageColorIndex = (DamageColorIndex)0;
						val.owner = ((EntityState)this).gameObject;
						val.procChainMask = default(ProcChainMask);
						val.force = 0f;
						val.useFuseOverride = false;
						val.useSpeedOverride = false;
						val.target = null;
						val.projectilePrefab = projectile;
						ProjectileManager.instance.FireProjectile(val);
						((BaseState)this).AddRecoil(-0.4f * num2, -0.8f * num2, -0.3f * num2, 0.3f * num2);
					}
				}
			}

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

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

			public override InterruptPriority GetMinimumInterruptPriority()
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				return (InterruptPriority)1;
			}
		}

		public class VoidSecondary : BaseState
		{
			private float duration;

			private float totalDuration = 0.5f;

			private float maxDistance = 200f;

			private float baseRandRadius = MainPlugin.configSecondaryRadius.Value;

			private float randRadius;

			private int baseBombCount = MainPlugin.configSecondaryStock.Value;

			private int bombCount;

			private float bombDamage = 3f * MainPlugin.configSecondaryDamage.Value;

			private Ray aimRay;

			private GameObject areaSphere;

			private GameObject myProjectile = MainPlugin.voidSecondaryProjectile;

			public override void OnEnter()
			{
				//IL_0068: Unknown result type (might be due to invalid IL or missing references)
				//IL_0073: Unknown result type (might be due to invalid IL or missing references)
				((BaseState)this).OnEnter();
				randRadius = baseRandRadius * (0.75f + base.attackSpeedStat * 0.25f);
				bombCount = (int)Math.Round(base.attackSpeedStat * (float)baseBombCount);
				if (((EntityState)this).isAuthority)
				{
					areaSphere = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab);
					areaSphere.transform.localScale = Vector3.one * randRadius;
				}
				duration = totalDuration / base.attackSpeedStat;
				Util.PlaySound(((EntityState)this).sfxLocator.barkSound, ((EntityState)this).gameObject);
			}

			public override void Update()
			{
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_0038: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
				//IL_005a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0072: Unknown result type (might be due to invalid IL or missing references)
				//IL_0088: Unknown result type (might be due to invalid IL or missing references)
				//IL_0093: Unknown result type (might be due to invalid IL or missing references)
				((EntityState)this).Update();
				if (((EntityState)this).isAuthority)
				{
					RaycastHit val = default(RaycastHit);
					if (Physics.Raycast(((BaseState)this).GetAimRay(), ref val, maxDistance, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)))
					{
						areaSphere.transform.position = ((RaycastHit)(ref val)).point;
						areaSphere.transform.up = ((RaycastHit)(ref val)).normal;
						areaSphere.transform.localScale = Vector3.one * randRadius;
					}
					else
					{
						areaSphere.transform.localScale = Vector3.zero;
					}
				}
			}

			public override void FixedUpdate()
			{
				//IL_003e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0043: Unknown result type (might be due to invalid IL or missing references)
				//IL_0049: 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_0077: 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_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)
				//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
				//IL_0096: Unknown result type (might be due to invalid IL or missing references)
				//IL_009b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0110: Unknown result type (might be due to invalid IL or missing references)
				//IL_0112: Unknown result type (might be due to invalid IL or missing references)
				//IL_012d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0132: Unknown result type (might be due to invalid IL or missing references)
				//IL_0137: Unknown result type (might be due to invalid IL or missing references)
				//IL_0105: Unknown result type (might be due to invalid IL or missing references)
				//IL_010a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0145: Unknown result type (might be due to invalid IL or missing references)
				//IL_0147: Unknown result type (might be due to invalid IL or missing references)
				((EntityState)this).FixedUpdate();
				if (!((EntityState)this).isAuthority || ((EntityState)this).inputBank.skill2.down || !((EntityState)this).isAuthority)
				{
					return;
				}
				aimRay = ((BaseState)this).GetAimRay();
				RaycastHit val = default(RaycastHit);
				if (Physics.Raycast(aimRay, ref val, maxDistance))
				{
					RaycastHit val4 = default(RaycastHit);
					for (int i = 0; i < bombCount; i++)
					{
						Vector3 val2 = Random.insideUnitSphere * randRadius;
						val2.y = 0f;
						if (i == 0)
						{
							val2 = Vector3.zero;
						}
						Vector3 val3 = ((RaycastHit)(ref val)).point + Vector3.up * randRadius + val2;
						val3 = ((!Physics.Raycast(val3, Vector3.down, ref val4, randRadius * 2f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask))) ? (val3 + Vector3.down * Random.Range(0f, randRadius * 2f)) : ((RaycastHit)(ref val4)).point);
						ProjectileManager.instance.FireProjectile(myProjectile, val3, Quaternion.identity, ((EntityState)this).gameObject, base.damageStat * bombDamage, 200f, Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f);
					}
				}
				else
				{
					GenericSkill secondary = ((EntityState)this).skillLocator.secondary;
					secondary.stock += 1;
				}
				((EntityState)this).outer.SetNextStateToMain();
			}

			public override void OnExit()
			{
				if (((EntityState)this).isAuthority)
				{
					EntityState.Destroy((Object)(object)areaSphere.gameObject);
				}
				EffectManager.SimpleMuzzleFlash(FirePortalBomb.muzzleflashEffectPrefab, ((EntityState)this).gameObject, FirePortalBomb.muzzleString, true);
				((EntityState)this).OnExit();
			}

			public override InterruptPriority GetMinimumInterruptPriority()
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				return (InterruptPriority)2;
			}
		}

		public class VoidUtility : BaseState
		{
			private Transform modelTransform;

			private float stopwatch;

			private Vector3 slipVector = Vector3.zero;

			private float yVector = 0f;

			public float duration = 1f;

			public float speedCoefficient = 4f;

			private CharacterModel characterModel;

			private HurtBoxGroup hurtboxGroup;

			public override void OnEnter()
			{
				//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_0012: Unknown result type (might be due to invalid IL or missing references)
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0034: Expected O, but got Unknown
				//IL_0137: Unknown result type (might be due to invalid IL or missing references)
				//IL_013c: Unknown result type (might be due to invalid IL or missing references)
				//IL_015b: Unknown result type (might be due to invalid IL or missing references)
				//IL_014e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0160: Unknown result type (might be due to invalid IL or missing references)
				//IL_0164: Unknown result type (might be due to invalid IL or missing references)
				//IL_0169: Unknown result type (might be due to invalid IL or missing references)
				EffectManager.SpawnEffect(GenericCharacterDeath.voidDeathEffect, new EffectData
				{
					origin = ((EntityState)this).characterBody.corePosition,
					scale = ((EntityState)this).characterBody.bestFitRadius
				}, false);
				Util.PlayAttackSpeedSound(BlinkState.beginSoundString, ((EntityState)this).gameObject, 0.6f);
				Util.PlayAttackSpeedSound(BlinkState.beginSoundString, ((EntityState)this).gameObject, 0.7f);
				((BaseState)this).OnEnter();
				modelTransform = ((EntityState)this).GetModelTransform();
				if (Object.op_Implicit((Object)(object)modelTransform))
				{
					characterModel = ((Component)modelTransform).GetComponent<CharacterModel>();
					hurtboxGroup = ((Component)modelTransform).GetComponent<HurtBoxGroup>();
				}
				if (Object.op_Implicit((Object)(object)characterModel))
				{
					CharacterModel obj = characterModel;
					obj.invisibilityCount++;
				}
				if (Object.op_Implicit((Object)(object)hurtboxGroup))
				{
					HurtBoxGroup val = hurtboxGroup;
					int hurtBoxesDeactivatorCounter = val.hurtBoxesDeactivatorCounter + 1;
					val.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter;
				}
				if (NetworkServer.active)
				{
					((EntityState)this).characterBody.AddTimedBuff(Buffs.Cloak, duration);
					((EntityState)this).characterBody.AddTimedBuff(Buffs.CrocoRegen, 0.75f);
				}
				Vector3 val2 = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector);
				slipVector = ((Vector3)(ref val2)).normalized;
				yVector = ((EntityState)this).characterMotor.velocity.y;
			}

			public override void FixedUpdate()
			{
				//IL_0043: Unknown result type (might be due to invalid IL or missing references)
				//IL_0048: Unknown result type (might be due to invalid IL or missing references)
				//IL_0054: Unknown result type (might be due to invalid IL or missing references)
				//IL_005a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0072: 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_0099: 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)
				//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00de: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
				((EntityState)this).FixedUpdate();
				stopwatch += Time.fixedDeltaTime;
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
				{
					((EntityState)this).characterMotor.velocity = Vector3.zero;
					CharacterMotor characterMotor = ((EntityState)this).characterMotor;
					characterMotor.rootMotion += slipVector * (base.moveSpeedStat * speedCoefficient * Time.fixedDeltaTime) * Mathf.Sin(stopwatch / duration * (MathF.PI * 3f / 4f));
					CharacterMotor characterMotor2 = ((EntityState)this).characterMotor;
					characterMotor2.rootMotion += new Vector3(0f, yVector * Time.fixedDeltaTime * Mathf.Cos(stopwatch / duration * (MathF.PI / 2f)), 0f);
				}
				if (stopwatch >= duration && ((EntityState)this).isAuthority)
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
			}

			public override void OnExit()
			{
				//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_0012: Unknown result type (might be due to invalid IL or missing references)
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0034: Expected O, but got Unknown
				EffectManager.SpawnEffect(GenericCharacterDeath.voidDeathEffect, new EffectData
				{
					origin = ((EntityState)this).characterBody.corePosition,
					scale = ((EntityState)this).characterBody.bestFitRadius
				}, false);
				Util.PlayAttackSpeedSound(BlinkState.endSoundString, ((EntityState)this).gameObject, 1f);
				if (Object.op_Implicit((Object)(object)characterModel))
				{
					CharacterModel obj = characterModel;
					obj.invisibilityCount--;
				}
				if (Object.op_Implicit((Object)(object)hurtboxGroup))
				{
					HurtBoxGroup val = hurtboxGroup;
					int hurtBoxesDeactivatorCounter = val.hurtBoxesDeactivatorCounter - 1;
					val.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter;
				}
				((EntityState)this).OnExit();
			}

			public override InterruptPriority GetMinimumInterruptPriority()
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				return (InterruptPriority)5;
			}
		}

		public class VoidSpecial : BaseState
		{
			private bool hasFiredVoidPortal = false;

			private GameObject projectile = MainPlugin.voidSpecialProjectile;

			private Transform muzzleTransform;

			private float totalDuration = 2.5f;

			private float selfDamage;

			private int ticks;

			private CameraParamsOverrideRequest zoomOutParams;

			private CameraParamsOverrideHandle zoomOutHandle;

			public override void OnEnter()
			{
				//IL_0031: Unknown result type (might be due to invalid IL or missing references)
				//IL_0051: Unknown result type (might be due to invalid IL or missing references)
				//IL_0056: Unknown result type (might be due to invalid IL or missing references)
				//IL_005b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				//IL_0075: Unknown result type (might be due to invalid IL or missing references)
				//IL_0082: Unknown result type (might be due to invalid IL or missing references)
				//IL_008c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0091: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
				//IL_010e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0113: Unknown result type (might be due to invalid IL or missing references)
				//IL_011a: Unknown result type (might be due to invalid IL or missing references)
				//IL_011f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0166: Unknown result type (might be due to invalid IL or missing references)
				((BaseState)this).OnEnter();
				selfDamage = ((EntityState)this).healthComponent.combinedHealth * MainPlugin.configSpecialSelfDamage.Value;
				ticks = 0;
				zoomOutParams = default(CameraParamsOverrideRequest);
				zoomOutParams.cameraParamsData.idealLocalCameraPos = BlendableVector3.op_Implicit(new Vector3(0f, 1f, -30f));
				zoomOutParams.cameraParamsData.pivotVerticalOffset = BlendableFloat.op_Implicit(0f);
				zoomOutHandle = ((EntityState)this).GetComponent<CameraTargetParams>().AddParamsOverride(zoomOutParams, 2f);
				muzzleTransform = ((BaseState)this).FindModelChild(DeathState.muzzleName);
				((EntityState)this).PlayCrossfade("Body", "Death", "Death.playbackRate", totalDuration, 0.1f);
				if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)muzzleTransform) && ((EntityState)this).isAuthority)
				{
					FireProjectileInfo val = default(FireProjectileInfo);
					val.projectilePrefab = projectile;
					val.position = muzzleTransform.position;
					val.rotation = Quaternion.identity;
					val.owner = ((EntityState)this).gameObject;
					val.damage = base.damageStat * 60f * MainPlugin.configSpecialDamage.Value;
					val.crit = ((EntityState)this).characterBody.RollCrit();
					ProjectileManager.instance.FireProjectile(val);
				}
				if (MainPlugin.configSpecialProtection.Value)
				{
					HurtBoxGroup component = ((Component)((EntityState)this).GetModelTransform()).GetComponent<HurtBoxGroup>();
					int hurtBoxesDeactivatorCounter = component.hurtBoxesDeactivatorCounter + 1;
					component.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter;
				}
			}

			public override void FixedUpdate()
			{
				//IL_002f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_0040: 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_0059: Unknown result type (might be due to invalid IL or missing references)
				//IL_005b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0060: Unknown result type (might be due to invalid IL or missing references)
				//IL_0065: Unknown result type (might be due to invalid IL or missing references)
				//IL_0071: Unknown result type (might be due to invalid IL or missing references)
				//IL_0078: Unknown result type (might be due to invalid IL or missing references)
				//IL_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)
				//IL_008e: Expected O, but got Unknown
				//IL_010c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0111: Unknown result type (might be due to invalid IL or missing references)
				if (NetworkServer.active && ((EntityState)this).fixedAge >= totalDuration * (0.2f * (float)ticks))
				{
					DamageInfo val = new DamageInfo
					{
						attacker = ((EntityState)this).gameObject,
						crit = false,
						damage = selfDamage / 3f,
						damageType = DamageTypeCombo.op_Implicit((DamageType)1),
						inflictor = ((EntityState)this).gameObject,
						position = ((EntityState)this).transform.position,
						procCoefficient = 0f
					};
					((EntityState)this).healthComponent.TakeDamage(val);
					ticks++;
				}
				if (((EntityState)this).fixedAge >= totalDuration && !hasFiredVoidPortal)
				{
					hasFiredVoidPortal = true;
					((EntityState)this).PlayAnimation("Gesture, Additive", "Empty");
					((EntityState)this).PlayAnimation("Gesture, Override", "Empty");
					((EntityState)this).outer.SetNextStateToMain();
				}
				else
				{
					((EntityState)this).characterMotor.velocity = Vector3.zero;
					((EntityState)this).FixedUpdate();
				}
			}

			public override void OnExit()
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				//IL_0023: Unknown result type (might be due to invalid IL or missing references)
				//IL_0028: Unknown result type (might be due to invalid IL or missing references)
				//IL_002f: Unknown result type (might be due to invalid IL or missing references)
				//IL_003a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0047: Expected O, but got Unknown
				((EntityState)this).GetComponent<CameraTargetParams>().RemoveParamsOverride(zoomOutHandle, 1f);
				float scale = 30f;
				EffectManager.SpawnEffect(GenericCharacterDeath.voidDeathEffect, new EffectData
				{
					origin = ((EntityState)this).characterBody.corePosition,
					scale = scale
				}, false);
				if (MainPlugin.configSpecialProtection.Value)
				{
					HurtBoxGroup component = ((Component)((EntityState)this).GetModelTransform()).GetComponent<HurtBoxGroup>();
					int hurtBoxesDeactivatorCounter = component.hurtBoxesDeactivatorCounter - 1;
					component.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter;
				}
				((EntityState)this).OnExit();
			}

			public override InterruptPriority GetMinimumInterruptPriority()
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				return (InterruptPriority)7;
			}
		}

		public class VoidDeath : GenericCharacterDeath
		{
			private bool hasFired;

			public override void OnEnter()
			{
				((GenericCharacterDeath)this).OnEnter();
				((EntityState)this).PlayCrossfade("Body", "Death", "Death.playbackRate", 1f, 0.1f);
				hasFired = false;
			}

			public override void FixedUpdate()
			{
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_0039: Unknown result type (might be due to invalid IL or missing references)
				//IL_0040: Unknown result type (might be due to invalid IL or missing references)
				//IL_004b: Unknown result type (might be due to invalid IL or missing references)
				//IL_005c: Expected O, but got Unknown
				((GenericCharacterDeath)this).FixedUpdate();
				if (!hasFired && ((EntityState)this).fixedAge >= 1f)
				{
					hasFired = true;
					EffectManager.SpawnEffect(GenericCharacterDeath.voidDeathEffect, new EffectData
					{
						origin = ((EntityState)this).characterBody.corePosition,
						scale = 4f
					}, false);
					Util.PlaySound(Complete.soundEntryEvent, ((EntityState)this).gameObject);
					CharacterModel component = ((Component)((EntityState)this).GetModelTransform()).GetComponent<CharacterModel>();
					component.invisibilityCount++;
					MonoBehaviour.print((object)"Character Death Test");
				}
			}

			public override void OnExit()
			{
				if (hasFired)
				{
					CharacterModel component = ((Component)((EntityState)this).GetModelTransform()).GetComponent<CharacterModel>();
					component.invisibilityCount--;
				}
				((GenericCharacterDeath)this).OnExit();
			}
		}

		public class VoidLunarPrimary : BaseState
		{
			private readonly float totalDuration = 0.1f;

			private float duration;

			public override void OnEnter()
			{
				//IL_002a: Unknown result type (might be due to invalid IL or missing references)
				//IL_002f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_0057: Unknown result type (might be due to invalid IL or missing references)
				//IL_0064: Unknown result type (might be due to invalid IL or missing references)
				//IL_006e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0073: Unknown result type (might be due to invalid IL or missing references)
				//IL_007c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0081: Unknown result type (might be due to invalid IL or missing references)
				//IL_0086: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
				//IL_010c: Unknown result type (might be due to invalid IL or missing references)
				((BaseState)this).OnEnter();
				duration = totalDuration / base.attackSpeedStat;
				if (((EntityState)this).isAuthority)
				{
					Ray aimRay = ((BaseState)this).GetAimRay();
					((Ray)(ref aimRay)).direction = Util.ApplySpread(((Ray)(ref aimRay)).direction, 0f, FireLunarNeedle.maxSpread, 1f, 1f, 0f, 0f);
					FireProjectileInfo val = default(FireProjectileInfo);
					val.position = ((Ray)(ref aimRay)).origin;
					val.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction);
					val.crit = ((EntityState)this).characterBody.RollCrit();
					val.damage = ((EntityState)this).characterBody.damage * FireLunarNeedle.damageCoefficient;
					val.damageColorIndex = (DamageColorIndex)0;
					val.owner = ((EntityState)this).gameObject;
					val.procChainMask = default(ProcChainMask);
					val.force = 0f;
					val.useFuseOverride = false;
					val.useSpeedOverride = false;
					val.target = null;
					val.projectilePrefab = FireLunarNeedle.projectilePrefab;
					ProjectileManager.instance.FireProjectile(val);
				}
				float recoilAmplitude = FireLunarNeedle.recoilAmplitude;
				((BaseState)this).AddRecoil(-0.4f * recoilAmplitude, -0.8f * recoilAmplitude, -0.3f * recoilAmplitude, 0.3f * recoilAmplitude);
				((EntityState)this).characterBody.AddSpreadBloom(FireLunarNeedle.spreadBloomValue);
				((BaseState)this).StartAimMode(2f, false);
				EffectManager.SimpleMuzzleFlash(FireLunarNeedle.muzzleFlashEffectPrefab, ((EntityState)this).gameObject, "Head", false);
				Util.PlaySound(FireLunarNeedle.fireSound, ((EntityState)this).gameObject);
			}

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

			public override InterruptPriority GetMinimumInterruptPriority()
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0005: Unknown result type (might be due to invalid IL or missing references)
				return (InterruptPriority)2;
			}
		}

		public class VoidLunarUtility : GhostUtilitySkillState
		{
		}
	}
	internal class Survivors
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_OnEnter <>9__0_0;

			internal void <Init>b__0_0(orig_OnEnter orig, GhostUtilitySkillState self)
			{
				orig.Invoke(self);
				if (Reflection.GetFieldValue<float>((object)self, "duration") == 0f)
				{
					Reflection.SetFieldValue<float>((object)self, "duration", 1.5f);
				}
			}
		}

		internal static void Init()
		{
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Expected O, but got Unknown
			//IL_012f: Expected O, but got Unknown
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: 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)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_0319: Unknown result type (might be due to invalid IL or missing references)
			//IL_031e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0335: Unknown result type (might be due to invalid IL or missing references)
			//IL_033a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0351: Unknown result type (might be due to invalid IL or missing references)
			//IL_0356: Unknown result type (might be due to invalid IL or missing references)
			//IL_036d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0372: Unknown result type (might be due to invalid IL or missing references)
			//IL_0389: Unknown result type (might be due to invalid IL or missing references)
			//IL_038e: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03df: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0401: Unknown result type (might be due to invalid IL or missing references)
			//IL_0406: Unknown result type (might be due to invalid IL or missing references)
			//IL_042e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0447: Unknown result type (might be due to invalid IL or missing references)
			//IL_044c: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_054b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0564: Unknown result type (might be due to invalid IL or missing references)
			//IL_0569: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c5: 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_07e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0840: Unknown result type (might be due to invalid IL or missing references)
			//IL_0914: Unknown result type (might be due to invalid IL or missing references)
			//IL_092d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0932: Unknown result type (might be due to invalid IL or missing references)
			//IL_098a: Unknown result type (might be due to invalid IL or missing references)
			//IL_067b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0694: 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_06f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b3a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b53: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b58: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bb5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ccb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cd5: 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_0cf6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a1b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a34: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a39: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a91: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d48: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d52: Expected O, but got Unknown
			//IL_0d5a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d64: Expected O, but got Unknown
			//IL_0d6c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d76: Expected O, but got Unknown
			//IL_0d30: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d35: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d3b: Expected O, but got Unknown
			GameObject val = Tools.CreateBody("PlayerNullifier", "RoR2/Base/Nullifier/NullifierBody.prefab");
			GameObject val2 = PrefabAPI.InstantiateClone(((Component)val.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "FubukiMods/PlayerNullifierDisplay");
			val2.AddComponent<NetworkIdentity>();
			GameObject gameObject = ((Component)val.GetComponent<ModelLocator>().modelBaseTransform).gameObject;
			gameObject.transform.localScale = Vector3.one * 0.5f;
			gameObject.transform.Translate(new Vector3(0f, 4f, 0f));
			val.GetComponent<CharacterBody>().aimOriginTransform.Translate(new Vector3(0f, 0f, 0f));
			val.GetComponent<Interactor>().maxInteractionDistance = 5f;
			val.GetComponent<CharacterBody>().bodyFlags = (BodyFlags)16;
			KinematicCharacterMotor[] componentsInChildren = val.GetComponentsInChildren<KinematicCharacterMotor>();
			foreach (KinematicCharacterMotor val3 in componentsInChildren)
			{
				val3.SetCapsuleDimensions(val3.Capsule.radius * 0.4f, val3.Capsule.height * 0.4f, 1.25f);
			}
			CameraTargetParams component = val.GetComponent<CameraTargetParams>();
			CharacterCameraParams val4 = new CharacterCameraParams();
			CharacterCameraParams val5 = val4;
			component.cameraParams = val4;
			CharacterCameraParams val6 = val5;
			val6.data.idealLocalCameraPos = BlendableVector3.op_Implicit(new Vector3(0f, 2f, -12f));
			val6.data.pivotVerticalOffset = BlendableFloat.op_Implicit(0f);
			val.GetComponent<SetStateOnHurt>().canBeHitStunned = false;
			val.GetComponent<CharacterDeathBehavior>().deathState = new SerializableEntityStateType(typeof(Skills.VoidDeath));
			CharacterBody component2 = val.GetComponent<CharacterBody>();
			component2.baseDamage = MainPlugin.configDamage.Value;
			component2.levelDamage = component2.baseDamage * 0.2f;
			component2.baseCrit = 1f;
			component2.levelCrit = 0f;
			component2.baseMaxHealth = MainPlugin.configMaxHealth.Value;
			component2.levelMaxHealth = component2.baseMaxHealth * 0.3f;
			component2.baseMaxShield = 0f;
			component2.levelMaxShield = 0f;
			component2.baseArmor = MainPlugin.configArmor.Value;
			component2.levelArmor = 0f;
			component2.baseRegen = MainPlugin.configRegen.Value;
			component2.levelRegen = component2.baseRegen * 0.2f;
			component2.baseMoveSpeed = MainPlugin.configMoveSpeed.Value;
			component2.levelMoveSpeed = 0f;
			component2.baseAcceleration = 80f;
			component2.baseJumpCount = 1;
			component2.baseJumpPower = 15f;
			component2.baseAttackSpeed = 1f;
			component2.baseNameToken = "Void Reaver";
			Color[] palette = (Color[])(object)new Color[16]
			{
				new Color(0f, 0f, 0f),
				new Color(0.3f, 0f, 0.3f),
				new Color(0.5f, 0f, 0.5f),
				new Color(0.3f, 0f, 0.5f),
				new Color(0.6f, 0.25f, 1f),
				new Color(0.8f, 0.75f, 1f),
				new Color(1f, 1f, 1f),
				new Color(0f, 0.1f, 0.2f),
				new Color(0.6f, 0.7f, 1f),
				new Color(0.5f, 0.5f, 0.7f),
				new Color(0.3f, 0.4f, 0.5f),
				default(Color),
				default(Color),
				default(Color),
				default(Color),
				new Color(0f, 0f, 0f, 0f)
			};
			component2.portraitIcon = (Texture)(object)Tools.SpriteFromString("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8888888888888888fffffffffffff8882222444444442222888ffffffff88222221110000001112222288fffff8222159549999999999459512228fff822299994499999999994499992228f82255555219999999999991255555228559999991199999999999911999999559956559998999998899999899955659915566655998888899888889955666551215566665999999999999995666655122155566665599999999995566665551221555566666555555555566666555512221655566666655555566666655561222216666556666666666666655666612282216666666666666666666666661228f882111008886666666688800111288ffff888888fff86666668fff888888ffffffffffffff8000000008fffffffffffffffffff8881110000111888fffffffffffff8881111111111111111888fffffffff811111122222222221111118fffffff89922222222222222222222998fffff89999224222222222222422999a8fff899999922542222222245229999aa8ff899995992245422224542299999aa8fff8999566992442222442999999aa8fffff89956659922422422999999aa8fffff889995665999222299999999aa88fff822199955999999999999999aa1228f824221999999999999999999aa122428", palette, Flipped: true).texture;
			ContentAddition.AddBody(val);
			bool flag = default(bool);
			ContentAddition.AddEntityState<Skills.VoidPrimary>(ref flag);
			SkillDef val7 = ScriptableObject.CreateInstance<SkillDef>();
			val7.activationState = new SerializableEntityStateType(typeof(Skills.VoidPrimary));
			val7.activationStateMachineName = "Weapon";
			val7.baseMaxStock = 1;
			val7.baseRechargeInterval = 1f;
			val7.beginSkillCooldownOnSkillEnd = true;
			val7.canceledFromSprinting = false;
			val7.cancelSprintingOnActivation = true;
			val7.dontAllowPastMaxStocks = false;
			val7.forceSprintDuringState = false;
			val7.fullRestockOnAssign = true;
			val7.interruptPriority = (InterruptPriority)0;
			val7.isCombatSkill = true;
			val7.mustKeyPress = false;
			val7.rechargeStock = val7.baseMaxStock;
			val7.requiredStock = 1;
			val7.stockToConsume = 0;
			val7.skillDescriptionToken = "Fire 3 void pearls in quick succession that hit twice for <style=cIsDamage>2x" + Math.Floor(MainPlugin.configPrimaryDamage.Value * 50f) + "% damage</style>. <style=cIsUtility>Number of pearls increases</style> with <style=cIsUtility>attack speed</style>.";
			val7.skillName = "VOID_PRIMARY";
			val7.skillNameToken = "Void Impulse";
			val7.icon = Tools.SpriteFromString("7777777070000000777777777777770007777777777770007700000000777777777700112207777000111112262777771000011122000777000000001112227701101101112266270000011111226627011220000112227711226207000007700012207000777777000007777777700000777777777777007777777770700000", palette);
			Tools.AddSkill(val, val7);
			ContentAddition.AddEntityState<Skills.VoidAltPrimary>(ref flag);
			SkillDef val8 = ScriptableObject.CreateInstance<SkillDef>();
			val8.activationState = new SerializableEntityStateType(typeof(Skills.VoidAltPrimary));
			val8.activationStateMachineName = "Weapon";
			val8.baseMaxStock = 1;
			val8.baseRechargeInterval = 1f;
			val8.beginSkillCooldownOnSkillEnd = true;
			val8.canceledFromSprinting = false;
			val8.cancelSprintingOnActivation = true;
			val8.dontAllowPastMaxStocks = false;
			val8.forceSprintDuringState = false;
			val8.fullRestockOnAssign = true;
			val8.interruptPriority = (InterruptPriority)0;
			val8.isCombatSkill = true;
			val8.mustKeyPress = false;
			val8.rechargeStock = val8.baseMaxStock;
			val8.requiredStock = 1;
			val8.stockToConsume = 0;
			val8.skillDescriptionToken = "Fire 5 void pearls in a line that hit twice for <style=cIsDamage>2x" + Math.Floor(MainPlugin.configAltPrimaryDamage.Value * 50f) + "% damage</style>.";
			val8.skillName = "VOID_ALT_PRIMARY";
			val8.skillNameToken = "Void Sweep";
			val8.icon = Tools.SpriteFromString("7777770112477000777001122227777000112111000025771100000002222277000111122000077711100077700022210000000001222261111111212111222100000000000001171110000000777777000111111112217777700012222462770000077011266277111122227712217012224664277777000124666627770000", palette);
			Tools.AddSkill(val, val8, "primary", 1);
			if (MainPlugin.configLunarSkills.Value)
			{
				ContentAddition.AddEntityState<Skills.VoidLunarPrimary>(ref flag);
				SkillDef val9 = ScriptableObject.CreateInstance<SkillDef>();
				val9.activationState = new SerializableEntityStateType(typeof(Skills.VoidLunarPrimary));
				val9.activationStateMachineName = "Weapon";
				val9.baseMaxStock = 6;
				val9.baseRechargeInterval = 1f;
				val9.beginSkillCooldownOnSkillEnd = true;
				val9.canceledFromSprinting = false;
				val9.cancelSprintingOnActivation = true;
				val9.dontAllowPastMaxStocks = false;
				val9.forceSprintDuringState = false;
				val9.fullRestockOnAssign = true;
				val9.interruptPriority = (InterruptPriority)1;
				val9.isCombatSkill = true;
				val9.mustKeyPress = false;
				val9.rechargeStock = val9.baseMaxStock;
				val9.requiredStock = 1;
				val9.stockToConsume = 1;
				val9.skillDescriptionToken = "Fire a flurry of tracking shards that <style=cIsDamage>detonate</style> after a delay, dealing <style=cIsDamage>120% damage</style>. Hold up to " + val9.baseMaxStock + " charges that reload after " + Math.Floor(val9.baseRechargeInterval * 10f) / 10.0 + " second(s).";
				val9.skillName = "VOID_ALT_PRIMARY";
				val9.skillNameToken = "Hungering Gaze";
				val9.icon = Tools.SpriteFromString("0117102002111111100172000177777771102200177777773431020017357777555410013446477724370345666654370220710345666654200111000464437702100000005301777771114100100011177734643011100027745666541771031277346432777745717771402777355577177711777777457777777777777773", palette);
				Tools.AddSkill(val, val9, "primary", 2);
			}
			ContentAddition.AddEntityState<Skills.VoidSecondary>(ref flag);
			SkillDef val10 = ScriptableObject.CreateInstance<SkillDef>();
			val10.activationState = new SerializableEntityStateType(typeof(Skills.VoidSecondary));
			val10.activationStateMachineName = "Weapon";
			val10.baseMaxStock = 1;
			val10.baseRechargeInterval = MainPlugin.configSecondaryCooldown.Value;
			val10.beginSkillCooldownOnSkillEnd = true;
			val10.canceledFromSprinting = true;
			val10.cancelSprintingOnActivation = true;
			val10.dontAllowPastMaxStocks = false;
			val10.forceSprintDuringState = false;
			val10.fullRestockOnAssign = true;
			val10.interruptPriority = (InterruptPriority)1;
			val10.isCombatSkill = true;
			val10.mustKeyPress = true;
			val10.rechargeStock = val10.baseMaxStock;
			val10.requiredStock = 1;
			val10.stockToConsume = 1;
			val10.skillDescriptionToken = "Summon a cluster of bombs that deal <style=cIsDamage>" + MainPlugin.configSecondaryStock.Value + "x" + Math.Floor(300f * MainPlugin.configSecondaryDamage.Value) + "% damage</style>. 3 consecutive hits will <style=cIsUtility>nullify</style> subjects. <style=cIsUtility>Attack Speed</style> will <style=cIsUtility>increase number of bombs</style> and <style=cIsUtility>slightly increase placement radius</style>.";
			val10.skillName = "VOID_SECONDARY";
			val10.skillNameToken = "Undertow";
			val10.icon = Tools.SpriteFromString("7770307700770007777030770077000777704077007703077770407733770307777040705507030777705074554704077770507744770407777050777770050070056500777356530356665307743434305666503777444740356530477777007453435477000044777555770033445577777770030445567777770040445566", palette);
			Tools.AddSkill(val, val10, "secondary");
			ContentAddition.AddEntityState<Skills.VoidUtility>(ref flag);
			SkillDef val11 = ScriptableObject.CreateInstance<SkillDef>();
			val11.activationState = new SerializableEntityStateType(typeof(Skills.VoidUtility));
			val11.activationStateMachineName = "Body";
			val11.baseMaxStock = 1;
			val11.baseRechargeInterval = 4f;
			val11.beginSkillCooldownOnSkillEnd = true;
			val11.canceledFromSprinting = false;
			val11.cancelSprintingOnActivation = false;
			val11.dontAllowPastMaxStocks = false;
			val11.forceSprintDuringState = true;
			val11.fullRestockOnAssign = true;
			val11.interruptPriority = (InterruptPriority)2;
			val11.isCombatSkill = false;
			val11.mustKeyPress = false;
			val11.rechargeStock = val11.baseMaxStock;
			val11.requiredStock = 1;
			val11.stockToConsume = 1;
			val11.skillDescriptionToken = "Temporarily slip into the void, becoming <style=cIsUtility>intangible</style> and recovering <style=cIsHealing>10% health</style>.";
			val11.skillName = "VOID_UTILITY";
			val11.skillNameToken = "Dive";
			val11.icon = Tools.SpriteFromString("0000000000333300700703303355543007777073554445437777073544566453777777344566645377777344455545307463735454444300754773444455300043773444453300003773344533700000773344337707300073343377004530003443770777340000433777773370000033777777700770003777777777770000", palette);
			Tools.AddSkill(val, val11, "utility");
			if (MainPlugin.configLunarSkills.Value)
			{
				ContentAddition.AddEntityState<Skills.VoidLunarUtility>(ref flag);
				SkillDef val12 = ScriptableObject.CreateInstance<SkillDef>();
				val12.activationState = new SerializableEntityStateType(typeof(Skills.VoidLunarUtility));
				val12.activationStateMachineName = "Body";
				val12.baseMaxStock = 1;
				val12.baseRechargeInterval = 3f;
				val12.beginSkillCooldownOnSkillEnd = true;
				val12.canceledFromSprinting = false;
				val12.cancelSprintingOnActivation = false;
				val12.dontAllowPastMaxStocks = false;
				val12.forceSprintDuringState = false;
				val12.fullRestockOnAssign = true;
				val12.interruptPriority = (InterruptPriority)2;
				val12.isCombatSkill = false;
				val12.mustKeyPress = false;
				val12.rechargeStock = val12.baseMaxStock;
				val12.requiredStock = 1;
				val12.stockToConsume = 1;
				val12.skillDescriptionToken = "Fade away, becoming <style=cIsUtility>intangible</style> for 1.5 seconds and gaining <style=cIsUtility>130% movement speed</style>. <style=cIsHealing>Heal for " + Math.Floor(125.0) / 10.0 + "% of your maximum health</style>.";
				val12.skillName = "VOID_UTILITY";
				val12.skillNameToken = "Shadowfade";
				val12.icon = Tools.SpriteFromString("7117771000011177100177711110001701111773113220011710133200233200710143355204110071004654456000001000556444550001100254554645001710050444444001371045500444405337710250004000237771025400054023777710000405021117777332250200000177771000000000177777711101001177", palette);
				Tools.AddSkill(val, val12, "utility", 1);
			}
			ContentAddition.AddEntityState<Skills.VoidSpecial>(ref flag);
			SkillDef val13 = ScriptableObject.CreateInstance<SkillDef>();
			val13.activationState = new SerializableEntityStateType(typeof(Skills.VoidSpecial));
			val13.activationStateMachineName = "Body";
			val13.baseMaxStock = 1;
			val13.baseRechargeInterval = MainPlugin.configSpecialCooldown.Value;
			val13.beginSkillCooldownOnSkillEnd = true;
			val13.canceledFromSprinting = false;
			val13.cancelSprintingOnActivation = true;
			val13.dontAllowPastMaxStocks = false;
			val13.forceSprintDuringState = false;
			val13.fullRestockOnAssign = true;
			val13.interruptPriority = (InterruptPriority)2;
			val13.isCombatSkill = true;
			val13.mustKeyPress = false;
			val13.rechargeStock = val13.baseMaxStock;
			val13.requiredStock = 1;
			val13.stockToConsume = 1;
			val13.skillDescriptionToken = "Sacrifice <style=cIsHealth>" + Math.Floor(MainPlugin.configSpecialSelfDamage.Value * 100f) + "% of your health</style>, and deal <style=cIsDamage>" + Math.Floor(MainPlugin.configSpecialDamage.Value * 6000f) + "% damage in a blast</style> to any nearby test subjects.";
			val13.skillName = "VOID_SPECIAL";
			val13.skillNameToken = "Reave";
			val13.icon = Tools.SpriteFromString("2245656625654642242552652465265445254254225425444524221000442544452400100012242454020510015201255244001000124425500100000011010554010000000101245422100000021245542201111112024545240020101224542525242020242554254524524245255414564562625626521246456564564642", palette);
			Tools.AddSkill(val, val13, "special");
			SurvivorDef val14 = ScriptableObject.CreateInstance<SurvivorDef>();
			val14.bodyPrefab = val;
			val14.descriptionToken = "Void Reaver is a funny purple crab. <style=cSub>\r\n\r\n < ! > The number of bullets fired with Void Darts increases or decreases based on your attack speed, while the duration of the attack remains the same.\r\n\r\n < ! > Void Reaver excels at mid-ranged combat. Keep enemies at bay with Capture's bombs and their natural debuff.\r\n\r\n < ! > Veil will break enemy line-of-sight, so use it to your advantage when trying to get out of a bad situation.\r\n\r\n < ! > When you're surrounded by enemies, use Reave and then quickly use Veil to regenerate some of your lost health and escape the chaos." + Environment.NewLine;
			val14.displayPrefab = val2;
			val14.displayPrefab.transform.localScale = Vector3.one * 0.3f;
			val14.primaryColor = new Color(0.5f, 0.5f, 0.5f);
			val14.desiredSortPosition = 44.44f;
			val14.displayNameToken = "Void Reaver";
			ContentAddition.AddSurvivorDef(val14);
			object obj = <>c.<>9__0_0;
			if (obj == null)
			{
				hook_OnEnter val15 = delegate(orig_OnEnter orig, GhostUtilitySkillState self)
				{
					orig.Invoke(self);
					if (Reflection.GetFieldValue<float>((object)self, "duration") == 0f)
					{
						Reflection.SetFieldValue<float>((object)self, "duration", 1.5f);
					}
				};
				<>c.<>9__0_0 = val15;
				obj = (object)val15;
			}
			GhostUtilitySkillState.OnEnter += (hook_OnEnter)obj;
			LunarPrimaryReplacementSkill.GetRechargeInterval += new hook_GetRechargeInterval(LunarPrimaryReplacementSkill_GetRechargeInterval);
			LunarPrimaryReplacementSkill.GetMaxStock += new hook_GetMaxStock(LunarPrimaryReplacementSkill_GetMaxStock);
			LunarPrimaryReplacementSkill.GetRechargeStock += new hook_GetRechargeStock(LunarPrimaryReplacementSkill_GetRechargeStock);
		}

		private static int LunarPrimaryReplacementSkill_GetRechargeStock(orig_GetRechargeStock orig, LunarPrimaryReplacementSkill self, GenericSkill skillSlot)
		{
			int num = orig.Invoke(self, skillSlot);
			if (num > 6)
			{
				return num;
			}
			return 6;
		}

		private static int LunarPrimaryReplacementSkill_GetMaxStock(orig_GetMaxStock orig, LunarPrimaryReplacementSkill self, GenericSkill skillSlot)
		{
			int num = orig.Invoke(self, skillSlot);
			if (num > 6)
			{
				return num;
			}
			return 6;
		}

		private static float LunarPrimaryReplacementSkill_GetRechargeInterval(orig_GetRechargeInterval orig, LunarPrimaryReplacementSkill self, GenericSkill skillSlot)
		{
			float num = orig.Invoke(self, skillSlot);
			if (num > 1f)
			{
				return num;
			}
			return 1f;
		}
	}
	internal static class Tools
	{
		internal static int Hex2Num(string hex)
		{
			int result = 0;
			hex = hex.ToUpper();
			switch (hex)
			{
			case "1":
				result = 1;
				break;
			case "2":
				result = 2;
				break;
			case "3":
				result = 3;
				break;
			case "4":
				result = 4;
				break;
			case "5":
				result = 5;
				break;
			case "6":
				result = 6;
				break;
			case "7":
				result = 7;
				break;
			case "8":
				result = 8;
				break;
			case "9":
				result = 9;
				break;
			case "A":
				result = 10;
				break;
			case "B":
				result = 11;
				break;
			case "C":
				result = 12;
				break;
			case "D":
				result = 13;
				break;
			case "E":
				result = 14;
				break;
			case "F":
				result = 15;
				break;
			}
			return result;
		}

		internal static string Num2Hex(int num)
		{
			string result = "0";
			switch (num)
			{
			case 1:
				result = "1";
				break;
			case 2:
				result = "2";
				break;
			case 3:
				result = "3";
				break;
			case 4:
				result = "4";
				break;
			case 5:
				result = "5";
				break;
			case 6:
				result = "6";
				break;
			case 7:
				result = "7";
				break;
			case 8:
				result = "8";
				break;
			case 9:
				result = "9";
				break;
			case 10:
				result = "A";
				break;
			case 11:
				result = "B";
				break;
			case 12:
				result = "C";
				break;
			case 13:
				result = "D";
				break;
			case 14:
				result = "E";
				break;
			case 15:
				result = "F";
				break;
			}
			return result;
		}

		public static Sprite SpriteFromString(string texture, Color[] palette, bool Flipped = false)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Expected O, but got Unknown
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: 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)
			int num = (int)Math.Floor(Math.Pow(texture.Length, 0.5));
			Texture2D val = new Texture2D(num, num, (TextureFormat)4, false);
			((Texture)val).filterMode = (FilterMode)0;
			((Texture)val).wrapMode = (TextureWrapMode)1;
			int num2 = 0;
			int i = 0;
			int num3 = 0;
			for (; i < num; i++)
			{
				for (num2 = 0; num2 < num; num2++)
				{
					if (!Flipped)
					{
						val.SetPixel(num - 1 - num2, i, palette[Hex2Num(texture.Substring(num3, 1))]);
					}
					else
					{
						val.SetPixel(num2, num - 1 - i, palette[Hex2Num(texture.Substring(num3, 1))]);
					}
					num3++;
				}
			}
			val.Apply();
			return Sprite.Create(val, new Rect((float)num, (float)num, (float)(-num), (float)(-num)), new Vector2((float)num * 0.5f, (float)num * 0.5f), (float)num);
		}

		internal static GameObject VoxelSprite(string texture, Color[] palette, Transform rootTransform)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject();
			val.transform.parent = rootTransform;
			val.transform.localPosition = new Vector3(0f, 0f, 0f);
			val.transform.localScale = new Vector3(0.25f, 0.25f, 0.25f);
			int num = -4;
			int i = -4;
			int num2 = 0;
			for (; i < 4; i++)
			{
				for (num = -4; num < 4; num++)
				{
					if (Hex2Num(texture.Substring(num2, 1)) != 0)
					{
						GameObject val2 = GameObject.CreatePrimitive((PrimitiveType)3);
						((Renderer)val2.GetComponent<MeshRenderer>()).material.shader = Resources.Load<Shader>("Shaders/Deferred/HGStandard");
						val2.transform.parent = val.transform;
						val2.transform.localPosition = new Vector3((float)(-num) - 0.5f, (float)(-i), 0f);
						val2.transform.localScale = new Vector3(1f, 1f, 1f);
						val2.transform.localRotation = Quaternion.identity;
						val2.GetComponent<Renderer>().material.color = palette[Hex2Num(texture.Substring(num2, 1))];
						val2.gameObject.layer = LayerIndex.noCollision.intVal;
					}
					num2++;
				}
			}
			return val;
		}

		internal static GameObject CreateBody(string BodyName, string BodyDirectory = "RoR2/Base/Commando/CommandoBody.prefab")
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = Addressables.LoadAssetAsync<GameObject>((object)BodyDirectory).WaitForCompletion();
			GameObject val2 = PrefabAPI.InstantiateClone(val, "FubukiMods/" + BodyName);
			KinematicCharacterMotor component = val2.GetComponent<KinematicCharacterMotor>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.playerCharacter = true;
			}
			GenericSkill[] componentsInChildren = val2.GetComponentsInChildren<GenericSkill>();
			foreach (GenericSkill val3 in componentsInChildren)
			{
				Object.DestroyImmediate((Object)(object)val3);
			}
			SkillLocator component2 = val2.GetComponent<SkillLocator>();
			Reflection.SetFieldValue<GenericSkill[]>((object)component2, "allSkills", (GenericSkill[])(object)new GenericSkill[0]);
			component2.primary = val2.AddComponent<GenericSkill>();
			SkillFamily val4 = ScriptableObject.CreateInstance<SkillFamily>();
			val4.variants = (Variant[])(object)new Variant[1];
			ContentAddition.AddSkillFamily(val4);
			Reflection.SetFieldValue<SkillFamily>((object)component2.primary, "_skillFamily", val4);
			component2.secondary = val2.AddComponent<GenericSkill>();
			SkillFamily val5 = ScriptableObject.CreateInstance<SkillFamily>();
			val5.variants = (Variant[])(object)new Variant[1];
			ContentAddition.AddSkillFamily(val5);
			Reflection.SetFieldValue<SkillFamily>((object)component2.secondary, "_skillFamily", val5);
			component2.utility = val2.AddComponent<GenericSkill>();
			SkillFamily val6 = ScriptableObject.CreateInstance<SkillFamily>();
			val6.variants = (Variant[])(object)new Variant[1];
			ContentAddition.AddSkillFamily(val6);
			Reflection.SetFieldValue<SkillFamily>((object)component2.utility, "_skillFamily", val6);
			component2.special = val2.AddComponent<GenericSkill>();
			SkillFamily val7 = ScriptableObject.CreateInstance<SkillFamily>();
			val7.variants = (Variant[])(object)new Variant[1];
			ContentAddition.AddSkillFamily(val7);
			Reflection.SetFieldValue<SkillFamily>((object)component2.special, "_skillFamily", val7);
			return val2;
		}

		internal static bool CreateIDR(List<KeyAssetRuleGroup> ItemDisplayRules, ItemDef Item)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			ItemDisplayRules.Add(new KeyAssetRuleGroup
			{
				keyAsset = (Object)(object)Item,
				displayRuleGroup = new DisplayRuleGroup
				{
					rules = (ItemDisplayRule[])(object)new ItemDisplayRule[1]
					{
						new ItemDisplayRule
						{
							ruleType = (ItemDisplayRuleType)0,
							followerPrefab = null,
							childName = "Muzzle",
							localPos = new Vector3(0f, 0.2091f, -0.3642f),
							localAngles = new Vector3(0f, 0f, 0f),
							localScale = new Vector3(0.15f, 0.15f, 0.15f),
							limbMask = (LimbFlags)0
						}
					}
				}
			});
			return true;
		}

		internal static void AddIDR(string AttachPoint, Vector3 Position, Vector3 Rotation, Vector3 Scale)
		{
		}

		internal static bool AddSkill(GameObject Body, SkillDef SkillDef, string Slot = "primary", int Variant = 0)
		{
			//IL_0155: 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_0181: Expected O, but got Unknown
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: 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_00fe: Expected O, but got Unknown
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			ContentAddition.AddSkillDef(SkillDef);
			SkillLocator component = Body.GetComponent<SkillLocator>();
			Reflection.SetFieldValue<GenericSkill[]>((object)component, "allSkills", (GenericSkill[])(object)new GenericSkill[0]);
			GenericSkill val;
			if (Slot.ToLower() == "primary")
			{
				val = component.primary;
			}
			else if (Slot.ToLower() == "secondary")
			{
				val = component.secondary;
			}
			else if (Slot.ToLower() == "utility")
			{
				val = component.utility;
			}
			else
			{
				if (!(Slot.ToLower() == "special"))
				{
					MonoBehaviour.print((object)"[FUBUKI ERROR:] Unrecognized slot.");
					return false;
				}
				val = component.special;
			}
			Variant val2;
			if (Variant == 0)
			{
				SkillFamily skillFamily = val.skillFamily;
				Variant[] variants = skillFamily.variants;
				val2 = new Variant
				{
					skillDef = SkillDef
				};
				((Variant)(ref val2)).viewableNode = new Node(SkillDef.skillName + "_TEST", false, (Node)null);
				variants[0] = val2;
				MonoBehaviour.print((object)("Skill Added: " + Slot + " - " + SkillDef.skillName));
				return true;
			}
			SkillFamily skillFamily2 = val.skillFamily;
			Array.Resize(ref skillFamily2.variants, skillFamily2.variants.Length + 1);
			Variant[] variants2 = skillFamily2.variants;
			val2 = new Variant
			{
				skillDef = SkillDef
			};
			((Variant)(ref val2)).viewableNode = new Node(SkillDef.skillName + "_TEST", false, (Node)null);
			variants2[Variant] = val2;
			MonoBehaviour.print((object)("Alt Skill Added: " + Slot + " - " + SkillDef.skillName));
			return true;
		}
	}
}