Decompiled source of SybilMod v0.1.2

plugins/SybilMod.dll

Decompiled 21 hours ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using EntityStates.AI.Walker;
using HG;
using HG.BlendableTypes;
using KinematicCharacterController;
using On.RoR2;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.Projectile;
using RoR2.Skills;
using SybilMod.Modules;
using SybilMod.Modules.BaseStates;
using SybilMod.Modules.Characters;
using SybilMod.Survivors.Sybil;
using SybilMod.Survivors.Sybil.Components;
using SybilMod.Survivors.Sybil.SkillStates;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("SybilMod")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("SybilMod")]
[assembly: AssemblyTitle("SybilMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace SybilMod
{
	internal static class Log
	{
		internal static ManualLogSource _logSource;

		internal static void Init(ManualLogSource logSource)
		{
			_logSource = logSource;
		}

		internal static void Debug(object data)
		{
			_logSource.LogDebug(data);
		}

		internal static void Error(object data)
		{
			_logSource.LogError(data);
		}

		internal static void ErrorAssetBundle(string assetName, string bundleName)
		{
			Error("failed to load asset, " + assetName + ", because it does not exist in asset bundle, " + bundleName);
		}

		internal static void Fatal(object data)
		{
			_logSource.LogFatal(data);
		}

		internal static void Info(object data)
		{
			_logSource.LogInfo(data);
		}

		internal static void Message(object data)
		{
			_logSource.LogMessage(data);
		}

		internal static void Warning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.kavahn.SybilMod", "SybilMod", "0.1.2")]
	public class SybilPlugin : BaseUnityPlugin
	{
		public const string MODUID = "com.kavahn.SybilMod";

		public const string MODNAME = "SybilMod";

		public const string MODVERSION = "0.1.2";

		public const string DEVELOPER_PREFIX = "KAVAHN";

		public static SybilPlugin instance;

		private void Awake()
		{
			instance = this;
			Log.Init(((BaseUnityPlugin)this).Logger);
			Language.Init();
			SoundBanks.Init();
			new SybilSurvivor().Initialize();
			new ContentPacks().Initialize();
		}
	}
}
namespace SybilMod.Survivors.Sybil
{
	public static class SybilAI
	{
		public static void Init(GameObject bodyPrefab, string masterName)
		{
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_022a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_0248: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f7: 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_0325: Unknown result type (might be due to invalid IL or missing references)
			//IL_032b: Unknown result type (might be due to invalid IL or missing references)
			GameObject obj = Prefabs.CreateBlankMasterPrefab(bodyPrefab, masterName);
			BaseAI component = obj.GetComponent<BaseAI>();
			component.aimVectorDampTime = 0.1f;
			component.aimVectorMaxSpeed = 360f;
			AISkillDriver obj2 = obj.AddComponent<AISkillDriver>();
			obj2.customName = "Use Primary Swing";
			obj2.skillSlot = (SkillSlot)0;
			obj2.requiredSkill = null;
			obj2.requireSkillReady = false;
			obj2.requireEquipmentReady = false;
			obj2.minUserHealthFraction = float.NegativeInfinity;
			obj2.maxUserHealthFraction = float.PositiveInfinity;
			obj2.minTargetHealthFraction = float.NegativeInfinity;
			obj2.maxTargetHealthFraction = float.PositiveInfinity;
			obj2.minDistance = 0f;
			obj2.maxDistance = 8f;
			obj2.selectionRequiresTargetLoS = false;
			obj2.selectionRequiresOnGround = false;
			obj2.selectionRequiresAimTarget = false;
			obj2.maxTimesSelected = -1;
			obj2.moveTargetType = (TargetType)0;
			obj2.activationRequiresTargetLoS = false;
			obj2.activationRequiresAimTargetLoS = false;
			obj2.activationRequiresAimConfirmation = false;
			obj2.movementType = (MovementType)1;
			obj2.moveInputScale = 1f;
			obj2.aimType = (AimType)1;
			obj2.ignoreNodeGraph = false;
			obj2.shouldSprint = false;
			obj2.shouldFireEquipment = false;
			obj2.buttonPressType = (ButtonPressType)0;
			obj2.driverUpdateTimerOverride = -1f;
			obj2.resetCurrentEnemyOnNextDriverSelection = false;
			obj2.noRepeat = false;
			obj2.nextHighPriorityOverride = null;
			AISkillDriver obj3 = obj.AddComponent<AISkillDriver>();
			obj3.customName = "Use Secondary First Bomb";
			obj3.skillSlot = (SkillSlot)1;
			obj3.requireSkillReady = true;
			obj3.minDistance = 0f;
			obj3.maxDistance = 8f;
			obj3.selectionRequiresTargetLoS = false;
			obj3.selectionRequiresOnGround = false;
			obj3.selectionRequiresAimTarget = false;
			obj3.maxTimesSelected = -1;
			obj3.moveTargetType = (TargetType)0;
			obj3.activationRequiresTargetLoS = false;
			obj3.activationRequiresAimTargetLoS = false;
			obj3.activationRequiresAimConfirmation = true;
			obj3.movementType = (MovementType)1;
			obj3.moveInputScale = 1f;
			obj3.aimType = (AimType)1;
			obj3.buttonPressType = (ButtonPressType)0;
			AISkillDriver obj4 = obj.AddComponent<AISkillDriver>();
			obj4.customName = "Use Utility Bomb Dash";
			obj4.skillSlot = (SkillSlot)2;
			obj4.requireSkillReady = true;
			obj4.minDistance = 8f;
			obj4.maxDistance = 20f;
			obj4.selectionRequiresTargetLoS = true;
			obj4.selectionRequiresOnGround = false;
			obj4.selectionRequiresAimTarget = false;
			obj4.maxTimesSelected = -1;
			obj4.moveTargetType = (TargetType)0;
			obj4.activationRequiresTargetLoS = false;
			obj4.activationRequiresAimTargetLoS = false;
			obj4.activationRequiresAimConfirmation = false;
			obj4.movementType = (MovementType)2;
			obj4.moveInputScale = 1f;
			obj4.aimType = (AimType)1;
			obj4.buttonPressType = (ButtonPressType)0;
			AISkillDriver obj5 = obj.AddComponent<AISkillDriver>();
			obj5.customName = "Use Special Sheer Heart Attack";
			obj5.skillSlot = (SkillSlot)3;
			obj5.requireSkillReady = true;
			obj5.minDistance = 0f;
			obj5.maxDistance = 20f;
			obj5.selectionRequiresTargetLoS = false;
			obj5.selectionRequiresOnGround = false;
			obj5.selectionRequiresAimTarget = false;
			obj5.maxTimesSelected = -1;
			obj5.moveTargetType = (TargetType)0;
			obj5.activationRequiresTargetLoS = false;
			obj5.activationRequiresAimTargetLoS = false;
			obj5.activationRequiresAimConfirmation = false;
			obj5.movementType = (MovementType)1;
			obj5.moveInputScale = 1f;
			obj5.aimType = (AimType)1;
			obj5.buttonPressType = (ButtonPressType)0;
			AISkillDriver obj6 = obj.AddComponent<AISkillDriver>();
			obj6.customName = "Chase";
			obj6.skillSlot = (SkillSlot)(-1);
			obj6.requireSkillReady = false;
			obj6.minDistance = 0f;
			obj6.maxDistance = float.PositiveInfinity;
			obj6.moveTargetType = (TargetType)0;
			obj6.activationRequiresTargetLoS = false;
			obj6.activationRequiresAimTargetLoS = false;
			obj6.activationRequiresAimConfirmation = false;
			obj6.movementType = (MovementType)1;
			obj6.moveInputScale = 1f;
			obj6.aimType = (AimType)1;
			obj6.buttonPressType = (ButtonPressType)0;
		}
	}
	public static class SybilAssets
	{
		public static BuffDef powerBuff;

		public static BuffDef chargeBuff;

		public static GameObject soulCutterPrefab;

		public static GameObject soulCutterPoweredPrefab;

		public static GameObject swingEffect;

		public static GameObject hitEffect;

		public static GameObject plungeLandEffect;

		public static NetworkSoundEventDef hitSound;

		public static NetworkSoundEventDef[] swishSounds;

		public static GameObject weaponThrownPrefab;

		public static GameObject weaponKickPrefab;

		public static void Init(AssetBundle bundle)
		{
			//IL_003a: 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_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			Sprite val = bundle.LoadAsset<Sprite>("texSybilPower");
			powerBuff = Content.CreateAndAddBuff("SybilMagicalPower", Object.op_Implicit((Object)(object)val) ? val : LegacyResourcesAPI.Load<BuffDef>("BuffDefs/AffixHaunted").iconSprite, new Color(0.75f, 0.55f, 1f), canStack: true, isDebuff: false);
			chargeBuff = Content.CreateAndAddBuff("SybilPowerCharge", powerBuff.iconSprite, Color.white, canStack: true, isDebuff: false);
			chargeBuff.isHidden = true;
			swingEffect = Silent(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/OmniImpactVFXSlashMerc.prefab").WaitForCompletion(), "SybilSwingEffect");
			hitEffect = Silent(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/OmniImpactVFXSlashMerc.prefab").WaitForCompletion(), "SybilHitEffect");
			plungeLandEffect = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/ImpactEffects/BeetleGuardGroundSlam") ?? LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/ImpactEffects/CharacterLandImpact");
			hitSound = Content.CreateAndAddNetworkSoundEventDef("Play_Sybil_HitEnemy");
			swishSounds = new string[3] { "Play_Sybil_Swing1", "Play_Sybil_Swing2", "Play_Sybil_Swing3" }.Select(Content.CreateAndAddNetworkSoundEventDef).ToArray();
			GameObject ghostSource = bundle.LoadAsset<GameObject>("SybilWeaponGhost");
			weaponThrownPrefab = MakeWeapon("SybilWeaponThrown", ghostSource);
			weaponKickPrefab = MakeKickSignal();
			soulCutterPrefab = MakeCutter("SybilSoulCutter", 1f);
			soulCutterPoweredPrefab = MakeCutter("SybilSoulCutterPowered", 1.8f);
		}

		private static GameObject Silent(GameObject source, string name)
		{
			GameObject val = PrefabAPI.InstantiateClone(source, name, false);
			EffectComponent component = val.GetComponent<EffectComponent>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.soundName = "";
			}
			PlaySoundOnEvent[] componentsInChildren = val.GetComponentsInChildren<PlaySoundOnEvent>(true);
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				Object.DestroyImmediate((Object)(object)componentsInChildren[i]);
			}
			AkEvent[] componentsInChildren2 = val.GetComponentsInChildren<AkEvent>(true);
			for (int i = 0; i < componentsInChildren2.Length; i++)
			{
				Object.DestroyImmediate((Object)(object)componentsInChildren2[i]);
			}
			Content.CreateAndAddEffectDef(val);
			return val;
		}

		private static GameObject MakeWeapon(string name, GameObject ghostSource)
		{
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_016c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0209: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/FMJ"), name, true);
			ProjectileController component = val.GetComponent<ProjectileController>();
			MonoBehaviour[] components = val.GetComponents<MonoBehaviour>();
			foreach (MonoBehaviour val2 in components)
			{
				if (val2 is ProjectileSimple || val2 is ProjectileOverlapAttack || val2 is ProjectileSingleTargetImpact)
				{
					Object.DestroyImmediate((Object)(object)val2);
				}
			}
			ParticleSystem[] componentsInChildren = val.GetComponentsInChildren<ParticleSystem>(true);
			foreach (ParticleSystem val3 in componentsInChildren)
			{
				Object.DestroyImmediate((Object)(((Object)(object)((Component)val3).gameObject == (Object)(object)val) ? ((object)val3) : ((object)((Component)val3).gameObject)));
			}
			Renderer[] componentsInChildren2 = val.GetComponentsInChildren<Renderer>(true);
			foreach (Renderer val4 in componentsInChildren2)
			{
				if (Object.op_Implicit((Object)(object)val4))
				{
					val4.enabled = false;
				}
			}
			Collider[] componentsInChildren3 = val.GetComponentsInChildren<Collider>(true);
			for (int i = 0; i < componentsInChildren3.Length; i++)
			{
				componentsInChildren3[i].enabled = false;
			}
			Rigidbody component2 = val.GetComponent<Rigidbody>();
			if (Object.op_Implicit((Object)(object)component2))
			{
				component2.isKinematic = true;
				component2.useGravity = false;
			}
			if (!Object.op_Implicit((Object)(object)val.GetComponent<ProjectileNetworkTransform>()))
			{
				val.AddComponent<ProjectileNetworkTransform>();
			}
			component.ghostPrefab = null;
			if (Object.op_Implicit((Object)(object)ghostSource))
			{
				GameObject val5 = Object.Instantiate<GameObject>(ghostSource, val.transform);
				((Object)val5).name = "SybilWeaponModel";
				val5.transform.localPosition = Vector3.zero;
				val5.transform.localRotation = Quaternion.identity;
				Animator[] componentsInChildren4 = val5.GetComponentsInChildren<Animator>(true);
				for (int i = 0; i < componentsInChildren4.Length; i++)
				{
					Object.DestroyImmediate((Object)(object)componentsInChildren4[i]);
				}
				ProjectileGhostController[] componentsInChildren5 = val5.GetComponentsInChildren<ProjectileGhostController>(true);
				for (int i = 0; i < componentsInChildren5.Length; i++)
				{
					Object.DestroyImmediate((Object)(object)componentsInChildren5[i]);
				}
				componentsInChildren2 = val5.GetComponentsInChildren<Renderer>(true);
				for (int i = 0; i < componentsInChildren2.Length; i++)
				{
					componentsInChildren2[i].enabled = true;
				}
				PointLongEndForward(val5.transform);
				val5.transform.localScale = Vector3.one * 1.25f * 1.5f;
			}
			else
			{
				Log.Error("no SybilWeaponGhost in the bundle");
			}
			val.AddComponent<SybilWeaponProjectile>();
			Content.AddProjectilePrefab(val);
			return val;
		}

		private static GameObject MakeKickSignal()
		{
			GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/FMJ"), "SybilWeaponKick", true);
			MonoBehaviour[] components = val.GetComponents<MonoBehaviour>();
			foreach (MonoBehaviour val2 in components)
			{
				if (val2 is ProjectileSimple || val2 is ProjectileOverlapAttack || val2 is ProjectileSingleTargetImpact)
				{
					Object.DestroyImmediate((Object)(object)val2);
				}
			}
			Renderer[] componentsInChildren = val.GetComponentsInChildren<Renderer>(true);
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				componentsInChildren[i].enabled = false;
			}
			Collider[] componentsInChildren2 = val.GetComponentsInChildren<Collider>(true);
			for (int i = 0; i < componentsInChildren2.Length; i++)
			{
				componentsInChildren2[i].enabled = false;
			}
			ProjectileController component = val.GetComponent<ProjectileController>();
			component.ghostPrefab = null;
			component.allowPrediction = false;
			val.AddComponent<SybilWeaponKickSignal>();
			Content.AddProjectilePrefab(val);
			return val;
		}

		private static void PointLongEndForward(Transform root)
		{
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: 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_0057: 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_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: 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_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Expected O, but got Unknown
			//IL_00fe: 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_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			Renderer[] componentsInChildren = ((Component)root).GetComponentsInChildren<Renderer>(true);
			foreach (Renderer val in componentsInChildren)
			{
				SkinnedMeshRenderer val2 = (SkinnedMeshRenderer)(object)((val is SkinnedMeshRenderer) ? val : null);
				object obj;
				if (val2 == null)
				{
					MeshFilter component = ((Component)val).GetComponent<MeshFilter>();
					obj = ((component != null) ? component.sharedMesh : null);
				}
				else
				{
					obj = val2.sharedMesh;
				}
				Mesh val3 = (Mesh)obj;
				if (!Object.op_Implicit((Object)(object)val3))
				{
					continue;
				}
				Bounds bounds = val3.bounds;
				Vector3 size = ((Bounds)(ref bounds)).size;
				int num = ((!(size.x > size.y) || !(size.x > size.z)) ? ((size.y > size.z) ? 1 : 2) : 0);
				Vector3 zero = Vector3.zero;
				Vector3 center = ((Bounds)(ref bounds)).center;
				((Vector3)(ref zero))[num] = ((((Vector3)(ref center))[num] >= 0f) ? 1f : (-1f));
				Quaternion val4 = Quaternion.FromToRotation(root.InverseTransformDirection(((Component)val).transform.TransformDirection(zero)), Vector3.forward);
				{
					foreach (Transform item in root)
					{
						Transform val5 = item;
						val5.localPosition = val4 * val5.localPosition;
						val5.localRotation = val4 * val5.localRotation;
					}
					break;
				}
			}
		}

		private static GameObject MakeCutter(string name, float scale)
		{
			//IL_0019: 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_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: 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)
			GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/FMJ"), name, true);
			Transform transform = val.transform;
			transform.localScale *= scale;
			ProjectileController component = val.GetComponent<ProjectileController>();
			if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.ghostPrefab))
			{
				GameObject val2 = PrefabAPI.InstantiateClone(component.ghostPrefab, name + "Ghost", false);
				val2.transform.localScale = new Vector3(2.2f, 0.35f, 1.2f) * scale;
				Renderer[] componentsInChildren = val2.GetComponentsInChildren<Renderer>(true);
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					Material[] materials = componentsInChildren[i].materials;
					foreach (Material val3 in materials)
					{
						if (val3.HasProperty("_TintColor"))
						{
							val3.SetColor("_TintColor", new Color(0.7f, 0.5f, 1f));
						}
						if (val3.HasProperty("_Color"))
						{
							val3.SetColor("_Color", new Color(0.8f, 0.65f, 1f));
						}
					}
				}
				Light[] componentsInChildren2 = val2.GetComponentsInChildren<Light>(true);
				for (int i = 0; i < componentsInChildren2.Length; i++)
				{
					componentsInChildren2[i].color = new Color(0.7f, 0.5f, 1f);
				}
				component.ghostPrefab = val2;
			}
			ProjectileSimple component2 = val.GetComponent<ProjectileSimple>();
			if (Object.op_Implicit((Object)(object)component2))
			{
				component2.desiredForwardSpeed = 110f;
				component2.lifetime = 1.2f;
			}
			Content.AddProjectilePrefab(val);
			return val;
		}
	}
	public static class SybilStaticValues
	{
		public const int jumpCount = 5;

		public const float jumpPower = 17f;

		public const float airKickPower = 0.8f;

		public const float highJumpPower = 1.42f;

		public const float moveSpeed = 6.6f;

		public const int wallRides = 6;

		public const float wallRideDuration = 0.8f;

		public const float wallRideSpeed = 12f;

		public const float wallKickUp = 15f;

		public const float wallKickOut = 12f;

		public const float wallKickReach = 0.9f;

		public const float slideDuration = 0.95f;

		public const float slideSpeed = 23f;

		public const float slideInvincibility = 0.12f;

		public const float longJumpSpeed = 22f;

		public const float longJumpUp = 0.65f;

		public const float longJumpGravityScale = 0.8f;

		public const float bunnyhopWindow = 0.25f;

		public const float bunnyhopBoost = 1.12f;

		public const float bunnyhopCap = 34f;

		public const float carryDecay = 1.5f;

		public const float carryTurnRate = 4f;

		public const float plungeStartup = 0.3f;

		public const float plungeSpeed = 50f;

		public const float plungeDamageCoefficient = 4f;

		public const float plungeLandDamageCoefficient = 5f;

		public const float plungeLandRadius = 6f;

		public const float highJumpWindow = 0.35f;

		public const float swingDamageCoefficient = 2.4f;

		public const float finisherDamageCoefficient = 3.4f;

		public const float airSwingDamageCoefficient = 2.4f;

		public const float ascendantBounce = 13f;

		public const float throwDamageCoefficient = 5f;

		public const float weaponFlightTime = 0.7f;

		public const float weaponSpeed = 55f;

		public const float weaponReach = 2.6f;

		public const float weaponHoverTime = 0.9f;

		public const float weaponReturnSpeed = 14f;

		public const float weaponKickStackCoefficient = 3f;

		public const float unarmedDamageCoefficient = 1.6f;

		public const float dropKickWindup = 0.08f;

		public const float dropKickDuration = 0.4f;

		public const float dropKickSpeed = 16f;

		public const float dropKickDamageCoefficient = 2.5f;

		public const float chargeTime = 0.55f;

		public const float soulCutterDamageCoefficient = 5f;

		public const float strikebreakDamageCoefficient = 8f;

		public const float poweredBonus = 1f;

		public const float powerPerLevel = 8f;

		public const int maxPowerLevel = 3;

		public const float powerRangeScale = 1.35f;

		public const float powerDamageBonus = 0.3f;

		public const float healPerLevel = 0.2f;

		public const float healBase = 0.1f;

		public const float healDuration = 1.1f;
	}
	public class SybilSurvivor : SurvivorBase<SybilSurvivor>
	{
		public const string SYBIL_PREFIX = "KAVAHN_SYBIL_";

		public const float modelScale = 1.25f;

		public static readonly (string key, string name)[] outfits = new(string, string)[12]
		{
			("", "Sun Greaves"),
			("vest", "Basic Vest"),
			("sleeve", "Cling Sleeve"),
			("xix", "XIX"),
			("pants", "Big Pants"),
			("classy", "Classy"),
			("professional", "Professional"),
			("guardian", "Guardian"),
			("sleepytime", "Sleepytime"),
			("solsister", "Sol Sister"),
			("soldier", "Soldier"),
			("bleedingheart", "Bleeding Heart")
		};

		public override string assetBundleName => "sybil";

		public override string bodyName => "KavahnSybilBody";

		public override string masterName => "KavahnSybilMonsterMaster";

		public override string modelPrefabName => "mdlSybil";

		public override string displayPrefabName => "SybilDisplay";

		public override string survivorTokenPrefix => "KAVAHN_SYBIL_";

		public override BodyInfo bodyInfo => new BodyInfo
		{
			bodyName = bodyName,
			bodyNameToken = "KAVAHN_SYBIL_NAME",
			subtitleNameToken = "KAVAHN_SYBIL_SUBTITLE",
			characterPortrait = assetBundle.LoadAsset<Texture>("texSybilIcon"),
			bodyColor = new Color(0.62f, 0.5f, 0.95f),
			sortPosition = 102f,
			crosshair = Asset.LoadCrosshair("Standard"),
			podPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/SurvivorPod"),
			maxHealth = 100f,
			healthRegen = 1.5f,
			armor = 0f,
			moveSpeed = 6.6f,
			jumpPower = 17f,
			jumpCount = 5,
			cameraParamsVerticalOffset = 1.37f,
			cameraParamsDepth = -10f
		};

		public override CustomRendererInfo[] customRendererInfos
		{
			get
			{
				//IL_003e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0043: Unknown result type (might be due to invalid IL or missing references)
				//IL_0045: Unknown result type (might be due to invalid IL or missing references)
				//IL_005f: Unknown result type (might be due to invalid IL or missing references)
				ChildLocator val = (Object.op_Implicit((Object)(object)characterModelObject) ? characterModelObject.GetComponent<ChildLocator>() : null);
				if (!Object.op_Implicit((Object)(object)val))
				{
					return new CustomRendererInfo[0];
				}
				List<CustomRendererInfo> list = new List<CustomRendererInfo>();
				NameTransformPair[] transformPairs = val.transformPairs;
				foreach (NameTransformPair val2 in transformPairs)
				{
					if (val2.name.StartsWith("Mesh"))
					{
						list.Add(new CustomRendererInfo
						{
							childName = val2.name
						});
					}
				}
				return list.ToArray();
			}
		}

		public override UnlockableDef characterUnlockableDef => null;

		public override ItemDisplaysBase itemDisplays => null;

		public override AssetBundle assetBundle { get; protected set; }

		public override GameObject bodyPrefab { get; protected set; }

		public override CharacterBody prefabCharacterBody { get; protected set; }

		public override GameObject characterModelObject { get; protected set; }

		public override CharacterModel prefabCharacterModel { get; protected set; }

		public override GameObject displayPrefab { get; protected set; }

		private Sprite Icon(string name)
		{
			return assetBundle.LoadAsset<Sprite>(name);
		}

		public override void Initialize()
		{
			assetBundle = Asset.LoadAssetBundle(assetBundleName);
			if (!Object.op_Implicit((Object)(object)assetBundle) || !assetBundle.Contains(modelPrefabName))
			{
				Log.Error("the sybil asset bundle is missing or has no model (rebuild it with Tools/build_bundle.sh)");
			}
			else
			{
				base.Initialize();
			}
		}

		public override void InitializeCharacter()
		{
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: 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_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			base.InitializeCharacter();
			Type[] array = new Type[12]
			{
				typeof(SybilMain),
				typeof(DreamBreaker),
				typeof(SlideOrPlunge),
				typeof(Slide),
				typeof(Sunsetter),
				typeof(ChargeSoulCutter),
				typeof(ChargeStrikebreak),
				typeof(SoulCutter),
				typeof(Strikebreak),
				typeof(Heal),
				typeof(ThrowWeapon),
				typeof(DropKick)
			};
			for (int i = 0; i < array.Length; i++)
			{
				Content.AddEntityState(array[i]);
			}
			SybilTokens.Init();
			SybilAssets.Init(assetBundle);
			InitializeEntityStateMachines();
			InitializeSkills();
			InitializeSkins();
			InitializeCharacterMaster();
			Transform transform = characterModelObject.transform;
			transform.localScale *= 1.25f;
			if (Object.op_Implicit((Object)(object)displayPrefab))
			{
				Transform transform2 = displayPrefab.transform;
				transform2.localScale *= 1.25f;
			}
			Prefabs.SetupHitBoxGroup(characterModelObject, "SwordGroup", "SwordHitbox");
			if (!Object.op_Implicit((Object)(object)bodyPrefab.GetComponent<AkGameObj>()))
			{
				bodyPrefab.AddComponent<AkGameObj>();
			}
			bodyPrefab.AddComponent<SybilMovement>();
			bodyPrefab.AddComponent<SybilKickTracker>();
			CharacterBody obj = prefabCharacterBody;
			obj.bodyFlags = (BodyFlags)(obj.bodyFlags | 1);
			GlobalEventManager.onServerDamageDealt += OnServerDamageDealt;
		}

		private static void OnServerDamageDealt(DamageReport report)
		{
			if (Object.op_Implicit((Object)(object)report.attackerBody) && (Object)(object)report.victimBody != (Object)(object)report.attackerBody && report.damageInfo.procCoefficient > 0f)
			{
				SybilMovement component = ((Component)report.attackerBody).GetComponent<SybilMovement>();
				if (Object.op_Implicit((Object)(object)component))
				{
					component.AddPower(report.damageInfo.procCoefficient);
				}
			}
		}

		public override void InitializeEntityStateMachines()
		{
			Prefabs.ClearEntityStateMachines(bodyPrefab);
			Prefabs.AddMainEntityStateMachine(bodyPrefab, "Body", typeof(SybilMain), typeof(SpawnTeleporterState));
			Prefabs.AddEntityStateMachine(bodyPrefab, "Weapon");
			Prefabs.AddEntityStateMachine(bodyPrefab, "Weapon2");
		}

		public override void InitializeSkills()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: 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_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_022c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0392: Unknown result type (might be due to invalid IL or missing references)
			//IL_0397: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a9: Unknown result type (might be due to invalid IL or missing references)
			Skills.ClearGenericSkills(bodyPrefab);
			bodyPrefab.GetComponent<SkillLocator>().passiveSkill = new PassiveSkill
			{
				enabled = true,
				skillNameToken = "KAVAHN_SYBIL_PASSIVE_NAME",
				skillDescriptionToken = "KAVAHN_SYBIL_PASSIVE_DESCRIPTION",
				icon = Icon("texSybilPassive")
			};
			Skills.CreateGenericSkillWithSkillFamily(bodyPrefab, (SkillSlot)0);
			SteppedSkillDef val = Skills.CreateSkillDef<SteppedSkillDef>(new SkillDefInfo("SybilDreamBreaker", "KAVAHN_SYBIL_PRIMARY_NAME", "KAVAHN_SYBIL_PRIMARY_DESCRIPTION", Icon("texSybilPrimary"), new SerializableEntityStateType(typeof(DreamBreaker)), "Weapon", agile: true));
			val.stepCount = 3;
			val.stepGraceDuration = 0.5f;
			Skills.AddPrimarySkills(bodyPrefab, (SkillDef)val);
			Skills.CreateGenericSkillWithSkillFamily(bodyPrefab, (SkillSlot)1);
			SkillDef val2 = Skills.CreateSkillDef(new SkillDefInfo
			{
				skillName = "SybilSoulCutter",
				skillNameToken = "KAVAHN_SYBIL_SECONDARY_CUTTER_NAME",
				skillDescriptionToken = "KAVAHN_SYBIL_SECONDARY_CUTTER_DESCRIPTION",
				skillIcon = Icon("texSybilSecondary"),
				activationState = new SerializableEntityStateType(typeof(ChargeSoulCutter)),
				activationStateMachineName = "Weapon",
				interruptPriority = (InterruptPriority)1,
				baseRechargeInterval = 3f,
				baseMaxStock = 1,
				mustKeyPress = true,
				isCombatSkill = true,
				cancelSprintingOnActivation = true
			});
			SkillDef val3 = Skills.CreateSkillDef(new SkillDefInfo
			{
				skillName = "SybilStrikebreak",
				skillNameToken = "KAVAHN_SYBIL_SECONDARY_STRIKEBREAK_NAME",
				skillDescriptionToken = "KAVAHN_SYBIL_SECONDARY_STRIKEBREAK_DESCRIPTION",
				skillIcon = Icon("texSybilSecondaryAlt"),
				activationState = new SerializableEntityStateType(typeof(ChargeStrikebreak)),
				activationStateMachineName = "Weapon",
				interruptPriority = (InterruptPriority)1,
				baseRechargeInterval = 4f,
				baseMaxStock = 1,
				mustKeyPress = true,
				isCombatSkill = true,
				cancelSprintingOnActivation = true
			});
			SkillDef val4 = Skills.CreateSkillDef(new SkillDefInfo
			{
				skillName = "SybilThrow",
				skillNameToken = "KAVAHN_SYBIL_SECONDARY_THROW_NAME",
				skillDescriptionToken = "KAVAHN_SYBIL_SECONDARY_THROW_DESCRIPTION",
				skillIcon = Icon("texSybilSecondary"),
				activationState = new SerializableEntityStateType(typeof(ThrowWeapon)),
				activationStateMachineName = "Weapon",
				interruptPriority = (InterruptPriority)1,
				baseRechargeInterval = 1f,
				baseMaxStock = 1,
				mustKeyPress = true,
				isCombatSkill = true,
				cancelSprintingOnActivation = true
			});
			Skills.AddSecondarySkills(bodyPrefab, val4, val2, val3);
			Skills.CreateGenericSkillWithSkillFamily(bodyPrefab, (SkillSlot)2);
			SkillDef val5 = Skills.CreateSkillDef(new SkillDefInfo
			{
				skillName = "SybilSlide",
				skillNameToken = "KAVAHN_SYBIL_UTILITY_NAME",
				skillDescriptionToken = "KAVAHN_SYBIL_UTILITY_DESCRIPTION",
				skillIcon = Icon("texSybilUtility"),
				activationState = new SerializableEntityStateType(typeof(SlideOrPlunge)),
				activationStateMachineName = "Body",
				interruptPriority = (InterruptPriority)2,
				baseRechargeInterval = 0.6f,
				baseMaxStock = 1,
				mustKeyPress = true,
				isCombatSkill = false,
				cancelSprintingOnActivation = false
			});
			Skills.AddUtilitySkills(bodyPrefab, val5);
			Skills.CreateGenericSkillWithSkillFamily(bodyPrefab, (SkillSlot)3);
			SkillDef val6 = Skills.CreateSkillDef(new SkillDefInfo
			{
				skillName = "SybilHeal",
				skillNameToken = "KAVAHN_SYBIL_SPECIAL_NAME",
				skillDescriptionToken = "KAVAHN_SYBIL_SPECIAL_DESCRIPTION",
				skillIcon = Icon("texSybilSpecial"),
				activationState = new SerializableEntityStateType(typeof(Heal)),
				activationStateMachineName = "Weapon",
				interruptPriority = (InterruptPriority)1,
				baseRechargeInterval = 2f,
				baseMaxStock = 1,
				mustKeyPress = true,
				isCombatSkill = false,
				cancelSprintingOnActivation = true
			});
			Skills.AddSpecialSkills(bodyPrefab, val6);
		}

		private static string OutfitOf(Transform mesh)
		{
			string name = ((Object)mesh).name;
			int num = name.IndexOf("__", StringComparison.Ordinal);
			if (num < 0)
			{
				return "";
			}
			string text = name.Substring(num + 2);
			int num2 = text.IndexOf('.');
			if (num2 < 0)
			{
				return text;
			}
			return text.Substring(0, num2);
		}

		private static bool IsWeapon(Transform mesh)
		{
			return ((Object)mesh).name.Contains("PlayerWepon");
		}

		private static bool InOutfit(Transform mesh, string key)
		{
			if (!IsWeapon(mesh))
			{
				return OutfitOf(mesh) == key;
			}
			return true;
		}

		private static void ShowOutfit(GameObject model, string key)
		{
			SkinnedMeshRenderer[] componentsInChildren = model.GetComponentsInChildren<SkinnedMeshRenderer>(true);
			foreach (SkinnedMeshRenderer val in componentsInChildren)
			{
				((Component)val).gameObject.SetActive(InOutfit(((Component)val).transform, key));
			}
		}

		public override void InitializeSkins()
		{
			GameObject gameObject = ((Component)prefabCharacterModel).gameObject;
			ModelSkinController val = gameObject.AddComponent<ModelSkinController>();
			SkinnedMeshRenderer[] componentsInChildren = gameObject.GetComponentsInChildren<SkinnedMeshRenderer>(true);
			List<SkinDef> list = new List<SkinDef>();
			(string, string)[] array = outfits;
			for (int i = 0; i < array.Length; i++)
			{
				(string, string) tuple = array[i];
				string key = tuple.Item1;
				string item = tuple.Item2;
				string text = ((key == "") ? "DEFAULT_SKIN" : ("SKIN_" + key.ToUpperInvariant()));
				SybilTokens.AddSkinName(text, item);
				if (!(key != "") || componentsInChildren.Any((SkinnedMeshRenderer m) => OutfitOf(((Component)m).transform) == key))
				{
					SkinDef val2 = Skins.CreateSkinDef("KAVAHN_SYBIL_" + text + "_NAME", Icon("texSybilSkin"), prefabCharacterModel.baseRendererInfos, gameObject);
					val2.gameObjectActivations = ((IEnumerable<SkinnedMeshRenderer>)componentsInChildren).Select((Func<SkinnedMeshRenderer, GameObjectActivation>)((SkinnedMeshRenderer m) => new GameObjectActivation
					{
						gameObject = ((Component)m).gameObject,
						shouldActivate = InOutfit(((Component)m).transform, key)
					})).ToArray();
					list.Add(val2);
				}
			}
			val.skins = list.ToArray();
			ShowOutfit(gameObject, "");
			if (Object.op_Implicit((Object)(object)displayPrefab))
			{
				ShowOutfit(displayPrefab, "");
				object obj = displayPrefab.GetComponentInChildren<ModelSkinController>();
				if (obj == null)
				{
					CharacterModel componentInChildren = displayPrefab.GetComponentInChildren<CharacterModel>();
					obj = ((componentInChildren != null) ? ((Component)componentInChildren).gameObject.AddComponent<ModelSkinController>() : null);
				}
				ModelSkinController val3 = (ModelSkinController)obj;
				if (Object.op_Implicit((Object)(object)val3))
				{
					val3.skins = val.skins;
				}
			}
		}

		public override void InitializeCharacterMaster()
		{
			SybilAI.Init(bodyPrefab, masterName);
		}
	}
	public static class SybilTokens
	{
		public static void Init()
		{
			string text = "Sybil, a dreamer lost in a castle that isn't hers, with her Dream Breaker and every movement trick from Pseudoregalia.<color=#CCD3E0>\n\n< ! > Jump in the air to drop kick. Kick a wall or an enemy to bounce off it. Hold sprint while falling along a wall to ride it.\n\n< ! > Throw the Dream Breaker, then drop kick it at the marked enemy. Every kick adds damage.\n\n< ! > Jump out of a slide for a long jump, and jump the moment you land to bunnyhop and keep your speed.\n\n< ! > Swinging at enemies in the air bounces you off them. Plunge, then jump as you land, for a high jump.\n\n< ! > Hits build magical power: spend it to heal, or keep it for wider, harder swings.</color>";
			Language.Add("KAVAHN_SYBIL_" + "NAME", "Sybil");
			Language.Add("KAVAHN_SYBIL_" + "DESCRIPTION", text);
			Language.Add("KAVAHN_SYBIL_" + "SUBTITLE", "Dreamer of Pseudoregalia");
			Language.Add("KAVAHN_SYBIL_" + "LORE", "She woke in a castle of dreams with a weapon she didn't remember picking up, and somewhere to be.");
			Language.Add("KAVAHN_SYBIL_" + "OUTRO_FLAVOR", "...and so she left, to wake up somewhere else.");
			Language.Add("KAVAHN_SYBIL_" + "OUTRO_FAILURE", "...and so she slept, and didn't dream.");
			Language.Add("KAVAHN_SYBIL_" + "DEFAULT_SKIN_NAME", "Default");
			Language.Add("KAVAHN_SYBIL_" + "PASSIVE_NAME", "Sun Greaves");
			Language.Add("KAVAHN_SYBIL_" + "PASSIVE_DESCRIPTION", $"Jump in the air to <style=cIsUtility>drop kick</style> forward, up to <style=cIsUtility>{4} times</style> (Heliacal Power); kicking a wall or an enemy <style=cIsUtility>bounces you off it</style> for <style=cIsDamage>{250f}% damage</style>. " + "Jumping near a wall <style=cIsUtility>kicks off it</style> without spending a kick. Hold <style=cIsUtility>Sprint</style> while falling along a wall to <style=cIsUtility>ride it</style> (Cling Gem, " + $"{6} times). Jump right after landing to <style=cIsUtility>bunnyhop</style> and keep your speed. No fall damage. " + "Hits build <style=cIsDamage>magical power</style> (Indignation): at level 2 her swings reach further, and at level 3 they hit harder.");
			Language.Add("KAVAHN_SYBIL_" + "PRIMARY_NAME", "Dream Breaker");
			Language.Add("KAVAHN_SYBIL_" + "PRIMARY_DESCRIPTION", "<style=cIsUtility>Agile.</style>" + $" Swing for <style=cIsDamage>{240.00002f}% damage</style>, the third swing for <style=cIsDamage>{340f}%</style>. " + "In the air, hitting an enemy <style=cIsUtility>bounces you off it</style> (Ascendant Light).");
			Language.Add("KAVAHN_SYBIL_" + "SECONDARY_THROW_NAME", "Throw Dream Breaker");
			Language.Add("KAVAHN_SYBIL_" + "SECONDARY_THROW_DESCRIPTION", $"Throw your weapon for <style=cIsDamage>{500f}% damage</style>. It <style=cIsUtility>floats over</style> the enemy it hits, then drifts back to you. " + $"<style=cIsUtility>Drop kick it</style> to send it at your locked-on enemy (or the nearest one you face). Each kick adds <style=cIsDamage>{300f}%</style> damage until you catch it. While it is out, your primary becomes kicks for <style=cIsDamage>{160f}%</style>.");
			Language.Add("KAVAHN_SYBIL_" + "SECONDARY_CUTTER_NAME", "Soul Cutter");
			Language.Add("KAVAHN_SYBIL_" + "SECONDARY_CUTTER_DESCRIPTION", $"Hold until your weapon is ready, release to fire a <style=cIsUtility>piercing</style> crescent for <style=cIsDamage>{500f}% damage</style>. " + "With <style=cIsDamage>magical power</style>, spends a level to deal <style=cIsDamage>double damage</style>.");
			Language.Add("KAVAHN_SYBIL_" + "SECONDARY_STRIKEBREAK_NAME", "Strikebreak");
			Language.Add("KAVAHN_SYBIL_" + "SECONDARY_STRIKEBREAK_DESCRIPTION", $"Hold until your weapon is ready, release for a heavy strike that <style=cIsUtility>locks you in place</style>, dealing <style=cIsDamage>{800f}% damage</style> around it.");
			Language.Add("KAVAHN_SYBIL_" + "UTILITY_NAME", "Slide / Sunsetter");
			Language.Add("KAVAHN_SYBIL_" + "UTILITY_DESCRIPTION", "On the ground, <style=cIsUtility>slide</style> forward fast, briefly untouchable, and jump out of it for a <style=cIsUtility>long jump</style> (Solar Wind). " + $"In the air, stop, then <style=cIsUtility>plunge</style> for <style=cIsDamage>{400f}%</style> and land for <style=cIsDamage>{500f}% damage</style> around you. " + "Jump as you land for a <style=cIsUtility>high jump</style>, or during the stop for a <style=cIsUtility>backflip</style> (once per landing).");
			Language.Add("KAVAHN_SYBIL_" + "SPECIAL_NAME", "Heal");
			Language.Add("KAVAHN_SYBIL_" + "SPECIAL_DESCRIPTION", $"Spend all your <style=cIsDamage>magical power</style> to <style=cIsHealing>heal {10f}% health</style> plus <style=cIsHealing>{20f}%</style> per level. You can walk slowly while channelling.");
		}

		public static void AddSkinName(string token, string name)
		{
			Language.Add("KAVAHN_SYBIL_" + token + "_NAME", name);
		}
	}
}
namespace SybilMod.Survivors.Sybil.SkillStates
{
	public abstract class ChargeWeapon : BaseSkillState
	{
		protected SybilMovement movement;

		private bool ready;

		private uint chargeSound;

		protected abstract EntityState ReleaseState();

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			movement = ((EntityState)this).GetComponent<SybilMovement>();
			if (Object.op_Implicit((Object)(object)movement))
			{
				movement.ShowWeapon(10f);
			}
			((EntityState)this).PlayCrossfade("Gesture, Override", "ThrowBomb", "ThrowBomb.playbackRate", 10f, 0.1f);
			chargeSound = Util.PlaySound("Play_Sybil_Charge", ((EntityState)this).gameObject);
			((BaseState)this).StartAimMode(2f, false);
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			float num = 0.55f / ((BaseState)this).attackSpeedStat;
			if (!ready && ((EntityState)this).fixedAge >= num)
			{
				ready = true;
				Util.PlaySound("Play_Sybil_ChargeReady", ((EntityState)this).gameObject);
			}
			if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority())
			{
				if (ready)
				{
					((EntityState)this).outer.SetNextState(ReleaseState());
				}
				else
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
			}
		}

		public override void OnExit()
		{
			AkSoundEngine.StopPlayingID(chargeSound);
			if (!ready)
			{
				((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty");
			}
			if (Object.op_Implicit((Object)(object)movement))
			{
				movement.ShowWeapon(0.3f);
			}
			((EntityState)this).OnExit();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
	public class ChargeSoulCutter : ChargeWeapon
	{
		protected override EntityState ReleaseState()
		{
			return (EntityState)(object)new SoulCutter();
		}
	}
	public class ChargeStrikebreak : ChargeWeapon
	{
		protected override EntityState ReleaseState()
		{
			return (EntityState)(object)new Strikebreak();
		}
	}
	public class SoulCutter : BaseSkillState
	{
		private float duration = 0.45f;

		public override void OnEnter()
		{
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: 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_0148: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			duration /= ((BaseState)this).attackSpeedStat;
			SybilMovement component = ((EntityState)this).GetComponent<SybilMovement>();
			bool flag = Object.op_Implicit((Object)(object)component) && component.PowerLevel > 0;
			if (flag && NetworkServer.active)
			{
				component.SpendPower(1);
			}
			if (Object.op_Implicit((Object)(object)component))
			{
				component.ShowWeapon(duration + 0.2f);
			}
			((EntityState)this).PlayCrossfade("FullBody, Override", "SoulCutter", "ThrowBomb.playbackRate", duration * 1.6f, 0.05f);
			Util.PlaySound("Play_Sybil_SoulCutter", ((EntityState)this).gameObject);
			if (((EntityState)this).isAuthority)
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
				ProjectileManager.instance.FireProjectile(new FireProjectileInfo
				{
					projectilePrefab = (flag ? SybilAssets.soulCutterPoweredPrefab : SybilAssets.soulCutterPrefab),
					position = ((Ray)(ref aimRay)).origin,
					rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction),
					owner = ((EntityState)this).gameObject,
					damage = ((BaseState)this).damageStat * 5f * (flag ? 2f : 1f),
					force = 600f,
					crit = ((BaseState)this).RollCrit(),
					damageTypeOverride = DamageTypeCombo.GenericSecondary
				});
				((BaseState)this).AddRecoil(-1f, -1.5f, -0.3f, 0.3f);
			}
		}

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
	public class Strikebreak : BaseSkillState
	{
		private float duration = 0.6f;

		private bool fired;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			duration /= ((BaseState)this).attackSpeedStat;
			SybilMovement component = ((EntityState)this).GetComponent<SybilMovement>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.ShowWeapon(duration + 0.2f);
				component.StopCarry();
			}
			((EntityState)this).PlayCrossfade("FullBody, Override", "Swing3", "Slash.playbackRate", duration * 1.4f, 0.05f);
			Util.PlaySound("Play_Sybil_Strikebreak", ((EntityState)this).gameObject);
		}

		public override void FixedUpdate()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: 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_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: 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_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: 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_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Expected O, but got Unknown
			((EntityState)this).FixedUpdate();
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				((EntityState)this).characterMotor.moveDirection = Vector3.zero;
				((EntityState)this).characterMotor.velocity = (Vector3)(((EntityState)this).characterMotor.isGrounded ? Vector3.zero : new Vector3(0f, Mathf.Max(((EntityState)this).characterMotor.velocity.y, -4f), 0f));
			}
			if (!fired && ((EntityState)this).fixedAge >= duration * 0.3f)
			{
				fired = true;
				if (((EntityState)this).isAuthority)
				{
					SybilMovement component = ((EntityState)this).GetComponent<SybilMovement>();
					int num = (Object.op_Implicit((Object)(object)component) ? component.PowerLevel : 0);
					Vector3 val = ((EntityState)this).characterBody.corePosition + ((EntityState)this).characterDirection.forward * 2.2f;
					new BlastAttack
					{
						attacker = ((EntityState)this).gameObject,
						inflictor = ((EntityState)this).gameObject,
						teamIndex = ((BaseState)this).GetTeam(),
						baseDamage = ((BaseState)this).damageStat * 8f * ((num >= 3) ? 1.3f : 1f),
						baseForce = 2500f,
						position = val,
						radius = ((num >= 2) ? 4.5f : 3.5f),
						falloffModel = (FalloffModel)0,
						procCoefficient = 1f,
						crit = ((BaseState)this).RollCrit(),
						damageType = DamageTypeCombo.GenericSecondary,
						attackerFiltering = (AttackerFiltering)2,
						impactEffect = EffectCatalog.FindEffectIndexFromPrefab(SybilAssets.hitEffect)
					}.Fire();
					EffectManager.SpawnEffect(SybilAssets.plungeLandEffect, new EffectData
					{
						origin = val,
						scale = 3.5f
					}, true);
					((BaseState)this).AddRecoil(-3f, -4f, -1f, 1f);
				}
			}
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
	public class Heal : BaseSkillState
	{
		private int levels;

		private float duration;

		private SybilMovement movement;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			movement = ((EntityState)this).GetComponent<SybilMovement>();
			levels = (Object.op_Implicit((Object)(object)movement) ? movement.PowerLevel : 0);
			duration = 1.1f;
			if (levels <= 0)
			{
				Util.PlaySound("Play_Sybil_Guard", ((EntityState)this).gameObject);
				duration = 0.1f;
			}
			else
			{
				((EntityState)this).PlayCrossfade("FullBody, Override", "Channel", "ShootGun.playbackRate", duration, 0.1f);
				Util.PlaySound("Play_Sybil_HealStep", ((EntityState)this).gameObject);
			}
		}

		public override void FixedUpdate()
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && levels > 0)
			{
				CharacterMotor characterMotor = ((EntityState)this).characterMotor;
				characterMotor.moveDirection *= 0.3f;
			}
			if (!(((EntityState)this).fixedAge >= duration))
			{
				return;
			}
			if (levels > 0)
			{
				if (NetworkServer.active && Object.op_Implicit((Object)(object)movement) && Object.op_Implicit((Object)(object)((EntityState)this).healthComponent))
				{
					int num = movement.SpendPower(levels);
					((EntityState)this).healthComponent.HealFraction(0.1f + 0.2f * (float)num, default(ProcChainMask));
				}
				Util.PlaySound("Play_Sybil_Heal", ((EntityState)this).gameObject);
				((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
				levels = 0;
			}
			if (((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
	public class DreamBreaker : BaseMeleeAttack
	{
		private bool aerial;

		private bool unarmed;

		private SybilMovement movement;

		private Vector3 hitboxScale;

		private Transform hitbox;

		private static int airSwingCount;

		private NetworkSoundEventDef swish;

		private bool connected;

		private bool swished;

		public override void OnEnter()
		{
			//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_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_0232: Unknown result type (might be due to invalid IL or missing references)
			//IL_023c: Unknown result type (might be due to invalid IL or missing references)
			movement = ((EntityState)this).GetComponent<SybilMovement>();
			aerial = Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded;
			hitboxGroupName = "SwordGroup";
			damageType = DamageTypeCombo.GenericPrimary;
			bool flag = !aerial && swingIndex == 2;
			damageCoefficient = (aerial ? 2.4f : (flag ? 3.4f : 2.4f));
			procCoefficient = 1f;
			pushForce = (flag ? 900f : 300f);
			baseDuration = (aerial ? 0.42f : (flag ? 0.62f : 0.42f));
			attackStartPercentTime = 0.18f;
			attackEndPercentTime = 0.45f;
			earlyExitPercentTime = 0.55f;
			hitStopDuration = 0.03f;
			attackRecoil = 0.5f;
			hitHopVelocity = 0f;
			swingSoundString = "";
			swish = SybilAssets.swishSounds[flag ? 2 : ((swingIndex == 1) ? 1 : 0)];
			hitSoundString = "";
			muzzleString = "SwingCenter";
			playbackRateParam = "Slash.playbackRate";
			swingEffectPrefab = SybilAssets.swingEffect;
			hitEffectPrefab = SybilAssets.hitEffect;
			impactSound = SybilAssets.hitSound.index;
			unarmed = Object.op_Implicit((Object)(object)movement) && movement.WeaponOut;
			if (unarmed)
			{
				damageCoefficient = 1.6f;
				swingEffectPrefab = null;
			}
			int num = (Object.op_Implicit((Object)(object)movement) ? movement.PowerLevel : 0);
			if (num >= 3)
			{
				damageCoefficient *= 1.3f;
			}
			base.OnEnter();
			HitBoxGroup val = ((BaseState)this).FindHitBoxGroup(hitboxGroupName);
			if (Object.op_Implicit((Object)(object)val) && val.hitBoxes.Length != 0)
			{
				hitbox = ((Component)val.hitBoxes[0]).transform;
				hitboxScale = hitbox.localScale;
				if (num >= 2)
				{
					hitbox.localScale = hitboxScale * 1.35f;
				}
			}
			if (Object.op_Implicit((Object)(object)movement) && !unarmed)
			{
				movement.ShowWeapon(duration + 0.35f);
			}
		}

		protected override void PlayAttackAnimation()
		{
			if (unarmed)
			{
				((EntityState)this).PlayCrossfade("FullBody, Override", "DropKick", playbackRateParam, duration * 1.3f, 0.05f);
				return;
			}
			string text = ((!aerial) ? ("Swing" + (1 + swingIndex)) : ((airSwingCount++ % 2 == 0) ? "AirSwing1" : "AirSwing2"));
			((EntityState)this).PlayCrossfade("FullBody, Override", text, playbackRateParam, duration * 1.3f, 0.05f);
		}

		protected override void PlaySwingEffect()
		{
			//IL_000f: 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_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: 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_004b: 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_0057: 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_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: 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_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Expected O, but got Unknown
			if (Object.op_Implicit((Object)(object)swingEffectPrefab))
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
				Vector3 val = ((Ray)(ref aimRay)).direction;
				val.y = 0f;
				val = ((((Vector3)(ref val)).sqrMagnitude > 0.01f) ? ((Vector3)(ref val)).normalized : ((EntityState)this).characterDirection.forward);
				EffectManager.SpawnEffect(swingEffectPrefab, new EffectData
				{
					origin = ((EntityState)this).transform.position + val * 1.4f + Vector3.up * 0.3f,
					rotation = Quaternion.LookRotation(val),
					scale = 1.5f
				}, false);
			}
		}

		public override void FixedUpdate()
		{
			//IL_004d: 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)
			base.FixedUpdate();
			if (((EntityState)this).isAuthority && !swished && !connected && Object.op_Implicit((Object)(object)swish) && ((EntityState)this).fixedAge >= duration * attackEndPercentTime)
			{
				swished = true;
				EffectManager.SimpleSoundEffect(swish.index, ((EntityState)this).characterBody.corePosition, true);
			}
		}

		protected override void OnHitEnemyAuthority()
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: 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_0053: Unknown result type (might be due to invalid IL or missing references)
			connected = true;
			if (aerial && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded)
			{
				Vector3 velocity = ((EntityState)this).characterMotor.velocity;
				velocity.y = Mathf.Max(velocity.y, 13f);
				((EntityState)this).characterMotor.velocity = velocity;
				Util.PlaySound("Play_Sybil_Bounce", ((EntityState)this).gameObject);
			}
			base.OnHitEnemyAuthority();
		}

		public override void OnExit()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)hitbox))
			{
				hitbox.localScale = hitboxScale;
			}
			base.OnExit();
		}
	}
	public class SlideOrPlunge : BaseState
	{
		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			if (((EntityState)this).isAuthority)
			{
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && ((EntityState)this).characterMotor.isGrounded)
				{
					((EntityState)this).outer.SetNextState((EntityState)(object)new Slide());
				}
				else
				{
					((EntityState)this).outer.SetNextState((EntityState)(object)new Sunsetter());
				}
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
	public class Slide : BaseState
	{
		private SybilMovement movement;

		private Vector3 direction;

		private float speed;

		public override void OnEnter()
		{
			//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_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: 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_00b2: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			movement = ((EntityState)this).GetComponent<SybilMovement>();
			direction = ((Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && ((Vector3)(ref ((EntityState)this).inputBank.moveVector)).sqrMagnitude > 0.01f) ? ((EntityState)this).inputBank.moveVector : ((EntityState)this).characterDirection.forward);
			direction.y = 0f;
			((Vector3)(ref direction)).Normalize();
			Vector3 velocity = ((EntityState)this).characterMotor.velocity;
			velocity.y = 0f;
			speed = Mathf.Max(23f, ((Vector3)(ref velocity)).magnitude);
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterDirection.forward = direction;
			}
			if (Object.op_Implicit((Object)(object)movement))
			{
				movement.StopCarry();
				movement.PlayAnimation("Slide");
			}
			Util.PlaySound("Play_Sybil_Slide", ((EntityState)this).gameObject);
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 0.12f);
			}
		}

		public override void FixedUpdate()
		{
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: 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_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).isAuthority)
			{
				float num = ((EntityState)this).fixedAge / 0.95f;
				if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && ((Vector3)(ref ((EntityState)this).inputBank.moveVector)).sqrMagnitude > 0.01f)
				{
					Vector3 val = direction;
					Vector3 val2 = new Vector3(((EntityState)this).inputBank.moveVector.x, 0f, ((EntityState)this).inputBank.moveVector.z);
					direction = Vector3.RotateTowards(val, ((Vector3)(ref val2)).normalized, 1.5f * Time.fixedDeltaTime, 0f);
				}
				float num2 = Mathf.Lerp(speed, ((EntityState)this).characterBody.moveSpeed * 1.6f, num * num * num);
				((EntityState)this).characterMotor.moveDirection = Vector3.zero;
				Vector3 velocity = direction * num2;
				velocity.y = ((EntityState)this).characterMotor.velocity.y;
				((EntityState)this).characterMotor.velocity = velocity;
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
				{
					((EntityState)this).characterDirection.forward = direction;
				}
				if (((ButtonState)(ref ((EntityState)this).inputBank.jump)).justPressed)
				{
					LongJump(num2);
				}
				else if (((EntityState)this).fixedAge >= 0.95f)
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
			}
		}

		private void LongJump(float slideSpeed)
		{
			//IL_0001: 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_004a: 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_007f: Unknown result type (might be due to invalid IL or missing references)
			Vector3 velocity = direction * Mathf.Max(22f, slideSpeed);
			velocity.y = ((EntityState)this).characterBody.jumpPower * 0.65f;
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
			((EntityState)this).characterMotor.velocity = velocity;
			((EntityState)this).characterMotor.jumpCount = Mathf.Max(((EntityState)this).characterMotor.jumpCount, 1);
			if (Object.op_Implicit((Object)(object)movement))
			{
				movement.Carry(velocity, lowGravity: true);
				movement.PlayAnimation("LongJump", 0.8f);
			}
			Util.PlaySound("Play_Sybil_LongJump", ((EntityState)this).gameObject);
			((EntityState)this).outer.SetNextStateToMain();
		}

		public override void OnExit()
		{
			if (Object.op_Implicit((Object)(object)movement) && ((EntityState)this).fixedAge < 1.95f && ((EntityState)this).characterMotor.isGrounded)
			{
				movement.StopFullBodyAnimation();
			}
			((EntityState)this).OnExit();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
	public class Sunsetter : BaseState
	{
		private SybilMovement movement;

		private bool plunging;

		private OverlapAttack attack;

		private HitBoxGroup hitBoxGroup;

		public override void OnEnter()
		{
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: 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_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Expected O, but got Unknown
			((BaseState)this).OnEnter();
			movement = ((EntityState)this).GetComponent<SybilMovement>();
			if (Object.op_Implicit((Object)(object)movement))
			{
				movement.StopCarry();
				movement.EndWallRide();
				movement.ShowWeapon(5f);
				movement.PlayAnimation("DropAttack");
			}
			Util.PlaySound("Play_Sybil_Plunge", ((EntityState)this).gameObject);
			hitBoxGroup = ((BaseState)this).FindHitBoxGroup("SwordGroup");
			attack = new OverlapAttack
			{
				attacker = ((EntityState)this).gameObject,
				inflictor = ((EntityState)this).gameObject,
				teamIndex = ((BaseState)this).GetTeam(),
				damage = 4f * base.damageStat,
				procCoefficient = 1f,
				hitEffectPrefab = SybilAssets.hitEffect,
				forceVector = Vector3.down * 1500f,
				hitBoxGroup = hitBoxGroup,
				isCrit = ((BaseState)this).RollCrit(),
				damageType = DamageTypeCombo.GenericUtility,
				impactSound = SybilAssets.hitSound.index
			};
		}

		public override void FixedUpdate()
		{
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			if (!((EntityState)this).isAuthority)
			{
				return;
			}
			if (!plunging)
			{
				((EntityState)this).characterMotor.velocity = Vector3.zero;
				((EntityState)this).characterMotor.moveDirection = Vector3.zero;
				if (((ButtonState)(ref ((EntityState)this).inputBank.jump)).justPressed && Object.op_Implicit((Object)(object)movement) && movement.backflipReady)
				{
					Backflip();
				}
				else if (((EntityState)this).fixedAge >= 0.3f)
				{
					plunging = true;
				}
			}
			else
			{
				((EntityState)this).characterMotor.moveDirection = Vector3.zero;
				((EntityState)this).characterMotor.velocity = new Vector3(0f, -50f, 0f);
				attack.Fire((List<HurtBox>)null);
				if (((EntityState)this).characterMotor.isGrounded || ((EntityState)this).fixedAge > 4f)
				{
					Land();
				}
			}
		}

		private void Backflip()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			movement.backflipReady = false;
			Vector3 velocity = -((EntityState)this).characterDirection.forward * 6f;
			velocity.y = ((EntityState)this).characterBody.jumpPower * 1.25f;
			((EntityState)this).characterMotor.velocity = velocity;
			movement.PlayAnimation("BackFlip", 0.7f);
			Util.PlaySound("Play_Sybil_Backflip", ((EntityState)this).gameObject);
			((EntityState)this).outer.SetNextStateToMain();
		}

		private void Land()
		{
			//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_0022: 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_003d: Expected O, but got Unknown
			//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_004e: 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_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: 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_0084: 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_0098: 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_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			Util.PlaySound("Play_Sybil_PlungeLand", ((EntityState)this).gameObject);
			EffectManager.SpawnEffect(SybilAssets.plungeLandEffect, new EffectData
			{
				origin = ((EntityState)this).characterBody.footPosition,
				scale = 6f
			}, true);
			new BlastAttack
			{
				attacker = ((EntityState)this).gameObject,
				inflictor = ((EntityState)this).gameObject,
				teamIndex = ((BaseState)this).GetTeam(),
				baseDamage = 5f * base.damageStat,
				baseForce = 800f,
				bonusForce = Vector3.up * 1200f,
				position = ((EntityState)this).characterBody.footPosition,
				radius = 6f,
				falloffModel = (FalloffModel)2,
				procCoefficient = 1f,
				crit = ((BaseState)this).RollCrit(),
				damageType = DamageTypeCombo.GenericUtility,
				attackerFiltering = (AttackerFiltering)2
			}.Fire();
			if (Object.op_Implicit((Object)(object)movement))
			{
				movement.highJumpTimer = 0.35f;
				movement.ShowWeapon(0.4f);
				movement.PlayAnimation("HardLanding", 0.4f);
			}
			((EntityState)this).outer.SetNextStateToMain();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
	public class SybilMain : GenericCharacterMain
	{
		private SybilMovement movement;

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

		public override void ProcessJump()
		{
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			Vector3 normal;
			if (!base.jumpInputReceived || !Object.op_Implicit((Object)(object)movement) || !Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody))
			{
				((GenericCharacterMain)this).ProcessJump();
			}
			else if (((EntityState)this).characterMotor.isGrounded)
			{
				if (movement.highJumpTimer > 0f)
				{
					HighJump();
					return;
				}
				bool num = movement.carrySpeed > ((EntityState)this).characterBody.moveSpeed;
				Vector3 velocity = ((EntityState)this).characterMotor.velocity;
				((GenericCharacterMain)this).ProcessJump();
				if (num)
				{
					velocity.y = 0f;
					float num2 = Mathf.Min(((Vector3)(ref velocity)).magnitude * 1.12f, 34f);
					Vector3 velocity2 = ((Vector3)(ref velocity)).normalized * num2;
					velocity2.y = ((EntityState)this).characterMotor.velocity.y;
					((EntityState)this).characterMotor.velocity = velocity2;
					movement.Carry(velocity2, lowGravity: false);
					movement.PlayAnimation("Bunnyhop", 0.4f);
					Util.PlaySound("Play_Sybil_Bunnyhop", ((EntityState)this).gameObject);
				}
				else
				{
					Util.PlaySound("Play_Sybil_Jump", ((EntityState)this).gameObject);
				}
			}
			else if (movement.wallRiding)
			{
				movement.WallKick(movement.WallNormal);
			}
			else if (movement.FindWall(out normal, 0.9f))
			{
				movement.WallKick(normal);
			}
			else if (((EntityState)this).characterMotor.jumpCount < ((EntityState)this).characterBody.maxJumpCount)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new DropKick());
			}
		}

		private void AirKick()
		{
			//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_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)
			//IL_0081: 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_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Expected O, but got Unknown
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			movement.EndWallRide();
			Vector3 velocity = ((EntityState)this).characterMotor.velocity;
			velocity.y = 0f;
			Vector3 moveDirection = ((EntityState)this).characterMotor.moveDirection;
			moveDirection.y = 0f;
			float num = Mathf.Max(((Vector3)(ref velocity)).magnitude, ((EntityState)this).characterBody.moveSpeed);
			Vector3 velocity2 = ((((Vector3)(ref moveDirection)).sqrMagnitude > 0.01f) ? ((Vector3)(ref moveDirection)).normalized : ((((Vector3)(ref velocity)).sqrMagnitude > 0.01f) ? ((Vector3)(ref velocity)).normalized : Vector3.zero)) * num;
			velocity2.y = ((EntityState)this).characterBody.jumpPower * 0.8f;
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
			((EntityState)this).characterMotor.velocity = velocity2;
			CharacterMotor characterMotor = ((EntityState)this).characterMotor;
			characterMotor.jumpCount++;
			if (num > ((EntityState)this).characterBody.moveSpeed + 0.5f)
			{
				movement.Carry(velocity2, lowGravity: false);
			}
			movement.PlayAnimation("AirKick", 0.45f);
			Util.PlaySound("Play_Sybil_AirKick", ((EntityState)this).gameObject);
			EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/ImpactEffects/CharacterLandImpact"), new EffectData
			{
				origin = ((EntityState)this).characterBody.footPosition,
				scale = ((EntityState)this).characterBody.radius
			}, true);
		}

		private void HighJump()
		{
			//IL_0016: 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_0030: 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_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			movement.highJumpTimer = 0f;
			Vector3 velocity = ((EntityState)this).characterMotor.moveDirection * ((EntityState)this).characterBody.moveSpeed * 0.6f;
			velocity.y = ((EntityState)this).characterBody.jumpPower * 1.42f;
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
			((EntityState)this).characterMotor.velocity = velocity;
			movement.StopCarry();
			movement.PlayAnimation("HighJump", 0.7f);
			Util.PlaySound("Play_Sybil_HighJump", ((EntityState)this).gameObject);
		}
	}
	public class ThrowWeapon : BaseSkillState
	{
		private float duration = 0.45f;

		public override void OnEnter()
		{
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			SybilMovement component = ((EntityState)this).GetComponent<SybilMovement>();
			if (Object.op_Implicit((Object)(object)component) && component.WeaponOut)
			{
				if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.secondary))
				{
					((EntityState)this).skillLocator.secondary.AddOneStock();
				}
				duration = 0f;
				return;
			}
			duration /= ((BaseState)this).attackSpeedStat;
			if (Object.op_Implicit((Object)(object)component))
			{
				component.throwPending = 0.6f;
			}
			((EntityState)this).PlayCrossfade("FullBody, Override", "SoulCutter", "ThrowBomb.playbackRate", duration * 1.6f, 0.05f);
			Util.PlaySound("Play_Sybil_SoulCutter", ((EntityState)this).gameObject);
			((BaseState)this).StartAimMode(1f, false);
			if (((EntityState)this).isAuthority)
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
				ProjectileManager.instance.FireProjectile(new FireProjectileInfo
				{
					projectilePrefab = SybilAssets.weaponThrownPrefab,
					position = ((Ray)(ref aimRay)).origin + ((Ray)(ref aimRay)).direction * 0.5f,
					rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction),
					owner = ((EntityState)this).gameObject,
					damage = ((BaseState)this).damageStat * 5f,
					force = 800f,
					crit = ((BaseState)this).RollCrit(),
					damageTypeOverride = DamageTypeCombo.GenericSecondary
				});
			}
		}

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
	public class DropKick : BaseState
	{
		private SybilMovement movement;

		private Vector3 direction;

		private OverlapAttack attack;

		private bool kicking;

		public override void OnEnter()
		{
			//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_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Expected O, but got Unknown
			((BaseState)this).OnEnter();
			movement = ((EntityState)this).GetComponent<SybilMovement>();
			CharacterMotor characterMotor = ((EntityState)this).characterMotor;
			characterMotor.jumpCount++;
			direction = ((EntityState)this).inputBank.aimDirection;
			direction.y = 0f;
			if (((Vector3)(ref ((EntityState)this).inputBank.moveVector)).sqrMagnitude > 0.01f)
			{
				direction = ((EntityState)this).inputBank.moveVector;
			}
			((Vector3)(ref direction)).Normalize();
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterDirection.forward = direction;
			}
			if (Object.op_Implicit((Object)(object)movement))
			{
				movement.EndWallRide();
				movement.StopCarry();
				movement.PlayAnimation("DropKick", 0.4f);
			}
			attack = new OverlapAttack
			{
				attacker = ((EntityState)this).gameObject,
				inflictor = ((EntityState)this).gameObject,
				teamIndex = ((BaseState)this).GetTeam(),
				damage = 2.5f * base.damageStat,
				procCoefficient = 1f,
				hitEffectPrefab = SybilAssets.hitEffect,
				forceVector = direction * 1200f,
				hitBoxGroup = ((BaseState)this).FindHitBoxGroup("SwordGroup"),
				isCrit = ((BaseState)this).RollCrit(),
				impactSound = SybilAssets.hitSound.index
			};
		}

		public override void FixedUpdate()
		{
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			if (!((EntityState)this).isAuthority)
			{
				return;
			}
			if (!kicking)
			{
				((EntityState)this).characterMotor.velocity = new Vector3(((EntityState)this).characterMotor.velocity.x * 0.5f, Mathf.Max(((EntityState)this).characterMotor.velocity.y, 0f) * 0.5f, ((EntityState)this).characterMotor.velocity.z * 0.5f);
				if (((EntityState)this).fixedAge < 0.08f)
				{
					return;
				}
				kicking = true;
				Util.PlaySound("Play_Sybil_AirKick", ((EntityState)this).gameObject);
			}
			Vector3 velocity = direction * 16f;
			velocity.y = Mathf.Max(((EntityState)this).characterMotor.velocity.y, -6f);
			((EntityState)this).characterMotor.velocity = velocity;
			((EntityState)this).characterMotor.moveDirection = Vector3.zero;
			if (Object.op_Implicit((Object)(object)movement) && movement.FindWall(out var normal, 0.5f))
			{
				movement.WallKick(normal);
				((EntityState)this).outer.SetNextStateToMain();
			}
			else if (SybilWeaponProjectile.TryKickAuthority(((EntityState)this).characterBody))
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
			else if (attack.Fire((List<HurtBox>)null))
			{
				if (Object.op_Implicit((Object)(object)movement))
				{
					movement.WallKick(-direction);
				}
				((EntityState)this).outer.SetNextStateToMain();
			}
			else if (((EntityState)this).characterMotor.isGrounded || ((EntityState)this).fixedAge >= 0.4f)
			{
				if (Object.op_Implicit((Object)(object)movement))
				{
					movement.Carry(((EntityState)this).characterMotor.velocity, lowGravity: false);
				}
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)2;
		}
	}
}
namespace SybilMod.Survivors.Sybil.Components
{
	public class SybilKickTracker : MonoBehaviour
	{
		public const float range = 70f;

		public const float angle = 25f;

		private CharacterBody body;

		private Indicator indicator;

		private float searchTimer;

		private static readonly Color inHand = new Color(1f, 0.85f, 0.15f);

		private static readonly Color kicking = new Color(0.3f, 0.65f, 1f);

		public HurtBox Target { get; private set; }

		private void Awake()
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Expected O, but got Unknown
			body = ((Component)this).GetComponent<CharacterBody>();
			indicator = new Indicator(((Component)this).gameObject, LegacyResourcesAPI.Load<GameObject>("Prefabs/HuntressTrackingIndicator"));
		}

		private void FixedUpdate()
		{
			if (Object.op_Implicit((Object)(object)body) && body.hasEffectiveAuthority && Object.op_Implicit((Object)(object)body.inputBank))
			{
				searchTimer -= Time.fixedDeltaTime;
				if (searchTimer <= 0f)
				{
					searchTimer = 0.1f;
					Target = Search();
				}
				if (Object.op_Implicit((Object)(object)Target) && (!Object.op_Implicit((Object)(object)Target.healthComponent) || !Target.healthComponent.alive))
				{
					Target = null;
				}
				indicator.targetTransform = (Object.op_Implicit((Object)(object)Target) ? ((Component)Target).transform : null);
				indicator.active = Object.op_Implicit((Object)(object)Target);
			}
		}

		private void Update()
		{
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: 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_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)Target) && !((Object)(object)indicator.visualizerInstance == (Object)null))
			{
				bool num = SybilWeaponProjectile.HasOut(((Component)this).gameObject);
				EntityStateMachine val = EntityStateMachine.FindByCustomName(((Component)this).gameObject, "Body");
				bool flag = Object.op_Implicit((Object)(object)val) && val.state is DropKick;
				Color color = ((!num) ? inHand : (flag ? kicking : Color.white));
				SpriteRenderer[] componentsInChildren = indicator.visualizerInstance.GetComponentsInChildren<SpriteRenderer>();
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					componentsInChildren[i].color = color;
				}
			}
		}

		private HurtBox Search()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: 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_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: 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_0046: 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_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: 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_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			Ray aimRay = body.inputBank.GetAimRay();
			BullseyeSe