Kor.dll

Decompiled 5 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using EntityStates;
using EntityStates.Commando;
using EntityStates.Merc;
using KinematicCharacterController;
using On.RoR2;
using R2API;
using R2API.Utils;
using Rewired;
using Rewired.ComponentControls.Effects;
using RoR2;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using ThreeEyedGames;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;

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

internal class Assets
{
	public static AssetBundle MainAssetBundle;

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

	public static void PopulateAssets()
	{
		Assembly executingAssembly = Assembly.GetExecutingAssembly();
		if ((Object)(object)MainAssetBundle == (Object)null)
		{
			using Stream stream = executingAssembly.GetManifestResourceStream("Kor.AssetBundle.korassets");
			MainAssetBundle = AssetBundle.LoadFromStream(stream);
		}
		using Stream stream2 = executingAssembly.GetManifestResourceStream("Kor.Kor.bnk");
		byte[] array = new byte[stream2.Length];
		stream2.Read(array, 0, array.Length);
		SoundBanks.Add(array);
	}
}
internal class AnimEvents : MonoBehaviour
{
	public bool fire;

	public bool Throw;

	public bool slamHeavy;

	public bool slamLight;

	public string child;

	public bool newAttack;

	public float projectileFw = 2f;

	public void Fire(string childString)
	{
		child = childString;
		fire = true;
	}

	public void NewAttack()
	{
		newAttack = true;
	}

	public void Yeet()
	{
		Throw = true;
	}

	public void SlamHeavy()
	{
		slamHeavy = true;
	}

	public void SlamLight()
	{
		slamLight = true;
	}
}
internal class BoulderCollision : MonoBehaviour
{
	private void OnTriggerEnter(Collider other)
	{
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0126: Unknown result type (might be due to invalid IL or missing references)
		//IL_012b: Unknown result type (might be due to invalid IL or missing references)
		Debug.LogWarning((object)("collision: " + (object)other));
		BoulderProjectileBehaviour component = ((Component)other).GetComponent<BoulderProjectileBehaviour>();
		if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component.owner) || !Object.op_Implicit((Object)(object)component.simple) || !Object.op_Implicit((Object)(object)component.damage))
		{
			return;
		}
		((Component)component).transform.forward = component.owner.inputBank.aimDirection;
		float num = 1f;
		DashBehaviour component2 = ((Component)component.owner).GetComponent<DashBehaviour>();
		if (Object.op_Implicit((Object)(object)component2))
		{
			if (component2.dash)
			{
				num = 1.5f;
			}
			if (component2.hit)
			{
				num = 2f;
			}
			num += component2.charge;
		}
		ProjectileDamage damage = component.damage;
		damage.damage *= num;
		ProjectileSimple simple = component.simple;
		simple.desiredForwardSpeed *= num;
		if (!((Behaviour)component.simple).enabled)
		{
			AkSoundEngine.PostEvent(Sounds.Play_Kor_Hammer_RockHit_Swing, ((Component)component.owner).gameObject);
			EffectManager.SimpleEffect(Prefabs.impactEffectHammerLight, ((Component)component).transform.position, Quaternion.identity, false);
		}
		((Behaviour)component.simple).enabled = true;
	}
}
internal class BoulderProjectileBehaviour : MonoBehaviour
{
	private float stopwatch;

	public float lerpDuration = 0.45f;

	public float speed = 22f;

	public float upPos = 2f;

	public float maxDuration = 2f;

	private Vector3 startPos;

	private Vector3 endPos;

	public bool active;

	public SphereCollider collider;

	public ProjectileSimple simple;

	public ProjectileImpactExplosion explosion;

	public ProjectileController controller;

	public ProjectileDamage damage;

	public CharacterBody owner;

	private void Awake()
	{
		damage = ((Component)this).GetComponent<ProjectileDamage>();
		collider = ((Component)this).GetComponent<SphereCollider>();
		simple = ((Component)this).GetComponent<ProjectileSimple>();
		explosion = ((Component)this).GetComponent<ProjectileImpactExplosion>();
		controller = ((Component)this).GetComponent<ProjectileController>();
	}

	private void OnEnable()
	{
		InstanceTracker.Add<BoulderProjectileBehaviour>(this);
	}

	private void OnDisable()
	{
		InstanceTracker.Remove<BoulderProjectileBehaviour>(this);
	}

	private void Start()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: 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_002e: Unknown result type (might be due to invalid IL or missing references)
		startPos = ((Component)this).transform.position;
		endPos = startPos + Vector3.up * upPos;
		if (Object.op_Implicit((Object)(object)controller) && Object.op_Implicit((Object)(object)controller.owner))
		{
			owner = controller.owner.GetComponent<CharacterBody>();
		}
	}

	private void FixedUpdate()
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		if (stopwatch < lerpDuration)
		{
			((Component)this).transform.position = Vector3.Lerp(startPos, endPos, Time.fixedDeltaTime * speed);
		}
		else if (!active)
		{
			active = true;
			((Collider)collider).enabled = true;
		}
		stopwatch += Time.fixedDeltaTime;
		if (stopwatch >= maxDuration && NetworkServer.active)
		{
			((ProjectileExplosion)explosion).Detonate();
		}
	}
}
internal class DashBehaviour : NetworkBehaviour
{
	public bool dash;

	public bool hit;

	private float buffDuration = 0.45f;

	private float stopwatch;

	public float charge;

	private static int kRpcRpcHit;

	[ClientRpc]
	public void RpcHit()
	{
		hit = true;
	}

	private void FixedUpdate()
	{
		if (hit)
		{
			stopwatch += Time.fixedDeltaTime;
			if (stopwatch >= buffDuration)
			{
				stopwatch = 0f;
				hit = false;
			}
		}
	}

	private void UNetVersion()
	{
	}

	protected static void InvokeRpcRpcHit(NetworkBehaviour obj, NetworkReader reader)
	{
		if (!NetworkClient.active)
		{
			Debug.LogError((object)"RPC RpcHit called on server.");
		}
		else
		{
			((DashBehaviour)(object)obj).RpcHit();
		}
	}

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

	static DashBehaviour()
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Expected O, but got Unknown
		kRpcRpcHit = -1490279278;
		NetworkBehaviour.RegisterRpcDelegate(typeof(DashBehaviour), kRpcRpcHit, new CmdDelegate(InvokeRpcRpcHit));
		NetworkCRC.RegisterBehaviour("DashBehaviour", 0);
	}

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

	public override void OnDeserialize(NetworkReader reader, bool initialState)
	{
	}
}
internal class KorGhostProjectileSkinController : MonoBehaviour
{
	private bool hammer;

	private int skinIndex;

	public float upForce = 400f;

	public float backForce = 400f;

	public float torque = 1600f;

	private CharacterBody body;

	public void OnDisable()
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_004f: 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_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: 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_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_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_0087: 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_0093: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = Object.Instantiate<GameObject>(hammer ? Prefabs.hammerProjectilePhysics : Prefabs.gauntletProjectilePhysics, ((Component)this).transform.position, ((Component)this).transform.rotation);
		val.transform.localScale = ((Component)this).transform.localScale;
		Rigidbody component = val.GetComponent<Rigidbody>();
		Vector3 val2 = Random.rotationUniform * Vector3.one;
		component.AddForce(val2 * backForce + Vector3.up * upForce);
		Vector3 val3 = val2 * torque;
		component.AddRelativeTorque(val3);
		ChildLocator component2 = val.GetComponent<ChildLocator>();
		GameObject gameObject = ((Component)component2.FindChild((skinIndex == 0) ? "base" : "skin")).gameObject;
		if (gameObject.activeInHierarchy)
		{
			((Component)gameObject.transform.GetChild((((Component)body.modelLocator.modelTransform).GetComponent<AnimEvents>().child == "hand.r") ? 1 : 0)).gameObject.SetActive(true);
		}
		else
		{
			gameObject.SetActive(true);
		}
	}

	private void Start()
	{
		ProjectileGhostController component = ((Component)this).GetComponent<ProjectileGhostController>();
		Transform val = (Object.op_Implicit((Object)(object)component.authorityTransform) ? component.authorityTransform : component.predictionTransform);
		if (!Object.op_Implicit((Object)(object)val))
		{
			return;
		}
		GameObject owner = ((Component)val).GetComponent<ProjectileController>().owner;
		if (Object.op_Implicit((Object)(object)owner))
		{
			body = owner.GetComponent<CharacterBody>();
			skinIndex = (int)body.skinIndex;
			ChildLocator component2 = ((Component)this).GetComponent<ChildLocator>();
			GameObject gameObject = ((Component)component2.FindChild((skinIndex == 0) ? "base" : "skin")).gameObject;
			if (gameObject.activeInHierarchy)
			{
				((Component)gameObject.transform.GetChild((((Component)body.modelLocator.modelTransform).GetComponent<AnimEvents>().child == "hand.r") ? 1 : 0)).gameObject.SetActive(true);
				return;
			}
			hammer = true;
			gameObject.SetActive(true);
		}
	}
}
internal class ThrowHitboxBehaviour : MonoBehaviour
{
	public CharacterBody owner;

	public float force = 4500f;

	public float radiusMult = 4f;

	public float damageCoefficient = 2f;

	public float recoilDamageCoefficient = 1f;

	public float charge = 0f;

	public CharacterBody victim;

	public SphereCollider collider;

	private List<HealthComponent> hitList = new List<HealthComponent>();

	private void Start()
	{
		damageCoefficient = Util.Remap(charge, 0f, 1f, 1.7f, 3f);
		recoilDamageCoefficient = Util.Remap(charge, 0f, 1f, 1f, 2f);
		victim = ((Component)this).GetComponentInParent<CharacterBody>();
		collider = ((Component)this).GetComponent<SphereCollider>();
		collider.radius = victim.radius * radiusMult;
	}

	private void OnCollisionEnter(Collision collision)
	{
		//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0102: Unknown result type (might be due to invalid IL or missing references)
		//IL_0103: 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_0122: Unknown result type (might be due to invalid IL or missing references)
		//IL_0129: Unknown result type (might be due to invalid IL or missing references)
		//IL_0134: Unknown result type (might be due to invalid IL or missing references)
		//IL_0139: Unknown result type (might be due to invalid IL or missing references)
		//IL_013e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0142: Unknown result type (might be due to invalid IL or missing references)
		//IL_014d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0152: Unknown result type (might be due to invalid IL or missing references)
		//IL_0157: Unknown result type (might be due to invalid IL or missing references)
		//IL_0168: Unknown result type (might be due to invalid IL or missing references)
		//IL_0174: Unknown result type (might be due to invalid IL or missing references)
		//IL_017a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0180: Unknown result type (might be due to invalid IL or missing references)
		//IL_018b: Unknown result type (might be due to invalid IL or missing references)
		//IL_018d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0192: Unknown result type (might be due to invalid IL or missing references)
		//IL_0194: Unknown result type (might be due to invalid IL or missing references)
		//IL_019b: Expected O, but got Unknown
		//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_01bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0208: Unknown result type (might be due to invalid IL or missing references)
		//IL_0212: Unknown result type (might be due to invalid IL or missing references)
		//IL_0217: Unknown result type (might be due to invalid IL or missing references)
		//IL_021c: Unknown result type (might be due to invalid IL or missing references)
		//IL_022d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0239: Unknown result type (might be due to invalid IL or missing references)
		//IL_023f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0245: Unknown result type (might be due to invalid IL or missing references)
		//IL_0250: Unknown result type (might be due to invalid IL or missing references)
		//IL_0252: Unknown result type (might be due to invalid IL or missing references)
		//IL_0257: Unknown result type (might be due to invalid IL or missing references)
		//IL_0259: Unknown result type (might be due to invalid IL or missing references)
		//IL_0260: Expected O, but got Unknown
		//IL_0278: Unknown result type (might be due to invalid IL or missing references)
		//IL_027a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
		if (!NetworkServer.active || !Object.op_Implicit((Object)(object)collision.collider) || !Object.op_Implicit((Object)(object)victim) || !victim.healthComponent.alive)
		{
			return;
		}
		HurtBox component = ((Component)collision.collider).GetComponent<HurtBox>();
		if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.healthComponent) && !hitList.Contains(component.healthComponent) && (Object)(object)component.healthComponent != (Object)(object)victim.healthComponent && component.healthComponent.alive)
		{
			TeamMask enemyTeams = TeamMask.GetEnemyTeams(owner.teamComponent.teamIndex);
			if (((TeamMask)(ref enemyTeams)).HasTeam(component.healthComponent.body.teamComponent.teamIndex))
			{
				hitList.Add(component.healthComponent);
				Vector3 val = ProjectileController.EstimateContactPoint(collision.contacts, collision.collider);
				DamageInfo val2 = new DamageInfo
				{
					position = val,
					damage = owner.damage * damageCoefficient
				};
				Vector3 val3 = ((Component)component).transform.position - ((Component)this).transform.position;
				val2.force = ((Vector3)(ref val3)).normalized * force;
				val2.attacker = ((Component)owner).gameObject;
				val2.inflictor = ((Component)this).gameObject;
				val2.procChainMask = default(ProcChainMask);
				val2.procCoefficient = 0f;
				val2.damageColorIndex = (DamageColorIndex)0;
				val2.damageType = (DamageType)0;
				DamageInfo val4 = val2;
				component.healthComponent.TakeDamage(val4);
				DamageInfo val5 = new DamageInfo
				{
					position = ProjectileController.EstimateContactPoint(collision.contacts, (Collider)(object)collider),
					damage = owner.damage * recoilDamageCoefficient
				};
				val3 = ((Component)this).transform.position - ((Component)component).transform.position;
				val5.force = ((Vector3)(ref val3)).normalized * force / 4f;
				val5.attacker = ((Component)owner).gameObject;
				val5.inflictor = ((Component)this).gameObject;
				val5.procChainMask = default(ProcChainMask);
				val5.procCoefficient = 0f;
				val5.damageColorIndex = (DamageColorIndex)0;
				val5.damageType = (DamageType)0;
				val4 = val5;
				victim.healthComponent.TakeDamage(val4);
				EffectManager.SimpleEffect(Prefabs.impactEffectGauntlet, val, Quaternion.identity, true);
			}
		}
	}
}
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
		HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
		GlobalEventManager.onServerDamageDealt += delegate(DamageReport damageReport)
		{
			DashBehaviour dashBehaviour = (Object.op_Implicit((Object)(object)damageReport.attacker) ? damageReport.attacker.GetComponent<DashBehaviour>() : null);
			if (damageReport.damageInfo.procCoefficient > 0f && Object.op_Implicit((Object)(object)dashBehaviour))
			{
				dashBehaviour.CallRpcHit();
			}
		};
	}

	private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Invalid comparison between Unknown and I4
		//IL_0038: 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_0058: Unknown result type (might be due to invalid IL or missing references)
		if ((int)damageInfo.damageType == 262144)
		{
			CharacterBody val = (Object.op_Implicit((Object)(object)damageInfo.attacker) ? damageInfo.attacker.GetComponent<CharacterBody>() : null);
			if (Object.op_Implicit((Object)(object)val) && val.bodyIndex == MainPlugin.characterPrefab.GetComponent<CharacterBody>().bodyIndex)
			{
				damageInfo.damageType = (DamageType)0;
				SetStateOnHurt.SetStunOnObject(((Component)self).gameObject, 0.5f / val.attackSpeed);
			}
		}
		orig.Invoke(self, damageInfo);
	}
}
[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.Kor", "Kor", "1.0.1")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class MainPlugin : BaseUnityPlugin
{
	public const string MODUID = "com.Dragonyck.Kor";

	public const string MODNAME = "Kor";

	public const string VERSION = "1.0.1";

	public const string SURVIVORNAME = "Kor";

	public const string SURVIVORNAMEKEY = "KOR";

	public static GameObject characterPrefab;

	private static readonly Color characterColor = Utils.HexTo10("DBC48E");

	private void Awake()
	{
		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_00d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dc: Expected O, but got Unknown
		//IL_0107: Unknown result type (might be due to invalid IL or missing references)
		//IL_0118: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: 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_014e: Expected O, but got Unknown
		//IL_0175: 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_0197: 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_01c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_0246: Unknown result type (might be due to invalid IL or missing references)
		//IL_0377: Unknown result type (might be due to invalid IL or missing references)
		//IL_03b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_03b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_041a: Unknown result type (might be due to invalid IL or missing references)
		//IL_041f: Unknown result type (might be due to invalid IL or missing references)
		//IL_044b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0450: 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_0686: Unknown result type (might be due to invalid IL or missing references)
		//IL_068b: Unknown result type (might be due to invalid IL or missing references)
		//IL_06a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_06a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_06bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_06c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_06c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_06fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_06ff: Unknown result type (might be due to invalid IL or missing references)
		//IL_0715: Unknown result type (might be due to invalid IL or missing references)
		//IL_071a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0730: Unknown result type (might be due to invalid IL or missing references)
		//IL_0735: Unknown result type (might be due to invalid IL or missing references)
		//IL_074b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0750: Unknown result type (might be due to invalid IL or missing references)
		//IL_0755: Unknown result type (might be due to invalid IL or missing references)
		//IL_076a: Unknown result type (might be due to invalid IL or missing references)
		//IL_076f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0531: Unknown result type (might be due to invalid IL or missing references)
		//IL_053b: Expected O, but got Unknown
		//IL_0573: Unknown result type (might be due to invalid IL or missing references)
		//IL_0599: Unknown result type (might be due to invalid IL or missing references)
		//IL_05a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ab9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b24: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b38: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b5d: 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_0b8f: 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_0b9e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ba5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0baf: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bb4: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bd0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bd5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0beb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bf0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c1d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c22: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c29: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c33: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c38: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c54: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c59: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c6f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c74: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c8a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c94: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ca8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0cbe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0cc8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0cdc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0cf2: Unknown result type (might be due to invalid IL or missing references)
		//IL_0cfc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d10: 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_0d49: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d6e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d82: Unknown result type (might be due to invalid IL or missing references)
		//IL_0da7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0dbb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0de0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0df4: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e19: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e2d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e67: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e6c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e8f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0e94: 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_0ec7: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoBody.prefab").WaitForCompletion();
		characterPrefab = PrefabAPI.InstantiateClone(val, "KorBody", true);
		characterPrefab.AddComponent<DashBehaviour>();
		characterPrefab.GetComponent<NetworkIdentity>().localPlayerAuthority = true;
		Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("ModelBase")).gameObject);
		Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("CameraPivot")).gameObject);
		Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("AimOrigin")).gameObject);
		GameObject val2 = Assets.MainAssetBundle.LoadAsset<GameObject>("Kormdl");
		val2.AddComponent<AnimEvents>();
		((Component)val2.GetComponent<ChildLocator>().FindChild("BoulderHitbox")).gameObject.AddComponent<BoulderCollision>();
		GameObject val3 = new GameObject("ModelBase");
		val3.transform.parent = characterPrefab.transform;
		val3.transform.localPosition = new Vector3(0f, -0.94f, 0f);
		val3.transform.localRotation = Quaternion.identity;
		val3.transform.localScale = new Vector3(1f, 1f, 1f);
		GameObject val4 = new GameObject("AimOrigin");
		val4.transform.parent = val3.transform;
		val4.transform.localPosition = new Vector3(0f, 1.1f, 0f);
		val4.transform.localRotation = Quaternion.identity;
		val4.transform.localScale = Vector3.one;
		Transform transform = val2.transform;
		transform.parent = val3.transform;
		transform.localPosition = Vector3.zero;
		transform.localScale = Vector3.one;
		transform.localRotation = Quaternion.identity;
		CharacterDirection component = characterPrefab.GetComponent<CharacterDirection>();
		component.targetTransform = val3.transform;
		component.modelAnimator = val2.GetComponentInChildren<Animator>();
		component.turnSpeed = 720f;
		CharacterBody component2 = characterPrefab.GetComponent<CharacterBody>();
		((Object)component2).name = "KorBody";
		component2.baseNameToken = "KOR_NAME";
		component2.subtitleNameToken = "KOR_SUBTITLE";
		component2.bodyFlags = (BodyFlags)16;
		component2.rootMotionInMainState = false;
		component2.mainRootSpeed = 0f;
		component2.baseMaxHealth = 110f;
		component2.levelMaxHealth = 35f;
		component2.baseRegen = 1.5f;
		component2.levelRegen = 0.2f;
		component2.baseMaxShield = 0f;
		component2.levelMaxShield = 0f;
		component2.baseMoveSpeed = 7f;
		component2.levelMoveSpeed = 0f;
		component2.baseAcceleration = 110f;
		component2.baseJumpPower = 15f;
		component2.levelJumpPower = 0f;
		component2.baseDamage = 12f;
		component2.levelDamage = 2.4f;
		component2.baseAttackSpeed = 1f;
		component2.levelAttackSpeed = 0f;
		component2.baseCrit = 1f;
		component2.levelCrit = 0f;
		component2.baseArmor = 0f;
		component2.levelArmor = 0f;
		component2.baseJumpCount = 3;
		component2.sprintingSpeedMultiplier = 1.45f;
		component2.wasLucky = false;
		component2.hideCrosshair = false;
		component2.aimOriginTransform = val4.transform;
		component2.hullClassification = (HullClassification)0;
		component2.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait").texture;
		component2.isChampion = false;
		component2.currentVehicle = null;
		component2.skinIndex = 0u;
		component2.bodyColor = characterColor;
		CharacterMotor component3 = characterPrefab.GetComponent<CharacterMotor>();
		component3.walkSpeedPenaltyCoefficient = 1f;
		component3.characterDirection = component;
		component3.muteWalkMotion = false;
		component3.mass = 90f;
		component3.airControl = 0.25f;
		component3.disableAirControlUntilCollision = false;
		component3.generateParametersOnAwake = true;
		InputBankTest component4 = characterPrefab.GetComponent<InputBankTest>();
		component4.moveVector = Vector3.zero;
		CameraTargetParams component5 = characterPrefab.GetComponent<CameraTargetParams>();
		component5.cameraParams = Prefabs.Load<CharacterCameraParams>("RoR2/Base/Common/ccpStandardMelee.asset");
		component5.cameraPivotTransform = null;
		component5.recoil = Vector2.zero;
		component5.dontRaycastToPivot = false;
		ModelLocator component6 = characterPrefab.GetComponent<ModelLocator>();
		component6.modelTransform = transform;
		component6.modelBaseTransform = val3.transform;
		component6.dontReleaseModelOnDeath = false;
		component6.autoUpdateModelTransform = true;
		component6.dontDetatchFromParent = false;
		component6.noCorpse = false;
		component6.normalizeToFloor = false;
		component6.preserveModel = false;
		CharacterModel val5 = val2.AddComponent<CharacterModel>();
		SkinnedMeshRenderer[] componentsInChildren = val2.GetComponentsInChildren<SkinnedMeshRenderer>();
		List<RendererInfo> list = new List<RendererInfo>();
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			bool flag = ((Object)componentsInChildren[i]).name.Contains("Transparency");
			bool flag2 = ((Object)componentsInChildren[i]).name.Contains("Skin");
			((Renderer)componentsInChildren[i]).material = (flag ? Prefabs.spaceTransparencyMat : (flag2 ? Prefabs.spaceMat : Prefabs.baseMat));
			((Renderer)componentsInChildren[i]).material = new Material(((Renderer)componentsInChildren[i]).material);
			((Renderer)componentsInChildren[i]).material.EnableKeyword("DITHER");
			if (flag || flag2)
			{
				((Component)componentsInChildren[i]).gameObject.SetActive(false);
			}
			list.Add(new RendererInfo
			{
				renderer = (Renderer)(object)componentsInChildren[i],
				defaultMaterial = ((Renderer)componentsInChildren[i]).material,
				defaultShadowCastingMode = (ShadowCastingMode)1,
				ignoreOverlays = false
			});
		}
		RendererInfo[] array = list.ToArray();
		val5.body = component2;
		val5.baseRendererInfos = array;
		val5.autoPopulateLightInfos = true;
		val5.invisibilityCount = 0;
		val5.temporaryOverlays = new List<TemporaryOverlay>();
		val5.mainSkinnedMeshRenderer = componentsInChildren[0];
		GameObject gameObject = ((Component)transform).gameObject;
		ModelSkinController val6 = gameObject.AddComponent<ModelSkinController>();
		LanguageAPI.Add("KORBODY_DEFAULT_SKIN_NAME", "Default");
		LanguageAPI.Add("KORBODY_MASTERY_SKIN_NAME", "Space");
		val6.skins = (SkinDef[])(object)new SkinDef[2]
		{
			LoadoutAPI.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "KORBODY_DEFAULT_SKIN_NAME", "Base", array, new Color(0.99608f, 0.70588f, 0f), new Color(0.85882f, 0.76863f, 0.55686f), new Color(0.78431f, 0.66667f, 0.44706f), new Color(0.47843f, 0.42353f, 0.32941f))),
			LoadoutAPI.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "KORBODY_MASTERY_SKIN_NAME", "Skin", array, new Color(0.10196f, 0.85882f, 0.75294f), new Color(0.77255f, 0.85098f, 0.87059f), new Color(0.38431f, 0.47843f, 0.52941f), new Color(0.0902f, 0.35686f, 0.30196f)))
		};
		PhysicMaterial val7 = Addressables.LoadAssetAsync<PhysicMaterial>((object)"RoR2/Base/Common/physmatRagdoll.physicMaterial").WaitForCompletion();
		List<Transform> list2 = new List<Transform>();
		List<string> list3 = new List<string>
		{
			"Root", "Hammer1", "Hips", "Leg.L", "Foot.L", "Leg.R", "Foot.R", "Spine", "Arm.L", "Hand.L",
			"Arm.R", "Hand.R", "GauntletArm.L", "GauntletHand.L", "GauntletArm.R", "GauntletHand.R", "Head"
		};
		Transform[] componentsInChildren2 = val2.GetComponentsInChildren<Transform>(true);
		foreach (Transform val8 in componentsInChildren2)
		{
			string name = ((Object)val8).name;
			if (list3.Contains(name))
			{
				list2.Add(val8);
				GameObject gameObject2 = ((Component)val8).gameObject;
				gameObject2.layer = LayerIndex.ragdoll.intVal;
				if (!Object.op_Implicit((Object)(object)gameObject2.GetComponent<Rigidbody>()))
				{
					gameObject2.AddComponent<Rigidbody>();
				}
				CapsuleCollider val9 = gameObject2.AddComponent<CapsuleCollider>();
				val9.radius = 0.2f;
				val9.height = 1.5f;
				((Collider)val9).material = val7;
				((Collider)val9).sharedMaterial = val7;
				Rigidbody component7 = ((Component)val8.parent).GetComponent<Rigidbody>();
				if (Object.op_Implicit((Object)(object)component7))
				{
					CharacterJoint val10 = gameObject2.AddComponent<CharacterJoint>();
					((Joint)val10).autoConfigureConnectedAnchor = true;
					((Joint)val10).enablePreprocessing = true;
					((Joint)val10).connectedBody = component7;
				}
			}
		}
		RagdollController val11 = val2.AddComponent<RagdollController>();
		val11.bones = list2.ToArray();
		HealthComponent component8 = characterPrefab.GetComponent<HealthComponent>();
		component8.health = component2.baseMaxHealth;
		component8.shield = 0f;
		component8.barrier = 0f;
		component8.magnetiCharge = 0f;
		component8.body = null;
		component8.dontShowHealthbar = false;
		characterPrefab.GetComponent<Interactor>().maxInteractionDistance = 3f;
		characterPrefab.GetComponent<InteractionDriver>().highlightInteractor = true;
		SfxLocator component9 = characterPrefab.GetComponent<SfxLocator>();
		component9.deathSound = "Play_ui_player_death";
		component9.barkSound = "";
		component9.openSound = "";
		component9.landingSound = "Play_char_land";
		component9.fallDamageSound = "Play_char_land_fall_damage";
		component9.aliveLoopStart = "";
		component9.aliveLoopStop = "";
		characterPrefab.GetComponent<Rigidbody>().mass = 80f;
		Collider[] componentsInChildren3 = val2.GetComponentsInChildren<Collider>();
		HurtBoxGroup val12 = val2.AddComponent<HurtBoxGroup>();
		List<HurtBox> list4 = new List<HurtBox>();
		Collider[] array2 = componentsInChildren3;
		foreach (Collider val13 in array2)
		{
			HurtBox val14 = ((Component)val13).gameObject.AddComponent<HurtBox>();
			((Component)val14).gameObject.layer = LayerIndex.entityPrecise.intVal;
			val14.healthComponent = component8;
			val14.isBullseye = true;
			val14.damageModifier = (DamageModifier)0;
			val14.hurtBoxGroup = val12;
			val14.indexInGroup = 0;
			val12.mainHurtBox = val14;
			val12.bullseyeCount = 1;
			list4.Add(val14);
		}
		val12.hurtBoxes = list4.ToArray();
		Utils.CreateHitbox("SLight", val2.transform, new Vector3(9f, 9f, 12f), new Vector3(0f, 0.5f, 2.5f));
		Utils.CreateHitbox("SLightAir", val2.transform, new Vector3(12f, 9f, 13f), new Vector3(1f, 0.5f, 2.5f));
		Utils.CreateHitboxes("Slam", val2.transform, (Vector3[])(object)new Vector3[2]
		{
			Vector3.one * 12f,
			Vector3.one * 19f
		}, (Vector3[])(object)new Vector3[2]
		{
			new Vector3(0f, 0.5f, 2f),
			new Vector3(0f, 0.5f, 8f)
		});
		Utils.CreateHitboxes("Bonk", val2.transform, (Vector3[])(object)new Vector3[2]
		{
			new Vector3(8f, 9f, 11f),
			Vector3.one * 8f
		}, (Vector3[])(object)new Vector3[2]
		{
			new Vector3(0f, 0.5f, 2f),
			new Vector3(0f, 0.5f, 3f)
		});
		Utils.CreateHitbox("GroundPunch", val2.transform, Vector3.one * 15f, new Vector3(0f, 0.5f, 0f));
		Utils.CreateHitbox("Boulder", val2.transform, Vector3.one * 10f, new Vector3(0f, 0.5f, 0f));
		Utils.CreateHitbox("DLight", val2.transform, Vector3.one * 14f, new Vector3(0f, 0.5f, 0f));
		Utils.CreateHitbox("DLightAir", val2.transform, new Vector3(11f, 12f, 7f), new Vector3(2f, 0f, 0f));
		Utils.CreateHitbox("DLightAir-FollowUp", val2.transform, new Vector3(14f, 14f, 10f), new Vector3(-1.5f, 3f, 0f));
		Utils.CreateHitbox("NLight", val2.transform, new Vector3(8f, 9f, 10f), new Vector3(0f, 0.5f, 1f));
		Utils.CreateHitbox("NLightAir", val2.transform, new Vector3(9f, 12f, 16f), new Vector3(0f, 3f, 0f));
		Utils.CreateHitbox("Kick", val2.transform, new Vector3(7f, 9f, 10f), new Vector3(0f, 1f, 1.5f));
		FootstepHandler val15 = val2.AddComponent<FootstepHandler>();
		val15.baseFootstepString = "Play_player_footstep";
		val15.sprintFootstepOverrideString = "";
		val15.enableFootstepDust = true;
		val15.footstepDustPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/GenericFootstepDust.prefab").WaitForCompletion();
		EntityStateMachine component10 = ((Component)component2).GetComponent<EntityStateMachine>();
		component10.mainStateType = new SerializableEntityStateType(typeof(CharacterMain));
		CharacterDeathBehavior component11 = characterPrefab.GetComponent<CharacterDeathBehavior>();
		component11.deathStateMachine = characterPrefab.GetComponent<EntityStateMachine>();
		component11.deathState = new SerializableEntityStateType(typeof(DeathState));
		NetworkStateMachine component12 = ((Component)component2).GetComponent<NetworkStateMachine>();
		component12.stateMachines = ((Component)component2).GetComponents<EntityStateMachine>();
		characterPrefab.GetComponent<SetStateOnHurt>().idleStateMachine = (EntityStateMachine[])(object)new EntityStateMachine[1] { component10 };
		ContentAddition.AddBody(characterPrefab);
	}

	private void RegisterCharacter()
	{
		//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
		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("KOR_NAME", "Kor");
		LanguageAPI.Add("KOR_DESCRIPTION", text);
		LanguageAPI.Add("KOR_SUBTITLE", "");
		LanguageAPI.Add("KOR_OUTRO", text2);
		LanguageAPI.Add("KOR_FAIL", text3);
		SurvivorDef val = ScriptableObject.CreateInstance<SurvivorDef>();
		val.cachedName = "KOR_NAME";
		val.unlockableDef = null;
		val.descriptionToken = "KOR_DESCRIPTION";
		val.primaryColor = characterColor;
		val.bodyPrefab = characterPrefab;
		val.displayPrefab = Utils.NewDisplayModel(((Component)characterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "KorDisplay");
		val.outroFlavorToken = "KOR_OUTRO";
		val.desiredSortPosition = 22f;
		val.mainEndingEscapeFailureFlavorToken = "KOR_FAIL";
		ContentAddition.AddSurvivorDef(val);
		SkillSetup();
		GameObject val2 = PrefabAPI.InstantiateClone(Prefabs.Load<GameObject>("RoR2/Base/Merc/MercMonsterMaster.prefab"), "KorMaster", true);
		ContentAddition.AddMaster(val2);
		CharacterMaster component = val2.GetComponent<CharacterMaster>();
		component.bodyPrefab = characterPrefab;
	}

	private void RegisterStates()
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_006b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
		bool flag = default(bool);
		ContentAddition.AddEntityState<CharacterMain>(ref flag);
		ContentAddition.AddEntityState<MomentumCharge>(ref flag);
		ContentAddition.AddEntityState<BaseKorState>(ref flag);
		ContentAddition.AddEntityState<WeaponThrow>(ref flag);
		ContentAddition.AddEntityState<GauntletThrow>(ref flag);
		ContentAddition.AddEntityState<HammerThrow>(ref flag);
		ContentAddition.AddEntityState<ChargeState>(ref flag);
		ContentAddition.AddEntityState<ChargeSlam>(ref flag);
		ContentAddition.AddEntityState<Slam>(ref flag);
		ContentAddition.AddEntityState<ChargeGrab>(ref flag);
		ContentAddition.AddEntityState<Yeet>(ref flag);
		ContentAddition.AddEntityState<Dodge>(ref flag);
		ContentAddition.AddEntityState<BoulderCharge>(ref flag);
		ContentAddition.AddEntityState<BoulderRoll>(ref flag);
		ContentAddition.AddEntityState<BoulderSlam>(ref flag);
		ContentAddition.AddEntityState<GroundPunchCharge>(ref flag);
		ContentAddition.AddEntityState<GroundPunchHit>(ref flag);
		ContentAddition.AddEntityState<InputMeleeAttack>(ref flag);
		ContentAddition.AddEntityState<ForwardMelee>(ref flag);
		ContentAddition.AddEntityState<StandMelee>(ref flag);
		ContentAddition.AddEntityState<BackMelee>(ref flag);
		ContentAddition.AddEntityState<BackMeleeFollowup>(ref flag);
		ContentAddition.AddEntityState<InputMeleeEnd>(ref flag);
	}

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

	private void PrimarySetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0129: Unknown result type (might be due to invalid IL or missing references)
		//IL_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0167: Unknown result type (might be due to invalid IL or missing references)
		//IL_0287: Unknown result type (might be due to invalid IL or missing references)
		//IL_028c: 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)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("KOR_M1", "Hammer Throw");
		LanguageAPI.Add("KOR_M1_DESCRIPTION", "Throw a hammer for <style=cIsDamage>420%</style> damage.");
		SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(HammerThrow));
		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 = false;
		val.rechargeStock = 0;
		val.requiredStock = 0;
		val.stockToConsume = 0;
		val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("kor_128_1");
		val.skillDescriptionToken = "KOR_M1_DESCRIPTION";
		val.skillName = "KOR_M1";
		val.skillNameToken = "KOR_M1";
		ContentAddition.AddSkillDef(val);
		component.primary = Utils.NewGenericSkill(characterPrefab, val);
		LanguageAPI.Add("KOR_M1_ALT1", "Gauntlet Throw");
		LanguageAPI.Add("KOR_M1_ALT1_DESCRIPTION", "Throw your gauntlets in quick succession for <style=cIsDamage>220%</style> damage each.");
		val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(GauntletThrow));
		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 = false;
		val.rechargeStock = 0;
		val.requiredStock = 0;
		val.stockToConsume = 0;
		val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("kor_128_2");
		val.skillDescriptionToken = "KOR_M1_ALT1_DESCRIPTION";
		val.skillName = "KOR_M1_ALT1";
		val.skillNameToken = "KOR_M1_ALT1";
		ContentAddition.AddSkillDef(val);
		Utils.AddAlt(component.primary.skillFamily, val);
		LanguageAPI.Add("KOR_M1_ALT2_KEYWORD", "<style=cKeywordName>Forward/Side</style><style=cSub>Ground: Thrust forward for <style=cIsDamage>350%</style> damage." + Environment.NewLine + "Air: Swing sideways for <style=cIsDamage>350%</style> damage." + Environment.NewLine + "<style=cKeywordName>No Input/Jump</style><style=cSub>Ground: Kick forward twice for <style=cIsDamage>230%</style> damage each." + Environment.NewLine + "Air: Upward swing for <style=cIsDamage>350%</style> damage." + Environment.NewLine + "<style=cKeywordName>Back</style><style=cSub>Ground: Stomp for <style=cIsDamage>150%</style> damage, creates a boulder that can be hit to launch it in the aim direction, dealing <style=cIsDamage>350%</style> damage, deals an additional <style=cIsDamage>100%</style> if hit right after dashing. Charged abilities can double it's damage based on charge." + Environment.NewLine + "Air: Downward-sideways swing for <style=cIsDamage>200%</style> damage. Followup <style=cIsDamage>on hit</style> with a upward-sideways swing for <style=cIsDamage>450%</style> damage.");
		LanguageAPI.Add("KOR_M1_ALT2", "Hammer Combo");
		LanguageAPI.Add("KOR_M1_ALT2_DESCRIPTION", "Perform an input-based melee attack, that behaves differently based on directional input and while on ground/air. <style=cKeywordName>Inputs</style><style=cSub>");
		val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(InputMeleeAttack));
		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>("kor_128_3");
		val.skillDescriptionToken = "KOR_M1_ALT2_DESCRIPTION";
		val.skillName = "KOR_M1_ALT2";
		val.skillNameToken = "KOR_M1_ALT2";
		val.keywordTokens = new string[1] { "KOR_M1_ALT2_KEYWORD" };
		ContentAddition.AddSkillDef(val);
		Utils.AddAlt(component.primary.skillFamily, val);
	}

	private void SecondarySetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0129: Unknown result type (might be due to invalid IL or missing references)
		//IL_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0167: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("KOR_M2", "Yeet");
		LanguageAPI.Add("KOR_M2_DESCRIPTION", "Grab an enemy in the forward direction for <style=cIsDamage>170%-700%</style> damage, and throw them away in the aim direction for <style=cIsDamage>100%-500%</style> damage. Thrown targets can collide with other enemies for <style=cIsDamage>170%-300%</style> damage, and thrown targets take recoil damage for <style=cIsDamage>100%-200%</style> damage. Bosses get slapped instead, for <style=cIsDamage>500%-1500%</style>.");
		SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(ChargeGrab));
		val.activationStateMachineName = "Weapon";
		val.baseMaxStock = 1;
		val.baseRechargeInterval = 5f;
		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>("kor_128_4");
		val.skillDescriptionToken = "KOR_M2_DESCRIPTION";
		val.skillName = "KOR_M2";
		val.skillNameToken = "KOR_M2";
		ContentAddition.AddSkillDef(val);
		component.secondary = Utils.NewGenericSkill(characterPrefab, val);
		LanguageAPI.Add("KOR_M2_ALT", "Bonk");
		LanguageAPI.Add("KOR_M2_ALT_DESCRIPTION", "Slam forward for <style=cIsDamage>450%-2100%</style> damage. Hitbox size increases exponentially when at full charge.");
		val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(ChargeSlam));
		val.activationStateMachineName = "Weapon";
		val.baseMaxStock = 1;
		val.baseRechargeInterval = 5f;
		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>("kor_128_5");
		val.skillDescriptionToken = "KOR_M2_ALT_DESCRIPTION";
		val.skillName = "KOR_M2_ALT";
		val.skillNameToken = "KOR_M2_ALT";
		ContentAddition.AddSkillDef(val);
		Utils.AddAlt(component.secondary.skillFamily, val);
	}

	private void UtilitySetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("KOR_UTIL", "Dodge");
		LanguageAPI.Add("KOR_UTIL_DESCRIPTION", "Dash in the forward direction or diagonally if holding <style=cIsUtility>jump</style>.");
		SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(Dodge));
		val.activationStateMachineName = "Slide";
		val.baseMaxStock = 1;
		val.baseRechargeInterval = 2.7f;
		val.beginSkillCooldownOnSkillEnd = true;
		val.canceledFromSprinting = false;
		val.fullRestockOnAssign = false;
		val.interruptPriority = (InterruptPriority)1;
		val.isCombatSkill = false;
		val.mustKeyPress = true;
		val.cancelSprintingOnActivation = false;
		val.rechargeStock = 1;
		val.requiredStock = 1;
		val.stockToConsume = 1;
		val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("kor_128_6");
		val.skillDescriptionToken = "KOR_UTIL_DESCRIPTION";
		val.skillName = "KOR_UTIL";
		val.skillNameToken = "KOR_UTIL";
		ContentAddition.AddSkillDef(val);
		component.utility = Utils.NewGenericSkill(characterPrefab, val);
	}

	private void SpecialSetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0129: Unknown result type (might be due to invalid IL or missing references)
		//IL_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0167: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("KOR_SPEC", "The Rolling Stones");
		LanguageAPI.Add("KOR_SPEC_DESCRIPTION", "Curl up to a boulder and roll forward for <style=cIsDamage>100%-500%</style> damage. At the end of it's duration or after activating any ability, slam forward for <style=cIsDamage>650%-2600%</style>.");
		SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(BoulderCharge));
		val.activationStateMachineName = "Slide";
		val.baseMaxStock = 1;
		val.baseRechargeInterval = 8f;
		val.beginSkillCooldownOnSkillEnd = true;
		val.canceledFromSprinting = false;
		val.fullRestockOnAssign = false;
		val.interruptPriority = (InterruptPriority)1;
		val.isCombatSkill = true;
		val.mustKeyPress = true;
		val.cancelSprintingOnActivation = false;
		val.rechargeStock = 1;
		val.requiredStock = 1;
		val.stockToConsume = 1;
		val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("kor_128_7");
		val.skillDescriptionToken = "KOR_SPEC_DESCRIPTION";
		val.skillName = "KOR_SPEC";
		val.skillNameToken = "KOR_SPEC";
		ContentAddition.AddSkillDef(val);
		component.special = Utils.NewGenericSkill(characterPrefab, val);
		LanguageAPI.Add("KOR_SPEC_ALT", "Ko(r)ake");
		LanguageAPI.Add("KOR_SPEC_ALT_DESCRIPTION", "Charge up a ground punch for <style=cIsDamage>800%-3000%</style> damage.");
		val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(GroundPunchCharge));
		val.activationStateMachineName = "Slide";
		val.baseMaxStock = 1;
		val.baseRechargeInterval = 8f;
		val.beginSkillCooldownOnSkillEnd = true;
		val.canceledFromSprinting = false;
		val.fullRestockOnAssign = false;
		val.interruptPriority = (InterruptPriority)1;
		val.isCombatSkill = true;
		val.mustKeyPress = true;
		val.cancelSprintingOnActivation = false;
		val.rechargeStock = 1;
		val.requiredStock = 1;
		val.stockToConsume = 1;
		val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("kor_128_8");
		val.skillDescriptionToken = "KOR_SPEC_ALT_DESCRIPTION";
		val.skillName = "KOR_SPEC_ALT";
		val.skillNameToken = "KOR_SPEC_ALT";
		ContentAddition.AddSkillDef(val);
		Utils.AddAlt(component.special.skillFamily, val);
	}
}
internal class Prefabs
{
	internal static GameObject hammerProjectile;

	internal static GameObject hammerProjectileGhost;

	internal static GameObject hammerProjectilePhysics;

	internal static GameObject gauntletProjectile;

	internal static GameObject gauntletProjectileGhost;

	internal static GameObject gauntletProjectilePhysics;

	internal static GameObject gauntletSlamImpactEffect;

	internal static GameObject bonkImpactEffectLight;

	internal static GameObject bonkImpactEffectHeavy;

	internal static GameObject impactEffectHammer;

	internal static GameObject impactEffectHammerLight;

	internal static GameObject impactEffectGauntlet;

	internal static GameObject stepImpactEffect;

	internal static GameObject chargeEffect;

	internal static GameObject hammerSwingEffect;

	internal static GameObject gauntletSwingEffect;

	internal static GameObject stompEffect;

	internal static GameObject dashEffect;

	internal static GameObject dashEffectEmp;

	internal static GameObject throwCollider;

	internal static GameObject boulderProjectile;

	internal static GameObject boulderProjectileGhost;

	internal static Material baseMat;

	internal static Material spaceMat;

	internal static Material spaceTransparencyMat;

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

	internal static void CreatePrefabs()
	{
		//IL_0040: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c8: 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_0126: Unknown result type (might be due to invalid IL or missing references)
		//IL_0130: Expected O, but got Unknown
		//IL_016e: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c0: Expected O, but got Unknown
		//IL_021c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0226: Unknown result type (might be due to invalid IL or missing references)
		//IL_0270: Unknown result type (might be due to invalid IL or missing references)
		//IL_027a: Expected O, but got Unknown
		//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_0300: Unknown result type (might be due to invalid IL or missing references)
		//IL_0313: Unknown result type (might be due to invalid IL or missing references)
		//IL_031d: Unknown result type (might be due to invalid IL or missing references)
		//IL_033f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0396: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_041f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0424: Unknown result type (might be due to invalid IL or missing references)
		//IL_04cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_04d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_04eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0513: Unknown result type (might be due to invalid IL or missing references)
		//IL_051d: Unknown result type (might be due to invalid IL or missing references)
		//IL_052f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0534: Unknown result type (might be due to invalid IL or missing references)
		//IL_0600: Unknown result type (might be due to invalid IL or missing references)
		//IL_060a: Expected O, but got Unknown
		//IL_0626: Unknown result type (might be due to invalid IL or missing references)
		//IL_0650: Unknown result type (might be due to invalid IL or missing references)
		//IL_065a: Expected O, but got Unknown
		//IL_0676: Unknown result type (might be due to invalid IL or missing references)
		//IL_0908: Unknown result type (might be due to invalid IL or missing references)
		//IL_0912: Unknown result type (might be due to invalid IL or missing references)
		//IL_092e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0955: Unknown result type (might be due to invalid IL or missing references)
		//IL_095a: Unknown result type (might be due to invalid IL or missing references)
		//IL_097d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0982: Unknown result type (might be due to invalid IL or missing references)
		//IL_098b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a0d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a17: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d5c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d66: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d7b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0d82: Expected O, but got Unknown
		//IL_0d9d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0da2: Unknown result type (might be due to invalid IL or missing references)
		Shader shader = Load<Shader>("RoR2/Base/Shaders/HGStandard.shader");
		baseMat = Assets.Load<Material>("base");
		baseMat.shader = shader;
		baseMat.SetColor("_Color", new Color(1f, 0.8549f, 0.75686f));
		baseMat.SetTexture("_EmTex", (Texture)(object)Assets.Load<Texture2D>("base_e"));
		baseMat.SetColor("_EmColor", Utils.HexTo10("feb400"));
		baseMat.SetFloat("_EmPower", 2f);
		spaceMat = Assets.Load<Material>("space");
		spaceMat.shader = shader;
		spaceMat.SetColor("_Color", new Color(1f, 0.8549f, 0.75686f));
		spaceMat.SetTexture("_EmTex", (Texture)(object)Assets.Load<Texture2D>("space_e"));
		spaceMat.SetColor("_EmColor", Utils.HexTo10("13dcc1"));
		spaceMat.SetFloat("_EmPower", 2f);
		spaceTransparencyMat = new Material(Load<Shader>("RoR2/Base/Shaders/HGIntersectionCloudRemap.shader"));
		spaceTransparencyMat.EnableKeyword("DITHER");
		spaceTransparencyMat.SetFloat("_Boost", 0.56f);
		spaceTransparencyMat.SetColor("_TintColor", new Color(0.07450981f, 44f / 51f, 0.854902f));
		hammerSwingEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Brother/BrotherSwing1.prefab"), "HammerSwingEffect", false);
		((Behaviour)hammerSwingEffect.GetComponentInChildren<PostProcessVolume>()).enabled = false;
		ParticleSystemRenderer componentInChildren = hammerSwingEffect.GetComponentInChildren<ParticleSystemRenderer>();
		((Renderer)componentInChildren).material = new Material(((Renderer)componentInChildren).material);
		((Renderer)componentInChildren).material.SetTexture("_RemapTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/ColorRamps/texRampTwotone.jpg"));
		((Renderer)componentInChildren).material.SetFloat("_AlphaBoost", 5f);
		Object.Destroy((Object)(object)hammerSwingEffect.GetComponent<EffectComponent>());
		Object.Destroy((Object)(object)hammerSwingEffect.GetComponent<VFXAttributes>());
		hammerSwingEffect.transform.localScale = Vector3.one * 0.35f;
		throwCollider = new GameObject("ThrowCollider", new Type[4]
		{
			typeof(SphereCollider),
			typeof(ThrowHitboxBehaviour),
			typeof(DestroyOnTimer),
			typeof(Rigidbody)
		});
		throwCollider.layer = 14;
		throwCollider.GetComponent<DestroyOnTimer>().duration = 1.2f;
		throwCollider.transform.parent = hammerSwingEffect.transform.parent;
		gauntletSwingEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Croco/CrocoSlash.prefab"), "GauntletSwingEffect", false);
		ParticleSystemRenderer[] componentsInChildren = gauntletSwingEffect.GetComponentsInChildren<ParticleSystemRenderer>();
		((Renderer)componentsInChildren[0]).material = ((Renderer)componentInChildren).material;
		((Component)componentsInChildren[0]).transform.localScale = Vector3.one * 2f;
		((Component)componentsInChildren[1]).transform.localScale = Vector3.one * 2f;
		((Component)componentsInChildren[1]).transform.localRotation = Quaternion.Euler(0f, 0f, 140f);
		ScaleParticleSystemDuration component = gauntletSwingEffect.GetComponent<ScaleParticleSystemDuration>();
		component.newDuration = 0.55f;
		component.initialDuration = 0.55f;
		stompEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Titan/TitanFistEffect.prefab"), "KorStompEffect", false);
		stompEffect.transform.GetChild(0).localScale = Vector3.one * 0.55f;
		ParticleSystemRenderer[] componentsInChildren2 = stompEffect.GetComponentsInChildren<ParticleSystemRenderer>();
		ParticleSystemRenderer val;
		MainModule main;
		for (int i = 0; i < componentsInChildren2.Length; main = ((Component)val).GetComponent<ParticleSystem>().main, ((MainModule)(ref main)).scalingMode = (ParticleSystemScalingMode)0, i++)
		{
			val = componentsInChildren2[i];
			string name = ((Object)val).name;
			switch (name)
			{
			default:
				if (!(name == "Flash, White"))
				{
					continue;
				}
				break;
			case "Fist":
			case "Sparks, Trail":
			case "Flash, Red":
				break;
			}
			((Renderer)val).enabled = false;
		}
		stompEffect.GetComponent<EffectComponent>().soundName = "Play_Kor_Rocky_Impact";
		Object.Destroy((Object)(object)((Component)stompEffect.GetComponentInChildren<Light>()).gameObject);
		ContentAddition.AddEffect(stompEffect);
		dashEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Bandit2/Bandit2SmokeBomb.prefab"), "KorDashEffect", false);
		ParticleSystemRenderer[] componentsInChildren3 = dashEffect.GetComponentsInChildren<ParticleSystemRenderer>();
		foreach (ParticleSystemRenderer val2 in componentsInChildren3)
		{
			string name2 = ((Object)val2).name;
			if (name2 == "Dust, CenterTube")
			{
				((Component)val2).transform.localScale = Vector3.one * 0.75f;
				((Component)val2).transform.localRotation = Quaternion.identity;
			}
			else if (name2 == "Dust, CenterSphere")
			{
				((Component)val2).transform.localScale = Vector3.one * 0.6f;
				MainModule main2 = ((Component)val2).GetComponent<ParticleSystem>().main;
				((MainModule)(ref main2)).simulationSpace = (ParticleSystemSimulationSpace)0;
			}
			else
			{
				((Component)val2).gameObject.SetActive(false);
			}
		}
		Object.Destroy((Object)(object)dashEffect.GetComponent<EffectComponent>());
		Object.Destroy((Object)(object)dashEffect.GetComponent<VFXAttributes>());
		Object.Destroy((Object)(object)dashEffect.GetComponent<Rigidbody>());
		Object.Destroy((Object)(object)((Component)dashEffect.GetComponentInChildren<Light>()).gameObject);
		dashEffectEmp = PrefabAPI.InstantiateClone(dashEffect, "KorDashEffectEmp", false);
		ParticleSystemRenderer[] componentsInChildren4 = dashEffectEmp.GetComponentsInChildren<ParticleSystemRenderer>();
		foreach (ParticleSystemRenderer val3 in componentsInChildren4)
		{
			string name3 = ((Object)val3).name;
			if (name3 == "Dust, CenterTube")
			{
				((Renderer)val3).material = new Material(((Renderer)val3).material);
				((Renderer)val3).material.SetColor("_TintColor", new Color(1f, 0.41568f, 0f));
			}
			else if (name3 == "Dust, CenterSphere")
			{
				((Renderer)val3).material = new Material(((Renderer)val3).material);
				((Renderer)val3).material.SetColor("_TintColor", new Color(1f, 0.37647f, 0f));
			}
		}
		impactEffectGauntlet = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Common/VFX/OmniImpactVFX.prefab"), "KorHammerBonkImpactEffectHeavy", false);
		impactEffectGauntlet.GetComponent<EffectComponent>().soundName = "Play_Kor_Gauntlet_Impact";
		ContentAddition.AddEffect(impactEffectGauntlet);
		impactEffectHammerLight = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Common/VFX/OmniImpactVFX.prefab"), "KorHammerBonkImpactEffectLight", false);
		impactEffectHammerLight.GetComponent<EffectComponent>().soundName = "Play_Kor_Hammer_Light_Impact";
		ContentAddition.AddEffect(impactEffectHammerLight);
		impactEffectHammer = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Common/VFX/OmniImpactVFXLarge.prefab"), "KorHammerBonkImpactEffectHeavy", false);
		impactEffectHammer.GetComponent<EffectComponent>().soundName = "Play_Kor_Hammer_Impact";
		ContentAddition.AddEffect(impactEffectHammer);
		gauntletSlamImpactEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Parent/ParentSlamEffect.prefab"), "KorGauntletGroundImpactEffect", false);
		gauntletSlamImpactEffect.GetComponent<EffectComponent>().soundName = "Play_Kor_Gauntlet_GroundHit_Impact";
		ContentAddition.AddEffect(gauntletSlamImpactEffect);
		bonkImpactEffectLight = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Beetle/BeetleGuardSunderPop.prefab"), "KorHammerBonkImpactEffectLight", false);
		ParticleSystem[] componentsInChildren5 = bonkImpactEffectLight.GetComponentsInChildren<ParticleSystem>();
		foreach (ParticleSystem val4 in componentsInChildren5)
		{
			if (((Object)val4).name.Contains("Spikes"))
			{
				((Component)val4).gameObject.SetActive(false);
			}
		}
		bonkImpactEffectLight.GetComponent<EffectComponent>().soundName = "Play_Kor_Hammer_Slam_Impact";
		ContentAddition.AddEffect(bonkImpactEffectLight);
		bonkImpactEffectHeavy = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Beetle/BeetleGuardGroundSlam.prefab"), "KorHammerBonkImpactEffectHeavy", false);
		ParticleSystem[] componentsInChildren6 = bonkImpactEffectHeavy.GetComponentsInChildren<ParticleSystem>();
		foreach (ParticleSystem val5 in componentsInChildren6)
		{
			if (((Object)val5).name.Contains("Spikes"))
			{
				((Component)val5).gameObject.SetActive(false);
			}
		}
		bonkImpactEffectHeavy.GetComponent<EffectComponent>().soundName = "Play_Kor_Hammer_Slam_Impact";
		ContentAddition.AddEffect(bonkImpactEffectHeavy);
		chargeEffect = PrefabAPI.InstantiateClone(bonkImpactEffectHeavy, "KorChargeEffect", false);
		Object.Destroy((Object)(object)chargeEffect.GetComponent<EffectComponent>());
		Object.Destroy((Object)(object)chargeEffect.GetComponent<DestroyOnTimer>());
		Object.Destroy((Object)(object)chargeEffect.GetComponent<VFXAttributes>());
		Object.Destroy((Object)(object)chargeEffect.GetComponent<AlignToNormal>());
		Object.Destroy((Object)(object)((Component)chargeEffect.GetComponentInChildren<Decal>()).gameObject);
		Transform child = chargeEffect.transform.GetChild(0);
		child.localScale = Vector3.one * 0.35f;
		child.localRotation = Quaternion.Euler(25f, 0f, -25f);
		ParticleSystem[] componentsInChildren7 = chargeEffect.GetComponentsInChildren<ParticleSystem>();
		foreach (ParticleSystem val6 in componentsInChildren7)
		{
			MainModule main3 = val6.main;
			((MainModule)(ref main3)).loop = true;
			((MainModule)(ref main3)).duration = 0.55f;
			((MainModule)(ref main3)).scalingMode = (ParticleSystemScalingMode)0;
			EmissionModule emission = val6.emission;
			((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(35f);
		}
		ShakeEmitter component2 = chargeEffect.GetComponent<ShakeEmitter>();
		component2.wave.amplitude = 0.1f;
		component2.duration = 2f;
		stepImpactEffect = PrefabAPI.InstantiateClone(bonkImpactEffectHeavy, "KorStepImpactEffect", false);
		stepImpactEffect.GetComponent<EffectComponent>().soundName = "Play_Kor_Rocky_Impact";
		Transform child2 = stepImpactEffect.transform.GetChild(0);
		child2.localScale *= 0.55f;
		ContentAddition.AddEffect(stepImpactEffect);
		GameObject val7 = Load<GameObject>("RoR2/DLC1/Assassin2/AssassinShurikenProjectile.prefab");
		hammerProjectilePhysics = PrefabAPI.InstantiateClone(Assets.Load<GameObject>("hammerProjectilePhysics"), "KorHammerProjectilePhysics", false);
		hammerProjectilePhysics.AddComponent<DestroyOnTimer>().duration = 4f;
		hammerProjectilePhysics.AddComponent<DestroyOnUnseen>();
		hammerProjectileGhost = PrefabAPI.InstantiateClone(Assets.Load<GameObject>("hammerProjectile"), "KorHammerProjectileGhost", false);
		hammerProjectileGhost.AddComponent<ProjectileGhostController>();
		hammerProjectileGhost.AddComponent<KorGhostProjectileSkinController>();
		Utils.AddScaleComponent(hammerProjectileGhost, 0.2f, AnimationCurve.Linear(0f, 1f, 1f, 1.6f));
		Utils.AddRotationComponent(((Component)hammerProjectileGhost.transform.GetChild(0)).gameObject, 1440f, (RotationAxis)0, (Space)1);
		hammerProjectile = PrefabAPI.InstantiateClone(val7, "KorHammerProjectile", true);
		Rigidbody component3 = hammerProjectile.GetComponent<Rigidbody>();
		component3.useGravity = true;
		ProjectileController component4 = hammerProjectile.GetComponent<ProjectileController>();
		component4.ghostPrefab = hammerProjectileGhost;
		component4.startSound = "";
		hammerProjectile.GetComponent<SphereCollider>().radius = 1f;
		ProjectileSingleTargetImpact component5 = hammerProjectile.GetComponent<ProjectileSingleTargetImpact>();
		component5.impactEffect = impactEffectHammer;
		component5.enemyHitSoundString = "";
		component5.hitSoundString = "";
		ProjectileSimple component6 = hammerProjectile.GetComponent<ProjectileSimple>();
		component6.desiredForwardSpeed = 110f;
		component6.lifetime = 7f;
		AntiGravityForce val8 = hammerProjectile.AddComponent<AntiGravityForce>();
		val8.rb = component3;
		val8.antiGravityCoefficient = 0.15f;
		ContentAddition.AddProjectile(hammerProjectile);
		gauntletProjectilePhysics = PrefabAPI.InstantiateClone(Assets.Load<GameObject>("gauntletProjectilePhysics"), "KorGauntletProjectilePhysics", false);
		gauntletProjectilePhysics.AddComponent<DestroyOnTimer>().duration = 4f;
		gauntletProjectilePhysics.AddComponent<DestroyOnUnseen>();
		gauntletProjectileGhost = PrefabAPI.InstantiateClone(Assets.Load<GameObject>("gauntletProjectile"), "KorGauntletProjectileGhost", false);
		gauntletProjectileGhost.AddComponent<ProjectileGhostController>();
		KorGhostProjectileSkinController korGhostProjectileSkinController = gauntletProjectileGhost.AddComponent<KorGhostProjectileSkinController>();
		korGhostProjectileSkinController.backForce = 200f;
		korGhostProjectileSkinController.upForce = 200f;
		korGhostProjectileSkinController.torque = 1000f;
		Utils.AddScaleComponent(gauntletProjectileGhost, 0.05f, AnimationCurve.Linear(0f, 1f, 1f, 1.5f));
		gauntletProjectile = PrefabAPI.InstantiateClone(val7, "KorGauntletProjectile", true);
		gauntletProjectile.GetComponent<ProjectileSingleTargetImpact>().impactEffect = Load<GameObject>("RoR2/Base/Common/VFX/OmniImpactVFX.prefab");
		ProjectileController component7 = gauntletProjectile.GetComponent<ProjectileController>();
		component7.ghostPrefab = gauntletProjectileGhost;
		component7.startSound = "";
		ProjectileSimple component8 = gauntletProjectile.GetComponent<ProjectileSimple>();
		component8.desiredForwardSpeed = 140f;
		component8.lifetime = 7f;
		ProjectileSingleTargetImpact component9 = gauntletProjectile.GetComponent<ProjectileSingleTargetImpact>();
		component9.impactEffect = impactEffectGauntlet;
		component9.enemyHitSoundString = "";
		component9.hitSoundString = "";
		ContentAddition.AddProjectile(gauntletProjectile);
		boulderProjectileGhost = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Grandparent/GrandparentBoulderGhost.prefab"), "BoudlerProjectileGhost", true);
		boulderProjectileGhost.transform.GetChild(0).localScale = Vector3.one * 0.2f;
		Material val9 = new Material(Load<Material>("RoR2/DLC1/ancientloft/matAncientLoft_Floor.mat"));
		val9.SetColor("_Color", Color32.op_Implicit(new Color32(byte.MaxValue, (byte)218, (byte)132, byte.MaxValue)));
		val9.SetFloat("_Depth", 1f);
		val9.SetTexture("_BlueChannelTex", (Texture)(object)Load<Texture2D>("RoR2/DLC1/itskymeadow/texSMGrassTerrainInfiniteTower.png"));
		MeshRenderer componentInChildren2 = boulderProjectileGhost.GetComponentInChildren<MeshRenderer>();
		((Renderer)componentInChildren2).material = val9;
		((Component)componentInChildren2).gameObject.AddComponent<MeshCollider>();
		boulderProjectile = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Grandparent/GrandparentBoulder.prefab"), "BoudlerProjectile", true);
		boulderProjectile.AddComponent<BoulderProjectileBehaviour>();
		boulderProjectile.GetComponent<Rigidbody>().useGravity = false;
		boulderProjectile.GetComponent<ProjectileController>().ghostPrefab = boulderProjectileGhost;
		((Behaviour)boulderProjectile.GetComponent<ProjectileSimple>()).enabled = false;
		SphereCollider component10 = boulderProjectile.GetComponent<SphereCollider>();
		component10.radius = 0.5f;
		((Collider)component10).enabled = false;
		((ProjectileExplosion)boulderProjectile.GetComponent<ProjectileImpactExplosion>()).fireChildren = false;
		ContentAddition.AddProjectile(boulderProjectile);
	}
}
internal class BaseKorState : BaseSkillState
{
	public Animator animator;

	public AnimEvents events;

	public string childString;

	public float charge;

	public HitBox hitbox;

	private Transform boulderHitbox;

	public virtual bool SmashBoulder => false;

	public override void OnSerialize(NetworkWriter writer)
	{
		((BaseSkillState)this).OnSerialize(writer);
		writer.Write((byte)charge);
	}

	public override void OnDeserialize(NetworkReader reader)
	{
		((BaseSkillState)this).OnDeserialize(reader);
		charge = (int)reader.ReadByte();
	}

	public bool FireMeleeAttack(OverlapAttack attack, Animator animator, string mecanimHitboxActiveParameter, float forceMagnitude, Vector3 bonusForce)
	{
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_003c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: 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_0055: Unknown result type (might be due to invalid IL or missing references)
		bool result = false;
		if (Object.op_Implicit((Object)(object)animator) && animator.GetFloat(mecanimHitboxActiveParameter) > 0.1f)
		{
			attack.forceVector = (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? ((EntityState)this).characterDirection.forward : (((EntityState)this).transform.forward * forceMagnitude + bonusForce));
			result = attack.Fire((List<HurtBox>)null);
		}
		return result;
	}

	public override void OnEnter()
	{
		((BaseState)this).OnEnter();
		animator = ((EntityState)this).GetModelAnimator();
		events = ((Component)animator).GetComponent<AnimEvents>();
		boulderHitbox = ((BaseState)this).FindModelChild("BoulderHitbox");
		((EntityState)this).GetComponent<DashBehaviour>().charge = charge;
	}

	public override void FixedUpdate()
	{
		//IL_0055: 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)
		((EntityState)this).FixedUpdate();
		if (SmashBoulder && animator.GetFloat("Curve") > 0.1f)
		{
			if (Object.op_Implicit((Object)(object)hitbox))
			{
				((Component)boulderHitbox).transform.localPosition = ((Component)hitbox).transform.localPosition;
				((Component)boulderHitbox).transform.localScale = ((Component)hitbox).transform.localScale;
				hitbox = null;
			}
			((Component)boulderHitbox).gameObject.SetActive(true);
		}
		else
		{
			((Component)boulderHitbox).gameObject.SetActive(false);
		}
		if (events.fire)
		{
			events.fire = false;
			childString = events.child;
			OnFire();
		}
	}

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

	public virtual void OnFire()
	{
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		return (InterruptPriority)1;
	}
}
internal class CharacterMain : GenericCharacterMain
{
	public override void OnEnter()
	{
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		((GenericCharacterMain)this).OnEnter();
		GenericSkill skill = ((EntityState)this).skillLocator.primary;
		if (Array.IndexOf(skill.skillFamily.variants, Array.Find(skill.skillFamily.variants, (Variant x) => (Object)(object)x.skillDef == (Object)(object)skill.skillDef)) == 2)
		{
			((BaseCharacterMain)this).modelAnimator.SetFloat("Hammer", 1f);
		}
	}

	public override void FixedUpdate()
	{
		((GenericCharacterMain)this).FixedUpdate();
	}
}
internal class MomentumCharge : GenericCharacterMain
{
	private Vector3 vector = Vector3.zero;

	private AnimationCurve curve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);

	public override void OnEnter()
	{
		((GenericCharacterMain)this).OnEnter();
	}

	public override void HandleMovements()
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: 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_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		((BaseCharacterMain)this).hasSkillLocator = false;
		if (vector == Vector3.zero)
		{
			vector = base.moveVector;
		}
		base.moveVector = Vector3.Lerp(vector, Vector3.zero, curve.Evaluate(((EntityState)this).fixedAge * 5f));
		((EntityState)this).characterMotor.moveDirection = vector;
	}
}
internal class ChargeState : BaseKorState
{
	private uint ID;

	private GameObject chargeEffect;

	private float chargeTime;

	private EntityStateMachine bodyMachine;

	public virtual string muzzleString => "hammerMuzzle";

	public virtual string layerName => "FullBody, Override";

	public virtual string animationStateName => "";

	public virtual float maxChargeTime => 1.2f;

	public virtual bool momentum => true;

	public virtual uint chargeSound => Sounds.Play_Kor_Hammer_Charge;

	public override void OnEnter()
	{
		//IL_009a: Unknown result type (might be due to invalid IL or missing references)
		//IL_009f: 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)
		base.OnEnter();
		if (((EntityState)this).isAuthority && momentum)
		{
			bodyMachine = ((EntityState)this).GetComponent<EntityStateMachine>();
			bodyMachine.SetNextState((EntityState)(object)new MomentumCharge());
		}
		((BaseState)this).StartAimMode(1f, true);
		chargeTime = maxChargeTime / ((BaseState)this).attackSpeedStat;
		((EntityState)this).PlayAnimation(layerName, animationStateName);
		ID = AkSoundEngine.PostEvent(chargeSound, ((EntityState)this).gameObject);
		Transform val = ((BaseState)this).FindModelChild(muzzleString);
		chargeEffect = Object.Instantiate<GameObject>(Prefabs.chargeEffect, val.position, Quaternion.identity, val);
		chargeEffect.transform.localRotation = Quaternion.Euler(15f, 203f, 315f);
	}

	public override void FixedUpdate()
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: 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_001b: 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_001d: 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_003f: 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_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: 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)
		base.FixedUpdate();
		Ray aimRay = ((BaseState)this).GetAimRay();
		Vector2 val = Util.Vector3XZToVector2XY(((Ray)(ref aimRay)).direction);
		if (val != Vector2.zero)
		{
			((Vector2)(ref val)).Normalize();
			Vector3 val2 = new Vector3(val.x, 0f, val.y);
			Vector3 normalized = ((Vector3)(ref val2)).normalized;
			((EntityState)this).characterDirection.moveVector = normalized;
		}
		charge = Mathf.Clamp01(((EntityState)this).fixedAge / chargeTime);
		if ((((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority()) || ((EntityState)this).fixedAge >= chargeTime)
		{
			BaseKorState baseKorState = NextState();
			baseKorState.charge = charge;
			((EntityState)this).outer.SetNextState((EntityState)(object)baseKorState);
		}
	}

	public override void OnExit()
	{
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Expected O, but got Unknown
		if (Object.op_Implicit((Object)(object)chargeEffect))
		{
			EntityState.Destroy((Object)(object)chargeEffect);
		}
		if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)bodyMachine) && ((object)bodyMachine.state).GetType() == typeof(MomentumCharge))
		{
			bodyMachine.SetNextState((EntityState)new Idle());
		}
		AkSoundEngine.StopPlayingID(ID);
		base.OnExit();
	}

	public virtual BaseKorState NextState()
	{
		return new BaseKorState();
	}

	public override InterruptPriority GetMinimumInterruptPriority()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		return (InterruptPriority)1;
	}
}
internal class InputMeleeAttack : BaseKorState
{
	public override void OnEnter()
	{
		base.OnEnter();
		if (!((EntityState)this).isAuthority)
		{
			return;
		}
		LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser();
		NetworkUser val = ((firstLocalUser != null) ? firstLocalUser.currentNetworkUser : null);
		Player val2 = (Object.op_Implicit((Object)(object)val) ? val.inputPlayer : null);
		if (val2 != null)
		{
			float axis = val2.GetAxis(0);
			float axis2 = val2.GetAxis(1);
			if (axis != 0f || axis2 > 0f)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new ForwardMelee());
			}
			else if (axis2 < 0f)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new BackMelee());
			}
			else
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new StandMelee());
			}
		}
	}
}
internal class ForwardMelee : MeleeSkillState
{
	public override bool SmashBoulder => true;

	public override float baseAttackDuration => 0.33f;

	public override string animationStateName => ((BaseState)this).isGrounded ? "SLight" : "SLightAir";

	public override string animParameter => "M1";

	public override float forceMagnitude => 1200f;

	public override float damageCoefficient => 3.5f;

	public override uint swingSound => Sounds.Play_Kor_Hammer_Light_Swing;

	public override GameObject hitEffectPrefab => Prefabs.impactEffectHammerLight;

	public override bool rootMotion => true;

	public override GameObject swingEffectPrefab => ((BaseState)this).isGrounded ? null : Prefabs.hammerSwingEffect;

	public override DamageType damageType => (DamageType)262144;

	public override Vector3 rootMotionDirection()
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		return ((EntityState)this).characterDirection.forward;
	}

	public override void OnEnter()
	{
		base.OnEnter();
	}

	public override BaseKorState StateOverride()
	{
		return new InputMeleeEnd();
	}
}
internal class StandMelee : MeleeSkillState
{
	public override bool SmashBoulder => true;

	public override float baseAttackDuration => 0.33f;

	public override string animationStateName => ((BaseState)this).isGrounded ? "NLight" : "NLightAir";

	public override string animParameter => "M1";

	public override float forceMagnitude => 2500f;

	public override Vector3 bonusForce => ((EntityState)this).characterDirection.forward * 1500f + Vector3.up * 1500f;

	public override float damageCoefficient => ((BaseState)this).isGrounded ? 2.3f : 3.5f;

	public override GameObject swingEffectPrefab => ((BaseState)this).isGrounded ? null : Prefabs.hammerSwingEffect;

	public override bool rootMotion => true;

	public override uint swingSound => Sounds.Play_Kor_Hammer_Light_Swing;

	public override GameObject hitEffectPrefab => Prefabs.impactEffectHammerLight;

	public override DamageType damageType => (DamageType)32;

	public override Vector3 rootMotionDirection()
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		return ((EntityState)this).characterDirection.forward;
	}

	public override BaseKorState StateOverride()
	{
		return new InputMeleeEnd();
	}

	public override void FixedUpdate()
	{
		base.FixedUpdate();
		if (events.newAttack)
		{
			events.newAttack = false;
			overlapAttack = ((BaseState)this).InitMeleeOverlap(damageCoefficient, hitEffectPrefab, ((EntityState)this).GetModelTransform(), hitBoxGroupName);
		}
	}
}
internal class BackMelee : MeleeSkillState
{
	private bool followUp;

	public override bool SmashBoulder => !((BaseState)this).isGrounded;

	public override float baseAttackDuration => 0.33f;

	public override string animationStateName => ((BaseState)this).isGrounded ? "DLight" : "DLightAir";

	public override string animParameter => "M1";

	public override float forceMagnitude => 3500f;

	public override float damageCoefficient => ((BaseState)this).isGrounded ? 1.5f : 2f;

	public override uint swingSound => Sounds.Play_Kor_Hammer_Light_Swing;

	public override GameObject hitEffectPrefab => Prefabs.impactEffectHammerLight;

	public override GameObject swingEffectPrefab => ((BaseState)this).isGrounded ? null : Prefabs.hammerSwingEffect;

	public override DamageType damageType => (DamageType)32;

	public override Vector3 rootMotionDirection()
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		return ((EntityState)this).characterDirection.forward;
	}

	public override void OnEnter()
	{
		base.OnEnter();
	}

	public override void FixedUpdate()
	{
		//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c4: 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)
		base.FixedUpdate();
		if (((EntityState)this).isAuthority && !((BaseState)this).isGrounded)
		{
			if (hasHit)
			{
				followUp = true;
			}
			if (followUp && stopwatch >= attackDuration * 0.75f)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new BackMeleeFollowup());
			}
		}
		if (((BaseState)this).isGrounded && events.slamHeavy)
		{
			events.slamHeavy = false;
			EffectManager.SimpleEffect(Prefabs.stompEffect, ((BaseState)this).FindModelChild("foot.l").position, Quaternion.identity, false);
			if (((EntityState)this).isAuthority)
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
			}
		}
	}

	public override void OnExit()
	{
		//IL_0018: 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_002e: 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_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		if (((BaseState)this).isGrounded && ((EntityState)this).isAuthority)
		{
			Ray aimRay = ((BaseState)this).GetAimRay();
			ProjectileManager.instance.FireProjectile(Prefabs.boulderProjectile, ((EntityState)this).transform.position + ((EntityState)this).characterDirection.forward * events.projectileFw, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * 3.5f, 15f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f);
		}
		base.OnExit();
	}

	public override BaseKorState StateOverride()
	{
		return new InputMeleeEnd();
	}
}
internal class BackMeleeFollowup : MeleeSkillState
{
	public override float baseAttackDuration => 0.33f;

	public override string animationStateName => "DLightAir-FollowUp";

	public override string animParameter => "M1";

	public override float forceMagnitude => 2500f;

	public override Vector3 bonusForce => Vector3.up * 6500f;

	public override float damageCoefficient => 4.5f;

	public override uint swingSound => Sounds.Play_Kor_Hammer_Light_Swing;

	public override GameObject hitEffectPrefab => Prefabs.impactEffectHammerLight;

	public override DamageType damageType => (DamageType)32;

	public override BaseKorState StateOverride()
	{
		return new InputMeleeEnd();
	}
}
internal class InputMeleeEnd : BaseKorState
{
	public override void FixedUpdate()
	{
		base.FixedUpdate();
		if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= 0.35f)
		{
			((EntityState)this).outer.SetNextStateToMain();
		}
	}
}
internal class MeleeSkillState : BaseKorState
{
	public float attackDuration;

	public float earlyExitDuration;

	private bool hopped;

	private bool hasSwung;

	public bool isInHitPause;

	public float hitPauseDuration;

	public float hopVelocity;

	public float hitPauseTimer;

	public float stopwatch;

	public HitStopCachedState hitStopCachedState;

	public OverlapAttack overlapAttack;

	public bool hasHit;

	private bool hasAnimParameter;

	private float attackSpeedScaling;

	public virtual float baseAttackDuration => 0f;

	public virtual float baseEarlyExitDuration => 0f;

	public virtual float damageCoefficient => 0f;

	public virtual float forceMagnitude => 440f;

	public virtual float rootMotionSpeed => 25f;

	public virtual float baseHopVelocity => 4f;

	public virtual string layerName => "FullBody, Override";

	public virtual string animationStateName => "";

	public virtual string animParameter => "M1";

	public virtual string hitBoxGroupName => animationStateName;

	public virtual string hitBoxActiveParameter => "Curve";

	public virtual string swingMuzzle => animationStateName + "Muzzle";

	public virtual GameObject swingEffectPrefab => Prefabs.hammerSwingEffect;

	public virtual bool hopOnHit => true;

	public virtual bool rootMotion => false;

	public virtual bool rootMotionWhileHitting => false;

	public virtual uint swingSound => Sounds.Play_Kor_Hammer_Swing;

	public virtual DamageType damageType => (DamageType)0;

	public virtual DamageColorIndex damageColor => (DamageColorIndex)0;

	public virtual Vector3 bonusForce => Vector3.zero;

	public virtual GameObject hitEffectPrefab => Prefabs.impactEffectHammer;

	public override void OnEnter()
	{
		base.OnEnter();
		attackSpeedScaling = Math.Min(((BaseState)this).attackSpeedStat, 6f);
		attackDuration = baseAttackDuration / attackSpeedScaling;
		earlyExitDuration = baseEarlyExitDuration / attackSpeedScaling;
		hitPauseDuration = GroundLight.hitPauseDuration / attackSpeedScaling;
		hitPauseTimer = hitPauseDuration;
		hopVelocity = baseHopVelocity / attackSpeedScaling;
		animator.SetFloat(hitBoxActiveParameter, 0f);
		((BaseState)this).StartAimMode(attackDuration + 1f, false);
		hitbox = Array.Find(((Component)((EntityState)this).GetModelTransform()).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitBoxGroupName).hitBoxes[0];
		overlapAttack = ((BaseState)this).InitMeleeOverlap(damageCoefficient, hitEffectPrefab, ((EntityState)this).GetModelTransform(), hitBoxGroupName);
		overlapAttack.pushAwayForce = 1f;
		hasAnimParam