Decompiled source of KomachiOnozuka v0.0.8

Komachi.dll

Decompiled a month ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AddWatermark;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Logging;
using Cysharp.Threading.Tasks;
using HarmonyLib;
using JetBrains.Annotations;
using Komachi.Actions;
using Komachi.Cards.Red;
using Komachi.Cards.Special;
using Komachi.Keywords;
using Komachi.Patches;
using Komachi.StatusEffects;
using Komachi.Templates;
using Komachi.Ultimates;
using Komachi.Utils;
using LBoL.Base;
using LBoL.Base.Extensions;
using LBoL.ConfigData;
using LBoL.Core;
using LBoL.Core.Battle;
using LBoL.Core.Battle.BattleActions;
using LBoL.Core.Battle.Interactions;
using LBoL.Core.Cards;
using LBoL.Core.Randoms;
using LBoL.Core.StatusEffects;
using LBoL.Core.Units;
using LBoL.EntityLib.Exhibits;
using LBoL.EntityLib.StatusEffects.Basic;
using LBoL.EntityLib.StatusEffects.Cirno;
using LBoL.EntityLib.StatusEffects.Enemy;
using LBoL.EntityLib.StatusEffects.ExtraTurn;
using LBoL.EntityLib.StatusEffects.Others;
using LBoLEntitySideloader;
using LBoLEntitySideloader.Attributes;
using LBoLEntitySideloader.Entities;
using LBoLEntitySideloader.Resource;
using UnityEngine;
using UnityEngine.Experimental.Rendering;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("LBoL.Base")]
[assembly: IgnoresAccessChecksTo("LBoL.ConfigData")]
[assembly: IgnoresAccessChecksTo("LBoL.Core")]
[assembly: IgnoresAccessChecksTo("LBoL.EntityLib")]
[assembly: IgnoresAccessChecksTo("LBoL.Presentation")]
[assembly: IgnoresAccessChecksTo("Untitled.ConfigDataBuilder.Base")]
[assembly: AssemblyCompany("Komachi")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Komachi")]
[assembly: AssemblyTitle("Komachi")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Komachi
{
	[BepInPlugin("cyaneko.lbol.mods.komachi", "Komachi Onozuka", "0.0.8")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInProcess("LBoL.exe")]
	public class BepinexPlugin : BaseUnityPlugin
	{
		public static ManualLogSource Log = null;

		private static readonly Harmony Patcher = PluginInfo.HarmonyPatcher;

		internal static TemplateSequenceTable SequenceTable = new TemplateSequenceTable(0);

		internal static EmbeddedSource EmbeddedAssets = new EmbeddedSource(Assembly.GetExecutingAssembly());

		internal static DirectorySource DirectoryAssets = new DirectorySource("cyaneko.lbol.mods.komachi", "");

		internal static BatchLocalization CardLoc = new BatchLocalization((IResourceSource)(object)DirectoryAssets, typeof(CardTemplate), "Cards", (Locale)0, false);

		internal static BatchLocalization ExhibitLoc = new BatchLocalization((IResourceSource)(object)DirectoryAssets, typeof(ExhibitTemplate), "Exhibits", (Locale)0, false);

		internal static BatchLocalization PlayerUnitLoc = new BatchLocalization((IResourceSource)(object)DirectoryAssets, typeof(PlayerUnitTemplate), "PlayerUnit", (Locale)0, false);

		internal static BatchLocalization SELoc = new BatchLocalization((IResourceSource)(object)DirectoryAssets, typeof(StatusEffectTemplate), "StatusEffects", (Locale)0, false);

		internal static BatchLocalization UltLoc = new BatchLocalization((IResourceSource)(object)DirectoryAssets, typeof(UltimateSkillTemplate), "UltSkill", (Locale)0, false);

		internal static BatchLocalization UnitModelLoc = new BatchLocalization((IResourceSource)(object)DirectoryAssets, typeof(UnitModelTemplate), "UnitModel", (Locale)0, false);

		private void Awake()
		{
			Log = ((BaseUnityPlugin)this).Logger;
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
			EntityManager.RegisterSelf();
			Patcher.PatchAll();
			if (Chainloader.PluginInfos.ContainsKey("neo.lbol.tools.watermark"))
			{
				WatermarkWrapper.ActivateWatermark();
			}
		}

		private void OnDestroy()
		{
			Harmony patcher = Patcher;
			if (patcher != null)
			{
				patcher.UnpatchSelf();
			}
		}
	}
	public static class PluginInfo
	{
		public const string GUID = "cyaneko.lbol.mods.komachi";

		public const string Name = "Komachi Onozuka";

		public const string Version = "0.0.8";

		public static readonly Harmony HarmonyPatcher = new Harmony("cyaneko.lbol.mods.komachi");
	}
	internal class WatermarkWrapper
	{
		[MethodImpl(MethodImplOptions.NoInlining)]
		internal static void ActivateWatermark()
		{
			API.ActivateWatermark();
		}
	}
}
namespace Komachi.Utils
{
	public static class Extensions
	{
		public static bool IsPhysicalCardZone(this CardZone zone)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected I4, but got Unknown
			return (zone - 1) switch
			{
				0 => true, 
				1 => true, 
				2 => true, 
				3 => true, 
				_ => false, 
			};
		}

		public static SelectCardInteraction ShortcutInteraction(this BattleController battle, int cards, GameEntity source)
		{
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Expected O, but got Unknown
			int count = battle.DrawZoneToShow.Count;
			int num = 5 - count % 5;
			if (5 > num)
			{
				num += 5;
			}
			IEnumerable<KomachiRiverCrossing> second = Library.CreateCards<KomachiRiverCrossing>(num, false);
			List<Card> list = battle.DrawZoneToShow.Concat((IEnumerable<Card>)second).Concat(battle.DiscardZone).ToList();
			if (CollectionsExtensions.Empty<Card>((IReadOnlyCollection<Card>)list))
			{
				return null;
			}
			string text = TypeFactory<StatusEffect>.LocalizeProperty(typeof(ShortcutKeyword).Name, "InteractionText", true, false);
			return new SelectCardInteraction(0, cards, (IEnumerable<Card>)list, (SelectedCardHandling)0)
			{
				Source = source,
				Description = ((text != null) ? string.Format(text, cards) : null)
			};
		}

		public static bool IsAfterlifeCard(this Card c)
		{
			if (c is AfterlifeCard afterlifeCard)
			{
				return afterlifeCard.AfterlifeEffectActive;
			}
			return false;
		}
	}
	public static class Helpers
	{
		public static bool IsFerryAction(CardZone srcZone, CardZone dstZone)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Invalid comparison between I4 and Unknown
			//IL_000c: 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)
			//IL_0006: Invalid comparison between I4 and Unknown
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Invalid comparison between I4 and Unknown
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			if (5 != (int)srcZone || (4 != (int)dstZone && 1 != (int)dstZone))
			{
				if (srcZone.IsPhysicalCardZone() && dstZone.IsPhysicalCardZone())
				{
					return srcZone != dstZone;
				}
				return false;
			}
			return true;
		}
	}
}
namespace Komachi.Ultimates
{
	public sealed class KomachiUltBDef : UltimateSkillTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("KomachiUltB");
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.UltLoc.AddEntity((EntityDefinition)(object)this);
		}

		public override Sprite LoadSprite()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".png", (IResourceSource)(object)BepinexPlugin.DirectoryAssets, (Rect?)null, 1, (Vector2?)null);
		}

		public override UltimateSkillConfig MakeConfig()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Expected O, but got Unknown
			return new UltimateSkillConfig("", 10, 100, 100, 2, (UsRepeatableType)1, 36, 16, 20, (Keyword)274877907200L, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>());
		}
	}
	[EntityLogic(typeof(KomachiUltBDef))]
	public sealed class KomachiUltB : UltimateSkill
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass4_0
		{
			public EnemyUnit enemy;

			internal bool <Actions>b__0(EnemyUnit e)
			{
				return enemy != e;
			}
		}

		[CompilerGenerated]
		private sealed class <Actions>d__4 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private UnitSelector selector;

			public UnitSelector <>3__selector;

			public KomachiUltB <>4__this;

			private <>c__DisplayClass4_0 <>8__1;

			BattleAction IEnumerator<BattleAction>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <Actions>d__4(int <>1__state)
			{
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>8__1 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_009a: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b0: Expected O, but got Unknown
				//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
				//IL_0108: Expected O, but got Unknown
				int num = <>1__state;
				KomachiUltB komachiUltB = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>8__1 = new <>c__DisplayClass4_0();
					<>8__1.enemy = selector.GetEnemy(((UltimateSkill)komachiUltB).Battle);
					<>2__current = (BattleAction)(object)PerformAction.Spell((Unit)(object)((UltimateSkill)komachiUltB).Owner, ((GameEntity)komachiUltB).Id);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)komachiUltB).Owner, (Unit)(object)<>8__1.enemy, DamageInfo.Attack((float)((UltimateSkill)komachiUltB).Config.Damage, true), ((UltimateSkill)komachiUltB).GunName, (GunType)0);
					<>1__state = 2;
					return true;
				case 2:
				{
					<>1__state = -1;
					IEnumerable<EnemyUnit> enumerable = ((UltimateSkill)komachiUltB).Battle.AllAliveEnemies.Where((EnemyUnit e) => <>8__1.enemy != e);
					if (enumerable.Count() != 0)
					{
						<>2__current = (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)komachiUltB).Owner, (IEnumerable<Unit>)enumerable, komachiUltB.AlternateDamage, "Instant", (GunType)0);
						<>1__state = 3;
						return true;
					}
					break;
				}
				case 3:
					<>1__state = -1;
					break;
				}
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}

			[DebuggerHidden]
			IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
			{
				<Actions>d__4 <Actions>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<Actions>d__ = this;
				}
				else
				{
					<Actions>d__ = new <Actions>d__4(0)
					{
						<>4__this = <>4__this
					};
				}
				<Actions>d__.selector = <>3__selector;
				return <Actions>d__;
			}

			[DebuggerHidden]
			IEnumerator IEnumerable.GetEnumerator()
			{
				return ((IEnumerable<BattleAction>)this).GetEnumerator();
			}
		}

		[CompilerGenerated]
		private sealed class <OnEnemyDied>d__5 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			public KomachiUltB <>4__this;

			private DieEventArgs args;

			public DieEventArgs <>3__args;

			BattleAction IEnumerator<BattleAction>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnEnemyDied>d__5(int <>1__state)
			{
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0046: Unknown result type (might be due to invalid IL or missing references)
				//IL_0050: Expected O, but got Unknown
				int num = <>1__state;
				KomachiUltB komachiUltB = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					if (komachiUltB == args.DieSource && !args.Unit.HasStatusEffect<Servant>())
					{
						<>2__current = (BattleAction)new GainMoneyAction(((UltimateSkill)komachiUltB).Value2, (SpecialSourceType)0);
						<>1__state = 1;
						return true;
					}
					break;
				case 1:
					<>1__state = -1;
					break;
				}
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}

			[DebuggerHidden]
			IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
			{
				<OnEnemyDied>d__5 <OnEnemyDied>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnEnemyDied>d__ = this;
				}
				else
				{
					<OnEnemyDied>d__ = new <OnEnemyDied>d__5(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnEnemyDied>d__.args = <>3__args;
				return <OnEnemyDied>d__;
			}

			[DebuggerHidden]
			IEnumerator IEnumerable.GetEnumerator()
			{
				return ((IEnumerable<BattleAction>)this).GetEnumerator();
			}
		}

		public DamageInfo AlternateDamage => DamageInfo.Attack((float)((UltimateSkill)this).Value1, true);

		public KomachiUltB()
		{
			((UltimateSkill)this).TargetType = (TargetType)1;
			((UltimateSkill)this).GunName = "Simple1";
		}

		public void OnEnterBattle(BattleController battle)
		{
			BepinexPlugin.Log.LogDebug((object)"Somehow, KomachiUltB.OnEnterBattle was called!");
			((Unit)((UltimateSkill)this).Owner).ReactBattleEvent<DieEventArgs>(battle.EnemyDied, (Func<DieEventArgs, IEnumerable<BattleAction>>)OnEnemyDied);
		}

		[IteratorStateMachine(typeof(<Actions>d__4))]
		protected override IEnumerable<BattleAction> Actions(UnitSelector selector)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <Actions>d__4(-2)
			{
				<>4__this = this,
				<>3__selector = selector
			};
		}

		[IteratorStateMachine(typeof(<OnEnemyDied>d__5))]
		private IEnumerable<BattleAction> OnEnemyDied(DieEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnEnemyDied>d__5(-2)
			{
				<>4__this = this,
				<>3__args = args
			};
		}
	}
	public sealed class KomachiUltWDef : UltimateSkillTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("KomachiUltW");
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.UltLoc.AddEntity((EntityDefinition)(object)this);
		}

		public override Sprite LoadSprite()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".png", (IResourceSource)(object)BepinexPlugin.DirectoryAssets, (Rect?)null, 1, (Vector2?)null);
		}

		public override UltimateSkillConfig MakeConfig()
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			return new UltimateSkillConfig("", 10, 100, 100, 2, (UsRepeatableType)1, 16, 2, 2, (Keyword)256, (IReadOnlyList<string>)new List<string> { "Weak", "ShortcutKeyword" }, (IReadOnlyList<string>)new List<string>());
		}
	}
	[EntityLogic(typeof(KomachiUltWDef))]
	public sealed class KomachiUltW : UltimateSkill
	{
		[CompilerGenerated]
		private sealed class <Actions>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			public KomachiUltW <>4__this;

			private UnitSelector selector;

			public UnitSelector <>3__selector;

			private IEnumerable<EnemyUnit> <enemies>5__2;

			private SelectCardInteraction <int>5__3;

			private IEnumerator<EnemyUnit> <>7__wrap3;

			BattleAction IEnumerator<BattleAction>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <Actions>d__1(int <>1__state)
			{
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				int num = <>1__state;
				if (num == -3 || num == 2)
				{
					try
					{
					}
					finally
					{
						<>m__Finally1();
					}
				}
				<enemies>5__2 = null;
				<int>5__3 = null;
				<>7__wrap3 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0191: Unknown result type (might be due to invalid IL or missing references)
				//IL_019d: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a7: Expected O, but got Unknown
				//IL_0133: Unknown result type (might be due to invalid IL or missing references)
				//IL_013d: Expected O, but got Unknown
				try
				{
					int num = <>1__state;
					KomachiUltW komachiUltW = <>4__this;
					switch (num)
					{
					default:
						return false;
					case 0:
						<>1__state = -1;
						<>2__current = (BattleAction)(object)PerformAction.Spell((Unit)(object)((UltimateSkill)komachiUltW).Owner, ((GameEntity)komachiUltW).Id);
						<>1__state = 1;
						return true;
					case 1:
						<>1__state = -1;
						<enemies>5__2 = selector.GetEnemies(((UltimateSkill)komachiUltW).Battle);
						<>7__wrap3 = <enemies>5__2.GetEnumerator();
						<>1__state = -3;
						goto IL_00f9;
					case 2:
						<>1__state = -3;
						goto IL_00f9;
					case 3:
						<>1__state = -1;
						<>2__current = (BattleAction)(object)new ShortcutAction(<int>5__3.SelectedCards);
						<>1__state = 4;
						return true;
					case 4:
						<>1__state = -1;
						<>2__current = (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)komachiUltW).Owner, (IEnumerable<Unit>)<enemies>5__2, DamageInfo.Attack((float)((UltimateSkill)komachiUltW).Config.Damage, true), ((UltimateSkill)komachiUltW).GunName, (GunType)0);
						<>1__state = 5;
						return true;
					case 5:
						{
							<>1__state = -1;
							return false;
						}
						IL_00f9:
						if (<>7__wrap3.MoveNext())
						{
							EnemyUnit current = <>7__wrap3.Current;
							int? num2 = ((UltimateSkill)komachiUltW).Value1;
							<>2__current = (BattleAction)(object)new ApplyStatusEffectAction<Weak>((Unit)(object)current, (int?)null, num2, (int?)null, (int?)null, 0f, true);
							<>1__state = 2;
							return true;
						}
						<>m__Finally1();
						<>7__wrap3 = null;
						<int>5__3 = ((UltimateSkill)komachiUltW).Battle.ShortcutInteraction(((UltimateSkill)komachiUltW).Value2, (GameEntity)(object)komachiUltW);
						<>2__current = (BattleAction)new InteractionAction((Interaction)(object)<int>5__3, false);
						<>1__state = 3;
						return true;
					}
				}
				catch
				{
					//try-fault
					((IDisposable)this).Dispose();
					throw;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			private void <>m__Finally1()
			{
				<>1__state = -1;
				if (<>7__wrap3 != null)
				{
					<>7__wrap3.Dispose();
				}
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}

			[DebuggerHidden]
			IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
			{
				<Actions>d__1 <Actions>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<Actions>d__ = this;
				}
				else
				{
					<Actions>d__ = new <Actions>d__1(0)
					{
						<>4__this = <>4__this
					};
				}
				<Actions>d__.selector = <>3__selector;
				return <Actions>d__;
			}

			[DebuggerHidden]
			IEnumerator IEnumerable.GetEnumerator()
			{
				return ((IEnumerable<BattleAction>)this).GetEnumerator();
			}
		}

		public KomachiUltW()
		{
			((UltimateSkill)this).TargetType = (TargetType)2;
			((UltimateSkill)this).GunName = "Simple1";
		}

		[IteratorStateMachine(typeof(<Actions>d__1))]
		protected override IEnumerable<BattleAction> Actions(UnitSelector selector)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <Actions>d__1(-2)
			{
				<>4__this = this,
				<>3__selector = selector
			};
		}
	}
}
namespace Komachi.Templates
{
	public abstract class AfterlifeCard : KomachiCard
	{
		public virtual bool AfterlifeEffectActive => true;

		public bool AfterlifeActivatedThisTurn { get; protected set; }

		public string AfterlifeEffect => DecorateModdedKeyword<AfterlifeKeyword>("Afterlife", AfterlifeActivatedThisTurn);

		protected override void OnEnterBattle(BattleController battle)
		{
			((Card)this).ReactBattleEvent<CardMovingEventArgs>(battle.CardMoved, (EventSequencedReactor<CardMovingEventArgs>)OnCardMoved);
			((Card)this).ReactBattleEvent<CardMovingToDrawZoneEventArgs>(battle.CardMovedToDrawZone, (EventSequencedReactor<CardMovingToDrawZoneEventArgs>)OnCardMovedToDrawZone);
			((Card)this).HandleBattleEvent<UnitEventArgs>(((Unit)battle.Player).TurnEnded, (GameEventHandler<UnitEventArgs>)OnTurnEnded, (GameEventPriority)int.MaxValue);
		}

		protected abstract IEnumerable<BattleAction> OnAfterlife();

		private IEnumerable<BattleAction> ReactToCardMove(ActionCause cause, CardZone srcZone, CardZone dstZone)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Invalid comparison between I4 and Unknown
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Invalid comparison between I4 and Unknown
			if (!AfterlifeEffectActive)
			{
				return null;
			}
			if (3 == (int)dstZone && 13 == (int)cause)
			{
				return null;
			}
			if (Helpers.IsFerryAction(srcZone, dstZone) && !AfterlifeActivatedThisTurn)
			{
				AfterlifeActivatedThisTurn = true;
				((GameEntity)this).NotifyChanged();
				return OnAfterlife();
			}
			return null;
		}

		protected IEnumerable<BattleAction> OnCardMoved(CardMovingEventArgs args)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			if (this != args.Card)
			{
				return null;
			}
			return ReactToCardMove(((GameEventArgs)args).Cause, args.SourceZone, args.DestinationZone);
		}

		protected IEnumerable<BattleAction> OnCardMovedToDrawZone(CardMovingToDrawZoneEventArgs args)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			if (this != args.Card)
			{
				return null;
			}
			return ReactToCardMove(((GameEventArgs)args).Cause, args.SourceZone, (CardZone)1);
		}

		public override IEnumerable<BattleAction> OnDiscard(CardZone srcZone)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return ReactToCardMove((ActionCause)1, srcZone, (CardZone)3);
		}

		public override IEnumerable<BattleAction> OnExile(CardZone srcZone)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return ReactToCardMove((ActionCause)1, srcZone, (CardZone)4);
		}

		protected void OnTurnEnded(GameEventArgs args)
		{
			AfterlifeActivatedThisTurn = false;
		}

		protected string DecorateModdedKeyword<T>(string lockey, bool grayOut) where T : StatusEffect
		{
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			string arg = TypeFactory<StatusEffect>.LocalizeProperty(typeof(T).Name, "Name", false, false) ?? lockey;
			string arg2 = (((Card)this).IsUpgraded ? ((GameEntity)this).LocalizeProperty(lockey + "Upgraded", true, false) : null) ?? ((GameEntity)this).LocalizeProperty(lockey, true, true) ?? ("<" + ((GameEntity)this).Id + "." + lockey + ">");
			KeywordFormatStrings value;
			KeywordFormatStrings keywordFormatStrings = (FormatStrings.TryGetValue(Localization.CurrentLocale, out value) ? value : FormatStrings[(Locale)0]);
			return RuntimeFormatterExtensions.RuntimeFormat(StringDecorator.Decorate(string.Format((((Card)this).Battle != null && grayOut) ? keywordFormatStrings.Inactive : keywordFormatStrings.Active, arg, arg2)), ((GameEntity)this).FormatWrapper);
		}

		protected override void OnCopy(KomachiCard cpy)
		{
			if (cpy is AfterlifeCard afterlifeCard)
			{
				afterlifeCard.AfterlifeActivatedThisTurn = AfterlifeActivatedThisTurn;
			}
		}
	}
	public abstract class KomachiCardTemplate : CardTemplate
	{
		public override CardImages LoadCardImages()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			CardImages val = new CardImages((IResourceSource)(object)BepinexPlugin.DirectoryAssets);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override CardConfig MakeConfig()
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Expected O, but got Unknown
			return new CardConfig(0, "", 10, true, new string[0][], "", "", 0, false, true, false, true, true, (Rarity)0, (CardType)0, (TargetType?)null, (IReadOnlyList<ManaColor>)new List<ManaColor>(), false, ManaGroup.Empty, (ManaGroup?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "KomachiPlayer", (string)null, (string)null, false, (string)null, (IReadOnlyList<string>)new List<string>());
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.CardLoc.AddEntity((EntityDefinition)(object)this);
		}
	}
	public abstract class KomachiCard : Card
	{
		protected struct KeywordFormatStrings
		{
			public string Inactive;

			public string Active;
		}

		protected readonly Dictionary<Locale, KeywordFormatStrings> FormatStrings = new Dictionary<Locale, KeywordFormatStrings>
		{
			[(Locale)0] = new KeywordFormatStrings
			{
				Active = "|{0}|: {1}",
				Inactive = "|d:{0}: {1}|"
			},
			[(Locale)1] = new KeywordFormatStrings
			{
				Active = "|{0}|:{1}",
				Inactive = "|d:{0}:{1}|"
			},
			[(Locale)2] = new KeywordFormatStrings
			{
				Active = "|{0}|:{1}",
				Inactive = "|d:{0}:{1}|"
			},
			[(Locale)3] = new KeywordFormatStrings
			{
				Active = "|{0}|:{1}",
				Inactive = "|d:{0}:{1}|"
			}
		};

		public string OverflowEffect => DecorateKeyword((Keyword)8796093022208L, "Overflow", ((Card)this).PlentifulHappenThisTurn);

		public string DebutEffect => DecorateKeyword((Keyword)268435456, "Debut", !((Card)this).DebutActive);

		protected string DecorateEffect(string lockey, bool grayOut)
		{
			string text = (((Card)this).IsUpgraded ? ((GameEntity)this).LocalizeProperty(lockey + "Upgraded", true, false) : null) ?? ((GameEntity)this).LocalizeProperty(lockey, true, true) ?? ("<" + ((GameEntity)this).Id + "." + lockey + ">");
			return RuntimeFormatterExtensions.RuntimeFormat(StringDecorator.Decorate((((Card)this).Battle != null && grayOut) ? ("|d:" + text + "|") : (text ?? "")), ((GameEntity)this).FormatWrapper);
		}

		protected string DecorateKeyword(Keyword keyword, string lockey, bool grayOut)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			KeywordDisplayWord displayWord = Keywords.GetDisplayWord(keyword);
			string arg = ((displayWord != null) ? displayWord.Name : null) ?? lockey;
			string arg2 = (((Card)this).IsUpgraded ? ((GameEntity)this).LocalizeProperty(lockey + "Upgraded", true, false) : null) ?? ((GameEntity)this).LocalizeProperty(lockey, true, true) ?? ("<" + ((GameEntity)this).Id + "." + lockey + ">");
			KeywordFormatStrings value;
			KeywordFormatStrings keywordFormatStrings = (FormatStrings.TryGetValue(Localization.CurrentLocale, out value) ? value : FormatStrings[(Locale)0]);
			return RuntimeFormatterExtensions.RuntimeFormat(StringDecorator.Decorate(string.Format((((Card)this).Battle != null && grayOut) ? keywordFormatStrings.Inactive : keywordFormatStrings.Active, arg, arg2)), ((GameEntity)this).FormatWrapper);
		}

		protected virtual void OnCopy(KomachiCard cpy)
		{
		}

		[HarmonyPatch(typeof(Card), "CloneBattleCard")]
		[HarmonyPostfix]
		private static void CopyBattleCard(Card __instance, Card __result)
		{
			if (__instance is KomachiCard komachiCard && __result is KomachiCard cpy)
			{
				komachiCard.OnCopy(cpy);
			}
		}

		[HarmonyPatch(typeof(Card), "CloneTwiceToken")]
		[HarmonyPostfix]
		private static void CopyTwiceToken(Card __instance, Card __result)
		{
			if (__instance is KomachiCard komachiCard && __result is KomachiCard cpy)
			{
				komachiCard.OnCopy(cpy);
			}
		}
	}
	public abstract class KomachiExhibitTemplate : ExhibitTemplate
	{
		public override ExhibitConfig MakeConfig()
		{
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Expected O, but got Unknown
			return new ExhibitConfig(0, "", 10, false, false, false, false, (AppearanceType)3, "KomachiPlayer", (ExhibitLosableType)1, (Rarity)3, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)(ManaColor)6, 0, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>());
		}

		public override ExhibitSprites LoadSprite()
		{
			//IL_0000: 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)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Expected O, but got Unknown
			return new ExhibitSprites
			{
				main = ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".png", (IResourceSource)(object)BepinexPlugin.DirectoryAssets, (Rect?)null, 1, (Vector2?)null)
			};
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.ExhibitLoc.AddEntity((EntityDefinition)(object)this);
		}
	}
	public abstract class KomachiStatusEffectTemplate : StatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Expected O, but got Unknown
			return new StatusEffectConfig(0, "", 10, (StatusEffectType)2, false, false, (int?)null, false, (StackType?)(StackType)3, false, (StackType?)(StackType)3, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (string)null, "Default", "Default", "Default");
		}

		public override Sprite LoadSprite()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".png", (IResourceSource)(object)BepinexPlugin.DirectoryAssets, (Rect?)null, 1, (Vector2?)null);
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.SELoc.AddEntity((EntityDefinition)(object)this);
		}
	}
}
namespace Komachi.StatusEffects
{
	public sealed class IncomingTempFirepowerSeDef : KomachiStatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("IncomingTempFirepowerSe");
		}

		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig obj = base.MakeConfig();
			obj.Type = (StatusEffectType)2;
			obj.HasLevel = true;
			obj.IsStackable = true;
			obj.LevelStackType = (StackType)0;
			obj.RelativeEffects = new List<string> { "TempFirepower" };
			return obj;
		}
	}
	[EntityLogic(typeof(IncomingTempFirepowerSeDef))]
	public sealed class IncomingTempFirepowerSe : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnPlayerTurnStarted>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			public IncomingTempFirepowerSe <>4__this;

			BattleAction IEnumerator<BattleAction>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnPlayerTurnStarted>d__1(int <>1__state)
			{
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_005b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0065: Expected O, but got Unknown
				int num = <>1__state;
				IncomingTempFirepowerSe incomingTempFirepowerSe = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = ((StatusEffect)incomingTempFirepowerSe).BuffAction<TempFirepower>(((StatusEffect)incomingTempFirepowerSe).Level, 0, 0, 0, 0.2f);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)incomingTempFirepowerSe, true, 0.1f);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}

			[DebuggerHidden]
			IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
			{
				<OnPlayerTurnStarted>d__1 result;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					result = this;
				}
				else
				{
					result = new <OnPlayerTurnStarted>d__1(0)
					{
						<>4__this = <>4__this
					};
				}
				return result;
			}

			[DebuggerHidden]
			IEnumerator IEnumerable.GetEnumerator()
			{
				return ((IEnumerable<BattleAction>)this).GetEnumerator();
			}
		}

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(unit.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted);
		}

		[IteratorStateMachine(typeof(<OnPlayerTurnStarted>d__1))]
		private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnPlayerTurnStarted>d__1(-2)
			{
				<>4__this = this
			};
		}
	}
	public sealed class IncomingTempSpiritSeDef : KomachiStatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("IncomingTempSpiritSe");
		}

		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig obj = base.MakeConfig();
			obj.Type = (StatusEffectType)2;
			obj.HasLevel = true;
			obj.IsStackable = true;
			obj.LevelStackType = (StackType)0;
			obj.RelativeEffects = new List<string> { "TempSpirit" };
			return obj;
		}
	}
	[EntityLogic(typeof(IncomingTempSpiritSeDef))]
	public sealed class IncomingTempSpiritSe : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnPlayerTurnStarted>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			public IncomingTempSpiritSe <>4__this;

			BattleAction IEnumerator<BattleAction>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnPlayerTurnStarted>d__1(int <>1__state)
			{
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_005b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0065: Expected O, but got Unknown
				int num = <>1__state;
				IncomingTempSpiritSe incomingTempSpiritSe = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = ((StatusEffect)incomingTempSpiritSe).BuffAction<TempSpirit>(((StatusEffect)incomingTempSpiritSe).Level, 0, 0, 0, 0.2f);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)incomingTempSpiritSe, true, 0.1f);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}

			[DebuggerHidden]
			IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
			{
				<OnPlayerTurnStarted>d__1 result;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					result = this;
				}
				else
				{
					result = new <OnPlayerTurnStarted>d__1(0)
					{
						<>4__this = <>4__this
					};
				}
				return result;
			}

			[DebuggerHidden]
			IEnumerator IEnumerable.GetEnumerator()
			{
				return ((IEnumerable<BattleAction>)this).GetEnumerator();
			}
		}

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(unit.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted);
		}

		[IteratorStateMachine(typeof(<OnPlayerTurnStarted>d__1))]
		private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnPlayerTurnStarted>d__1(-2)
			{
				<>4__this = this
			};
		}
	}
	public sealed class KomachiBindingRiteSeDef : KomachiStatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("KomachiBindingRiteSe");
		}

		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig obj = base.MakeConfig();
			obj.Type = (StatusEffectType)0;
			obj.HasLevel = true;
			obj.IsStackable = true;
			obj.LevelStackType = (StackType)0;
			obj.RelativeEffects = new List<string> { "FirepowerNegative" };
			obj.VFX = "BuffBlack";
			obj.SFX = "Buff";
			return obj;
		}
	}
	[EntityLogic(typeof(KomachiBindingRiteSeDef))]
	public sealed class KomachiBindingRiteSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(unit.DamageReceiving, (GameEventHandler<DamageEventArgs>)OnDamageReceiving);
		}

		private void OnDamageReceiving(DamageEventArgs args)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Invalid comparison between I4 and Unknown
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			DamageInfo damageInfo = args.DamageInfo;
			if (2 == (int)((DamageInfo)(ref damageInfo)).DamageType)
			{
				List<StatusEffect> list = args.Source.StatusEffects.Where((StatusEffect se) => 1 == (int)se.Type).ToList();
				if (0 < list.Count)
				{
					args.DamageInfo = ((DamageInfo)(ref damageInfo)).ReduceBy(list.Count * ((StatusEffect)this).Level);
					((GameEventArgs)args).AddModifier((GameEntity)(object)this);
				}
			}
		}
	}
	public sealed class KomachiBreakTimeSeDef : KomachiStatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("KomachiBreakTimeSe");
		}

		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig obj = base.MakeConfig();
			obj.Type = (StatusEffectType)0;
			obj.IsStackable = true;
			obj.Keywords = (Keyword)4194304;
			obj.VFX = "BuffWhite";
			obj.SFX = "Buff";
			return obj;
		}
	}
	[EntityLogic(typeof(KomachiBreakTimeSeDef))]
	public sealed class KomachiBreakTimeSe : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnTurnEnding>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private UnitEventArgs args;

			public UnitEventArgs <>3__args;

			public KomachiBreakTimeSe <>4__this;

			BattleAction IEnumerator<BattleAction>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnTurnEnding>d__1(int <>1__state)
			{
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_006b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0075: Expected O, but got Unknown
				int num = <>1__state;
				KomachiBreakTimeSe komachiBreakTimeSe = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					if (args.Unit is PlayerUnit)
					{
						foreach (Card item in ((StatusEffect)komachiBreakTimeSe).Battle.HandZone)
						{
							item.IsTempRetain = true;
						}
					}
					<>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)komachiBreakTimeSe, true, 0.1f);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}

			[DebuggerHidden]
			IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
			{
				<OnTurnEnding>d__1 <OnTurnEnding>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnTurnEnding>d__ = this;
				}
				else
				{
					<OnTurnEnding>d__ = new <OnTurnEnding>d__1(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnTurnEnding>d__.args = <>3__args;
				return <OnTurnEnding>d__;
			}

			[DebuggerHidden]
			IEnumerator IEnumerable.GetEnumerator()
			{
				return ((IEnumerable<BattleAction>)this).GetEnumerator();
			}
		}

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(unit.TurnEnding, (EventSequencedReactor<UnitEventArgs>)OnTurnEnding);
		}

		[IteratorStateMachine(typeof(<OnTurnEnding>d__1))]
		private IEnumerable<BattleAction> OnTurnEnding(UnitEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnTurnEnding>d__1(-2)
			{
				<>4__this = this,
				<>3__args = args
			};
		}
	}
	public sealed class KomachiDayOfPeaceSeDef : KomachiStatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("KomachiDayOfPeaceSe");
		}

		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig obj = base.MakeConfig();
			obj.Type = (StatusEffectType)0;
			obj.Order = 999;
			obj.IsStackable = true;
			obj.HasDuration = true;
			obj.DurationStackType = (StackType)0;
			obj.DurationDecreaseTiming = (DurationDecreaseTiming)3;
			obj.VFX = "BuffWhite";
			obj.SFX = "Buff";
			return obj;
		}
	}
	[EntityLogic(typeof(KomachiDayOfPeaceSeDef))]
	public sealed class KomachiDayOfPeaceSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).HandleOwnerEvent<DamageDealingEventArgs>(unit.DamageDealing, (GameEventHandler<DamageDealingEventArgs>)OnDamageDealing);
			((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(unit.DamageReceiving, (GameEventHandler<DamageEventArgs>)OnDamageReceiving);
		}

		private void OnDamageDealing(DamageDealingEventArgs args)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Invalid comparison between I4 and Unknown
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			DamageInfo damageInfo = args.DamageInfo;
			if (2 == (int)((DamageInfo)(ref damageInfo)).DamageType)
			{
				((DamageInfo)(ref damageInfo)).Damage = 0f;
				args.DamageInfo = damageInfo;
				((GameEventArgs)args).AddModifier((GameEntity)(object)this);
			}
		}

		private void OnDamageReceiving(DamageEventArgs args)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Invalid comparison between I4 and Unknown
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			DamageInfo damageInfo = args.DamageInfo;
			if (2 == (int)((DamageInfo)(ref damageInfo)).DamageType)
			{
				((DamageInfo)(ref damageInfo)).Damage = 0f;
				args.DamageInfo = damageInfo;
				((GameEventArgs)args).AddModifier((GameEntity)(object)this);
			}
		}
	}
	public sealed class KomachiDeathPresenceSeDef : StatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("KomachiDeathPresenceSe");
		}

		public override StatusEffectConfig MakeConfig()
		{
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Expected O, but got Unknown
			return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)3, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Graze" }, (string)null, "BuffBlack", "Default", "Buff");
		}

		public override Sprite LoadSprite()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".png", (IResourceSource)(object)BepinexPlugin.DirectoryAssets, (Rect?)null, 1, (Vector2?)null);
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.SELoc.AddEntity((EntityDefinition)(object)this);
		}
	}
	[EntityLogic(typeof(KomachiDeathPresenceSeDef))]
	public sealed class KomachiDeathPresenceSe : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnDamageReceived>d__3 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private DamageEventArgs args;

			public DamageEventArgs <>3__args;

			public KomachiDeathPresenceSe <>4__this;

			BattleAction IEnumerator<BattleAction>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnDamageReceived>d__3(int <>1__state)
			{
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0027: Unknown result type (might be due to invalid IL or missing references)
				//IL_002c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0081: 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_0096: Expected O, but got Unknown
				int num = <>1__state;
				KomachiDeathPresenceSe komachiDeathPresenceSe = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
				{
					<>1__state = -1;
					DamageInfo damageInfo = args.DamageInfo;
					if (((DamageInfo)(ref damageInfo)).IsGrazed)
					{
						Unit source = args.Source;
						EnemyUnit val = (EnemyUnit)(object)((source is EnemyUnit) ? source : null);
						if (val != null && ((Unit)val).IsAlive && komachiDeathPresenceSe.IncomingDamage.TryGetValue(val, out var value))
						{
							((StatusEffect)komachiDeathPresenceSe).NotifyActivating();
							<>2__current = (BattleAction)new DamageAction(((StatusEffect)komachiDeathPresenceSe).Owner, (Unit)(object)val, DamageInfo.HpLose((float)((StatusEffect)komachiDeathPresenceSe).Level * ((DamageInfo)(ref value)).Damage, false), "Instant", (GunType)0);
							<>1__state = 1;
							return true;
						}
					}
					break;
				}
				case 1:
					<>1__state = -1;
					break;
				}
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}

			[DebuggerHidden]
			IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
			{
				<OnDamageReceived>d__3 <OnDamageReceived>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnDamageReceived>d__ = this;
				}
				else
				{
					<OnDamageReceived>d__ = new <OnDamageReceived>d__3(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnDamageReceived>d__.args = <>3__args;
				return <OnDamageReceived>d__;
			}

			[DebuggerHidden]
			IEnumerator IEnumerable.GetEnumerator()
			{
				return ((IEnumerable<BattleAction>)this).GetEnumerator();
			}
		}

		[CompilerGenerated]
		private sealed class <OnTurnStart>d__4 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			public KomachiDeathPresenceSe <>4__this;

			BattleAction IEnumerator<BattleAction>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnTurnStart>d__4(int <>1__state)
			{
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0031: Unknown result type (might be due to invalid IL or missing references)
				//IL_003b: Expected O, but got Unknown
				int num = <>1__state;
				KomachiDeathPresenceSe komachiDeathPresenceSe = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					komachiDeathPresenceSe.IncomingDamage.Clear();
					<>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)komachiDeathPresenceSe, true, 0.1f);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}

			[DebuggerHidden]
			IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
			{
				<OnTurnStart>d__4 result;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					result = this;
				}
				else
				{
					result = new <OnTurnStart>d__4(0)
					{
						<>4__this = <>4__this
					};
				}
				return result;
			}

			[DebuggerHidden]
			IEnumerator IEnumerable.GetEnumerator()
			{
				return ((IEnumerable<BattleAction>)this).GetEnumerator();
			}
		}

		private Dictionary<EnemyUnit, DamageInfo> IncomingDamage = new Dictionary<EnemyUnit, DamageInfo>();

		protected override void OnAdded(Unit unit)
		{
			IncomingDamage.Clear();
			((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(unit.DamageReceiving, (GameEventHandler<DamageEventArgs>)OnDamageReceiving, (GameEventPriority)int.MaxValue);
			((StatusEffect)this).ReactOwnerEvent<DamageEventArgs>(unit.DamageReceived, (EventSequencedReactor<DamageEventArgs>)OnDamageReceived);
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(unit.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnTurnStart);
		}

		private void OnDamageReceiving(DamageEventArgs args)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			Unit source = args.Source;
			EnemyUnit val = (EnemyUnit)(object)((source is EnemyUnit) ? source : null);
			if (val != null)
			{
				IncomingDamage[val] = args.DamageInfo;
			}
		}

		[IteratorStateMachine(typeof(<OnDamageReceived>d__3))]
		private IEnumerable<BattleAction> OnDamageReceived(DamageEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnDamageReceived>d__3(-2)
			{
				<>4__this = this,
				<>3__args = args
			};
		}

		[IteratorStateMachine(typeof(<OnTurnStart>d__4))]
		private IEnumerable<BattleAction> OnTurnStart(GameEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnTurnStart>d__4(-2)
			{
				<>4__this = this
			};
		}
	}
	public sealed class KomachiDeathsDoorSeDef : KomachiStatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("KomachiDeathsDoorSe");
		}

		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig obj = base.MakeConfig();
			obj.Type = (StatusEffectType)0;
			obj.HasLevel = true;
			obj.HasCount = true;
			obj.IsStackable = true;
			obj.LevelStackType = (StackType)0;
			obj.CountStackType = (StackType)0;
			obj.VFX = "BuffBlack";
			obj.SFX = "Buff";
			return obj;
		}
	}
	[EntityLogic(typeof(KomachiDeathsDoorSeDef))]
	public sealed class KomachiDeathsDoorSe : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnTurnEnding>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			public KomachiDeathsDoorSe <>4__this;

			BattleAction IEnumerator<BattleAction>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnTurnEnding>d__1(int <>1__state)
			{
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0038: 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_004d: Expected O, but got Unknown
				int num = <>1__state;
				KomachiDeathsDoorSe komachiDeathsDoorSe = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (BattleAction)new DamageAction(((StatusEffect)komachiDeathsDoorSe).Owner, (IEnumerable<Unit>)((StatusEffect)komachiDeathsDoorSe).Battle.AllAliveEnemies, DamageInfo.HpLose((float)((StatusEffect)komachiDeathsDoorSe).Level, false), "Instant", (GunType)0);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					((StatusEffect)komachiDeathsDoorSe).Level = ((StatusEffect)komachiDeathsDoorSe).Level + ((StatusEffect)komachiDeathsDoorSe).Count;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}

			[DebuggerHidden]
			IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
			{
				<OnTurnEnding>d__1 result;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					result = this;
				}
				else
				{
					result = new <OnTurnEnding>d__1(0)
					{
						<>4__this = <>4__this
					};
				}
				return result;
			}

			[DebuggerHidden]
			IEnumerator IEnumerable.GetEnumerator()
			{
				return ((IEnumerable<BattleAction>)this).GetEnumerator();
			}
		}

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(unit.TurnEnding, (EventSequencedReactor<UnitEventArgs>)OnTurnEnding);
		}

		[IteratorStateMachine(typeof(<OnTurnEnding>d__1))]
		private IEnumerable<BattleAction> OnTurnEnding(UnitEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnTurnEnding>d__1(-2)
			{
				<>4__this = this
			};
		}
	}
	public sealed class KomachiDeathWaltzSeDef : KomachiStatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("KomachiDeathWaltzSe");
		}

		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig obj = base.MakeConfig();
			obj.Type = (StatusEffectType)0;
			obj.Order = 7;
			obj.HasLevel = true;
			obj.IsStackable = true;
			obj.LevelStackType = (StackType)0;
			obj.RelativeEffects = new List<string> { "LockedOn" };
			obj.VFX = "BuffRed";
			obj.SFX = "Buff";
			return obj;
		}
	}
	[EntityLogic(typeof(KomachiDeathWaltzSeDef))]
	public sealed class KomachiDeathWaltzSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(unit.Battle.EnemySpawned, (GameEventHandler<UnitEventArgs>)OnEnemySpawned);
			foreach (EnemyUnit allAliveEnemy in unit.Battle.AllAliveEnemies)
			{
				((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(((Unit)allAliveEnemy).DamageReceiving, (GameEventHandler<DamageEventArgs>)OnDamageReceiving);
			}
		}

		private void OnEnemySpawned(UnitEventArgs args)
		{
			((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(args.Unit.DamageReceiving, (GameEventHandler<DamageEventArgs>)OnDamageReceiving);
		}

		private void OnDamageReceiving(DamageEventArgs args)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Invalid comparison between I4 and Unknown
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			DamageInfo damageInfo = args.DamageInfo;
			if (2 == (int)((DamageInfo)(ref damageInfo)).DamageType)
			{
				List<StatusEffect> list = args.Target.StatusEffects.Where((StatusEffect se) => 1 == (int)se.Type).ToList();
				if (0 < list.Count)
				{
					args.DamageInfo = ((DamageInfo)(ref damageInfo)).IncreaseBy(list.Count * ((StatusEffect)this).Level);
					((GameEventArgs)args).AddModifier((GameEntity)(object)this);
				}
			}
		}
	}
	public sealed class KomachiDisciplinedSeDef : KomachiStatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("KomachiDisciplinedSe");
		}

		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig obj = base.MakeConfig();
			obj.Type = (StatusEffectType)0;
			obj.Order = 10;
			obj.VFX = "BuffGreen";
			obj.SFX = "Buff";
			return obj;
		}
	}
	[EntityLogic(typeof(KomachiDisciplinedSeDef))]
	public sealed class KomachiDisciplinedSe : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnStatusEffectAdding>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private StatusEffectApplyEventArgs args;

			public StatusEffectApplyEventArgs <>3__args;

			public KomachiDisciplinedSe <>4__this;

			BattleAction IEnumerator<BattleAction>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnStatusEffectAdding>d__1(int <>1__state)
			{
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0035: Unknown result type (might be due to invalid IL or missing references)
				//IL_003a: Invalid comparison between I4 and Unknown
				int num = <>1__state;
				KomachiDisciplinedSe komachiDisciplinedSe = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					if (1 == (int)args.Effect.Type && !((GameEventArgs)args).IsCanceled)
					{
						((GameEventArgs)args).CancelBy((GameEntity)(object)komachiDisciplinedSe);
						((StatusEffect)komachiDisciplinedSe).NotifyActivating();
						<>2__current = (BattleAction)(object)PerformAction.Sfx("Amulet", 0f);
						<>1__state = 1;
						return true;
					}
					break;
				case 1:
					<>1__state = -1;
					<>2__current = (BattleAction)(object)PerformAction.SePop(((StatusEffect)komachiDisciplinedSe).Owner, ((GameEntity)args.Effect).Name);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					break;
				}
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}

			[DebuggerHidden]
			IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
			{
				<OnStatusEffectAdding>d__1 <OnStatusEffectAdding>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnStatusEffectAdding>d__ = this;
				}
				else
				{
					<OnStatusEffectAdding>d__ = new <OnStatusEffectAdding>d__1(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnStatusEffectAdding>d__.args = <>3__args;
				return <OnStatusEffectAdding>d__;
			}

			[DebuggerHidden]
			IEnumerator IEnumerable.GetEnumerator()
			{
				return ((IEnumerable<BattleAction>)this).GetEnumerator();
			}
		}

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<StatusEffectApplyEventArgs>(unit.StatusEffectAdding, (EventSequencedReactor<StatusEffectApplyEventArgs>)OnStatusEffectAdding);
		}

		[IteratorStateMachine(typeof(<OnStatusEffectAdding>d__1))]
		private IEnumerable<BattleAction> OnStatusEffectAdding(StatusEffectApplyEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnStatusEffectAdding>d__1(-2)
			{
				<>4__this = this,
				<>3__args = args
			};
		}
	}
	public sealed class KomachiDistanceSeDef : KomachiStatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("KomachiDistanceSe");
		}

		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig obj = base.MakeConfig();
			obj.Type = (StatusEffectType)0;
			obj.IsStackable = true;
			obj.HasLevel = true;
			obj.LevelStackType = (StackType)0;
			obj.Keywords = (Keyword)65536;
			obj.RelativeEffects = new List<string> { "FerriedKeyword" };
			obj.VFX = "BuffWhite";
			obj.SFX = "Buff";
			return obj;
		}
	}
	[EntityLogic(typeof(KomachiDistanceSeDef))]
	public sealed class KomachiDistanceSe : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <ReactToCardMove>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private CardZone dstZone;

			public CardZone <>3__dstZone;

			private ActionCause cause;

			public ActionCause <>3__cause;

			private CardZone srcZone;

			public CardZone <>3__srcZone;

			public KomachiDistanceSe <>4__this;

			BattleAction IEnumerator<BattleAction>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <ReactToCardMove>d__1(int <>1__state)
			{
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0020: Unknown result type (might be due to invalid IL or missing references)
				//IL_0025: Invalid comparison between I4 and Unknown
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_003a: Unknown result type (might be due to invalid IL or missing references)
				//IL_002a: Unknown result type (might be due to invalid IL or missing references)
				//IL_002f: Invalid comparison between I4 and Unknown
				//IL_005a: 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_006a: Expected O, but got Unknown
				int num = <>1__state;
				KomachiDistanceSe komachiDistanceSe = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					if (3 == (int)dstZone && 13 == (int)cause)
					{
						return false;
					}
					if (Helpers.IsFerryAction(srcZone, dstZone))
					{
						((StatusEffect)komachiDistanceSe).NotifyActivating();
						<>2__current = (BattleAction)new CastBlockShieldAction(((StatusEffect)komachiDistanceSe).Owner, new BlockInfo(((StatusEffect)komachiDistanceSe).Level, (BlockShieldType)2), true);
						<>1__state = 1;
						return true;
					}
					break;
				case 1:
					<>1__state = -1;
					break;
				}
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}

			[DebuggerHidden]
			IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_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_004f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0054: Unknown result type (might be due to invalid IL or missing references)
				<ReactToCardMove>d__1 <ReactToCardMove>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<ReactToCardMove>d__ = this;
				}
				else
				{
					<ReactToCardMove>d__ = new <ReactToCardMove>d__1(0)
					{
						<>4__this = <>4__this
					};
				}
				<ReactToCardMove>d__.cause = <>3__cause;
				<ReactToCardMove>d__.srcZone = <>3__srcZone;
				<ReactToCardMove>d__.dstZone = <>3__dstZone;
				return <ReactToCardMove>d__;
			}

			[DebuggerHidden]
			IEnumerator IEnumerable.GetEnumerator()
			{
				return ((IEnumerable<BattleAction>)this).GetEnumerator();
			}
		}

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<CardMovingEventArgs>(unit.Battle.CardMoved, (EventSequencedReactor<CardMovingEventArgs>)OnCardMoving);
			((StatusEffect)this).ReactOwnerEvent<CardMovingToDrawZoneEventArgs>(unit.Battle.CardMovedToDrawZone, (EventSequencedReactor<CardMovingToDrawZoneEventArgs>)OnCardMovingToDrawZone);
			((StatusEffect)this).ReactOwnerEvent<CardEventArgs>(unit.Battle.CardDiscarding, (EventSequencedReactor<CardEventArgs>)OnCardDiscarding);
			((StatusEffect)this).ReactOwnerEvent<CardEventArgs>(unit.Battle.CardExiling, (EventSequencedReactor<CardEventArgs>)OnCardExiling);
		}

		[IteratorStateMachine(typeof(<ReactToCardMove>d__1))]
		private IEnumerable<BattleAction> ReactToCardMove(Card c, ActionCause cause, CardZone srcZone, CardZone dstZone)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: 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)
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <ReactToCardMove>d__1(-2)
			{
				<>4__this = this,
				<>3__cause = cause,
				<>3__srcZone = srcZone,
				<>3__dstZone = dstZone
			};
		}

		private IEnumerable<BattleAction> OnCardMoving(CardMovingEventArgs args)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			return ReactToCardMove(args.Card, ((GameEventArgs)args).Cause, args.SourceZone, args.DestinationZone);
		}

		private IEnumerable<BattleAction> OnCardMovingToDrawZone(CardMovingToDrawZoneEventArgs args)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return ReactToCardMove(args.Card, ((GameEventArgs)args).Cause, args.SourceZone, (CardZone)1);
		}

		private IEnumerable<BattleAction> OnCardDiscarding(CardEventArgs args)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			return ReactToCardMove(args.Card, ((GameEventArgs)args).Cause, args.Card.Zone, (CardZone)3);
		}

		private IEnumerable<BattleAction> OnCardExiling(CardEventArgs args)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			return ReactToCardMove(args.Card, ((GameEventArgs)args).Cause, args.Card.Zone, (CardZone)4);
		}
	}
	public sealed class KomachiDoomsdayVisionsSeDef : KomachiStatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("KomachiDoomsdayVisionsSe");
		}

		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig obj = base.MakeConfig();
			obj.Type = (StatusEffectType)2;
			obj.VFX = "BuffBlack";
			obj.SFX = "Buff";
			return obj;
		}
	}
	[EntityLogic(typeof(KomachiDoomsdayVisionsSeDef))]
	public sealed class KomachiDoomsdayVisionsSe : ExtraTurnPartner
	{
		[CompilerGenerated]
		private sealed class <OnTurnEnded>d__3 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			public KomachiDoomsdayVisionsSe <>4__this;

			BattleAction IEnumerator<BattleAction>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnTurnEnded>d__3(int <>1__state)
			{
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_002e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0038: Expected O, but got Unknown
				int num = <>1__state;
				KomachiDoomsdayVisionsSe komachiDoomsdayVisionsSe = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					if (((ExtraTurnPartner)komachiDoomsdayVisionsSe).ThisTurnActivating)
					{
						<>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)komachiDoomsdayVisionsSe, true, 0.1f);
						<>1__state = 1;
						return true;
					}
					break;
				case 1:
					<>1__state = -1;
					break;
				}
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}

			[DebuggerHidden]
			IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
			{
				<OnTurnEnded>d__3 result;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					result = this;
				}
				else
				{
					result = new <OnTurnEnded>d__3(0)
					{
						<>4__this = <>4__this
					};
				}
				return result;
			}

			[DebuggerHidden]
			IEnumerator IEnumerable.GetEnumerator()
			{
				return ((IEnumerable<BattleAction>)this).GetEnumerator();
			}
		}

		protected override void OnAdded(Unit unit)
		{
			((ExtraTurnPartner)this).ThisTurnActivating = false;
			((StatusEffect)this).HandleOwnerEvent<CardEventArgs>(unit.Battle.Predraw, (GameEventHandler<CardEventArgs>)OnPredraw);
			((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(unit.TurnStarting, (GameEventHandler<UnitEventArgs>)OnTurnStarting);
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(unit.TurnEnded, (EventSequencedReactor<UnitEventArgs>)OnTurnEnded);
		}

		private void OnPredraw(CardEventArgs args)
		{
			if (((ExtraTurnPartner)this).ThisTurnActivating)
			{
				((StatusEffect)this).NotifyActivating();
				((GameEventArgs)args).CancelBy((GameEntity)(object)this);
			}
		}

		private void OnTurnStarting(UnitEventArgs args)
		{
			Unit unit = args.Unit;
			PlayerUnit val = (PlayerUnit)(object)((unit is PlayerUnit) ? unit : null);
			if (val != null && ((Unit)val).IsExtraTurn && !val.IsSuperExtraTurn && this == ((Unit)val).GetStatusEffectExtend<ExtraTurnPartner>())
			{
				((ExtraTurnPartner)this).ThisTurnActivating = true;
				((StatusEffect)this).Highlight = true;
			}
		}

		[IteratorStateMachine(typeof(<OnTurnEnded>d__3))]
		private IEnumerable<BattleAction> OnTurnEnded(UnitEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnTurnEnded>d__3(-2)
			{
				<>4__this = this
			};
		}
	}
	public sealed class KomachiEtherealBarrierSeDef : StatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("KomachiEtherealBarrierSe");
		}

		public override StatusEffectConfig MakeConfig()
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Expected O, but got Unknown
			return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)3, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (string)null, "BuffBlack", "Default", "Buff");
		}

		public override Sprite LoadSprite()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".png", (IResourceSource)(object)BepinexPlugin.DirectoryAssets, (Rect?)null, 1, (Vector2?)null);
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.SELoc.AddEntity((EntityDefinition)(object)this);
		}
	}
	[EntityLogic(typeof(KomachiEtherealBarrierSeDef))]
	public sealed class KomachiEtherealBarrierSe : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnCardUsed>d__8 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private CardUsingEventArgs args;

			public CardUsingEventArgs <>3__args;

			public KomachiEtherealBarrierSe <>4__this;

			BattleAction IEnumerator<BattleAction>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnCardUsed>d__8(int <>1__state)
			{
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_002a: Unknown result type (might be due to invalid IL or missing references)
				//IL_002f: Invalid comparison between I4 and Unknown
				//IL_004d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0057: Expected O, but got Unknown
				int num = <>1__state;
				KomachiEtherealBarrierSe komachiEtherealBarrierSe = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					if (1 == (int)args.Card.CardType)
					{
						int num3 = (((StatusEffect)komachiEtherealBarrierSe).Level = ((StatusEffect)komachiEtherealBarrierSe).Level - 1);
						if (0 >= num3)
						{
							<>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)komachiEtherealBarrierSe, true, 0.1f);
							<>1__state = 1;
							return true;
						}
					}
					break;
				case 1:
					<>1__state = -1;
					break;
				}
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}

			[DebuggerHidden]
			IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
			{
				<OnCardUsed>d__8 <OnCardUsed>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnCardUsed>d__ = this;
				}
				else
				{
					<OnCardUsed>d__ = new <OnCardUsed>d__8(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnCardUsed>d__.args = <>3__args;
				return <OnCardUsed>d__;
			}

			[DebuggerHidden]
			IEnumerator IEnumerable.GetEnumerator()
			{
				return ((IEnumerable<BattleAction>)this).GetEnumerator();
			}
		}

		public ManaGroup Mana => ManaGroup.Anys(1);

		protected override void OnAdded(Unit unit)
		{
			ReduceAttackCost(unit.Battle.EnumerateAllCards());
			((StatusEffect)this).HandleOwnerEvent<CardsEventArgs>(unit.Battle.CardsAddedToDiscard, (GameEventHandler<CardsEventArgs>)OnCardsAdded);
			((StatusEffect)this).HandleOwnerEvent<CardsAddingToDrawZoneEventArgs>(unit.Battle.CardsAddedToDrawZone, (GameEventHandler<CardsAddingToDrawZoneEventArgs>)OnCardsAddedToDrawZone);
			((StatusEffect)this).HandleOwnerEvent<CardsEventArgs>(unit.Battle.CardsAddedToExile, (GameEventHandler<CardsEventArgs>)OnCardsAdded);
			((StatusEffect)this).HandleOwnerEvent<CardsEventArgs>(unit.Battle.CardsAddedToHand, (GameEventHandler<CardsEventArgs>)OnCardsAdded);
			((StatusEffect)this).HandleOwnerEvent<CardTransformEventArgs>(unit.Battle.CardTransformed, (GameEventHandler<CardTransformEventArgs>)OnCardTransformed);
			((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(unit.Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed);
		}

		protected override void OnRemoved(Unit unit)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Invalid comparison between I4 and Unknown
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			foreach (Card item in ((StatusEffect)this).Battle.EnumerateAllCards())
			{
				if (1 == (int)item.CardType)
				{
					item.AuraCost += Mana;
				}
			}
		}

		private void OnCardsAdded(CardsEventArgs args)
		{
			ReduceAttackCost(args.Cards);
		}

		private void OnCardsAddedToDrawZone(CardsAddingToDrawZoneEventArgs args)
		{
			ReduceAttackCost(args.Cards);
		}

		private void ReduceAttackCost(IEnumerable<Card> cards)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Invalid comparison between I4 and Unknown
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			foreach (Card card in cards)
			{
				if (1 == (int)card.CardType)
				{
					card.AuraCost -= Mana;
				}
			}
		}

		private void OnCardTransformed(CardTransformEventArgs args)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Invalid comparison between I4 and Unknown
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			if (1 == (int)args.DestinationCard.CardType && 0 < ((StatusEffect)this).Level)
			{
				Card destinationCard = args.DestinationCard;
				destinationCard.AuraCost -= Mana;
			}
		}

		[IteratorStateMachine(typeof(<OnCardUsed>d__8))]
		private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnCardUsed>d__8(-2)
			{
				<>4__this = this,
				<>3__args = args
			};
		}
	}
	public sealed class KomachiFerrymanSeDef : KomachiStatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("KomachiFerrymanSe");
		}

		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig obj = base.MakeConfig();
			obj.Type = (StatusEffectType)0;
			obj.HasLevel = true;
			obj.IsStackable = true;
			obj.LevelStackType = (StackType)0;
			obj.RelativeEffects = new List<string> { "ShortcutKeyword" };
			obj.VFX = "BuffWhite";
			obj.SFX = "Buff";
			return obj;
		}
	}
	[EntityLogic(typeof(KomachiFerrymanSeDef))]
	public sealed class KomachiFerrymanSe : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnTurnEnded>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			public KomachiFerrymanSe <>4__this;

			private SelectCardInteraction <int>5__2;

			BattleAction IEnumerator<BattleAction>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnTurnEnded>d__1(int <>1__state)
			{
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<int>5__2 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0058: Unknown result type (might be due to invalid IL or missing references)
				//IL_0062: Expected O, but got Unknown
				int num = <>1__state;
				KomachiFerrymanSe komachiFerrymanSe = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					if (((StatusEffect)komachiFerrymanSe).Battle.BattleShouldEnd)
					{
						return false;
					}
					<int>5__2 = ((StatusEffect)komachiFerrymanSe).Battle.ShortcutInteraction(((StatusEffect)komachiFerrymanSe).Level, (GameEntity)(object)komachiFerrymanSe);
					<>2__current = (BattleAction)new InteractionAction((Interaction)(object)<int>5__2, false);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = (BattleAction)(object)new ShortcutAction(<int>5__2.SelectedCards);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}

			[DebuggerHidden]
			IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
			{
				<OnTurnEnded>d__1 result;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					result = this;
				}
				else
				{
					result = new <OnTurnEnded>d__1(0)
					{
						<>4__this = <>4__this
					};
				}
				return result;
			}

			[DebuggerHidden]
			IEnumerator IEnumerable.GetEnumerator()
			{
				return ((IEnumerable<BattleAction>)this).GetEnumerator();
			}
		}

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(unit.TurnEnded, (EventSequencedReactor<UnitEventArgs>)OnTurnEnded);
		}

		[IteratorStateMachine(typeof(<OnTurnEnded>d__1))]
		private IEnumerable<BattleAction> OnTurnEnded(UnitEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnTurnEnded>d__1(-2)
			{
				<>4__this = this
			};
		}
	}
	public sealed class KomachiIcePrisonSeDef : KomachiStatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("KomachiIcePrisonSe");
		}

		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig obj = base.MakeConfig();
			obj.Type = (StatusEffectType)0;
			obj.Order = 9999;
			obj.HasLevel = true;
			obj.HasCount = true;
			obj.IsStackable = true;
			obj.LevelStackType = (StackType)0;
			obj.CountStackType = (StackType)0;
			obj.RelativeEffects = new List<string> { "Cold" };
			obj.VFX = "BuffBlue";
			obj.SFX = "Buff";
			return obj;
		}
	}
	[EntityLogic(typeof(KomachiIcePrisonSeDef))]
	public sealed class KomachiIcePrisonSe : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <InstakillCheck>d__2 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private Unit target;

			public Unit <>3__target;

			public KomachiIcePrisonSe <>4__this;

			BattleAction IEnumerator<BattleAction>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <InstakillCheck>d__2(int <>1__state)
			{
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d9: Expected O, but got Unknown
				int num = <>1__state;
				KomachiIcePrisonSe komachiIcePrisonSe = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					if (target.IsAlive && !target.IsDying && target.StatusEffects.Where((StatusEffect se) => 1 == (int)se.Type).Count() * ((StatusEffect)komachiIcePrisonSe).Count >= target.Hp)
					{
						<>2__current = (BattleAction)(object)PerformAction.Gun(((StatusEffect)komachiIcePrisonSe).Owner, target, "Cold2", 0f);
						<>1__state = 1;
						return true;
					}
					break;
				case 1:
					<>1__state = -1;
					<>2__current = (BattleAction)new ForceKillAction(((StatusEffect)komachiIcePrisonSe).Owner, target);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					break;
				}
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}

			[DebuggerHidden]
			IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
			{
				<InstakillCheck>d__2 <InstakillCheck>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<InstakillCheck>d__ = this;
				}
				else
				{
					<InstakillCheck>d__ = new <InstakillCheck>d__2(0)
					{
						<>4__this = <>4__this
					};
				}
				<InstakillCheck>d__.target = <>3__target;
				return <InstakillCheck>d__;
			}

			[DebuggerHidden]
			IEnumerator IEnumerable.GetEnumerator()
			{
				return ((IEnumerable<BattleAction>)this).GetEnumerator();
			}
		}

		[CompilerGenerated]
		private sealed class <OnTurnStarted>d__5 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			public KomachiIcePrisonSe <>4__this;

			private IEnumerator<BattleAction> <>7__wrap1;

			BattleAction IEnumerator<BattleAction>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnTurnStarted>d__5(int <>1__state)
			{
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				int num = <>1__state;
				if (num == -3 || num == 1)
				{
					try
					{
					}
					finally
					{
						<>m__Finally1();
					}
				}
				<>7__wrap1 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				try
				{
					int num = <>1__state;
					KomachiIcePrisonSe komachiIcePrisonSe = <>4__this;
					switch (num)
					{
					default:
						return false;
					case 0:
						<>1__state = -1;
						<>7__wrap1 = ((StatusEffect)komachiIcePrisonSe).DebuffAction<Cold>((IEnumerable<Unit>)((StatusEffect)komachiIcePrisonSe).Battle.AllAliveEnemies, 0, 0, 0, 0, true, 0.2f).GetEnumerator();
						<>1__state = -3;
						break;
					case 1:
						<>1__state = -3;
						break;
					}
					if (<>7__wrap1.MoveNext())
					{
						BattleAction current = <>7__wrap1.Current;
						<>2__current = current;
						<>1__state = 1;
						return true;
					}
					<>m__Finally1();
					<>7__wrap1 = null;
					return false;
				}
				catch
				{
					//try-fault
					((IDisposable)this).Dispose();
					throw;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			private void <>m__Finally1()
			{
				<>1__state = -1;
				if (<>7__wrap1 != null)
				{
					<>7__wrap1.Dispose();
				}
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}

			[DebuggerHidden]
			IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
			{
				<OnTurnStarted>d__5 result;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					result = this;
				}
				else
				{
					result = new <OnTurnStarted>d__5(0)
					{
						<>4__this = <>4__this
					};
				}
				return result;
			}

			[DebuggerHidden]
			IEnumerator IEnumerable.GetEnumerator()
			{
				return ((IEnumerable<BattleAction>)this).GetEnumerator();
			}
		}

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(unit.Battle.EnemySpawned, (GameEventHandler<UnitEventArgs>)OnEnemySpawned);
			foreach (EnemyUnit allAliveEnemy in unit.Battle.AllAliveEnemies)
			{
				((StatusEffect)this).ReactOwnerEvent<DamageEventArgs>(((Unit)allAliveEnemy).DamageReceived, (EventSequencedReactor<DamageEventArgs>)OnEnemyDamageReceived);
				((StatusEffect)this).ReactOwnerEvent<StatusEffectApplyEventArgs>(((Unit)allAliveEnemy).StatusEffectAdded, (EventSequencedReactor<StatusEffectApplyEventArgs>)OnEnemyDebuffed);
			}
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(unit.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnTurnStarted);
		}

		private void OnEnemySpawned(UnitEventArgs args)
		{
			((StatusEffect)this).ReactOwnerEvent<DamageEventArgs>(args.Unit.DamageReceived, (EventSequencedReactor<DamageEventArgs>)OnEnemyDamageReceived);
			((StatusEffect)this).ReactOwnerEvent<StatusEffectApplyEventArgs>(args.Unit.StatusEffectAdded, (EventSequencedReactor<StatusEffectApplyEventArgs>)OnEnemyDebuffed);
		}

		[IteratorStateMachine(typeof(<InstakillCheck>d__2))]
		private IEnumerable<BattleAction> InstakillCheck(Unit target)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <InstakillCheck>d__2(-2)
			{
				<>4__this = this,
				<>3__target = target
			};
		}

		private IEnumerable<BattleAction> OnEnemyDamageReceived(DamageEventArgs args)
		{
			return InstakillCheck(args.Target);
		}

		private IEnumerable<BattleAction> OnEnemyDebuffed(StatusEffectApplyEventArgs args)
		{
			return InstakillCheck(args.Unit);
		}

		[IteratorStateMachine(typeof(<OnTurnStarted>d__5))]
		private IEnumerable<BattleAction> OnTurnStarted(UnitEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnTurnStarted>d__5(-2)
			{
				<>4__this = this
			};
		}
	}
	public sealed class KomachiIdealsSeDef : KomachiStatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("KomachiIdealsSe");
		}

		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig obj = base.MakeConfig();
			obj.Type = (StatusEffectType)0;
			obj.HasLevel = true;
			obj.IsStackable = true;
			obj.LevelStackType = (StackType)0;
			obj.Keywords = (Keyword)8704;
			obj.VFX = "BuffWhite";
			obj.SFX = "Buff";
			return obj;
		}
	}
	[EntityLogic(typeof(KomachiIdealsSeDef))]
	public sealed class KomachiIdealsSe : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <Trigger>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			public KomachiIdealsSe <>4__this;

			private int <upgradedCount>5__2;

			BattleAction IEnumerator<BattleAction>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <Trigger>d__1(int <>1__state)
			{
				this.<>1__state = <>1__state;
				<>l__initialThreadId = Environment.CurrentManagedThreadId;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_00df: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ef: Expected O, but got Unknown
				//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b1: Expected O, but got Unknown
				int num = <>1__state;
				KomachiIdealsSe komachiIdealsSe = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
				{
					<>1__state = -1;
					ILookup<bool, Card> lookup = ((StatusEffect)komachiIdealsSe).Battle.HandZone.Where((Card c) => c.Config.IsUpgradable).ToLookup((Card c) => c.CanUpgrade);
					List<Card> list = lookup[true].ToList();
					<upgradedCount>5__2 = lookup[false].Count();
					if (0 < list.Count)
					{
						<>2__current = (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)list);
						<>1__state = 1;
						return true;
					}