Decompiled source of KijinSeija v0.0.7

KijinSeijaMod_windows.dll

Decompiled a week ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using Cysharp.Threading.Tasks;
using HarmonyLib;
using KijinSeijaMod.BattleActions;
using KijinSeijaMod.Cards;
using KijinSeijaMod.Cards.Template;
using KijinSeijaMod.Config;
using KijinSeijaMod.Enemies;
using KijinSeijaMod.Enemies.Template;
using KijinSeijaMod.GunName;
using KijinSeijaMod.ImageLoader;
using KijinSeijaMod.Localization;
using KijinSeijaMod.Patches;
using KijinSeijaMod.StatusEffects;
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.Dialogs;
using LBoL.Core.Intentions;
using LBoL.Core.Randoms;
using LBoL.Core.Stations;
using LBoL.Core.StatusEffects;
using LBoL.Core.Units;
using LBoL.EntityLib.Cards;
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.Koishi;
using LBoL.EntityLib.StatusEffects.Neutral.Black;
using LBoL.EntityLib.StatusEffects.Neutral.TwoColor;
using LBoL.EntityLib.StatusEffects.Others;
using LBoL.EntityLib.StatusEffects.Sakuya;
using LBoL.Presentation;
using LBoL.Presentation.UI.Widgets;
using LBoL.Presentation.Units;
using LBoLEntitySideloader;
using LBoLEntitySideloader.Attributes;
using LBoLEntitySideloader.Entities;
using LBoLEntitySideloader.Resource;
using LBoLEntitySideloader.Utils;
using Microsoft.CodeAnalysis;
using TMPro;
using UnityEngine;
using UnityEngine.Experimental.Rendering;
using UnityEngine.UI;
using YamlDotNet.Serialization;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = "")]
[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("KijinSeijaMod_windows")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("KijinSeijaMod_windows")]
[assembly: AssemblyTitle("KijinSeijaMod_windows")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace KijinSeijaMod
{
	[BepInPlugin("author.game.typeofmod.KijinSeija", "KijinSeijaMod", "0.0.7")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInProcess("LBoL.exe")]
	public class BepinexPlugin : BaseUnityPlugin
	{
		public static string modUniqueID = "KijinSeijaMod";

		public static string playerName = "KijinSeija";

		public static bool useInGameModel = false;

		public static string modelName = "KijinSeija";

		public static bool modelIsFlipped = true;

		public static List<ManaColor> offColors = new List<ManaColor> { (ManaColor)6 };

		public static ConfigEntry<bool> enableAct1Boss;

		public static CustomConfigEntry<bool> enableAct1BossEntry = new CustomConfigEntry<bool>(value: false, "EnableAct1Boss", "EnableAct1Boss", "Toggle the Act 1 boss. Default: Off");

		private static readonly Harmony harmony = PInfo.harmony;

		internal static ManualLogSource log;

		internal static BatchLocalization unitModelLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(UnitModelTemplate), false);

		internal static TemplateSequenceTable sequenceTable = new TemplateSequenceTable(0);

		internal static BatchLocalization exhibitLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(ExhibitTemplate), false);

		internal static IResourceSource embeddedSource = (IResourceSource)new EmbeddedSource(Assembly.GetExecutingAssembly());

		internal static DirectorySource directorySource = new DirectorySource("author.game.typeofmod.KijinSeija", "");

		public static ConfigEntry<string> KijinSeijaRecords;

		private static object KijinSeija()
		{
			throw new NotImplementedException();
		}

		private void Awake()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			Harmony val = new Harmony(modUniqueID);
			val.PatchAll();
			log = ((BaseUnityPlugin)this).Logger;
			enableAct1Boss = ((BaseUnityPlugin)this).Config.Bind<bool>(enableAct1BossEntry.Section, enableAct1BossEntry.Key, enableAct1BossEntry.Value, enableAct1BossEntry.Description);
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
			CardIndexGenerator.PromiseClearIndexSet();
			EntityManager.RegisterSelf();
			KijinSeijaRecords = ((BaseUnityPlugin)this).Config.Bind<string>("Records", "Records", "", "May cause an error if edited manually.");
			Func<Sprite> func = () => ResourceLoader.LoadSprite("BossIcon.png", (IResourceSource)(object)directorySource, (Rect?)null, 1, (Vector2?)null);
			EnemyUnitTemplate.AddBossNodeIcon("KijinSeijaSagume", func, (Assembly)null);
		}

		private void OnDestroy()
		{
			if (harmony != null)
			{
				harmony.UnpatchSelf();
			}
		}
	}
	public static class PInfo
	{
		public const string GUID = "author.game.typeofmod.KijinSeija";

		public const string Name = "KijinSeijaMod";

		public const string version = "0.0.7";

		public static readonly Harmony harmony = new Harmony("author.game.typeofmod.KijinSeija");
	}
	public class KijinSeijaLoadouts
	{
		public static string UltimateSkillA = "KijinSeijaUltA";

		public static string UltimateSkillB = "KijinSeijaUltB";

		public static string ExhibitA = "KijinSeijaExhibitA";

		public static string ExhibitB = "KijinSeijaExhibitB";

		public static List<string> DeckA = new List<string>
		{
			"Shoot", "Shoot", "Boundary", "Boundary", "KijinSeijaAttackR", "KijinSeijaAttackR", "KijinSeijaBlockU", "KijinSeijaBlockU", "KijinSeijaAccurateAttack", "KijinSeijaEscape",
			"Zhukeling"
		};

		public static List<string> DeckB = new List<string>
		{
			"Shoot", "Shoot", "Boundary", "Boundary", "KijinSeijaAttackW", "KijinSeijaAttackW", "KijinSeijaBlockB", "KijinSeijaBlockB", "KijinSeijaGraze", "KijinSeijaEscape",
			"Zhukeling"
		};

		public static PlayerUnitConfig playerUnitConfig;

		static KijinSeijaLoadouts()
		{
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Expected O, but got Unknown
			string modUniqueID = BepinexPlugin.modUniqueID;
			int? num = 10;
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).White = 0;
			((ManaGroup)(ref val)).Blue = 0;
			((ManaGroup)(ref val)).Black = 1;
			((ManaGroup)(ref val)).Red = 1;
			((ManaGroup)(ref val)).Green = 0;
			((ManaGroup)(ref val)).Colorless = 2;
			((ManaGroup)(ref val)).Philosophy = 0;
			ManaGroup val2 = val;
			playerUnitConfig = new PlayerUnitConfig(modUniqueID, true, "", 0, 8, num, true, (int?)null, (ManaColor)7, (ManaColor)6, val2, "#ff0000ff", 24, 999, 99, UltimateSkillA, UltimateSkillB, ExhibitA, ExhibitB, (IReadOnlyList<string>)DeckA, (IReadOnlyList<string>)DeckB, 3, 2);
		}
	}
	public sealed class KijinSeijaModDef : PlayerUnitTemplate
	{
		[EntityLogic(typeof(KijinSeijaModDef))]
		public sealed class KijinSeijaMod : PlayerUnit
		{
			public class KijinSeijaTextForcer : MonoBehaviour
			{
				public string adventureId = "Debut";

				private void Update()
				{
					if (!SeijaRunTracker.IsSeijaRun)
					{
						return;
					}
					if (!CustomEventTextManager.IsLoaded)
					{
						CustomEventTextManager.LoadAllCustomYamls();
					}
					string value = null;
					string value2 = null;
					string text = null;
					string text2 = null;
					foreach (Dictionary<string, string> value5 in CustomEventTextManager.MasterTextDict.Values)
					{
						if (value5.TryGetValue("TargetTitle_" + adventureId, out var value3))
						{
							text = value3;
							value5.TryGetValue("Title_" + adventureId, out value);
						}
						if (value5.TryGetValue("TargetNPC_" + adventureId, out var value4))
						{
							text2 = value4;
							if (!value5.TryGetValue("NPC_" + adventureId, out value2))
							{
								value5.TryGetValue("HostName_" + adventureId, out value2);
							}
						}
					}
					string text3 = text?.Trim();
					string text4 = text2?.Trim();
					string text5 = value?.Trim();
					string text6 = value2?.Trim();
					TextMeshProUGUI[] array = Object.FindObjectsOfType<TextMeshProUGUI>();
					foreach (TextMeshProUGUI val in array)
					{
						if (!string.IsNullOrEmpty(text3) && !string.IsNullOrEmpty(text5) && ((TMP_Text)val).text.Contains(text3))
						{
							((TMP_Text)val).text = ((TMP_Text)val).text.Replace(text3, text5);
						}
						if (!string.IsNullOrEmpty(text4) && !string.IsNullOrEmpty(text6) && ((TMP_Text)val).text.Contains(text4))
						{
							((TMP_Text)val).text = ((TMP_Text)val).text.Replace(text4, text6);
						}
					}
				}
			}

			[HarmonyPatch(typeof(GameRunController), "EnterMapNode")]
			public class EnterMapNode_Patch
			{
				[CompilerGenerated]
				private sealed class <LoopShopDialogue>d__1 : IEnumerator<object>, IDisposable, IEnumerator
				{
					private int <>1__state;

					private object <>2__current;

					public UnitView boss;

					public UnitView player;

					public KijinSeijaMod mod;

					public int currentLevel;

					public int nodeX;

					private bool <isFinalAct>5__1;

					private bool <isFirstEncounter>5__2;

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

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

					[DebuggerHidden]
					public <LoopShopDialogue>d__1(int <>1__state)
					{
						this.<>1__state = <>1__state;
					}

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

					private bool MoveNext()
					{
						//IL_0097: Unknown result type (might be due to invalid IL or missing references)
						//IL_00a1: Expected O, but got Unknown
						//IL_015f: Unknown result type (might be due to invalid IL or missing references)
						//IL_0169: Expected O, but got Unknown
						//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
						//IL_01ab: Expected O, but got Unknown
						//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
						//IL_01ed: Expected O, but got Unknown
						//IL_0225: Unknown result type (might be due to invalid IL or missing references)
						//IL_022f: Expected O, but got Unknown
						//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
						//IL_02c7: Expected O, but got Unknown
						//IL_02ff: Unknown result type (might be due to invalid IL or missing references)
						//IL_0309: Expected O, but got Unknown
						//IL_0342: Unknown result type (might be due to invalid IL or missing references)
						//IL_034c: Expected O, but got Unknown
						//IL_0385: Unknown result type (might be due to invalid IL or missing references)
						//IL_038f: Expected O, but got Unknown
						//IL_03c8: Unknown result type (might be due to invalid IL or missing references)
						//IL_03d2: Expected O, but got Unknown
						//IL_040b: Unknown result type (might be due to invalid IL or missing references)
						//IL_0415: Expected O, but got Unknown
						//IL_011d: Unknown result type (might be due to invalid IL or missing references)
						//IL_0127: Expected O, but got Unknown
						//IL_027b: Unknown result type (might be due to invalid IL or missing references)
						//IL_0285: Expected O, but got Unknown
						switch (<>1__state)
						{
						default:
							return false;
						case 0:
							<>1__state = -1;
							<>2__current = (object)new WaitForSeconds(4.5f);
							<>1__state = 1;
							return true;
						case 1:
							<>1__state = -1;
							<isFinalAct>5__1 = currentLevel == 4 && nodeX == 1;
							<isFirstEncounter>5__2 = currentLevel == 1 && nodeX == 1;
							if (<isFinalAct>5__1)
							{
								boss.Chat(mod.shop6, 3f, (CloudType)2, 0f);
								<>2__current = (object)new WaitForSeconds(3.5f);
								<>1__state = 2;
								return true;
							}
							if (<isFirstEncounter>5__2)
							{
								player.Chat(mod.shop1, 3f, (CloudType)2, 0f);
								<>2__current = (object)new WaitForSeconds(3.5f);
								<>1__state = 7;
								return true;
							}
							break;
						case 2:
							<>1__state = -1;
							player.Chat(mod.shop7, 3f, (CloudType)2, 0f);
							<>2__current = (object)new WaitForSeconds(3.5f);
							<>1__state = 3;
							return true;
						case 3:
							<>1__state = -1;
							player.Chat(mod.shop8, 3f, (CloudType)2, 0f);
							<>2__current = (object)new WaitForSeconds(3.5f);
							<>1__state = 4;
							return true;
						case 4:
							<>1__state = -1;
							boss.Chat(mod.shop9, 3f, (CloudType)2, 0f);
							<>2__current = (object)new WaitForSeconds(3.5f);
							<>1__state = 5;
							return true;
						case 5:
							<>1__state = -1;
							boss.Chat(mod.shop10, 3f, (CloudType)2, 0f);
							<>2__current = (object)new WaitForSeconds(3.5f);
							<>1__state = 6;
							return true;
						case 6:
							<>1__state = -1;
							break;
						case 7:
							<>1__state = -1;
							boss.Chat(mod.shop2, 3f, (CloudType)2, 0f);
							<>2__current = (object)new WaitForSeconds(3.5f);
							<>1__state = 8;
							return true;
						case 8:
							<>1__state = -1;
							player.Chat(mod.shop3, 3f, (CloudType)2, 0f);
							<>2__current = (object)new WaitForSeconds(3.5f);
							<>1__state = 9;
							return true;
						case 9:
							<>1__state = -1;
							boss.Chat(mod.shop4, 3f, (CloudType)2, 0f);
							<>2__current = (object)new WaitForSeconds(3.5f);
							<>1__state = 10;
							return true;
						case 10:
							<>1__state = -1;
							boss.Chat(mod.shop45, 3f, (CloudType)2, 0f);
							<>2__current = (object)new WaitForSeconds(3.5f);
							<>1__state = 11;
							return true;
						case 11:
							<>1__state = -1;
							player.Chat(mod.shop5, 3f, (CloudType)2, 0f);
							<>2__current = (object)new WaitForSeconds(3.5f);
							<>1__state = 12;
							return true;
						case 12:
							<>1__state = -1;
							boss.Chat(mod.shop52, 3f, (CloudType)2, 0f);
							<>2__current = (object)new WaitForSeconds(3.5f);
							<>1__state = 13;
							return true;
						case 13:
							<>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();
					}
				}

				[Obsolete]
				private static void Prefix(GameRunController __instance, MapNode node)
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0008: Invalid comparison between Unknown and I4
					//IL_0099: Unknown result type (might be due to invalid IL or missing references)
					//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
					if ((int)node.StationType != 5)
					{
						return;
					}
					UnitView val = null;
					UnitView[] array = Object.FindObjectsOfType<UnitView>();
					UnitView[] array2 = array;
					foreach (UnitView val2 in array2)
					{
						if (val2.Unit == __instance.Player)
						{
							val = val2;
							break;
						}
					}
					if ((Object)(object)val != (Object)null && __instance.Player is KijinSeijaMod mod)
					{
						GameObject val3 = Object.Instantiate<GameObject>(((Component)val).gameObject);
						val3.transform.position = ((Component)val).transform.position + new Vector3(6.6f, 0.6f, 0f);
						Renderer[] componentsInChildren = val3.GetComponentsInChildren<Renderer>();
						foreach (Renderer val4 in componentsInChildren)
						{
							val4.enabled = false;
						}
						UnitView component = val3.GetComponent<UnitView>();
						if ((Object)(object)component != (Object)null)
						{
							((MonoBehaviour)component).StartCoroutine(LoopShopDialogue(component, val, mod, __instance.CurrentStage.Level, node.X));
						}
						Object.Destroy((Object)(object)val3, 30f);
					}
				}

				[IteratorStateMachine(typeof(<LoopShopDialogue>d__1))]
				private static IEnumerator LoopShopDialogue(UnitView boss, UnitView player, KijinSeijaMod mod, int currentLevel, int nodeX)
				{
					//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
					return new <LoopShopDialogue>d__1(0)
					{
						boss = boss,
						player = player,
						mod = mod,
						currentLevel = currentLevel,
						nodeX = nodeX
					};
				}
			}

			public bool DialogueTriggered = false;

			private float Multiplier => 0.8f;

			public string shop1 => ((GameEntity)this).LocalizeProperty("shop1", false, true);

			public string shop2 => ((GameEntity)this).LocalizeProperty("shop2", false, true);

			public string shop3 => ((GameEntity)this).LocalizeProperty("shop3", false, true);

			public string shop4 => ((GameEntity)this).LocalizeProperty("shop4", false, true);

			public string shop45 => ((GameEntity)this).LocalizeProperty("shop45", false, true);

			public string shop5 => ((GameEntity)this).LocalizeProperty("shop5", false, true);

			public string shop52 => ((GameEntity)this).LocalizeProperty("shop52", false, true);

			public string shop6 => ((GameEntity)this).LocalizeProperty("shop6", false, true);

			public string shop7 => ((GameEntity)this).LocalizeProperty("shop7", false, true);

			public string shop8 => ((GameEntity)this).LocalizeProperty("shop8", false, true);

			public string shop9 => ((GameEntity)this).LocalizeProperty("shop9", false, true);

			public string shop10 => ((GameEntity)this).LocalizeProperty("shop10", false, true);

			public string FJ1 => ((GameEntity)this).LocalizeProperty("FJ1", false, true);

			public bool Blackout { get; private set; }

			public string LocShortcut(string key, bool decorated, bool required)
			{
				return ((GameEntity)this).LocalizeProperty(key, decorated, required);
			}

			protected override void OnEnterGameRun(GameRunController gameRun)
			{
				//IL_0055: Unknown result type (might be due to invalid IL or missing references)
				//IL_005f: Expected O, but got Unknown
				//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
				//IL_0106: Unknown result type (might be due to invalid IL or missing references)
				//IL_015b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0161: Expected O, but got Unknown
				GameRunController gameRun2 = ((GameEntity)this).GameRun;
				gameRun2.ShopPriceMultiplier *= Multiplier;
				((GameEntity)this).GameRun.TrueEndingProviders.Add((GameEntity)(object)this);
				bool flag = gameRun.CurrentMap == null;
				GameObject shinObj = new GameObject("Shinmyoumaru_Debut");
				Object.DontDestroyOnLoad((Object)(object)shinObj);
				if (flag)
				{
					SpriteRenderer val = shinObj.AddComponent<SpriteRenderer>();
					val.sprite = ResourceLoader.LoadSprite("KijinSeijaShinmyoumaru.png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 84, (Vector2?)null);
					((Renderer)val).sortingLayerName = "Default";
					((Renderer)val).sortingOrder = 50;
					shinObj.transform.position = new Vector3(5.4f, 0f, 0f);
					shinObj.transform.localScale = new Vector3(-1f, 1f, 1f);
				}
				else
				{
					Debug.Log((object)"不是全新开局");
				}
				KijinSeijaTextForcer kijinSeijaTextForcer = shinObj.AddComponent<KijinSeijaTextForcer>();
				kijinSeijaTextForcer.adventureId = "Debut";
				((Unit)this).HandleGameRunEvent<StationEventArgs>(((GameEntity)this).GameRun.StationFinished, (GameEventHandler<StationEventArgs>)delegate
				{
					if ((Object)(object)shinObj != (Object)null)
					{
						Object.Destroy((Object)(object)shinObj);
					}
				});
				GameObject val2 = new GameObject("ShinDebutHandler");
				Object.DontDestroyOnLoad((Object)(object)val2);
				ShinmyoumaruDebutHandler shinmyoumaruDebutHandler = val2.AddComponent<ShinmyoumaruDebutHandler>();
				shinmyoumaruDebutHandler.gameRun = gameRun;
				((Unit)this).HandleGameRunEvent<StationEventArgs>(((GameEntity)this).GameRun.StationEntered, (GameEventHandler<StationEventArgs>)delegate(StationEventArgs args)
				{
					//IL_0007: Unknown result type (might be due to invalid IL or missing references)
					//IL_000d: Invalid comparison between Unknown and I4
					if ((int)args.Station.Type == 4)
					{
						((GameEntity)this).GameRun.LoseMoney(200);
					}
					if (gameRun.CurrentStage.Level == 1)
					{
						GameMap currentMap = gameRun.CurrentMap;
						if (currentMap != null)
						{
							int num = 1;
							for (int i = 0; i < currentMap.Width; i++)
							{
								MapNode val3 = currentMap.Nodes[num, i];
								if (val3 != null)
								{
									val3.StationType = (StationType)5;
								}
							}
						}
					}
				});
			}

			protected override void OnEnterBattle(BattleController battle)
			{
				DialogueTriggered = false;
			}
		}

		public UniTask<Sprite>? LoadSpellPortraitAsync { get; private set; }

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit(BepinexPlugin.modUniqueID);
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)KijinSeijaLocalization.PlayerUnitBatchLoc.AddEntity((EntityDefinition)(object)this);
		}

		public override PlayerImages LoadPlayerImages()
		{
			return KijinSeijaImageLoader.LoadPlayerImages(BepinexPlugin.playerName);
		}

		public override PlayerUnitConfig MakeConfig()
		{
			return KijinSeijaLoadouts.playerUnitConfig;
		}
	}
}
namespace KijinSeijaMod.KijinSeijaUlt
{
	public sealed class KijinSeijaUltADef : KijinSeijaUltTemplate
	{
		public override UltimateSkillConfig MakeConfig()
		{
			UltimateSkillConfig defaulUltConfig = GetDefaulUltConfig();
			defaulUltConfig.Damage = 30;
			defaulUltConfig.PowerCost = 100;
			return defaulUltConfig;
		}
	}
	[EntityLogic(typeof(KijinSeijaUltADef))]
	public sealed class KijinSeijaUltA : UltimateSkill
	{
		[CompilerGenerated]
		private sealed class <Actions>d__6 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private UnitSelector selector;

			public UnitSelector <>3__selector;

			public KijinSeijaUltA <>4__this;

			private EnemyUnit <enemy>5__1;

			private PlayerUnit <player>5__2;

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

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

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

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

			private bool MoveNext()
			{
				//IL_0104: Unknown result type (might be due to invalid IL or missing references)
				//IL_0116: Unknown result type (might be due to invalid IL or missing references)
				//IL_0120: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<enemy>5__1 = selector.GetEnemy(((UltimateSkill)<>4__this).Battle);
					<player>5__2 = ((UltimateSkill)<>4__this).Battle.Player;
					<>2__current = (BattleAction)(object)PerformAction.Spell((Unit)(object)((UltimateSkill)<>4__this).Battle.Player, "逆转攻势");
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = (BattleAction)(object)PerformAction.Animation((Unit)(object)((UltimateSkill)<>4__this).Battle.Player, "spell", 1f, (string)null, 0f, -1);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					<>2__current = (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)<>4__this).Battle.Player, (Unit)(object)<enemy>5__1, DamageInfo.Reaction((float)<player>5__2.Us.MaxPowerLevel * 30f, false), <>4__this.GetGunName(1), (GunType)0);
					<>1__state = 3;
					return true;
				case 3:
					<>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()
			{
				<Actions>d__6 <Actions>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<Actions>d__ = this;
				}
				else
				{
					<Actions>d__ = new <Actions>d__6(0)
					{
						<>4__this = <>4__this
					};
				}
				<Actions>d__.selector = <>3__selector;
				return <Actions>d__;
			}

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

		private string LastType { get; set; }

		public KijinSeijaUltA()
		{
			((UltimateSkill)this).TargetType = (TargetType)1;
		}

		private string GetGunName(int gunIndex)
		{
			string text = LastType + gunIndex;
			if (GunConfig.FromName(text) != null)
			{
				return text;
			}
			return "SingleJiandaoSe" + gunIndex;
		}

		[IteratorStateMachine(typeof(<Actions>d__6))]
		protected override IEnumerable<BattleAction> Actions(UnitSelector selector)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <Actions>d__6(-2)
			{
				<>4__this = this,
				<>3__selector = selector
			};
		}
	}
	public sealed class KijinSeijaUltBDef : KijinSeijaUltTemplate
	{
		public override UltimateSkillConfig MakeConfig()
		{
			UltimateSkillConfig defaulUltConfig = GetDefaulUltConfig();
			defaulUltConfig.Damage = 18;
			return defaulUltConfig;
		}
	}
	[EntityLogic(typeof(KijinSeijaUltBDef))]
	public sealed class KijinSeijaUltB : UltimateSkill
	{
		[CompilerGenerated]
		private sealed class <Actions>d__5 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private UnitSelector selector;

			public UnitSelector <>3__selector;

			public KijinSeijaUltB <>4__this;

			private int <Value18>5__1;

			private IEnumerator<EnemyUnit> <>s__2;

			private Unit <enemy>5__3;

			private int <Value19>5__4;

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

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

			[DebuggerHidden]
			public <Actions>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 || (uint)(num - 3) <= 1u)
				{
					try
					{
					}
					finally
					{
						<>m__Finally1();
					}
				}
				<>s__2 = null;
				<enemy>5__3 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0194: Unknown result type (might be due to invalid IL or missing references)
				//IL_019f: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a9: Expected O, but got Unknown
				//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
				//IL_0206: Expected O, but got Unknown
				bool result;
				try
				{
					switch (<>1__state)
					{
					default:
						result = false;
						break;
					case 0:
						<>1__state = -1;
						<Value18>5__1 = ((Unit)((UltimateSkill)<>4__this).Battle.Player).StatusEffects.Where((StatusEffect se) => (int)se.Type == 1).Count();
						<>2__current = (BattleAction)(object)PerformAction.Spell((Unit)(object)((UltimateSkill)<>4__this).Battle.Player, "天下翻覆");
						<>1__state = 1;
						result = true;
						break;
					case 1:
						<>1__state = -1;
						<>2__current = (BattleAction)(object)PerformAction.Animation((Unit)(object)((UltimateSkill)<>4__this).Battle.Player, "spell", 1f, (string)null, 0f, -1);
						<>1__state = 2;
						result = true;
						break;
					case 2:
						<>1__state = -1;
						<>s__2 = ((UltimateSkill)<>4__this).Battle.AllAliveEnemies.GetEnumerator();
						<>1__state = -3;
						while (true)
						{
							if (<>s__2.MoveNext())
							{
								<enemy>5__3 = (Unit)(object)<>s__2.Current;
								if (<enemy>5__3.IsAlive && !((UltimateSkill)<>4__this).Battle.BattleShouldEnd)
								{
									<Value19>5__4 = 0;
									goto IL_01d0;
								}
								<enemy>5__3 = null;
								continue;
							}
							<>m__Finally1();
							<>s__2 = null;
							result = false;
							break;
						}
						break;
					case 3:
						<>1__state = -3;
						<Value19>5__4++;
						goto IL_01d0;
					case 4:
						{
							<>1__state = -3;
							result = false;
							<>m__Finally1();
							break;
						}
						IL_01d0:
						if (<Value19>5__4 < <Value18>5__1 + 1)
						{
							<>2__current = (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)<>4__this).Owner, (IEnumerable<Unit>)((UltimateSkill)<>4__this).Battle.AllAliveEnemies, ((UltimateSkill)<>4__this).Damage, "Guiren1", (GunType)0);
							<>1__state = 3;
							result = true;
						}
						else
						{
							<>2__current = (BattleAction)new RemoveAllNegativeStatusEffectAction((Unit)(object)((UltimateSkill)<>4__this).Battle.Player, 0.2f);
							<>1__state = 4;
							result = true;
						}
						break;
					}
				}
				catch
				{
					//try-fault
					((IDisposable)this).Dispose();
					throw;
				}
				return result;
			}

			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 (<>s__2 != null)
				{
					<>s__2.Dispose();
				}
			}

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

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

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

		private string LastType { get; set; }

		public KijinSeijaUltB()
		{
			((UltimateSkill)this).TargetType = (TargetType)2;
		}

		[IteratorStateMachine(typeof(<Actions>d__5))]
		protected override IEnumerable<BattleAction> Actions(UnitSelector selector)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <Actions>d__5(-2)
			{
				<>4__this = this,
				<>3__selector = selector
			};
		}
	}
	public class KijinSeijaUltTemplate : UltimateSkillTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit(KijinSeijaDefaultConfig.DefaultID((EntityDefinition)(object)this));
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)KijinSeijaLocalization.UltimateSkillsBatchLoc.AddEntity((EntityDefinition)(object)this);
		}

		public override Sprite LoadSprite()
		{
			return KijinSeijaImageLoader.LoadUltLoader((UltimateSkillTemplate)(object)this);
		}

		public override UltimateSkillConfig MakeConfig()
		{
			throw new NotImplementedException();
		}

		public UltimateSkillConfig GetDefaulUltConfig()
		{
			return KijinSeijaDefaultConfig.DefaultUltConfig();
		}
	}
}
namespace KijinSeijaMod.StatusEffects
{
	public sealed class AccuracyModule1Def : KijinSeijaStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = KijinSeijaStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Spirit" };
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(AccuracyModule1Def))]
	public sealed class AccuracyModule1 : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).HandleOwnerEvent<DamageDealingEventArgs>(((StatusEffect)this).Owner.DamageDealing, (GameEventHandler<DamageDealingEventArgs>)OnDamageDealing);
		}

		private void OnDamageDealing(DamageDealingEventArgs args)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			DamageInfo damageInfo = args.DamageInfo;
			((DamageInfo)(ref damageInfo)).IsAccuracy = true;
			args.DamageInfo = damageInfo;
			((GameEventArgs)args).AddModifier((GameEntity)(object)this);
		}
	}
	public sealed class KijinSeijaEnhanceSeDef : KijinSeijaStatusEffectTemplate
	{
		public override Sprite LoadSprite()
		{
			return null;
		}
	}
	[EntityLogic(typeof(KijinSeijaEnhanceSeDef))]
	public sealed class KijinSeijaEnhanceSe : StatusEffect
	{
	}
	public sealed class KijinSeijaBoomSeDef : KijinSeijaStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = KijinSeijaStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Spirit" };
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(KijinSeijaBoomSeDef))]
	public sealed class KijinSeijaBoomSe : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnOwnerTurnStarted>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private UnitEventArgs args;

			public UnitEventArgs <>3__args;

			public KijinSeijaBoomSe <>4__this;

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

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

			[DebuggerHidden]
			public <OnOwnerTurnStarted>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_0052: Unknown result type (might be due to invalid IL or missing references)
				//IL_005d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0067: Expected O, but got Unknown
				//IL_0084: Unknown result type (might be due to invalid IL or missing references)
				//IL_008e: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (BattleAction)new DamageAction(((StatusEffect)<>4__this).Owner, (IEnumerable<Unit>)((StatusEffect)<>4__this).Battle.EnemyGroup.Alives, DamageInfo.Reaction(40f, false), "ExhTNT", (GunType)0);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)<>4__this, 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()
			{
				<OnOwnerTurnStarted>d__1 <OnOwnerTurnStarted>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnOwnerTurnStarted>d__ = this;
				}
				else
				{
					<OnOwnerTurnStarted>d__ = new <OnOwnerTurnStarted>d__1(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnOwnerTurnStarted>d__.args = <>3__args;
				return <OnOwnerTurnStarted>d__;
			}

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

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

		[IteratorStateMachine(typeof(<OnOwnerTurnStarted>d__1))]
		private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnOwnerTurnStarted>d__1(-2)
			{
				<>4__this = this,
				<>3__args = args
			};
		}
	}
	public sealed class KijinSeijaBorrowedBlade1Def : KijinSeijaStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = KijinSeijaStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Spirit" };
			defaultStatusEffectConfig.Type = (StatusEffectType)0;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(KijinSeijaBorrowedBlade1Def))]
	public sealed class KijinSeijaBorrowedBlade1 : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnOwnerTurnStarted>d__7 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private UnitEventArgs args;

			public UnitEventArgs <>3__args;

			public KijinSeijaBorrowedBlade1 <>4__this;

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

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

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

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

			private bool MoveNext()
			{
				//IL_002d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0037: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)<>4__this, 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()
			{
				<OnOwnerTurnStarted>d__7 <OnOwnerTurnStarted>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnOwnerTurnStarted>d__ = this;
				}
				else
				{
					<OnOwnerTurnStarted>d__ = new <OnOwnerTurnStarted>d__7(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnOwnerTurnStarted>d__.args = <>3__args;
				return <OnOwnerTurnStarted>d__;
			}

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

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

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private DamageEventArgs args;

			public DamageEventArgs <>3__args;

			public KijinSeijaBorrowedBlade1 <>4__this;

			private ReflectDamage <reflectDamage>5__1;

			private EnemyUnit <target>5__2;

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

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

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

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

			private bool MoveNext()
			{
				//IL_008e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0099: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a3: Expected O, but got Unknown
				int num = <>1__state;
				if (num != 0)
				{
					if (num != 1)
					{
						return false;
					}
					<>1__state = -1;
					goto IL_00b4;
				}
				<>1__state = -1;
				goto IL_00c3;
				IL_00b4:
				<reflectDamage>5__1 = null;
				<target>5__2 = null;
				goto IL_00c3;
				IL_00c3:
				if (<>4__this.ReflectDamages.Count > 0)
				{
					<reflectDamage>5__1 = <>4__this.ReflectDamages.Dequeue();
					<target>5__2 = ((StatusEffect)<>4__this).Battle.RandomAliveEnemy;
					if (<reflectDamage>5__1.Target.IsAlive)
					{
						<>2__current = (BattleAction)new DamageAction((Unit)(object)((StatusEffect)<>4__this).Battle.Player, (Unit)(object)<target>5__2, DamageInfo.Reaction((float)<reflectDamage>5__1.Damage, false), "ESakuyaSE1", (GunType)0);
						<>1__state = 1;
						return true;
					}
					goto IL_00b4;
				}
				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()
			{
				<OnPlayerDamageReceived>d__6 <OnPlayerDamageReceived>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnPlayerDamageReceived>d__ = this;
				}
				else
				{
					<OnPlayerDamageReceived>d__ = new <OnPlayerDamageReceived>d__6(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnPlayerDamageReceived>d__.args = <>3__args;
				return <OnPlayerDamageReceived>d__;
			}

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

		private Queue<ReflectDamage> ReflectDamages { get; set; } = new Queue<ReflectDamage>();


		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(((Unit)((StatusEffect)this).Battle.Player).DamageTaking, (GameEventHandler<DamageEventArgs>)OnPlayerDamageTaking);
			((StatusEffect)this).ReactOwnerEvent<DamageEventArgs>(((Unit)((StatusEffect)this).Battle.Player).DamageReceived, (EventSequencedReactor<DamageEventArgs>)OnPlayerDamageReceived);
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted);
		}

		private void OnPlayerDamageTaking(DamageEventArgs args)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Expected O, but got Unknown
			DamageInfo damageInfo = args.DamageInfo;
			int num = MathExtensions.RoundToInt(((DamageInfo)(ref damageInfo)).Damage);
			if (num >= 1)
			{
				((StatusEffect)this).NotifyActivating();
				args.DamageInfo = ((DamageInfo)(ref damageInfo)).ReduceActualDamageBy(num);
				((GameEventArgs)args).AddModifier((GameEntity)(object)this);
				Unit source = args.Source;
				if (source is EnemyUnit && source.IsAlive)
				{
					ReflectDamages.Enqueue(new ReflectDamage(args.Source, num));
				}
			}
		}

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

		[IteratorStateMachine(typeof(<OnOwnerTurnStarted>d__7))]
		private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnOwnerTurnStarted>d__7(-2)
			{
				<>4__this = this,
				<>3__args = args
			};
		}
	}
	public sealed class KijinSeijaFastAttackDef : KijinSeijaStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = KijinSeijaStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Spirit" };
			defaultStatusEffectConfig.HasCount = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(KijinSeijaFastAttackDef))]
	public sealed class KijinSeijaFastAttack : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnAllEnemyTurnStarted>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private GameEventArgs args;

			public GameEventArgs <>3__args;

			public KijinSeijaFastAttack <>4__this;

			private DamageAction <damageaction>5__1;

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

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

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

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

			private bool MoveNext()
			{
				//IL_0078: Unknown result type (might be due to invalid IL or missing references)
				//IL_0083: Unknown result type (might be due to invalid IL or missing references)
				//IL_008d: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					if (((StatusEffect)<>4__this).Owner == null || ((StatusEffect)<>4__this).Battle.BattleShouldEnd)
					{
						return false;
					}
					<damageaction>5__1 = new DamageAction((Unit)(object)((StatusEffect)<>4__this).Battle.Player, (Unit)(object)((StatusEffect)<>4__this).Battle.FirstAliveEnemy, DamageInfo.Attack((float)((StatusEffect)<>4__this).Level, false), "鸦天狗触发B", (GunType)0);
					<>2__current = (BattleAction)(object)<damageaction>5__1;
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					((StatusEffect)<>4__this).Highlight = false;
					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()
			{
				<OnAllEnemyTurnStarted>d__1 <OnAllEnemyTurnStarted>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnAllEnemyTurnStarted>d__ = this;
				}
				else
				{
					<OnAllEnemyTurnStarted>d__ = new <OnAllEnemyTurnStarted>d__1(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnAllEnemyTurnStarted>d__.args = <>3__args;
				return <OnAllEnemyTurnStarted>d__;
			}

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

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<GameEventArgs>(((StatusEffect)this).Battle.AllEnemyTurnStarted, (EventSequencedReactor<GameEventArgs>)OnAllEnemyTurnStarted);
			((StatusEffect)this).Highlight = true;
		}

		[IteratorStateMachine(typeof(<OnAllEnemyTurnStarted>d__1))]
		private IEnumerable<BattleAction> OnAllEnemyTurnStarted(GameEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnAllEnemyTurnStarted>d__1(-2)
			{
				<>4__this = this,
				<>3__args = args
			};
		}
	}
	public sealed class KijinSeijaFriendS1Def : KijinSeijaStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = KijinSeijaStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Spirit" };
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(KijinSeijaFriendS1Def))]
	public sealed class KijinSeijaFriendS1 : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Expected O, but got Unknown
			foreach (EnemyUnit allAliveEnemy in ((StatusEffect)this).Battle.AllAliveEnemies)
			{
				((GameEntity)this).GameRun.SetEnemyHpAndMaxHp(((Unit)((StatusEffect)this).Battle.Player).Hp, ((Unit)((StatusEffect)this).Battle.Player).Hp, allAliveEnemy, false);
			}
			((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (GameEventHandler<UnitEventArgs>)OnOwnerTurnStarted);
		}

		protected void OnOwnerTurnStarted(UnitEventArgs args)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Expected O, but got Unknown
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Expected O, but got Unknown
			((GameEntity)this).React(Reactor.op_Implicit((BattleAction)(object)new ApplyStatusEffectAction<Invincible>((Unit)((StatusEffect)this).Battle.AllAliveEnemies, (int?)16, (int?)16, (int?)0, (int?)0, 0.2f, true)));
			((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f)));
		}
	}
	public sealed class KijinSeijaFriendS2Def : KijinSeijaStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = KijinSeijaStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Spirit" };
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(KijinSeijaFriendS2Def))]
	public sealed class KijinSeijaFriendS2 : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((GameEntity)this).GameRun.SetHpAndMaxHp(((Unit)((StatusEffect)this).Battle.Player).Hp, ((Unit)((StatusEffect)this).Battle.Player).MaxHp * 11 / 10, false);
			((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (GameEventHandler<UnitEventArgs>)OnOwnerTurnEnded);
		}

		protected void OnOwnerTurnEnded(UnitEventArgs args)
		{
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Expected O, but got Unknown
			((GameEntity)this).GameRun.SetHpAndMaxHp(((Unit)((StatusEffect)this).Battle.Player).Hp, ((Unit)((StatusEffect)this).Battle.Player).MaxHp * 9 / 10, false);
			((GameEntity)this).React(Reactor.op_Implicit(((StatusEffect)this).DebuffAction<Poison>((Unit)(object)((StatusEffect)this).Battle.Player, ((Unit)((StatusEffect)this).Battle.Player).Hp, 0, 0, 0, true, 0.2f)));
			((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f)));
		}
	}
	public sealed class KijinSeijaFriedS3Def : KijinSeijaStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = KijinSeijaStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Spirit" };
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(KijinSeijaFriedS3Def))]
	public sealed class KijinSeijaFriedS3 : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnEnemyDied>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private DieEventArgs args;

			public DieEventArgs <>3__args;

			public KijinSeijaFriedS3 <>4__this;

			private EnemyUnit <enemy>5__1;

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

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

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

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

			private bool MoveNext()
			{
				if (<>1__state != 0)
				{
					return false;
				}
				<>1__state = -1;
				if (((StatusEffect)<>4__this).Battle.BattleShouldEnd)
				{
					return false;
				}
				<enemy>5__1 = UnitSelector.AllEnemies.GetEnemy(((StatusEffect)<>4__this).Battle);
				<>4__this.<>n__0();
				((GameEntity)<>4__this).GameRun.GainMaxHp((int)((float)((Unit)<enemy>5__1).MaxHp / 10f), true, true);
				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__1 <OnEnemyDied>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnEnemyDied>d__ = this;
				}
				else
				{
					<OnEnemyDied>d__ = new <OnEnemyDied>d__1(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnEnemyDied>d__.args = <>3__args;
				return <OnEnemyDied>d__;
			}

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

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

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private GameEventArgs args;

			public GameEventArgs <>3__args;

			public KijinSeijaFriedS3 <>4__this;

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

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

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

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

			private bool MoveNext()
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (BattleAction)(object)new ApplyStatusEffectAction<NextTurnLoseGame>((Unit)(object)((StatusEffect)<>4__this).Battle.Player, (int?)0, (int?)0, (int?)0, (int?)0, 0.2f, true);
					<>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()
			{
				<OnturnStarted>d__2 <OnturnStarted>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnturnStarted>d__ = this;
				}
				else
				{
					<OnturnStarted>d__ = new <OnturnStarted>d__2(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnturnStarted>d__.args = <>3__args;
				return <OnturnStarted>d__;
			}

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

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<DieEventArgs>(((StatusEffect)this).Battle.EnemyDied, (EventSequencedReactor<DieEventArgs>)OnEnemyDied);
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnturnStarted);
		}

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

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

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class KijinSeijaHeal1Def : KijinSeijaStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = KijinSeijaStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Spirit" };
			defaultStatusEffectConfig.HasCount = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(KijinSeijaHeal1Def))]
	public sealed class KijinSeijaHeal1 : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnOwnerTurnStarted>d__2 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private UnitEventArgs args;

			public UnitEventArgs <>3__args;

			public KijinSeijaHeal1 <>4__this;

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

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

			[DebuggerHidden]
			public <OnOwnerTurnStarted>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_002d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0037: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)<>4__this, 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()
			{
				<OnOwnerTurnStarted>d__2 <OnOwnerTurnStarted>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnOwnerTurnStarted>d__ = this;
				}
				else
				{
					<OnOwnerTurnStarted>d__ = new <OnOwnerTurnStarted>d__2(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnOwnerTurnStarted>d__.args = <>3__args;
				return <OnOwnerTurnStarted>d__;
			}

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

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).HandleOwnerEvent<DieEventArgs>(((StatusEffect)this).Owner.Dying, (GameEventHandler<DieEventArgs>)OnDying);
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted);
		}

		private void OnDying(DieEventArgs args)
		{
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Expected O, but got Unknown
			((GameEventArgs)args).CancelBy((GameEntity)(object)this);
			((StatusEffect)this).NotifyActivating();
			if (((Unit)((StatusEffect)this).Battle.Player).MaxHp <= 30)
			{
				((GameEntity)this).GameRun.SetHpAndMaxHp(((Unit)((StatusEffect)this).Battle.Player).MaxHp, ((Unit)((StatusEffect)this).Battle.Player).MaxHp, false);
			}
			else
			{
				((GameEntity)this).GameRun.SetHpAndMaxHp(30, ((Unit)((StatusEffect)this).Battle.Player).MaxHp, false);
			}
			((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f)));
		}

		[IteratorStateMachine(typeof(<OnOwnerTurnStarted>d__2))]
		private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnOwnerTurnStarted>d__2(-2)
			{
				<>4__this = this,
				<>3__args = args
			};
		}
	}
	public sealed class KijinSeijaInvertedWorld1Def : KijinSeijaStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = KijinSeijaStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Spirit" };
			defaultStatusEffectConfig.Type = (StatusEffectType)0;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(KijinSeijaInvertedWorld1Def))]
	public sealed class KijinSeijaInvertedWorld1 : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnBlockShieldGained>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private BlockShieldEventArgs args;

			public BlockShieldEventArgs <>3__args;

			public KijinSeijaInvertedWorld1 <>4__this;

			private IEnumerator<EnemyUnit> <>s__1;

			private EnemyUnit <enemyUnit>5__2;

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

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

			[DebuggerHidden]
			public <OnBlockShieldGained>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 || (uint)(num - 1) <= 1u)
				{
					try
					{
					}
					finally
					{
						<>m__Finally1();
					}
				}
				<>s__1 = null;
				<enemyUnit>5__2 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_011f: Unknown result type (might be due to invalid IL or missing references)
				//IL_012a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0134: Expected O, but got Unknown
				//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c7: Expected O, but got Unknown
				bool result;
				try
				{
					switch (<>1__state)
					{
					default:
						result = false;
						break;
					case 0:
						<>1__state = -1;
						<>s__1 = ((StatusEffect)<>4__this).Battle.AllAliveEnemies.GetEnumerator();
						<>1__state = -3;
						if (<>s__1.MoveNext())
						{
							<enemyUnit>5__2 = <>s__1.Current;
							if (args.Block > 0f)
							{
								<>2__current = (BattleAction)new DamageAction((Unit)(object)((StatusEffect)<>4__this).Battle.Player, (Unit)(object)<enemyUnit>5__2, DamageInfo.Reaction(args.Block * 2f, false), "假面", (GunType)0);
								<>1__state = 1;
								result = true;
								break;
							}
							goto IL_00de;
						}
						<>m__Finally1();
						<>s__1 = null;
						result = false;
						break;
					case 1:
						<>1__state = -3;
						goto IL_00de;
					case 2:
						{
							<>1__state = -3;
							goto IL_0148;
						}
						IL_00de:
						if (args.Shield > 0f)
						{
							<>2__current = (BattleAction)new DamageAction((Unit)(object)((StatusEffect)<>4__this).Battle.Player, (Unit)(object)<enemyUnit>5__2, DamageInfo.Reaction(args.Shield * 2f, false), "假面", (GunType)0);
							<>1__state = 2;
							result = true;
							break;
						}
						goto IL_0148;
						IL_0148:
						result = false;
						<>m__Finally1();
						break;
					}
				}
				catch
				{
					//try-fault
					((IDisposable)this).Dispose();
					throw;
				}
				return result;
			}

			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 (<>s__1 != null)
				{
					<>s__1.Dispose();
				}
			}

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

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

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

		protected override void OnAdded(Unit unit)
		{
			foreach (EnemyUnit allAliveEnemy in ((StatusEffect)this).Battle.AllAliveEnemies)
			{
				((StatusEffect)this).ReactOwnerEvent<BlockShieldEventArgs>(((Unit)allAliveEnemy).BlockShieldGained, (EventSequencedReactor<BlockShieldEventArgs>)OnBlockShieldGained);
			}
		}

		[IteratorStateMachine(typeof(<OnBlockShieldGained>d__1))]
		private IEnumerable<BattleAction> OnBlockShieldGained(BlockShieldEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnBlockShieldGained>d__1(-2)
			{
				<>4__this = this,
				<>3__args = args
			};
		}
	}
	public sealed class KijinSeijaMaoYuSeDef : KijinSeijaStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = KijinSeijaStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Spirit" };
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(KijinSeijaMaoYuSeDef))]
	public sealed class KijinSeijaMaoYuSe : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnOwnerStatisticalTotalDamageReceived>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private StatisticalDamageEventArgs totalArgs;

			public StatisticalDamageEventArgs <>3__totalArgs;

			public KijinSeijaMaoYuSe <>4__this;

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

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

			[DebuggerHidden]
			public <OnOwnerStatisticalTotalDamageReceived>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_0061: Unknown result type (might be due to invalid IL or missing references)
				//IL_006b: Expected O, but got Unknown
				//IL_0088: Unknown result type (might be due to invalid IL or missing references)
				//IL_0092: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>4__this.<>n__0();
					<>2__current = (BattleAction)new CastBlockShieldAction(((StatusEffect)<>4__this).Owner, new ShieldInfo(((Unit)((StatusEffect)<>4__this).Battle.Player).MaxHp / 2, (BlockShieldType)2), false);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)<>4__this, 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()
			{
				<OnOwnerStatisticalTotalDamageReceived>d__1 <OnOwnerStatisticalTotalDamageReceived>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnOwnerStatisticalTotalDamageReceived>d__ = this;
				}
				else
				{
					<OnOwnerStatisticalTotalDamageReceived>d__ = new <OnOwnerStatisticalTotalDamageReceived>d__1(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnOwnerStatisticalTotalDamageReceived>d__.totalArgs = <>3__totalArgs;
				return <OnOwnerStatisticalTotalDamageReceived>d__;
			}

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

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<StatisticalDamageEventArgs>(((StatusEffect)this).Owner.StatisticalTotalDamageReceived, (EventSequencedReactor<StatisticalDamageEventArgs>)OnOwnerStatisticalTotalDamageReceived);
		}

		[IteratorStateMachine(typeof(<OnOwnerStatisticalTotalDamageReceived>d__1))]
		private IEnumerable<BattleAction> OnOwnerStatisticalTotalDamageReceived(StatisticalDamageEventArgs totalArgs)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnOwnerStatisticalTotalDamageReceived>d__1(-2)
			{
				<>4__this = this,
				<>3__totalArgs = totalArgs
			};
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class KijinSeijaMoney1Def : KijinSeijaStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = KijinSeijaStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Spirit" };
			defaultStatusEffectConfig.HasCount = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(KijinSeijaMoney1Def))]
	public sealed class KijinSeijaMoney1 : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnBattleEnding>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private GameEventArgs args;

			public GameEventArgs <>3__args;

			public KijinSeijaMoney1 <>4__this;

			private int <Value1>5__1;

			private int <Value2>5__2;

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

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

			[DebuggerHidden]
			public <OnBattleEnding>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_0085: Unknown result type (might be due to invalid IL or missing references)
				//IL_008f: Expected O, but got Unknown
				//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d0: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<Value1>5__1 = ((Unit)((StatusEffect)<>4__this).Battle.Player).Hp;
					<Value2>5__2 = ((Unit)((StatusEffect)<>4__this).Battle.Player).MaxHp;
					if (<Value1>5__1 < 4)
					{
						<>4__this.<>n__0();
						<>2__current = (BattleAction)new GainMoneyAction(999, (SpecialSourceType)0);
						<>1__state = 1;
						return true;
					}
					if (<Value1>5__1 == <Value2>5__2)
					{
						<>4__this.<>n__0();
						<>2__current = (BattleAction)new GainMoneyAction(99, (SpecialSourceType)0);
						<>1__state = 2;
						return true;
					}
					break;
				case 1:
					<>1__state = -1;
					break;
				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()
			{
				<OnBattleEnding>d__1 <OnBattleEnding>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnBattleEnding>d__ = this;
				}
				else
				{
					<OnBattleEnding>d__ = new <OnBattleEnding>d__1(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnBattleEnding>d__.args = <>3__args;
				return <OnBattleEnding>d__;
			}

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

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<GameEventArgs>(((StatusEffect)this).Battle.BattleEnding, (EventSequencedReactor<GameEventArgs>)OnBattleEnding);
		}

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

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class KijinSeijaTiaoZhan1Def : KijinSeijaStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = KijinSeijaStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Spirit" };
			defaultStatusEffectConfig.Type = (StatusEffectType)2;
			defaultStatusEffectConfig.HasCount = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(KijinSeijaTiaoZhan1Def))]
	public sealed class KijinSeijaTiaoZhan1 : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnBattleEnded>d__5 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private GameEventArgs args;

			public GameEventArgs <>3__args;

			public KijinSeijaTiaoZhan1 <>4__this;

			private List<Exhibit> <list>5__1;

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

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

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

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

			private bool MoveNext()
			{
				//IL_0065: Unknown result type (might be due to invalid IL or missing references)
				//IL_006f: Expected O, but got Unknown
				//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bd: Expected O, but got Unknown
				//IL_0116: Unknown result type (might be due to invalid IL or missing references)
				//IL_0120: Expected O, but got Unknown
				//IL_017d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0187: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<list>5__1 = new List<Exhibit>();
					if (<>4__this.value45 <= 2)
					{
						<>2__current = (BattleAction)new GainMoneyAction(50, (SpecialSourceType)0);
						<>1__state = 1;
						return true;
					}
					if (<>4__this.value45 > 2 && <>4__this.value45 <= 4)
					{
						<>2__current = (BattleAction)new GainMoneyAction(150, (SpecialSourceType)0);
						<>1__state = 2;
						return true;
					}
					if (<>4__this.value45 > 4 && <>4__this.value45 <= 6)
					{
						<>2__current = (BattleAction)new GainMoneyAction(400, (SpecialSourceType)0);
						<>1__state = 3;
						return true;
					}
					if (<>4__this.value45 > 6)
					{
						<>2__current = (BattleAction)new GainMoneyAction(700, (SpecialSourceType)0);
						<>1__state = 4;
						return true;
					}
					break;
				case 1:
					<>1__state = -1;
					break;
				case 2:
					<>1__state = -1;
					((GameEntity)<>4__this).GameRun.GainMaxHp(10, true, true);
					break;
				case 3:
					<>1__state = -1;
					((GameEntity)<>4__this).GameRun.GainMaxHp(20 + ((Unit)((StatusEffect)<>4__this).Battle.Player).MaxHp / 10, true, true);
					break;
				case 4:
					<>1__state = -1;
					((GameEntity)<>4__this).GameRun.GainMaxHp(30 + ((Unit)((StatusEffect)<>4__this).Battle.Player).MaxHp / 5, true, true);
					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()
			{
				<OnBattleEnded>d__5 <OnBattleEnded>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnBattleEnded>d__ = this;
				}
				else
				{
					<OnBattleEnded>d__ = new <OnBattleEnded>d__5(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnBattleEnded>d__.args = <>3__args;
				return <OnBattleEnded>d__;
			}

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

		public int value44 = 0;

		public int value45 = 0;

		protected override void OnAdded(Unit unit)
		{
			SetCount();
			((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (GameEventHandler<UnitEventArgs>)delegate
			{
				SetCount();
			});
			((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(unit.DamageReceived, (GameEventHandler<DamageEventArgs>)OnDamageReceived);
			((StatusEffect)this).ReactOwnerEvent<GameEventArgs>(((StatusEffect)this).Battle.BattleEnded, (EventSequencedReactor<GameEventArgs>)OnBattleEnded);
		}

		private void SetCount()
		{
			if (value44 >= 25)
			{
				value45++;
				value44 = 0;
			}
			else
			{
				value44 = 0;
			}
			((StatusEffect)this).Count = value45;
		}

		private void OnDamageReceived(DamageEventArgs args)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			int num = value44;
			DamageInfo damageInfo = args.DamageInfo;
			value44 = num + (int)((DamageInfo)(ref damageInfo)).Damage;
		}

		[IteratorStateMachine(typeof(<OnBattleEnded>d__5))]
		private IEnumerable<BattleAction> OnBattleEnded(GameEventArgs args)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnBattleEnded>d__5(-2)
			{
				<>4__this = this,
				<>3__args = args
			};
		}
	}
	public sealed class KijinSeijaTSGDef : KijinSeijaStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = KijinSeijaStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Spirit" };
			defaultStatusEffectConfig.Type = (StatusEffectType)1;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(KijinSeijaTSGDef))]
	public sealed class KijinSeijaTSG : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).HandleOwnerEvent<DieEventArgs>(((Unit)((StatusEffect)this).Battle.Player).Dying, (GameEventHandler<DieEventArgs>)OnPlayerDying);
		}

		private void OnPlayerDying(DieEventArgs args)
		{
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Expected O, but got Unknown
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Expected O, but got Unknown
			((GameEventArgs)args).CancelBy((GameEntity)(object)this);
			if (((StatusEffect)this).Owner.Hp <= ((Unit)((StatusEffect)this).Battle.Player).MaxHp)
			{
				((GameEntity)this).GameRun.SetHpAndMaxHp(((StatusEffect)this).Owner.Hp, ((Unit)((StatusEffect)this).Battle.Player).MaxHp, false);
			}
			else
			{
				((GameEntity)this).GameRun.SetHpAndMaxHp(((Unit)((StatusEffect)this).Battle.Player).MaxHp, ((Unit)((StatusEffect)this).Battle.Player).MaxHp, false);
			}
			((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new ForceKillAction((Unit)(object)((StatusEffect)this).Battle.Player, ((StatusEffect)this).Owner)));
			((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f)));
		}
	}
	public sealed class KijinSeijaTurnGainSpiritSeDef : KijinSeijaStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = KijinSeijaStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Spirit" };
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(KijinSeijaTurnGainSpiritSeDef))]
	public sealed class KijinSeijaTurnGainSpiritSe : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnCardUsing>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private CardUsingEventArgs args;

			public CardUsingEventArgs <>3__args;

			public KijinSeijaTurnGainSpiritSe <>4__this;

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

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

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

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

			private bool MoveNext()
			{
				if (<>1__state != 0)
				{
					return false;
				}
				<>1__state = -1;
				<>4__this.<>n__0();
				args.PlayTwice = true;
				((GameEventArgs)args).AddModifier((GameEntity)(object)<>4__this);
				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()
			{
				<OnCardUsing>d__1 <OnCardUsing>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnCardUsing>d__ = this;
				}
				else
				{
					<OnCardUsing>d__ = new <OnCardUsing>d__1(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnCardUsing>d__.args = <>3__args;
				return <OnCardUsing>d__;
			}

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

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

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private UnitEventArgs args;

			public UnitEventArgs <>3__args;

			public KijinSeijaTurnGainSpiritSe <>4__this;

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

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

			[DebuggerHidden]
			public <OnOwnerTurnEnded>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_002d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0037: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)<>4__this, 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()
			{
				<OnOwnerTurnEnded>d__2 <OnOwnerTurnEnded>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnOwnerTurnEnded>d__ = this;
				}
				else
				{
					<OnOwnerTurnEnded>d__ = new <OnOwnerTurnEnded>d__2(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnOwnerTurnEnded>d__.args = <>3__args;
				return <OnOwnerTurnEnded>d__;
			}

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

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsing, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsing);
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnEnded, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnEnded);
		}

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

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

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class KijinSeijaYinyangyuSeDef : KijinSeijaStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = KijinSeijaStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Spirit" };
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(KijinSeijaYinyangyuSeDef))]
	public sealed class KijinSeijaYinyangyuSe : StatusEffect
	{
		[CompilerGenerated]
		private sealed class <OnturnStarted>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private BattleAction <>2__current;

			private int <>l__initialThreadId;

			private GameEventArgs args;

			public GameEventArgs <>3__args;

			public KijinSeijaYinyangyuSe <>4__this;

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

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

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

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

			private bool MoveNext()
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>4__this.<>n__0();
					<>2__current = (BattleAction)(object)new ApplyStatusEffectAction<Firepower>(((StatusEffect)<>4__this).Owner, (int?)1, (int?)null, (int?)null, (int?)null, 0f, true);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = (BattleAction)(object)new ApplyStatusEffectAction<Spirit>(((StatusEffect)<>4__this).Owner, (int?)1, (int?)null, (int?)null, (int?)null, 0f, true);
					<>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()
			{
				<OnturnStarted>d__1 <OnturnStarted>d__;
				if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
				{
					<>1__state = 0;
					<OnturnStarted>d__ = this;
				}
				else
				{
					<OnturnStarted>d__ = new <OnturnStarted>d__1(0)
					{
						<>4__this = <>4__this
					};
				}
				<OnturnStarted>d__.args = <>3__args;
				return <OnturnStarted>d__;
			}

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

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

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

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public class KijinSeijaStatusEffectTemplate : StatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit(KijinSeijaDefaultConfig.DefaultID((EntityDefinition)(object)this));
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)KijinSeijaLocalization.StatusEffectsBatchLoc.AddEntity((EntityDefinition)(object)this);
		}

		public override Sprite LoadSprite()
		{
			return KijinSeijaImageLoader.LoadStatusEffectLoader((StatusEffectTemplate)(object)this);
		}

		public override StatusEffectConfig MakeConfig()
		{
			return GetDefaultStatusEffectConfig();
		}

		public static StatusEffectConfig GetDefaultStatusEffectConfig()
		{
			return KijinSeijaDefaultConfig.DefaultStatusEffectConfig();
		}
	}
}
namespace KijinSeijaMod.model
{
	public sealed class KijinSeijaModel : UnitModelTemplate
	{
		public static bool useInGameModel = BepinexPlugin.useInGameModel;

		public static string model_name = (useInGameModel ? BepinexPlugin.modelName : "KijinSeijaModel.png");

		public static string spellsprite_name = "KijinSeijaStand.png";

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit(BepinexPlugin.modUniqueID);
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)KijinSeijaLocalization.UnitModelBatchLoc.AddEntity((EntityDefinition)(object)this);
		}

		public override ModelOption LoadModelOptions()
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Expected O, but got Unknown
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			if (useInGameModel)
			{
				return new ModelOption(ResourcesHelper.LoadSpineUnitAsync(model_name));
			}
			return new ModelOption(ResourceLoader.LoadSpriteAsync(model_name, BepinexPlugin.directorySource, 565, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://"));
		}

		public override UniTask<Sprite> LoadSpellSprite()
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			if (useInGameModel)
			{
				return ResourcesHelper.LoadSpellPortraitAsync(model_name);
			}
			return ResourceLoader.LoadSpriteAsync(spellsprite_name, BepinexPlugin.directorySource, 100, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://");
		}

		public override UnitModelConfig MakeConfig()
		{
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			if (useInGameModel)
			{
				UnitModelConfig val = ObjectExtensions.Copy<UnitModelConfig>(UnitModelConfig.FromName(model_name));
				val.Flip = BepinexPlugin.modelIsFlipped;
				return val;
			}
			UnitModelConfig val2 = ObjectExtensions.Copy<UnitModelConfig>(((UnitModelTemplate)this).DefaultConfig());
			val2.Flip = BepinexPlugin.modelIsFlipped;
			val2.Type = 0;
			val2.Offset = new Vector2(0f, -0.1f);
			val2.HasSpellPortrait = true;
			return val2;
		}
	}
}
namespace KijinSeijaMod.Models
{
	public sealed class KijinSeijaShinmyoumaruModel : UnitModelTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("KijinSeijaShinmyoumaru");
		}

		public override UnitModelConfig MakeConfig()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			UnitModelConfig val = ObjectExtensions.Copy<UnitModelConfig>(UnitModelConfig.FromName("Reimu"));
			val.Name = "KijinSeijaShinmyoumaru";
			val.Type = 0;
			val.Flip = false;
			val.Offset = new Vector2(0f, 0.04f);
			return val;
		}

		public override ModelOption LoadModelOptions()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Expected O, but got Unknown
			return new ModelOption(UniTask.FromResult<Sprite>(ResourceLoader.LoadSprite("KijinSeijaShinmyoumaru.png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 100, (Vector2?)null)));
		}

		public override UniTask<Sprite> LoadSpellSprite()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			return UniTask.FromResult<Sprite>((Sprite)null);
		}

		public override LocalizationOption LoadLocalization()
		{
			return null;
		}
	}
}
namespace KijinSeijaMod.Localization
{
	public sealed class KijinSeijaLocalization
	{
		public static string Cards = "Cards";

		public static string Exhibits = "Exhibits";

		public static string PlayerUnit = "PlayerUnit";

		public static string EnemiesUnit = "EnemyUnit";

		public static string UnitModel = "UnitModel";

		public static string UltimateSkills = "UltimateSkills";

		public static string StatusEffects = "StatusEffects";

		public static BatchLocalization CardsBatchLoc = new BatchLocalization((IResourceSource)(object