Decompiled source of Seamstress v1.4.6

plugins/SeamstressMod.dll

Decompiled 6 days 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 AncientScepter;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EmotesAPI;
using EntityStates;
using EntityStates.AI.Walker;
using Grumpy;
using HG;
using HG.BlendableTypes;
using JetBrains.Annotations;
using KinematicCharacterController;
using On.RoR2;
using On.RoR2.Items;
using On.RoR2.UI;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.CameraModes;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using SeamstressMod.Modules;
using SeamstressMod.Modules.Achievements;
using SeamstressMod.Modules.BaseStates;
using SeamstressMod.Modules.Characters;
using SeamstressMod.Seamstress;
using SeamstressMod.Seamstress.Components;
using SeamstressMod.Seamstress.Content;
using SeamstressMod.Seamstress.SkillStates;
using ThreeEyedGames;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;

[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: CompilationRelaxations(8)]
[assembly: AssemblyCompany("SeamstressMod")]
[assembly: AssemblyProduct("SeamstressMod")]
[assembly: AssemblyTitle("SeamstressMod")]
[assembly: AssemblyInformationalVersion("1.0.0+c3c6e0c887d98f9bba6eaf6ccb7e4255803ad997")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace SeamstressMod
{
	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);
		}
	}
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.kenko.Seamstress", "Seamstress", "1.0.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class SeamstressPlugin : BaseUnityPlugin
	{
		public const string MODUID = "com.kenko.Seamstress";

		public const string MODNAME = "Seamstress";

		public const string MODVERSION = "1.0.0";

		public const string DEVELOPER_PREFIX = "KENKO";

		public static SeamstressPlugin instance;

		public static bool emotesInstalled => Chainloader.PluginInfos.ContainsKey("com.weliveinasociety.CustomEmotesAPI");

		public static bool scepterInstalled => Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter");

		public static bool importanceInstalled => Chainloader.PluginInfos.ContainsKey("pseudopulse.EnemyImportance");

		private void Awake()
		{
			instance = this;
			Log.Init(((BaseUnityPlugin)this).Logger);
			Language.Init();
			new SeamstressSurvivor().Initialize();
			new ContentPacks().Initialize();
		}
	}
}
namespace SeamstressMod.Seamstress
{
	public class SeamstressSurvivor : SurvivorBase<SeamstressSurvivor>
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_Init <>9__71_0;

			internal void <Emotes>b__71_0(orig_Init orig)
			{
				orig.Invoke();
				GameObject val = SeamstressAssets.mainAssetBundle.LoadAsset<GameObject>("seamstress_emoteskeleton");
				CustomEmotesAPI.ImportArmature(characterPrefab, val, 0, true);
			}
		}

		public const string SEAMSTRESS_PREFIX = "KENKO_SEAMSTRESS_";

		internal static GameObject characterPrefab;

		public static SkillDef explodeSkillDef;

		public static SkillDef scepterFireScissor;

		public override string assetBundleName => "seamstressassets";

		public override string bodyName => "SeamstressBody";

		public override string masterName => "SeamstressMonsterMaster";

		public override string modelPrefabName => "mdlSeamstress";

		public override string displayPrefabName => "SeamstressDisplay";

		public override string survivorTokenPrefix => "KENKO_SEAMSTRESS_";

		public override BodyInfo bodyInfo
		{
			get
			{
				//IL_004e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0053: Unknown result type (might be due to invalid IL or missing references)
				//IL_0085: 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)
				BodyInfo bodyInfo = new BodyInfo();
				bodyInfo.bodyName = bodyName;
				bodyInfo.bodyNameToken = "KENKO_SEAMSTRESS_NAME";
				bodyInfo.subtitleNameToken = "KENKO_SEAMSTRESS_SUBTITLE";
				bodyInfo.characterPortrait = assetBundle.LoadAsset<Texture>("texSeamstressIcon");
				bodyInfo.bodyColor = new Color(31f / 51f, 11f / 51f, 11f / 51f);
				bodyInfo.sortPosition = 7f;
				bodyInfo.crosshair = CharacterAssets.LoadCrosshair("SimpleDot");
				bodyInfo.podPrefab = null;
				bodyInfo.initialStateType = new SerializableEntityStateType(typeof(SeamstressSpawnState));
				bodyInfo.maxHealth = 160f;
				bodyInfo.healthRegen = 1f;
				bodyInfo.armor = 0f;
				bodyInfo.damage = SeamstressConfig.baseDamage.Value;
				bodyInfo.damageGrowth = 0f;
				bodyInfo.healthGrowth = 48f;
				bodyInfo.jumpCount = 1;
				return bodyInfo;
			}
		}

		public override CustomRendererInfo[] customRendererInfos => new CustomRendererInfo[5]
		{
			new CustomRendererInfo
			{
				childName = "Model"
			},
			new CustomRendererInfo
			{
				childName = "ScissorLModel"
			},
			new CustomRendererInfo
			{
				childName = "ScissorRModel"
			},
			new CustomRendererInfo
			{
				childName = "CrownModel"
			},
			new CustomRendererInfo
			{
				childName = "HeartModel"
			}
		};

		public override UnlockableDef characterUnlockableDef => SeamstressUnlockables.characterUnlockableDef;

		public override ItemDisplaysBase itemDisplays => new SeamstressItemDisplays();

		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; }

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

		public override void InitializeCharacter()
		{
			SeamstressConfig.Init();
			SeamstressUnlockables.Init();
			base.InitializeCharacter();
			SeamstressCrosshair.Init(assetBundle);
			DamageTypes.Init();
			SeamstressStates.Init();
			SeamstressTokens.Init();
			SeamstressAssets.Init(assetBundle);
			SeamstressBuffs.Init(assetBundle);
			InitializeEntityStateMachines();
			InitializeSkills();
			InitializeSkins();
			InitializeCharacterMaster();
			AdditionalBodySetup();
			characterPrefab = bodyPrefab;
			AddHooks();
		}

		private void AdditionalBodySetup()
		{
			//IL_0017: 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_0032: Expected O, but got Unknown
			//IL_0032: Expected O, but got Unknown
			//IL_003f: 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_005a: Expected O, but got Unknown
			//IL_005a: Expected O, but got Unknown
			AddHitboxes();
			TempVisualEffectAPI.AddTemporaryVisualEffect(SeamstressAssets.sewnCdEffect, new EffectRadius(pee), new EffectCondition(tempAdd), "");
			TempVisualEffectAPI.AddTemporaryVisualEffect(SeamstressAssets.sewnEffect, new EffectRadius(pee), new EffectCondition(tempAdd2), "");
			bodyPrefab.AddComponent<SeamstressController>();
			bodyPrefab.AddComponent<ScissorController>();
			bodyPrefab.AddComponent<NeedleController>();
			bodyPrefab.AddComponent<Tracker>();
			static float pee(CharacterBody body)
			{
				return 2f * body.radius;
			}
			static bool tempAdd(CharacterBody body)
			{
				return body.HasBuff(SeamstressBuffs.ManipulatedCd);
			}
			static bool tempAdd2(CharacterBody body)
			{
				return body.HasBuff(SeamstressBuffs.Manipulated);
			}
		}

		public void AddHitboxes()
		{
			Prefabs.SetupHitBoxGroup(characterModelObject, "Sword", "SwordHitbox");
			Prefabs.SetupHitBoxGroup(characterModelObject, "SwordBig", "SwordHitboxBig");
			Prefabs.SetupHitBoxGroup(characterModelObject, "Weave", "WeaveHitbox");
			Prefabs.SetupHitBoxGroup(characterModelObject, "WeaveBig", "WeaveHitboxBig");
			Prefabs.SetupHitBoxGroup(characterModelObject, "Right", "RightScissorHitbox");
			Prefabs.SetupHitBoxGroup(characterModelObject, "Left", "LeftScissorHitbox");
		}

		public override void InitializeEntityStateMachines()
		{
			//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_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: 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_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)
			bodyPrefab.GetComponent<CharacterBody>().preferredInitialStateType = new SerializableEntityStateType(typeof(SeamstressSpawnState));
			EntityStateMachine[] components = bodyPrefab.GetComponents<EntityStateMachine>();
			foreach (EntityStateMachine val in components)
			{
				if (val.customName == "Body")
				{
					val.mainStateType = new SerializableEntityStateType(typeof(MainState));
				}
			}
			EntityStateMachine val2 = bodyPrefab.AddComponent<EntityStateMachine>();
			val2.initialStateType = new SerializableEntityStateType(typeof(SeamstressJump));
			val2.mainStateType = new SerializableEntityStateType(typeof(SeamstressJump));
			val2.customName = "Passive";
			Prefabs.AddEntityStateMachine(bodyPrefab, "Weapon");
			Prefabs.AddEntityStateMachine(bodyPrefab, "Weapon2");
		}

		public override void InitializeSkills()
		{
			bodyPrefab.AddComponent<SeamstressPassive>();
			Skills.CreateSkillFamilies(bodyPrefab);
			AddPassiveSkills();
			AddPrimarySkills();
			AddSecondarySkills();
			AddUtilitySkills();
			AddSpecialSkills();
			if (SeamstressPlugin.scepterInstalled)
			{
				InitializeScepter();
			}
		}

		private void AddPassiveSkills()
		{
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			SeamstressPassive component = bodyPrefab.GetComponent<SeamstressPassive>();
			SkillLocator component2 = bodyPrefab.GetComponent<SkillLocator>();
			component2.passiveSkill.enabled = false;
			component.blinkPassive = Skills.CreateSkillDef(new SkillDefInfo
			{
				skillName = "KENKO_SEAMSTRESS_PASSIVE_NAME",
				skillNameToken = "KENKO_SEAMSTRESS_PASSIVE_NAME",
				skillDescriptionToken = "KENKO_SEAMSTRESS_PASSIVE_DESCRIPTION",
				skillIcon = assetBundle.LoadAsset<Sprite>("texItHungersIcon"),
				keywordTokens = new string[1] { Tokens.detailsKeyword },
				activationState = new SerializableEntityStateType(typeof(Idle)),
				activationStateMachineName = "",
				baseMaxStock = 1,
				baseRechargeInterval = 0f,
				beginSkillCooldownOnSkillEnd = false,
				canceledFromSprinting = false,
				forceSprintDuringState = false,
				fullRestockOnAssign = true,
				interruptPriority = (InterruptPriority)0,
				resetCooldownTimerOnUse = false,
				isCombatSkill = false,
				mustKeyPress = false,
				cancelSprintingOnActivation = false,
				rechargeStock = 1,
				requiredStock = 2,
				stockToConsume = 1
			});
			Skills.AddPassiveSkills(component.passiveSkillSlot.skillFamily, component.blinkPassive);
			component.impGauge = Skills.CreateSkillDef(new SkillDefInfo
			{
				skillName = "KENKO_SEAMSTRESS_NEEDLE_NAME",
				skillNameToken = "KENKO_SEAMSTRESS_NEEDLE_NAME",
				skillDescriptionToken = "KENKO_SEAMSTRESS_NEEDLE_DESCRIPTION",
				skillIcon = assetBundle.LoadAsset<Sprite>("texImpTouchedIcon"),
				keywordTokens = new string[1] { Tokens.needlesKeyword },
				activationState = new SerializableEntityStateType(typeof(Idle)),
				activationStateMachineName = "",
				baseMaxStock = 1,
				baseRechargeInterval = 0f,
				beginSkillCooldownOnSkillEnd = false,
				canceledFromSprinting = false,
				forceSprintDuringState = false,
				fullRestockOnAssign = true,
				interruptPriority = (InterruptPriority)0,
				resetCooldownTimerOnUse = false,
				isCombatSkill = false,
				mustKeyPress = false,
				cancelSprintingOnActivation = false,
				rechargeStock = 1,
				requiredStock = 2,
				stockToConsume = 1
			});
			Skills.AddPassiveSkills(component.impGaugeSkillSlot.skillFamily, component.impGauge);
		}

		private void AddPrimarySkills()
		{
			//IL_002a: 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)
			SteppedSkillDef val = Skills.CreateSkillDef<SteppedSkillDef>(new SkillDefInfo("Trim", "KENKO_SEAMSTRESS_PRIMARY_TRIM_NAME", "KENKO_SEAMSTRESS_PRIMARY_TRIM_DESCRIPTION", assetBundle.LoadAsset<Sprite>("texFlurryIcon"), new SerializableEntityStateType(typeof(Trim))));
			val.stepCount = 3;
			val.stepGraceDuration = 1f;
			Skills.AddPrimarySkills(bodyPrefab, (SkillDef)val);
			SteppedSkillDef val2 = Skills.CreateSkillDef<SteppedSkillDef>(new SkillDefInfo("Flurry", "KENKO_SEAMSTRESS_PRIMARY_FLURRY_NAME", "KENKO_SEAMSTRESS_PRIMARY_FLURRY_DESCRIPTION", assetBundle.LoadAsset<Sprite>("texFlurryIcon"), new SerializableEntityStateType(typeof(Flurry))));
			val2.stepCount = 2;
			val2.stepGraceDuration = 1f;
			Skills.AddPrimarySkills(bodyPrefab, (SkillDef)val2);
		}

		private void AddSecondarySkills()
		{
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: 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)
			SkillDefInfo skillDefInfo = new SkillDefInfo();
			skillDefInfo.skillName = "Clip";
			skillDefInfo.skillNameToken = "KENKO_SEAMSTRESS_SECONDARY_CLIP_NAME";
			skillDefInfo.skillDescriptionToken = "KENKO_SEAMSTRESS_SECONDARY_CLIP_DESCRIPTION";
			skillDefInfo.keywordTokens = new string[0];
			skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texClipIcon");
			skillDefInfo.activationState = new SerializableEntityStateType(typeof(Clip));
			skillDefInfo.activationStateMachineName = "Weapon";
			skillDefInfo.interruptPriority = (InterruptPriority)1;
			skillDefInfo.baseMaxStock = 1;
			skillDefInfo.baseRechargeInterval = 6f;
			skillDefInfo.rechargeStock = 1;
			skillDefInfo.requiredStock = 1;
			skillDefInfo.stockToConsume = 1;
			skillDefInfo.resetCooldownTimerOnUse = false;
			skillDefInfo.fullRestockOnAssign = false;
			skillDefInfo.dontAllowPastMaxStocks = false;
			skillDefInfo.beginSkillCooldownOnSkillEnd = false;
			skillDefInfo.mustKeyPress = true;
			skillDefInfo.isCombatSkill = true;
			skillDefInfo.canceledFromSprinting = false;
			skillDefInfo.cancelSprintingOnActivation = true;
			skillDefInfo.forceSprintDuringState = false;
			SkillDef val = Skills.CreateSkillDef(skillDefInfo);
			Skills.AddSecondarySkills(bodyPrefab, val);
			skillDefInfo = new SkillDefInfo();
			skillDefInfo.skillName = "PlanarManipulation";
			skillDefInfo.skillNameToken = "KENKO_SEAMSTRESS_SECONDARY_PLANMAN_NAME";
			skillDefInfo.skillDescriptionToken = "KENKO_SEAMSTRESS_SECONDARY_PLANMAN_DESCRIPTION";
			skillDefInfo.keywordTokens = new string[1] { Tokens.crushKeyword };
			skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texPlanarManipulationIcon");
			skillDefInfo.activationState = new SerializableEntityStateType(typeof(Telekinesis));
			skillDefInfo.activationStateMachineName = "Weapon2";
			skillDefInfo.interruptPriority = (InterruptPriority)1;
			skillDefInfo.baseMaxStock = 1;
			skillDefInfo.baseRechargeInterval = 0.5f;
			skillDefInfo.rechargeStock = 1;
			skillDefInfo.requiredStock = 0;
			skillDefInfo.stockToConsume = 0;
			skillDefInfo.resetCooldownTimerOnUse = false;
			skillDefInfo.fullRestockOnAssign = false;
			skillDefInfo.dontAllowPastMaxStocks = false;
			skillDefInfo.beginSkillCooldownOnSkillEnd = false;
			skillDefInfo.mustKeyPress = true;
			skillDefInfo.isCombatSkill = true;
			skillDefInfo.canceledFromSprinting = false;
			skillDefInfo.cancelSprintingOnActivation = false;
			skillDefInfo.forceSprintDuringState = false;
			TrackingSkillDef trackingSkillDef = Skills.CreateSkillDef<TrackingSkillDef>(skillDefInfo);
			Skills.AddSecondarySkills(bodyPrefab, trackingSkillDef);
		}

		private void AddUtilitySkills()
		{
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: 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_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0250: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Unknown result type (might be due to invalid IL or missing references)
			SkillDefInfo skillDefInfo = new SkillDefInfo();
			skillDefInfo.skillName = "HeartDashSeamstress";
			skillDefInfo.skillNameToken = "KENKO_SEAMSTRESS_UTILITY_HEARTDASH_NAME";
			skillDefInfo.skillDescriptionToken = "KENKO_SEAMSTRESS_UTILITY_HEARTDASH_DESCRIPTION";
			skillDefInfo.keywordTokens = new string[1] { Tokens.insatiableKeyword };
			skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texGlimpseOfCorruptionIcon");
			skillDefInfo.activationState = new SerializableEntityStateType(typeof(HealthCostDash));
			skillDefInfo.activationStateMachineName = "Weapon";
			skillDefInfo.interruptPriority = (InterruptPriority)1;
			skillDefInfo.baseRechargeInterval = 8f;
			skillDefInfo.baseMaxStock = 1;
			skillDefInfo.rechargeStock = 1;
			skillDefInfo.requiredStock = 1;
			skillDefInfo.stockToConsume = 1;
			skillDefInfo.resetCooldownTimerOnUse = false;
			skillDefInfo.fullRestockOnAssign = false;
			skillDefInfo.dontAllowPastMaxStocks = false;
			skillDefInfo.mustKeyPress = true;
			skillDefInfo.beginSkillCooldownOnSkillEnd = false;
			skillDefInfo.isCombatSkill = true;
			skillDefInfo.canceledFromSprinting = false;
			skillDefInfo.cancelSprintingOnActivation = false;
			skillDefInfo.forceSprintDuringState = false;
			SkillDef val = Skills.CreateSkillDef(skillDefInfo);
			Skills.AddUtilitySkills(bodyPrefab, val);
			skillDefInfo = new SkillDefInfo();
			skillDefInfo.skillName = "ParrySeamstress";
			skillDefInfo.skillNameToken = "KENKO_SEAMSTRESS_UTILITY_PARRY_NAME";
			skillDefInfo.skillDescriptionToken = "KENKO_SEAMSTRESS_UTILITY_PARRY_DESCRIPTION";
			skillDefInfo.keywordTokens = new string[1] { Tokens.insatiableKeyword };
			skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texGlimpseOfPurityIcon");
			skillDefInfo.activationState = new SerializableEntityStateType(typeof(Parry));
			skillDefInfo.activationStateMachineName = "Weapon";
			skillDefInfo.interruptPriority = (InterruptPriority)2;
			skillDefInfo.baseRechargeInterval = 8f;
			skillDefInfo.baseMaxStock = 1;
			skillDefInfo.rechargeStock = 1;
			skillDefInfo.requiredStock = 1;
			skillDefInfo.stockToConsume = 1;
			skillDefInfo.resetCooldownTimerOnUse = false;
			skillDefInfo.fullRestockOnAssign = true;
			skillDefInfo.dontAllowPastMaxStocks = false;
			skillDefInfo.mustKeyPress = true;
			skillDefInfo.beginSkillCooldownOnSkillEnd = false;
			skillDefInfo.isCombatSkill = true;
			skillDefInfo.canceledFromSprinting = false;
			skillDefInfo.cancelSprintingOnActivation = true;
			skillDefInfo.forceSprintDuringState = false;
			SkillDef val2 = Skills.CreateSkillDef(skillDefInfo);
			Skills.AddUtilitySkills(bodyPrefab, val2);
			skillDefInfo = new SkillDefInfo();
			skillDefInfo.skillName = "Expunge";
			skillDefInfo.skillNameToken = "Expunge";
			skillDefInfo.skillDescriptionToken = "Expunge your core.";
			skillDefInfo.keywordTokens = new string[0];
			skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texImpTouchedIcon");
			skillDefInfo.activationState = new SerializableEntityStateType(typeof(Explode));
			skillDefInfo.activationStateMachineName = "Weapon2";
			skillDefInfo.interruptPriority = (InterruptPriority)3;
			skillDefInfo.baseRechargeInterval = 0f;
			skillDefInfo.baseMaxStock = 1;
			skillDefInfo.rechargeStock = 0;
			skillDefInfo.requiredStock = 0;
			skillDefInfo.stockToConsume = 0;
			skillDefInfo.resetCooldownTimerOnUse = false;
			skillDefInfo.fullRestockOnAssign = true;
			skillDefInfo.dontAllowPastMaxStocks = true;
			skillDefInfo.beginSkillCooldownOnSkillEnd = false;
			skillDefInfo.mustKeyPress = true;
			skillDefInfo.isCombatSkill = false;
			skillDefInfo.canceledFromSprinting = false;
			skillDefInfo.cancelSprintingOnActivation = false;
			skillDefInfo.forceSprintDuringState = false;
			explodeSkillDef = Skills.CreateSkillDef(skillDefInfo);
		}

		private void AddSpecialSkills()
		{
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: 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)
			SkillDefInfo skillDefInfo = new SkillDefInfo();
			skillDefInfo.skillName = "FireSeamstress";
			skillDefInfo.skillNameToken = "KENKO_SEAMSTRESS_SPECIAL_FIRE_NAME";
			skillDefInfo.skillDescriptionToken = "KENKO_SEAMSTRESS_SPECIAL_FIRE_DESCRIPTION";
			skillDefInfo.keywordTokens = new string[1] { Tokens.symbioticKeyword };
			skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texSkewerIcon");
			skillDefInfo.activationState = new SerializableEntityStateType(typeof(FireScissor));
			skillDefInfo.activationStateMachineName = "Weapon";
			skillDefInfo.interruptPriority = (InterruptPriority)1;
			skillDefInfo.baseRechargeInterval = 14f;
			skillDefInfo.baseMaxStock = 2;
			skillDefInfo.rechargeStock = 2;
			skillDefInfo.requiredStock = 1;
			skillDefInfo.stockToConsume = 1;
			skillDefInfo.resetCooldownTimerOnUse = false;
			skillDefInfo.fullRestockOnAssign = true;
			skillDefInfo.dontAllowPastMaxStocks = true;
			skillDefInfo.mustKeyPress = true;
			skillDefInfo.beginSkillCooldownOnSkillEnd = false;
			skillDefInfo.isCombatSkill = true;
			skillDefInfo.canceledFromSprinting = false;
			skillDefInfo.cancelSprintingOnActivation = true;
			skillDefInfo.forceSprintDuringState = false;
			SkillDef val = Skills.CreateSkillDef(skillDefInfo);
			Skills.AddSpecialSkills(bodyPrefab, val);
		}

		private void InitializeScepter()
		{
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: 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)
			SkillDefInfo skillDefInfo = new SkillDefInfo();
			skillDefInfo.skillName = "FireScepterSeamstress";
			skillDefInfo.skillNameToken = "KENKO_SEAMSTRESS_SPECIAL_SCEPTER_NAME";
			skillDefInfo.skillDescriptionToken = "KENKO_SEAMSTRESS_SPECIAL_SCEPTER_DESCRIPTION";
			skillDefInfo.keywordTokens = new string[1] { Tokens.symbioticKeyword };
			skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texSkewerScepterIcon");
			skillDefInfo.activationState = new SerializableEntityStateType(typeof(FireScissorScepter));
			skillDefInfo.activationStateMachineName = "Weapon";
			skillDefInfo.interruptPriority = (InterruptPriority)1;
			skillDefInfo.baseRechargeInterval = 14f;
			skillDefInfo.baseMaxStock = 2;
			skillDefInfo.rechargeStock = 2;
			skillDefInfo.requiredStock = 1;
			skillDefInfo.stockToConsume = 1;
			skillDefInfo.resetCooldownTimerOnUse = false;
			skillDefInfo.fullRestockOnAssign = true;
			skillDefInfo.dontAllowPastMaxStocks = true;
			skillDefInfo.mustKeyPress = true;
			skillDefInfo.beginSkillCooldownOnSkillEnd = false;
			skillDefInfo.isCombatSkill = true;
			skillDefInfo.canceledFromSprinting = false;
			skillDefInfo.cancelSprintingOnActivation = true;
			skillDefInfo.forceSprintDuringState = false;
			scepterFireScissor = Skills.CreateSkillDef(skillDefInfo);
			ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(scepterFireScissor, bodyName, (SkillSlot)3, 0);
		}

		public static Material CreateMaterial(AssetBundle assetBundle, string materialName, float emission, Color emissionColor, float normalStrength)
		{
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)SeamstressAssets.commandoMat))
			{
				SeamstressAssets.commandoMat = Resources.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody").GetComponentInChildren<CharacterModel>().baseRendererInfos[0].defaultMaterial;
			}
			Material val = Object.Instantiate<Material>(SeamstressAssets.commandoMat);
			Material val2 = assetBundle.LoadAsset<Material>(materialName);
			if (!Object.op_Implicit((Object)(object)val2))
			{
				return SeamstressAssets.commandoMat;
			}
			((Object)val).name = materialName;
			val.SetColor("_Color", val2.GetColor("_Color"));
			val.SetTexture("_MainTex", val2.GetTexture("_MainTex"));
			val.SetColor("_EmColor", emissionColor);
			val.SetFloat("_EmPower", emission);
			val.SetTexture("_EmTex", val2.GetTexture("_EmissionMap"));
			val.SetFloat("_NormalStrength", normalStrength);
			return val;
		}

		public static Material CreateMaterial(AssetBundle assetBundle, string materialName)
		{
			return CreateMaterial(assetBundle, materialName, 0f);
		}

		public static Material CreateMaterial(AssetBundle assetBundle, string materialName, float emission)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			return CreateMaterial(assetBundle, materialName, emission, Color.black);
		}

		public static Material CreateMaterial(AssetBundle assetBundle, string materialName, float emission, Color emissionColor)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			return CreateMaterial(assetBundle, materialName, emission, emissionColor, 0f);
		}

		public override void InitializeSkins()
		{
			//IL_0247: Unknown result type (might be due to invalid IL or missing references)
			//IL_0267: Unknown result type (might be due to invalid IL or missing references)
			//IL_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_036d: Unknown result type (might be due to invalid IL or missing references)
			//IL_038d: Unknown result type (might be due to invalid IL or missing references)
			//IL_038f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0493: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_05db: Unknown result type (might be due to invalid IL or missing references)
			ModelSkinController val = ((Component)prefabCharacterModel).gameObject.AddComponent<ModelSkinController>();
			ChildLocator component = ((Component)prefabCharacterModel).GetComponent<ChildLocator>();
			RendererInfo[] baseRendererInfos = prefabCharacterModel.baseRendererInfos;
			List<SkinDef> list = new List<SkinDef>();
			SkinDef val2 = SeamstressSkins.CreateSkinDef("DEFAULT_SKIN", assetBundle.LoadAsset<Sprite>("texMainSkin"), baseRendererInfos, ((Component)prefabCharacterModel).gameObject);
			val2.meshReplacements = SeamstressSkins.getMeshReplacements(assetBundle, baseRendererInfos, "meshSeamstress", "meshScissorL", "meshScissorR", "meshSeamstressCrown", "meshHeart");
			val2.rendererInfos[0].defaultMaterial = assetBundle.LoadAsset<Material>("matSeamstress");
			val2.rendererInfos[1].defaultMaterial = assetBundle.LoadAsset<Material>("matScissors");
			val2.rendererInfos[2].defaultMaterial = assetBundle.LoadAsset<Material>("matScissors");
			val2.rendererInfos[3].defaultMaterial = assetBundle.LoadAsset<Material>("matSeamstress");
			val2.rendererInfos[4].defaultMaterial = assetBundle.LoadAsset<Material>("matSeamstress");
			list.Add(val2);
			SkinDef val3 = SeamstressSkins.CreateSkinDef("KENKO_SEAMSTRESS_MASTERY_SKIN_NAME", assetBundle.LoadAsset<Sprite>("texMonsoonBlue"), baseRendererInfos, ((Component)prefabCharacterModel).gameObject, SeamstressUnlockables.masterySkinUnlockableDef);
			val3.meshReplacements = SeamstressSkins.getMeshReplacements(assetBundle, baseRendererInfos, "meshPrincess", "meshPrincessSwordL", "meshPrincessSwordR", "meshPrincessCrown", null);
			val3.rendererInfos[0].defaultMaterial = assetBundle.LoadAsset<Material>("matPrincessBlue");
			val3.rendererInfos[1].defaultMaterial = assetBundle.LoadAsset<Material>("matPrincessSword");
			val3.rendererInfos[2].defaultMaterial = assetBundle.LoadAsset<Material>("matPrincessSword");
			val3.rendererInfos[3].defaultMaterial = assetBundle.LoadAsset<Material>("matPrincessBlueEmissions");
			val3.gameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[1]
			{
				new GameObjectActivation
				{
					gameObject = component.FindChildGameObject("HeartModel"),
					shouldActivate = false
				}
			};
			SkinDef val4 = SeamstressSkins.CreateSkinDef("KENKO_SEAMSTRESS_MASTERY_SKIN_NAME2", assetBundle.LoadAsset<Sprite>("texMonsoonRed"), baseRendererInfos, ((Component)prefabCharacterModel).gameObject, SeamstressUnlockables.masterySkinUnlockableDef);
			val4.meshReplacements = SeamstressSkins.getMeshReplacements(assetBundle, baseRendererInfos, "meshPrincess", "meshPrincessSwordL", "meshPrincessSwordR", "meshPrincessCrown", null);
			val4.rendererInfos[0].defaultMaterial = assetBundle.LoadAsset<Material>("matPrincessRed");
			val4.rendererInfos[1].defaultMaterial = assetBundle.LoadAsset<Material>("matPrincessSwordAlt");
			val4.rendererInfos[2].defaultMaterial = assetBundle.LoadAsset<Material>("matPrincessSwordAlt");
			val4.rendererInfos[3].defaultMaterial = assetBundle.LoadAsset<Material>("matPrincessRedEmissions");
			val4.gameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[1]
			{
				new GameObjectActivation
				{
					gameObject = component.FindChildGameObject("HeartModel"),
					shouldActivate = false
				}
			};
			SkinDef val5 = SeamstressSkins.CreateSkinDef("KENKO_SEAMSTRESS_MASTERY_SKIN_NAME3", assetBundle.LoadAsset<Sprite>("ravenIcon"), baseRendererInfos, ((Component)prefabCharacterModel).gameObject, SeamstressUnlockables.masteryTyphoonSkinUnlockableDef);
			val5.meshReplacements = SeamstressSkins.getMeshReplacements(assetBundle, baseRendererInfos, "meshRaven", "meshShadowClawsL", "meshShadowClawsR", "meshRavenCrown", null);
			val5.rendererInfos[0].defaultMaterial = assetBundle.LoadAsset<Material>("matRaven");
			val5.rendererInfos[1].defaultMaterial = assetBundle.LoadAsset<Material>("matRavenShadowClaws");
			val5.rendererInfos[2].defaultMaterial = assetBundle.LoadAsset<Material>("matRavenShadowClaws");
			val5.rendererInfos[3].defaultMaterial = assetBundle.LoadAsset<Material>("matRaven");
			val5.gameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[1]
			{
				new GameObjectActivation
				{
					gameObject = component.FindChildGameObject("HeartModel"),
					shouldActivate = false
				}
			};
			SkinDef val6 = SeamstressSkins.CreateSkinDef("KENKO_SEAMSTRESS_MASTERY_SKIN_NAME4", assetBundle.LoadAsset<Sprite>("ravenIcon"), baseRendererInfos, ((Component)prefabCharacterModel).gameObject, SeamstressUnlockables.masteryTyphoonSkinUnlockableDef);
			val6.meshReplacements = SeamstressSkins.getMeshReplacements(assetBundle, baseRendererInfos, "meshRavenAlt", "meshShadowClawsL", "meshShadowClawsR", "meshRavenCrownAlt", null);
			val6.rendererInfos[0].defaultMaterial = assetBundle.LoadAsset<Material>("matRavenAlt");
			val6.rendererInfos[1].defaultMaterial = assetBundle.LoadAsset<Material>("matRavenShadowClaws");
			val6.rendererInfos[2].defaultMaterial = assetBundle.LoadAsset<Material>("matRavenShadowClaws");
			val6.rendererInfos[3].defaultMaterial = assetBundle.LoadAsset<Material>("matRavenAltEmission");
			val6.gameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[1]
			{
				new GameObjectActivation
				{
					gameObject = component.FindChildGameObject("HeartModel"),
					shouldActivate = false
				}
			};
			list.Add(val3);
			list.Add(val4);
			list.Add(val5);
			list.Add(val6);
			val.skins = list.ToArray();
		}

		public override void InitializeCharacterMaster()
		{
			SeamstressAI.Init(bodyPrefab, masterName);
		}

		private void AddHooks()
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Expected O, but got Unknown
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Expected O, but got Unknown
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Expected O, but got Unknown
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Expected O, but got Unknown
			HUD.onHudTargetChangedGlobal += HUDSetup;
			HealthComponent.Heal += new hook_Heal(HealthComponent_Heal);
			CharacterModel.UpdateOverlays += new hook_UpdateOverlays(CharacterModel_UpdateOverlays);
			CharacterModel.UpdateOverlayStates += new hook_UpdateOverlayStates(CharacterModel_UpdateOverlayStates);
			HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(HealthComponent_TakeDamageProcess);
			LoadoutPanelController.Rebuild += new hook_Rebuild(LoadoutPanelController_Rebuild);
			GenericSkill.SetBonusStockFromBody += new hook_SetBonusStockFromBody(GenericSkill_SetBonusStockFromBody);
			ImmuneToDebuffBehavior.OverrideDot += new hook_OverrideDot(ImmuneToDebuffBehavior_OverrideDot);
			if (!SeamstressPlugin.importanceInstalled)
			{
				BodyCatalog.Init += new hook_Init(BodyCatalog_Init);
			}
			RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
			if (SeamstressPlugin.emotesInstalled)
			{
				Emotes();
			}
		}

		private IEnumerator BodyCatalog_Init(orig_Init orig)
		{
			yield return orig.Invoke();
			foreach (GameObject body in BodyCatalog.allBodyPrefabs)
			{
				KinematicCharacterMotor motor = body.GetComponent<KinematicCharacterMotor>();
				if (Object.op_Implicit((Object)(object)motor))
				{
					motor.playerCharacter = true;
				}
			}
		}

		private void CharacterModel_UpdateOverlays(orig_UpdateOverlays orig, CharacterModel self)
		{
			//IL_0040: 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)
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.body) && self.body.bodyIndex == BodyCatalog.FindBodyIndex("SeamstressBody"))
			{
				SeamstressController component = ((Component)self.body).GetComponent<SeamstressController>();
				AddOverlay(component.blue ? SeamstressAssets.insatiableOverlayMat2 : SeamstressAssets.insatiableOverlayMat, self.body.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff) && !component.hasStartedInsatiable);
				if (self.body.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff) && !component.hasStartedInsatiable)
				{
					TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)self).gameObject);
					val.duration = 0.6f;
					val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0.4f);
					val.animateShaderAlpha = true;
					val.destroyComponentOnEnd = true;
					val.originalMaterial = (component.blue ? SeamstressAssets.insatiableOverlayMat2 : SeamstressAssets.insatiableOverlayMat);
				}
				if (self.body.HasBuff(SeamstressBuffs.ParryStart))
				{
					TemporaryOverlayInstance val2 = TemporaryOverlayManager.AddOverlay(((Component)self).gameObject);
					val2.duration = 0.4f;
					val2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
					val2.animateShaderAlpha = true;
					val2.destroyComponentOnEnd = true;
					val2.originalMaterial = SeamstressAssets.parryMat;
				}
			}
			void AddOverlay(Material overlayMaterial, bool condition)
			{
				if (self.activeOverlayCount < CharacterModel.maxOverlays && condition)
				{
					Material[] currentOverlays = self.currentOverlays;
					CharacterModel obj = self;
					int activeOverlayCount = obj.activeOverlayCount;
					obj.activeOverlayCount = activeOverlayCount + 1;
					currentOverlays[activeOverlayCount] = overlayMaterial;
				}
			}
		}

		private bool CharacterModel_UpdateOverlayStates(orig_UpdateOverlayStates orig, CharacterModel self)
		{
			//IL_0040: 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)
			bool flag = orig.Invoke(self);
			if (!Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)self.body) || self.body.bodyIndex != BodyCatalog.FindBodyIndex("SeamstressBody"))
			{
				return flag;
			}
			SeamstressController component = ((Component)self.body).GetComponent<SeamstressController>();
			SetOverlayFlag(self.baseRendererInfos.Length, self.body.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff) && !component.hasStartedInsatiable);
			return self.oldOverlays != self.activeOverlays || flag;
			void SetOverlayFlag(int index, bool condition)
			{
				if (condition)
				{
					CharacterModel obj = self;
					obj.activeOverlays |= 1 << index;
				}
			}
		}

		private bool ImmuneToDebuffBehavior_OverrideDot(orig_OverrideDot orig, InflictDotInfo inflictDotInfo)
		{
			//IL_0001: 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_0027: 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_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_0048: Unknown result type (might be due to invalid IL or missing references)
			GameObject victimObject = inflictDotInfo.victimObject;
			CharacterBody val = ((victimObject != null) ? victimObject.GetComponent<CharacterBody>() : null);
			if (Object.op_Implicit((Object)(object)val) && val.bodyIndex != BodyCatalog.FindBodyIndex("SeamstressBody") && inflictDotInfo.dotIndex == SeamstressDots.SeamstressSelfBleed)
			{
				return false;
			}
			return orig.Invoke(inflictDotInfo);
		}

		private static void Emotes()
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			object obj = <>c.<>9__71_0;
			if (obj == null)
			{
				hook_Init val = delegate(orig_Init orig)
				{
					orig.Invoke();
					GameObject val2 = SeamstressAssets.mainAssetBundle.LoadAsset<GameObject>("seamstress_emoteskeleton");
					CustomEmotesAPI.ImportArmature(characterPrefab, val2, 0, true);
				};
				<>c.<>9__71_0 = val;
				obj = (object)val;
			}
			SurvivorCatalog.Init += (hook_Init)obj;
		}

		private static void LoadoutPanelController_Rebuild(orig_Rebuild orig, LoadoutPanelController self)
		{
			//IL_000f: 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)
			orig.Invoke(self);
			if (self.currentDisplayData.bodyIndex != BodyCatalog.FindBodyIndex("SeamstressBody"))
			{
				return;
			}
			LanguageTextMeshController[] componentsInChildren = ((Component)self).gameObject.GetComponentsInChildren<LanguageTextMeshController>();
			foreach (LanguageTextMeshController val in componentsInChildren)
			{
				if (Object.op_Implicit((Object)(object)val) && val.token == "LOADOUT_SKILL_MISC")
				{
					val.token = "Passive";
				}
			}
		}

		private void HealthComponent_TakeDamageProcess(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo)
		{
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			float num = 0f;
			if ((NetworkServer.active && self.alive) || !self.godMode || self.ospTimer <= 0f)
			{
				CharacterBody body = self.body;
				if (Object.op_Implicit((Object)(object)body) && body.bodyIndex == BodyCatalog.FindBodyIndex("SeamstressBody"))
				{
					if (body.HasBuff(SeamstressBuffs.ParryStart) && damageInfo.damage > 0f)
					{
						body.RemoveBuff(SeamstressBuffs.ParryStart);
						if (!body.HasBuff(SeamstressBuffs.ParrySuccess))
						{
							body.AddBuff(SeamstressBuffs.ParrySuccess);
						}
						body.AddTimedBuff(Buffs.Immune, SeamstressConfig.parryWindow.Value + 0.5f);
						damageInfo.rejected = true;
					}
					else if (body.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff) && damageInfo.dotIndex != SeamstressDots.SeamstressSelfBleed)
					{
						SeamstressController component = ((Component)body).gameObject.GetComponent<SeamstressController>();
						if (Object.op_Implicit((Object)(object)component) && !body.HasBuff(Buffs.HiddenInvincibility))
						{
							if (damageInfo.damage >= self.combinedHealth && (Object)(object)body.skillLocator.utility.skillDef == (Object)(object)explodeSkillDef)
							{
								body.skillLocator.utility.ExecuteIfReady();
							}
							damageInfo.rejected = true;
						}
					}
					else if (body.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff))
					{
						num = body.healthComponent.barrier;
						if (num > 0f)
						{
							body.healthComponent.AddBarrier(0f - num);
						}
					}
				}
			}
			orig.Invoke(self, damageInfo);
			if (NetworkServer.active && Object.op_Implicit((Object)(object)self.body) && self.body.bodyIndex == BodyCatalog.FindBodyIndex("SeamstressBody"))
			{
				if (num > 0f)
				{
					self.body.healthComponent.AddBarrier(num);
				}
				self.body.RecalculateStats();
			}
		}

		private float HealthComponent_Heal(orig_Heal orig, HealthComponent self, float amount, ProcChainMask procChainMask, bool nonRegen = true)
		{
			//IL_0021: 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_004c: 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_0066: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)self) && self.body.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff) && self.body.bodyIndex == BodyCatalog.FindBodyIndex("SeamstressBody"))
			{
				amount *= SeamstressConfig.healConversion.Value;
			}
			float num = orig.Invoke(self, amount, procChainMask, nonRegen);
			if (self.body.bodyIndex == BodyCatalog.FindBodyIndex("SeamstressBody") && Object.op_Implicit((Object)(object)((Component)self.body).GetComponent<SeamstressController>()) && self.body.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff))
			{
				if (self.health >= self.fullHealth)
				{
					self.AddBarrier(num / SeamstressConfig.healConversion.Value * (1f - SeamstressConfig.healConversion.Value));
				}
				else
				{
					self.AddBarrier(num / SeamstressConfig.healConversion.Value * (1f - SeamstressConfig.healConversion.Value));
				}
			}
			return num;
		}

		public void GenericSkill_SetBonusStockFromBody(orig_SetBonusStockFromBody orig, GenericSkill self, int newBonusStockFromBody)
		{
			if (!Object.op_Implicit((Object)(object)self) || ((!self.skillDef.dontAllowPastMaxStocks || !(self.skillDef.skillNameToken == "KENKO_SEAMSTRESS_SPECIAL_SCEPTER_NAME")) && !(self.skillDef.skillNameToken == "KENKO_SEAMSTRESS_SPECIAL_FIRE_NAME")))
			{
				orig.Invoke(self, newBonusStockFromBody);
			}
		}

		private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			if (sender.bodyIndex != BodyCatalog.FindBodyIndex("SeamstressBody"))
			{
				return;
			}
			SeamstressController component = ((Component)sender).GetComponent<SeamstressController>();
			HealthComponent component2 = ((Component)sender).GetComponent<HealthComponent>();
			KinematicCharacterMotor motor = ((BaseCharacterController)sender.characterMotor).Motor;
			SkillLocator component3 = ((Component)sender).GetComponent<SkillLocator>();
			if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component3))
			{
				float num = component2.fullCombinedHealth * sender.cursePenalty - (component2.health + component2.shield / 2f);
				float num2 = component2.fullHealth * 0.66f;
				if (sender.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff) && component3.utility.skillNameToken == "KENKO_SEAMSTRESS_UTILITY_PARRY_NAME")
				{
					args.baseDamageAdd += num2 * SeamstressConfig.passiveScaling.Value + num * SeamstressConfig.passiveScaling.Value;
				}
				else
				{
					args.baseDamageAdd += num * SeamstressConfig.passiveScaling.Value;
				}
			}
			if (sender.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff))
			{
				args.attackSpeedMultAdd += 0.2f;
				args.baseMoveSpeedAdd += 2f;
			}
			if (!sender.HasBuff(SeamstressBuffs.ScissorLeftBuff))
			{
				args.attackSpeedMultAdd += 0.1f;
			}
			if (!sender.HasBuff(SeamstressBuffs.ScissorRightBuff))
			{
				args.attackSpeedMultAdd += 0.1f;
			}
			if (Object.op_Implicit((Object)(object)sender.inventory) && sender.inventory.GetItemCount(Items.EquipmentMagazineVoid) != 0)
			{
				args.attackSpeedMultAdd += 0.1f * (float)sender.inventory.GetItemCount(Items.EquipmentMagazineVoid);
			}
		}

		internal static void HUDSetup(HUD hud)
		{
			if (Object.op_Implicit((Object)(object)hud.targetBodyObject) && (Object)(object)hud.targetMaster.bodyPrefab == (Object)(object)characterPrefab && ((NetworkBehaviour)hud.targetMaster).hasAuthority && !Object.op_Implicit((Object)(object)((Component)hud).transform.Find("MainContainer").Find("MainUIArea").Find("CrosshairCanvas")
				.Find("SeamstressCrosshair")))
			{
				GameObject val = Object.Instantiate<GameObject>(SeamstressCrosshair.seamstressCrosshair, ((Component)hud).transform.Find("MainContainer").Find("MainUIArea").Find("CrosshairCanvas"));
				((Object)val).name = "SeamstressCrosshair";
				val.gameObject.GetComponent<HudElement>().targetBodyObject = hud.targetBodyObject;
				val.gameObject.GetComponent<HudElement>().targetCharacterBody = hud.targetBodyObject.GetComponent<CharacterBody>();
			}
		}
	}
}
namespace SeamstressMod.Seamstress.SkillStates
{
	public class Clip : BaseSeamstressSkillState
	{
		public GameObject clawSlash = SeamstressAssets.clawSlashEffect;

		public GameObject hitEffectPrefab = SeamstressAssets.scissorsHitImpactEffect;

		public GameObject swingEffectPrefab = SeamstressAssets.scissorsSlashComboEffect;

		public GameObject wideEffectPrefab = SeamstressAssets.wideSlashEffect;

		private GameObject swingEffectInstance;

		protected EffectManagerHelper _emh_swingEffectInstance;

		private GameObject swingEffectInstance2;

		protected EffectManagerHelper _emh_swingEffectInstance2;

		protected Animator animator;

		private OverlapAttack overlapAttack;

		private DamageType damageType = (DamageType)0;

		private ModdedDamageType moddedDamageType = DamageTypes.CutDamage;

		private ModdedDamageType moddedDamageType2 = DamageTypes.SeamstressLifesteal;

		private float damageCoefficient = SeamstressConfig.clipDamageCoefficient.Value;

		private float procCoefficient = 0.6f;

		private float pushForce = 0f;

		private Vector3 bonusForce = Vector3.zero;

		protected float stopwatch;

		private HitStopCachedState hitStopCachedState;

		private float hitPauseTimer;

		protected float hitStopDuration = 0.04f;

		private bool hasHopped;

		protected bool inHitPause;

		protected string playbackRateParam = "Slash.playbackRate";

		protected string hitBoxString = "SwordBig";

		private int snips;

		private int alternateSwings = 0;

		private float baseDuration = 0.75f;

		private float duration;

		private float firstSnip;

		private float secondSnip;

		private float snipInterval;

		private float lastSnip;

		private bool hasFired;

		private bool hasFired2;

		private bool noScissors;

		private bool inAir;

		private Vector3 storedVelocity;

		public override void OnEnter()
		{
			RefreshState();
			if (seamstressController.blue)
			{
				clawSlash = SeamstressAssets.clawSlashEffect2;
				hitEffectPrefab = SeamstressAssets.scissorsHitImpactEffect2;
				swingEffectPrefab = SeamstressAssets.scissorsSlashComboEffect2;
				wideEffectPrefab = SeamstressAssets.wideSlashEffect2;
			}
			base.OnEnter();
			baseDuration = 0.75f;
			snips = needleCount;
			if (!scissorRight || !scissorLeft)
			{
				noScissors = true;
			}
			if (noScissors)
			{
				hitBoxString = "Sword";
			}
			animator = ((EntityState)this).GetModelAnimator();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			firstSnip = duration * 0.2f;
			secondSnip = duration * 0.4f;
			snipInterval = 0f;
			lastSnip = duration - firstSnip;
			if (!((EntityState)this).characterMotor.isGrounded)
			{
				inAir = true;
			}
			((BaseState)this).StartAimMode(duration, false);
			PlayAttackAnimation();
			if (inAir)
			{
				((BaseState)this).SmallHop(((EntityState)this).characterMotor, 6f);
			}
		}

		public override void FixedUpdate()
		{
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: 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)
			base.FixedUpdate();
			hitPauseTimer -= Time.fixedDeltaTime;
			if (hitPauseTimer <= 0f && inHitPause)
			{
				RemoveHitstop();
			}
			if (!inHitPause)
			{
				stopwatch += Time.fixedDeltaTime;
				if (inAir && ((EntityState)this).isAuthority)
				{
					Vector3 velocity = ((EntityState)this).characterDirection.forward * ((BaseState)this).moveSpeedStat * Mathf.Lerp(3f, 1f, ((EntityState)this).age / duration);
					velocity.y = ((EntityState)this).characterMotor.velocity.y;
					((EntityState)this).characterMotor.velocity = velocity;
				}
			}
			else
			{
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
				{
					((EntityState)this).characterMotor.velocity = Vector3.zero;
				}
				if (Object.op_Implicit((Object)(object)animator))
				{
					animator.SetFloat(playbackRateParam, 0f);
				}
			}
			if (stopwatch >= firstSnip && !hasFired)
			{
				hasFired = true;
				EnterAttack();
				FireAttack();
			}
			if (stopwatch >= secondSnip + snipInterval && snipInterval <= secondSnip && snips > 0)
			{
				EnterAttack();
				FireAttack();
				snips--;
				snipInterval += secondSnip / 5f;
				Util.PlaySound("Play_bandit2_m2_alt_throw", ((EntityState)this).gameObject);
			}
			if (stopwatch >= lastSnip && !hasFired2)
			{
				hasFired2 = true;
				EnterAttack();
				FireAttack();
			}
			if (stopwatch >= duration && snips == 0 && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		protected void ApplyHitstop()
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: 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_0048: Unknown result type (might be due to invalid IL or missing references)
			if (!inHitPause && hitStopDuration > 0f)
			{
				storedVelocity = ((EntityState)this).characterMotor.velocity;
				hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, playbackRateParam);
				hitPauseTimer = hitStopDuration / ((BaseState)this).attackSpeedStat;
				inHitPause = true;
			}
		}

		private void RemoveHitstop()
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator);
			inHitPause = false;
			((EntityState)this).characterMotor.velocity = storedVelocity;
		}

		protected virtual void OnHitEnemyAuthority()
		{
			if (!hasHopped)
			{
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded)
				{
					((BaseState)this).SmallHop(((EntityState)this).characterMotor, 4f);
				}
				hasHopped = true;
			}
			ApplyHitstop();
		}

		private void EnterAttack()
		{
			if (noScissors)
			{
				Util.PlayAttackSpeedSound("Play_imp_attack", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat);
			}
			else
			{
				Util.PlayAttackSpeedSound("Play_bandit2_m2_impact", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat);
			}
		}

		protected virtual void DetermineSwing()
		{
			Transform attachedTransform = ((BaseState)this).FindModelChild("SwingCenter");
			GameObject effect = clawSlash;
			PlaySwingEffect(attachedTransform, effect);
			if (noScissors)
			{
				effect = clawSlash;
				if (hasFired && !hasFired2)
				{
					if (alternateSwings == 0)
					{
						attachedTransform = ((BaseState)this).FindModelChild("SwingLeftSmall");
						alternateSwings = 1;
					}
					else if (alternateSwings == 1)
					{
						attachedTransform = ((BaseState)this).FindModelChild("SwingRightSmall");
						alternateSwings = 0;
					}
				}
				else if (hasFired2)
				{
					attachedTransform = ((BaseState)this).FindModelChild("SwingRightSmall");
				}
			}
			else if (inAir)
			{
				effect = wideEffectPrefab;
				if (hasFired && !hasFired2)
				{
					if (alternateSwings == 0)
					{
						attachedTransform = ((BaseState)this).FindModelChild("SwingCharAirCenter2");
						alternateSwings = 1;
					}
					else if (alternateSwings == 1)
					{
						attachedTransform = ((BaseState)this).FindModelChild("SwingCharAirCenter");
						alternateSwings = 0;
					}
				}
				else if (hasFired2)
				{
					attachedTransform = ((BaseState)this).FindModelChild("SwingCharAirCenter");
				}
			}
			else
			{
				if (hasFired && !hasFired2)
				{
					if (alternateSwings == 0)
					{
						attachedTransform = ((BaseState)this).FindModelChild("SwingLeftSmall");
						alternateSwings = 1;
					}
					else if (alternateSwings == 1)
					{
						attachedTransform = ((BaseState)this).FindModelChild("SwingRightSmall");
						alternateSwings = 0;
					}
				}
				else if (hasFired2)
				{
					attachedTransform = ((BaseState)this).FindModelChild("SwingRightSmall");
				}
				PlaySwingEffect(((BaseState)this).FindModelChild("SwingCenter"), swingEffectPrefab);
			}
			PlaySwingEffect(attachedTransform, effect);
		}

		protected virtual void PlaySwingEffect(Transform attachedTransform, GameObject Effect)
		{
			if (!EffectManager.ShouldUsePooledEffect(Effect))
			{
				swingEffectInstance = Object.Instantiate<GameObject>(Effect, attachedTransform);
			}
			else
			{
				_emh_swingEffectInstance = EffectManager.GetAndActivatePooledEffect(Effect, attachedTransform, true);
				swingEffectInstance = ((Component)_emh_swingEffectInstance).gameObject;
			}
			ScaleParticleSystemDuration component = swingEffectInstance.GetComponent<ScaleParticleSystemDuration>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.newDuration = component.initialDuration;
			}
		}

		protected virtual void PlaySwingEffect2(Transform attachedTransform, GameObject Effect)
		{
			if (Object.op_Implicit((Object)(object)attachedTransform))
			{
				if (!EffectManager.ShouldUsePooledEffect(Effect))
				{
					swingEffectInstance2 = Object.Instantiate<GameObject>(Effect, attachedTransform);
				}
				else
				{
					_emh_swingEffectInstance2 = EffectManager.GetAndActivatePooledEffect(Effect, attachedTransform, true);
					swingEffectInstance2 = ((Component)_emh_swingEffectInstance2).gameObject;
				}
				ScaleParticleSystemDuration component = swingEffectInstance2.GetComponent<ScaleParticleSystemDuration>();
				if (Object.op_Implicit((Object)(object)component))
				{
					component.newDuration = component.initialDuration;
				}
			}
		}

		protected virtual void FireAttack()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			hasHopped = false;
			overlapAttack = new OverlapAttack();
			overlapAttack.damageType = DamageTypeCombo.op_Implicit(damageType);
			if (isInsatiable)
			{
				DamageAPI.AddModdedDamageType(ref overlapAttack.damageType, moddedDamageType);
			}
			DamageAPI.AddModdedDamageType(ref overlapAttack.damageType, moddedDamageType2);
			overlapAttack.attacker = ((EntityState)this).gameObject;
			overlapAttack.inflictor = ((EntityState)this).gameObject;
			overlapAttack.teamIndex = ((BaseState)this).GetTeam();
			overlapAttack.damage = damageCoefficient * ((BaseState)this).damageStat;
			overlapAttack.procCoefficient = procCoefficient;
			overlapAttack.hitEffectPrefab = hitEffectPrefab;
			overlapAttack.forceVector = bonusForce;
			overlapAttack.pushAwayForce = pushForce;
			overlapAttack.hitBoxGroup = ((BaseState)this).FindHitBoxGroup(hitBoxString);
			overlapAttack.isCrit = ((BaseState)this).RollCrit();
			overlapAttack.damageType.damageSource = (DamageSource)2;
			if (((EntityState)this).isAuthority)
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
				Vector3 direction = ((Ray)(ref aimRay)).direction;
				direction.y = Mathf.Max(direction.y, direction.y * 0.5f);
				((BaseState)this).FindModelChild("SwingPivot").rotation = Util.QuaternionSafeLookRotation(direction);
				if (overlapAttack.Fire((List<HurtBox>)null))
				{
					OnHitEnemyAuthority();
				}
			}
			DetermineSwing();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: 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)
			if (stopwatch >= duration)
			{
				return (InterruptPriority)0;
			}
			return (InterruptPriority)2;
		}

		private void PlayAttackAnimation()
		{
			((EntityState)this).PlayCrossfade("Gesture, Additive", "Clip", "Slash.playbackRate", duration * 1.7f, 0.1f * duration);
		}

		public override void OnExit()
		{
			if (((EntityState)this).isAuthority)
			{
				if ((Object)(object)_emh_swingEffectInstance != (Object)null && _emh_swingEffectInstance.OwningPool != null)
				{
					((GenericPool<EffectManagerHelper>)(object)_emh_swingEffectInstance.OwningPool).ReturnObject(_emh_swingEffectInstance);
				}
				else if (Object.op_Implicit((Object)(object)swingEffectInstance))
				{
					EntityState.Destroy((Object)(object)swingEffectInstance);
				}
				swingEffectInstance = null;
				_emh_swingEffectInstance = null;
				if ((Object)(object)_emh_swingEffectInstance2 != (Object)null && _emh_swingEffectInstance2.OwningPool != null)
				{
					((GenericPool<EffectManagerHelper>)(object)_emh_swingEffectInstance2.OwningPool).ReturnObject(_emh_swingEffectInstance2);
				}
				else if (Object.op_Implicit((Object)(object)swingEffectInstance2))
				{
					EntityState.Destroy((Object)(object)swingEffectInstance2);
				}
				swingEffectInstance2 = null;
				_emh_swingEffectInstance2 = null;
			}
			((EntityState)this).OnExit();
		}
	}
	public class Explode : BaseSeamstressSkillState
	{
		public float BaseDuration = 0.8f;

		public BlastAttack BlastAttack;

		private bool _hasDelayed;

		public override void OnEnter()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: 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_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: 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_0112: Unknown result type (might be due to invalid IL or missing references)
			base.OnEnter();
			BlastAttack = new BlastAttack();
			BlastAttack.position = ((EntityState)this).transform.position;
			BlastAttack.baseDamage = SeamstressConfig.explodeDamageCoefficient.Value * ((BaseState)this).damageStat;
			BlastAttack.baseForce = 800f;
			BlastAttack.bonusForce = Vector3.zero;
			BlastAttack.radius = 25f;
			BlastAttack.attacker = ((EntityState)this).gameObject;
			BlastAttack.inflictor = ((EntityState)this).gameObject;
			BlastAttack.teamIndex = ((EntityState)this).teamComponent.teamIndex;
			BlastAttack.crit = ((BaseState)this).RollCrit();
			BlastAttack.procChainMask = default(ProcChainMask);
			BlastAttack.procCoefficient = 1f;
			BlastAttack.falloffModel = (FalloffModel)1;
			BlastAttack.damageColorIndex = (DamageColorIndex)0;
			BlastAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)131104);
			DamageAPI.AddModdedDamageType(BlastAttack, DamageTypes.SeamstressLifesteal);
			((EntityState)this).skillLocator.utility.UnsetSkillOverride((object)((EntityState)this).gameObject, SeamstressSurvivor.explodeSkillDef, (SkillOverridePriority)4);
			((EntityState)this).PlayCrossfade("FullBody, Override", "RipHeart", "Dash.playbackRate", BaseDuration / ((BaseState)this).attackSpeedStat * 1.8f, BaseDuration / ((BaseState)this).attackSpeedStat * 0.05f);
			Util.PlayAttackSpeedSound("Play_imp_overlord_attack2_tell", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat);
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddBuff(Buffs.Slow50);
				((EntityState)this).characterBody.AddTimedBuff(Buffs.SmallArmorBoost, BaseDuration / ((BaseState)this).attackSpeedStat);
			}
		}

		public override void FixedUpdate()
		{
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Expected O, but got Unknown
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_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: Expected O, but got Unknown
			base.FixedUpdate();
			if (((EntityState)this).isAuthority)
			{
				if (((EntityState)this).fixedAge > 0.5f / ((BaseState)this).attackSpeedStat && !_hasDelayed)
				{
					Util.PlaySound("Play_imp_overlord_teleport_end", ((EntityState)this).gameObject);
					BlastAttack.Fire();
					EffectManager.SpawnEffect(SeamstressAssets.genericImpactExplosionEffect, new EffectData
					{
						origin = ((EntityState)this).characterBody.corePosition,
						rotation = Quaternion.identity,
						color = Color32.op_Implicit(SeamstressAssets.coolRed)
					}, true);
					EffectManager.SpawnEffect(SeamstressAssets.slamEffect, new EffectData
					{
						origin = ((EntityState)this).characterBody.corePosition,
						rotation = Quaternion.identity
					}, true);
					_hasDelayed = true;
				}
				if (((EntityState)this).fixedAge >= BaseDuration / ((BaseState)this).attackSpeedStat && _hasDelayed)
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
			}
			if (NetworkServer.active && ((EntityState)this).characterBody.HasBuff(Buffs.Slow50) && _hasDelayed)
			{
				((EntityState)this).characterBody.RemoveBuff(Buffs.Slow50);
			}
		}

		public override void OnExit()
		{
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.RemoveOldestTimedBuff(SeamstressBuffs.SeamstressInsatiableBuff);
				if (((EntityState)this).characterBody.HasBuff(Buffs.Slow50))
				{
					((EntityState)this).characterBody.RemoveBuff(Buffs.Slow50);
				}
			}
			((EntityState)this).OnExit();
		}
	}
	public class FireScissor : BaseSeamstressSkillState
	{
		public GameObject scissorFiringPrefab = SeamstressAssets.impDashEffect;

		private GameObject projectilePrefab;

		public static float baseDuration = 0.5f;

		public static float damageCoefficient = 1f;

		public static float procCoefficient = 1f;

		public static string attackSoundString = "Play_imp_overlord_attack1_throw";

		private Animator modelAnimator;

		private float duration;

		private string chosenAnim = "FireScissorL";

		private bool hasFired;

		private Ray aimRay;

		private string fireString;

		protected virtual bool sceptered => false;

		public override void OnEnter()
		{
			//IL_005f: 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_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: 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_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: 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_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Expected O, but got Unknown
			RefreshState();
			if (seamstressController.blue)
			{
				scissorFiringPrefab = SeamstressAssets.impDashEffect2;
			}
			base.OnEnter();
			Util.PlaySound("Play_item_lunar_specialReplace_explode", ((EntityState)this).gameObject);
			((Component)((EntityState)this).characterBody).GetComponent<ScissorController>().isRight = true;
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			aimRay = ((BaseState)this).GetAimRay();
			((BaseState)this).StartAimMode(aimRay, 2f, false);
			modelAnimator = ((EntityState)this).GetModelAnimator();
			if (Object.op_Implicit((Object)(object)modelAnimator))
			{
				if (scissorRight && scissorLeft)
				{
					chosenAnim = "FireScissorL";
				}
				else if (scissorRight && !scissorLeft)
				{
					chosenAnim = "FireScissorR";
				}
				else if (scissorLeft && !scissorRight)
				{
					chosenAnim = "FireScissorL";
				}
				else
				{
					chosenAnim = "FireScissorL";
				}
				((EntityState)this).PlayCrossfade("Gesture, Additive", chosenAnim, "Slash.playbackRate", duration, 0.05f);
			}
			if (NetworkServer.active)
			{
				DamageInfo val = new DamageInfo
				{
					damage = ((EntityState)this).characterBody.healthComponent.fullCombinedHealth * 0.15f,
					damageType = DamageTypeCombo.op_Implicit((DamageType)67),
					position = ((EntityState)this).characterBody.corePosition,
					attacker = null,
					procCoefficient = 0f,
					crit = false,
					damageColorIndex = (DamageColorIndex)2
				};
				((EntityState)this).characterBody.healthComponent.TakeDamage(val);
			}
		}

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

		public override void FixedUpdate()
		{
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			base.FixedUpdate();
			if (Object.op_Implicit((Object)(object)modelAnimator) && !hasFired)
			{
				if (chosenAnim == "FireScissorL")
				{
					projectilePrefab = seamstressController.scissorLPrefab;
					fireString = "SwingRightSmall";
				}
				else
				{
					projectilePrefab = seamstressController.scissorRPrefab;
					fireString = "SwingLeftSmall";
				}
				float num = (sceptered ? 1.5f : SeamstressConfig.basePickupCooldown.Value);
				((Component)projectilePrefab.transform.GetChild(0).GetChild(5)).gameObject.GetComponent<PickupFilterComponent>().pickupTimer = Mathf.Max(0.5f, num * ((EntityState)this).skillLocator.special.cooldownScale - ((EntityState)this).skillLocator.special.flatCooldownReduction);
				if (isInsatiable)
				{
					DamageAPI.AddModdedDamageType(ref projectilePrefab.GetComponent<ProjectileDamage>().damageType, DamageTypes.CutDamage);
				}
				else if (DamageAPI.HasModdedDamageType(ref projectilePrefab.GetComponent<ProjectileDamage>().damageType, DamageTypes.CutDamage))
				{
					DamageAPI.RemoveModdedDamageType(ref projectilePrefab.GetComponent<ProjectileDamage>().damageType, DamageTypes.CutDamage);
				}
				Fire(aimRay, fireString);
				hasFired = true;
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private void Fire(Ray aimRay, string muzzleName)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			Util.PlaySound(attackSoundString, ((EntityState)this).gameObject);
			Transform val = ((BaseState)this).FindModelChild(muzzleName);
			if (Object.op_Implicit((Object)(object)val))
			{
				EffectData val2 = new EffectData();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction);
				val2.origin = val.position;
				val2.scale = 0.5f;
				EffectManager.SpawnEffect(scissorFiringPrefab, val2, true);
			}
			if (((EntityState)this).isAuthority)
			{
				ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat, 0f, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null);
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}
	}
	public class FireScissorScepter : FireScissor
	{
		protected override bool sceptered => true;
	}
	public class Flurry : BaseMeleeAttack
	{
		public override void OnEnter()
		{
			//IL_0015: 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_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			RefreshState();
			hitboxGroupName = "Sword";
			damageType = (DamageType)0;
			damageSource = (DamageSource)2;
			damageTotal = SeamstressConfig.flurryDamageCoefficient.Value;
			procCoefficient = 1f;
			pushForce = 300f;
			bonusForce = Vector3.zero;
			baseDuration = 1.1f;
			baseScissorDuration = 2f;
			attackStartPercentTime = 0.2f;
			attackEndPercentTime = 0.4f;
			earlyExitPercentTime = 0.5f;
			hitStopDuration = 0.05f;
			attackRecoil = 2f / ((BaseState)this).attackSpeedStat;
			hitHopVelocity = 3.5f;
			swingSoundString = "sfx_seamstress_swing";
			hitSoundString = "";
			hitEffectPrefab = (seamstressController.blue ? SeamstressAssets.scissorsHitImpactEffect2 : SeamstressAssets.scissorsHitImpactEffect);
			swingEffectPrefab = (seamstressController.blue ? SeamstressAssets.clawSlashEffect2 : SeamstressAssets.clawSlashEffect);
			bonusSwingEffectPrefab = (seamstressController.blue ? SeamstressAssets.scissorsSlashEffect2 : SeamstressAssets.scissorsSlashEffect);
			muzzleString = ((swingIndex % 2 == 0) ? "SwingLeftSmall" : "SwingRightSmall");
			buffer = false;
			if (isInsatiable)
			{
				moddedDamageTypeHolder.Add(DamageTypes.CutDamage);
				moddedDamageTypeHolder.Add(DamageTypes.GainNeedles);
			}
			moddedDamageTypeHolder.Add(DamageTypes.SeamstressLifesteal);
			scissorHit = true;
			if (muzzleString == "SwingLeftSmall" && !scissorRight)
			{
				scissorHit = false;
			}
			if (muzzleString == "SwingRightSmall" && !scissorLeft)
			{
				scissorHit = false;
			}
			impactSound = SeamstressAssets.scissorsHitSoundEvent.index;
			base.OnEnter();
		}

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

		protected override void FireAttack()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: 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_0044: 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)
			if (((EntityState)this).isAuthority)
			{
				Ray aimRay = ((BaseState)this).GetAimRay();
				Vector3 direction = ((Ray)(ref aimRay)).direction;
				direction.y = Mathf.Max(direction.y, direction.y * 0.5f);
				((BaseState)this).FindModelChild("SwingPivot").rotation = Util.QuaternionSafeLookRotation(direction);
				if (attack.Fire((List<HurtBox>)null))
				{
					OnHitEnemyAuthority();
				}
			}
		}

		protected override void PlayAttackAnimation()
		{
			((EntityState)this).PlayCrossfade("Gesture, Additive", (swingIndex % 2 == 0) ? "Slash1" : "Slash2", "Slash.playbackRate", duration, 0.1f * duration);
		}

		protected override void OnHitEnemyAuthority()
		{
			base.OnHitEnemyAuthority();
		}

		public override void OnExit()
		{
			base.OnExit();
		}
	}
	public class HealthCostDash : BaseSeamstressSkillState
	{
		public float baseDuration = 0.8f;

		public float dashPower = 6f;

		public float damageCoefficient = SeamstressConfig.blinkDamageCoefficient.Value;

		public GameObject uppercutEffect = SeamstressAssets.uppercutEffect;

		public GameObject projectilePrefab = SeamstressAssets.heartPrefab;

		public GameObject scissorHitImpactEffect = SeamstressAssets.scissorsHitImpactEffect;

		public GameObject bloodExplosionEffect = SeamstressAssets.bloodExplosionEffect;

		public GameObject impDashEffect = SeamstressAssets.impDashEffect;

		public GameObject bloodSplatterEffect = SeamstressAssets.bloodSplatterEffect;

		public GameObject smallBlinkEffect = SeamstressAssets.smallBlinkEffect;

		public Color mainColor = SeamstressAssets.coolRed;

		public Material destealthMaterial = SeamstressAssets.destealthMaterial;

		private Vector3 dashVector;

		private OverlapAttack attack;

		private List<HurtBox> victimsStruck = new List<HurtBox>();

		protected string hitBoxString = "Sword";

		private bool hasHit;

		private bool hasDelayed;

		public override void OnEnter()
		{
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			RefreshState();
			if (seamstressController.blue)
			{
				uppercutEffect = SeamstressAssets.uppercutEffect2;
				projectilePrefab = SeamstressAssets.heartPrefab2;
				scissorHitImpactEffect = SeamstressAssets.scissorsHitImpactEffect2;
				bloodExplosionEffect = SeamstressAssets.bloodExplosionEffect2;
				impDashEffect = SeamstressAssets.impDashEffect2;
				bloodSplatterEffect = SeamstressAssets.bloodSplatterEffect2;
				smallBlinkEffect = SeamstressAssets.smallBlinkEffect2;
				mainColor = Color.cyan;
				destealthMaterial = SeamstressAssets.destealthMaterial2;
			}
			base.OnEnter();
			dashVector = ((EntityState)this).inputBank.aimDirection;
			((EntityState)this).characterMotor.disableAirControlUntilCollision = false;
			Transform modelTransform = ((EntityState)this).GetModelTransform();
			Animator component = ((Component)modelTransform).GetComponent<Animator>();
			if (Object.op_Implicit((Object)(object)modelTransform) && Object.op_Implicit((Object)(object)destealthMaterial))
			{
				TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((EntityState)this).gameObject);
				val.duration = 1.2f;
				val.destroyComponentOnEnd = true;
				val.originalMaterial = destealthMaterial;
				val.inspectorCharacterModel = ((Component)component).gameObject.GetComponent<CharacterModel>();
				val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
				val.animateShaderAlpha = true;
			}
			((EntityState)this).characterMotor.velocity = Vector3.zero;
			((EntityState)this).PlayCrossfade("FullBody, Override", "RipHeart", "Dash.playbackRate", baseDuration / ((BaseState)this).attackSpeedStat * 1.8f, baseDuration / ((BaseState)this).attackSpeedStat * 0.05f);
			Util.PlayAttackSpeedSound("Play_imp_overlord_attack2_tell", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat);
		}

		public override void FixedUpdate()
		{
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Expected O, but got Unknown
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: 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_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Expected O, but got Unknown
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: Expected O, but got Unknown
			//IL_022d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0233: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0250: Unknown result type (might be due to invalid IL or missing references)
			//IL_0255: Unknown result type (might be due to invalid IL or missing references)
			//IL_0260: Unknown result type (might be due to invalid IL or missing references)
			//IL_0265: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_0267: Unknown result type (might be due to invalid IL or missing references)
			//IL_0278: 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_029d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b7: 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_02c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cc: Expected O, but got Unknown
			//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0290: Unknown result type (might be due to invalid IL or missing references)
			//IL_0295: Unknown result type (might be due to invalid IL or missing references)
			//IL_0331: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0403: Unknown result type (might be due to invalid IL or missing references)
			//IL_0408: Unknown result type (might be due to invalid IL or missing references)
			//IL_0415: Expected O, but got Unknown
			//IL_0398: Unknown result type (might be due to invalid IL or missing references)
			//IL_039d: Unknown result type (might be due to invalid IL or missing references)
			base.FixedUpdate();
			if (!hasDelayed)
			{
				((EntityState)this).characterMotor.velocity.y = 0f;
			}
			if (((EntityState)this).fixedAge > 0.5f / ((BaseState)this).attackSpeedStat && !hasDelayed)
			{
				Util.PlaySound("sfx_seamstress_dash", ((EntityState)this).gameObject);
				Util.PlaySound("sfx_seamstress_chains", ((EntityState)this).gameObject);
				hasDelayed = true;
				attack = new OverlapAttack();
				attack.attacker = ((EntityState)this).gameObject;
				attack.inflictor = ((EntityState)this).gameObject;
				attack.damageType = DamageTypeCombo.op_Implicit((DamageType)32);
				attack.damageType.damageSource = (DamageSource)4;
				attack.procCoefficient = 1f;
				attack.teamIndex = ((BaseState)this).GetTeam();
				attack.isCrit = ((BaseState)this).RollCrit();
				attack.forceVector = Vector3.up * 2000f;
				attack.damage = damageCoefficient * ((BaseState)this).damageStat;
				attack.hitBoxGroup = ((BaseState)this).FindHitBoxGroup(hitBoxString);
				attack.hitEffectPrefab = scissorHitImpactEffect;
				EffectManager.SpawnEffect(bloodExplosionEffect, new EffectData
				{
					origin = ((EntityState)this).transform.position,
					rotation = Quaternion.identity,
					scale = 0.5f
				}, false);
				if (isInsatiable)
				{
					DamageAPI.AddModdedDamageType(attack, DamageTypes.CutDamage);
				}
				DamageAPI.AddModdedDamageType(attack, DamageTypes.SeamstressLifesteal);
				EffectData val = new EffectData
				{
					origin = ((EntityState)this).characterBody.corePosition,
					rotation = Util.QuaternionSafeLookRotation(dashVector),
					scale = 3f
				};
				EffectManager.SpawnEffect(impDashEffect, val, false);
				EffectManager.SpawnEffect(smallBlinkEffect, val, false);
				((EntityState)this).characterMotor.velocity.y = 0f;
				CharacterMotor characterMotor = ((EntityState)this).characterMotor;
				characterMotor.velocity += dashVector * (dashPower * (((BaseState)this).moveSpeedStat + 1f));
				Vector3 val2 = ((EntityState)this).transform.localPosition;
				RaycastHit val3 = default(RaycastHit);
				if (Physics.Raycast(val2, Vector3.one, ref val3, 10f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)))
				{
					val2 = ((RaycastHit)(ref val3)).point;
				}
				EffectManager.SpawnEffect(bloodSplatterEffect, new EffectData
				{
					origin = val2,
					rotation = Quaternion.identity,
					color = Color32.op_Implicit(mainColor)
				}, false);
				Vector3 corePosition = ((EntityState)this).characterBody.corePosition;
				if (NetworkServer.active)
				{
					((EntityState)this).characterBody.AddTimedBuff(SeamstressBuffs.SeamstressInsatiableBuff, SeamstressConfig.insatiableDuration.Value);
					((EntityState)this).gameObject.AddComponent<SeamstressBleedVisualController>();
				}
			}
			if (!((EntityState)this).isAuthority || !hasDelayed)
			{
				return;
			}
			((EntityState)this).characterDirection.forward = dashVector;
			((EntityState)this).characterBody.isSprinting = true;
			if (attack.Fire(victimsStruck))
			{
				hasHit = true;
				Transform val4 = ((BaseState)this).FindModelChild("UpperCut");
				if (Object.op_Implicit((Object)(object)val4))
				{
					Object.Instantiate<GameObject>(uppercutEffect, val4);
				}
				((EntityState)this).characterMotor.velocity = Vector3.zero;
				((BaseState)this).SmallHop(((EntityState)this).characterMotor, 4f);
				((EntityState)this).outer.SetNextStateToMain();
			}
			if (((EntityState)this).fixedAge >= baseDuration / ((BaseState)this).attackSpeedStat)
			{
				EffectData val5 = new EffectData
				{
					origin = ((EntityState)this).characterBody.corePosition,
					rotation = Util.QuaternionSafeLookRotation(dashVector),
					scale = 3f
				};
				EffectManager.SpawnEffect(impDashEffect, val5, false);
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			if (!hasHit)
			{
				CharacterMotor characterMotor = ((EntityState)this).characterMotor;
				characterMotor.velocity *= 0.2f;
			}
			((EntityState)this).OnExit();
			((EntityState)this).skillLocator.utility.SetSkillOverride((object)((EntityState)this).gameObject, SeamstressSurvivor.explodeSkillDef, (SkillOverridePriority)4);
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)7;
		}
	}
	public class HeartSpawnState : BaseState
	{
		public static float duration = 0.01f;

		public static string enterSoundString = "Play_bleedOnCritAndExplode_impact";

		public float fixedAgeFixed;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			Util.PlaySound(enterSoundString, ((EntityState)this).gameObject);
			((Component)((BaseState)this).FindModelChild("ChargeUpFX")).gameObject.SetActive(true);
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			fixedAgeFixed += Time.fixedDeltaTime;
			if (fixedAgeFixed >= duration)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new HeartStandBy());
			}
		}
	}
	public class HeartStandBy : BaseState
	{
		public GameObject chain = SeamstressAssets.chainToHeart;

		public static AnimationCurve yankSuitabilityCurve;

		private CharacterBody ownerBody;

		private SeamstressController seamstressController;

		private GameObject owner;

		private float snapBackDelay;

		private bool hasFired;

		private bool splat;

		private static float bleedInterval = 0.2f;

		private float bleedTimer;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			splat = false;
			ProjectileController component = ((EntityState)this).GetComponent<ProjectileController>();
			if (Object.op_Implicit((Object)(object)component))
			{
				owner = component.owner;
			}
			((EntityState)this).PlayAnimation("Base", "SpawnToIdle");
			Util.PlaySound("Play_treeBot_R_yank", owner);
			seamstressController = owner.GetComponent<SeamstressController>();
			ownerBody = owner.GetComponent<CharacterBody>();
			((Behaviour)chain.GetComponent<DestroyOnCondition>()).enabled = true;
			chain.GetComponent<DestroyOnCondition>().ownerBody = ownerBody;
		}

		public override void FixedUpdate()
		{
			//IL_00ad: 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_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			if (Object.op_Implicit((Object)(object)ownerBody) && ownerBody.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff))
			{
				HandleBleed();
				if (!hasFired)
				{
					hasFired = true;
					ChainUpdate(SeamstressConfig.insatiableDuration.Value);
				}
			}
			else if (Object.op_Implicit((Object)(object)ownerBody) && !ownerBody.HasBuff(SeamstressBuffs.SeamstressInsatiableBuff) && hasFired)
			{
				if (!splat)
				{
					splat = true;
					Vector3 val = ownerBody.corePosition - ((EntityState)this).transform.position;
					snapBackDelay = ((Vector3)(ref val)).magnitude / 10f;
					snapBackDelay = Mathf.Clamp(snapBackDelay, 0.2f, 1f);
					((Behaviour)chain.GetComponent<DestroyOnCondition>()).enabled = false;
					ChainUpdate(snapBackDelay);
				}
				snapBackDelay -= Time.fixedDeltaTime;
				if (snapBackDelay <= 0.2f)
				{
					((EntityState)this).outer.SetNextStateToMain();
				}
			}
		}

		private void HandleBleed()
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: 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_00a7: 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_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: 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_00d6: 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_00e5: Expected O, but got Unknown
			bleedTimer += Time.fixedDeltaTime;
			if (bleedTimer >= bleedInterval)
			{
				bleedTimer = 0f;
				if (NetworkServer.active)
				{
					DamageInfo val = new DamageInfo
					{
						damage = (ownerBody.healthComponent.fullCombinedHealth - (ownerBody.healthComponent.fullCombinedHealth - (ownerBody.healthComponent.health + ownerBody.healthComponent.shield))) * 0.02f,
						damageType = DamageTypeCombo.op_Implicit((DamageType)67108931),
						dotIndex = (DotIndex)0,
						position = ownerBody.corePosition,
						attac