Decompiled source of OpponentPlayingCard v0.0.5
OpponentPlayingCard.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using AddWatermark; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using Cysharp.Threading.Tasks; using HarmonyLib; using JetBrains.Annotations; 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.Cards; using LBoL.Core.Randoms; using LBoL.Core.StatusEffects; using LBoL.Core.Units; using LBoL.EntityLib.Cards.Character.Koishi; using LBoL.EntityLib.Cards.Character.Marisa; using LBoL.EntityLib.Cards.Character.Reimu; using LBoL.EntityLib.Cards.Character.Sakuya; using LBoL.EntityLib.Cards.Enemy; using LBoL.EntityLib.Cards.Misfortune; using LBoL.EntityLib.Cards.Neutral.Black; using LBoL.EntityLib.Cards.Neutral.NoColor; using LBoL.EntityLib.Cards.Neutral.Red; using LBoL.EntityLib.EnemyUnits.Normal.Yinyangyus; using LBoL.EntityLib.Exhibits.Shining; using LBoL.EntityLib.StatusEffects.Basic; using LBoL.EntityLib.StatusEffects.Reimu; using LBoL.Presentation; using LBoLEntitySideloader; using LBoLEntitySideloader.Attributes; using LBoLEntitySideloader.Entities; using LBoLEntitySideloader.Resource; using Microsoft.CodeAnalysis; using OpponentPlayingCard.StatuEffects; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("OpponentPlayingCard")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("OpponentPlayingCard")] [assembly: AssemblyTitle("OpponentPlayingCard")] [assembly: AssemblyVersion("1.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { internal IgnoresAccessChecksToAttribute(string assemblyName) { } } } namespace OpponentPlayingCard { public static class PInfo { public const string GUID = "a254389063.OpponentPlayingCard"; public const string Name = "OpponentPlayingCard"; public const string version = "0.0.4"; public static readonly Harmony harmony = new Harmony("a254389063.OpponentPlayingCard"); } internal class WatermarkWrapper { [MethodImpl(MethodImplOptions.NoInlining)] internal static void ActivateWatermark() { API.ActivateWatermark(); } } [BepInPlugin("a254389063.OpponentPlayingCard", "OpponentPlayingCard", "0.0.4")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInProcess("LBoL.exe")] public class BepinexPlugin : BaseUnityPlugin { private static readonly Harmony harmony = PInfo.harmony; public static ConfigEntry<bool> ModBossOnly; internal static TemplateSequenceTable sequenceTable = new TemplateSequenceTable(0); internal static DirectorySource directorySource = new DirectorySource("a254389063.OpponentPlayingCard", ""); internal static IResourceSource embeddedSource = (IResourceSource)new EmbeddedSource(Assembly.GetExecutingAssembly()); internal static BatchLocalization enemyUnitLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(EnemyUnitTemplate), false); internal static BatchLocalization unitModelLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(UnitModelTemplate), false); internal static BatchLocalization statusEffectLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(StatusEffectTemplate), false); private void Awake() { Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); ((Object)this).hideFlags = (HideFlags)61; ModBossOnly = ((BaseUnityPlugin)this).Config.Bind<bool>("ModBossOnly", "Mod Boss Only/仅Mod中的Boss", false, "When enabled, vanilla bosses won't appear.\n启用后,原版boss将不会出现。"); EntityManager.RegisterSelf(); harmony.PatchAll(); if (Chainloader.PluginInfos.ContainsKey("neo.lbol.tools.watermark")) { WatermarkWrapper.ActivateWatermark(); } enemyUnitLoc.DiscoverAndLoadLocFiles("EnemyUnit"); unitModelLoc.DiscoverAndLoadLocFiles("UnitModel"); statusEffectLoc.DiscoverAndLoadLocFiles("StatusEffect"); } private void OnDestroy() { if (harmony != null) { harmony.UnpatchSelf(); } } } public class HarmonyPatches { [HarmonyPatch(typeof(Library), "EnumerateOpponentIds")] private class EnumerateOpponentIds_Patch { private static bool Prefix(ref IEnumerable<string> __result) { if (BepinexPlugin.ModBossOnly.Value) { List<string> list = new List<string> { "ReimuR1", "KoishiG1", "SakuyaW1", "MarisaB1" }; if (((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id == "Reimu") { list.Remove("ReimuR1"); } if (((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id == "Marisa") { list.Remove("MarisaB1"); } if (((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id == "Sakuya") { list.Remove("SakuyaW1"); } if (((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id == "Koishi") { list.Remove("KoishiG1"); } __result = list; return false; } return true; } } [HarmonyPatch(typeof(Stage), "InitBoss")] private class InitBoss_Patch { private static bool Prefix(Stage __instance) { if (BepinexPlugin.ModBossOnly.Value) { switch (__instance.Level) { } } return true; } } [HarmonyPatch(typeof(Stage), "GetBossExhibits")] private class GetBossExhibits_Patch { private static void Postfix(Stage __instance, ref Exhibit[] __result) { switch (__instance.Boss.Id) { case "ReimuR1": __result[1] = (Exhibit)(object)Library.CreateExhibit<ReimuR>(); break; case "KoishiG1": __result[1] = (Exhibit)(object)Library.CreateExhibit<KoishiG>(); break; case "SakuyaW1": __result[1] = (Exhibit)(object)Library.CreateExhibit<SakuyaW>(); break; case "MarisaB1": __result[1] = (Exhibit)(object)Library.CreateExhibit<MarisaB>(); break; } } } [HarmonyPatch(typeof(AudioManager), "PlayBossBgm")] private class PlayBossBgm_Patch { private static bool Prefix(ref string enemyId) { switch (enemyId) { case "ReimuR1": PlayInLayer1("Reimu"); return false; case "KoishiG1": PlayInLayer1("Koishi"); return false; case "SakuyaW1": PlayInLayer1("Sakuya"); return false; case "MarisaB1": PlayInLayer1("Marisa"); return false; default: return true; } } private static void PlayInLayer1(string bgmName) { AudioManager.LeaveLayer0(); if (Singleton<AudioManager>.Instance.playingUiBgm) { Singleton<AudioManager>.Instance.playingUiBgm = false; AudioManager.PlayBgm(bgmName, 0f, false); } else { AudioManager.FadeOutAndPlayBgm(bgmName, 1f, 0f, 0f, false); } } } } public static class Utils { public struct Mana { public int manaW; public int manaU; public int manaB; public int manaR; public int manaG; public int manaC; public int manaP; public Mana(int manaW, int manaU, int manaB, int manaR, int manaG, int manaC, int manaP) { this.manaW = manaW; this.manaU = manaU; this.manaB = manaB; this.manaR = manaR; this.manaG = manaG; this.manaC = manaC; this.manaP = manaP; } } [CompilerGenerated] private sealed class <AttackTargetActions>d__14 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private Type cardType; public Type <>3__cardType; private bool upgraded; public bool <>3__upgraded; private EnemyUnit enemyUnit; public EnemyUnit <>3__enemyUnit; private Mana mana; public Mana <>3__mana; private Unit target; public Unit <>3__target; private string move; public string <>3__move; private string gunName; public string <>3__gunName; private int damage; public int <>3__damage; private int times; public int <>3__times; private bool isAccuracy; public bool <>3__isAccuracy; private string followGunName; public string <>3__followGunName; private List<DamageAction> <damageActions>5__1; private IEnumerator<BattleAction> <>s__2; private BattleAction <action>5__3; private DamageAction <damageAction>5__4; private DamageAction <damageAction2>5__5; private DamageAction <damageAction4>5__6; private int <i>5__7; private DamageAction <damageAction3>5__8; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <AttackTargetActions>d__14(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <damageActions>5__1 = null; <>s__2 = null; <action>5__3 = null; <damageAction>5__4 = null; <damageAction2>5__5 = null; <damageAction4>5__6 = null; <damageAction3>5__8 = null; <>1__state = -2; } private bool MoveNext() { //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Expected O, but got Unknown //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Expected O, but got Unknown //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Expected O, but got Unknown //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Expected O, but got Unknown //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Expected O, but got Unknown //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>s__2 = ShowCardActions(cardType, upgraded, (Unit)(object)enemyUnit, mana).GetEnumerator(); <>1__state = -3; goto IL_00d2; case 1: <>1__state = -3; <action>5__3 = null; goto IL_00d2; case 2: <>1__state = -1; goto IL_0134; case 3: <>1__state = -1; <damageAction>5__4 = null; goto IL_0421; case 4: <>1__state = -1; if (times > 2) { <i>5__7 = 0; goto IL_0355; } goto IL_036f; case 5: <>1__state = -1; <damageAction3>5__8 = null; <i>5__7++; goto IL_0355; case 6: <>1__state = -1; <damageAction2>5__5 = null; <damageAction4>5__6 = null; goto IL_0421; case 7: { <>1__state = -1; break; } IL_0355: if (<i>5__7 < times - 2) { if (((Unit)enemyUnit).Battle.BattleShouldEnd || ((Unit)enemyUnit).IsNotAlive) { return false; } <damageAction3>5__8 = new DamageAction((Unit)(object)enemyUnit, target, DamageInfo.Attack((float)damage, isAccuracy), BasicTypeExtensions.IsNullOrEmpty(followGunName) ? gunName : followGunName, (GunType)2); <damageActions>5__1.Add(<damageAction3>5__8); <>2__current = (BattleAction)(object)<damageAction3>5__8; <>1__state = 5; return true; } goto IL_036f; IL_0134: if (times < 2) { if (((Unit)enemyUnit).Battle.BattleShouldEnd || ((Unit)enemyUnit).IsNotAlive) { return false; } <damageAction>5__4 = new DamageAction((Unit)(object)enemyUnit, target, DamageInfo.Attack((float)damage, isAccuracy), gunName, (GunType)0); <damageActions>5__1.Add(<damageAction>5__4); <>2__current = (BattleAction)(object)<damageAction>5__4; <>1__state = 3; return true; } if (((Unit)enemyUnit).Battle.BattleShouldEnd || ((Unit)enemyUnit).IsNotAlive) { return false; } <damageAction2>5__5 = new DamageAction((Unit)(object)enemyUnit, target, DamageInfo.Attack((float)damage, isAccuracy), gunName, (GunType)1); <damageActions>5__1.Add(<damageAction2>5__5); <>2__current = (BattleAction)(object)<damageAction2>5__5; <>1__state = 4; return true; IL_0421: if (!CollectionsExtensions.Empty<DamageAction>((IReadOnlyCollection<DamageAction>)<damageActions>5__1)) { <>2__current = (BattleAction)new StatisticalTotalDamageAction((IEnumerable<DamageAction>)<damageActions>5__1); <>1__state = 7; return true; } break; IL_00d2: if (<>s__2.MoveNext()) { <action>5__3 = <>s__2.Current; <>2__current = <action>5__3; <>1__state = 1; return true; } <>m__Finally1(); <>s__2 = null; <damageActions>5__1 = new List<DamageAction>(); if (move != null) { <>2__current = (BattleAction)new EnemyMoveAction(enemyUnit, move, true); <>1__state = 2; return true; } goto IL_0134; IL_036f: if (((Unit)enemyUnit).Battle.BattleShouldEnd || ((Unit)enemyUnit).IsNotAlive) { return false; } <damageAction4>5__6 = new DamageAction((Unit)(object)enemyUnit, target, DamageInfo.Attack((float)damage, isAccuracy), BasicTypeExtensions.IsNullOrEmpty(followGunName) ? gunName : followGunName, (GunType)3); <damageActions>5__1.Add(<damageAction4>5__6); <>2__current = (BattleAction)(object)<damageAction4>5__6; <>1__state = 6; return true; } return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__2 != null) { <>s__2.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <AttackTargetActions>d__14 <AttackTargetActions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <AttackTargetActions>d__ = this; } else { <AttackTargetActions>d__ = new <AttackTargetActions>d__14(0); } <AttackTargetActions>d__.cardType = <>3__cardType; <AttackTargetActions>d__.upgraded = <>3__upgraded; <AttackTargetActions>d__.enemyUnit = <>3__enemyUnit; <AttackTargetActions>d__.mana = <>3__mana; <AttackTargetActions>d__.target = <>3__target; <AttackTargetActions>d__.move = <>3__move; <AttackTargetActions>d__.gunName = <>3__gunName; <AttackTargetActions>d__.damage = <>3__damage; <AttackTargetActions>d__.times = <>3__times; <AttackTargetActions>d__.isAccuracy = <>3__isAccuracy; <AttackTargetActions>d__.followGunName = <>3__followGunName; return <AttackTargetActions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <AttackTargetActions>d__15 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private EnemyUnit source; public EnemyUnit <>3__source; private IEnumerable<Unit> targets; public IEnumerable<Unit> <>3__targets; private string move; public string <>3__move; private string gunName; public string <>3__gunName; private int damage; public int <>3__damage; private int times; public int <>3__times; private bool isAccuracy; public bool <>3__isAccuracy; private string followGunName; public string <>3__followGunName; private List<DamageAction> <damageActions>5__1; private DamageAction <damageAction>5__2; private DamageAction <damageAction2>5__3; private DamageAction <damageAction4>5__4; private int <i>5__5; private DamageAction <damageAction3>5__6; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <AttackTargetActions>d__15(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <damageActions>5__1 = null; <damageAction>5__2 = null; <damageAction2>5__3 = null; <damageAction4>5__4 = null; <damageAction3>5__6 = null; <>1__state = -2; } private bool MoveNext() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Expected O, but got Unknown //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Expected O, but got Unknown //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <damageActions>5__1 = new List<DamageAction>(); if (move != null) { <>2__current = (BattleAction)new EnemyMoveAction(source, move, true); <>1__state = 1; return true; } goto IL_0094; case 1: <>1__state = -1; goto IL_0094; case 2: <>1__state = -1; <damageAction>5__2 = null; goto IL_035a; case 3: <>1__state = -1; if (times > 2) { <i>5__5 = 0; goto IL_0295; } goto IL_02af; case 4: <>1__state = -1; <damageAction3>5__6 = null; <i>5__5++; goto IL_0295; case 5: <>1__state = -1; <damageAction2>5__3 = null; <damageAction4>5__4 = null; goto IL_035a; case 6: { <>1__state = -1; break; } IL_035a: if (!CollectionsExtensions.Empty<DamageAction>((IReadOnlyCollection<DamageAction>)<damageActions>5__1)) { <>2__current = (BattleAction)new StatisticalTotalDamageAction((IEnumerable<DamageAction>)<damageActions>5__1); <>1__state = 6; return true; } break; IL_0295: if (<i>5__5 < times - 2) { if (((Unit)source).Battle.BattleShouldEnd || ((Unit)source).IsNotAlive) { return false; } <damageAction3>5__6 = new DamageAction((Unit)(object)source, targets, DamageInfo.Attack((float)damage, isAccuracy), BasicTypeExtensions.IsNullOrEmpty(followGunName) ? gunName : followGunName, (GunType)2); <damageActions>5__1.Add(<damageAction3>5__6); <>2__current = (BattleAction)(object)<damageAction3>5__6; <>1__state = 4; return true; } goto IL_02af; IL_02af: if (((Unit)source).Battle.BattleShouldEnd || ((Unit)source).IsNotAlive) { return false; } <damageAction4>5__4 = new DamageAction((Unit)(object)source, targets, DamageInfo.Attack((float)damage, isAccuracy), BasicTypeExtensions.IsNullOrEmpty(followGunName) ? gunName : followGunName, (GunType)3); <damageActions>5__1.Add(<damageAction4>5__4); <>2__current = (BattleAction)(object)<damageAction4>5__4; <>1__state = 5; return true; IL_0094: if (times < 2) { if (((Unit)source).Battle.BattleShouldEnd || ((Unit)source).IsNotAlive) { return false; } <damageAction>5__2 = new DamageAction((Unit)(object)source, targets, DamageInfo.Attack((float)damage, isAccuracy), gunName, (GunType)0); <damageActions>5__1.Add(<damageAction>5__2); <>2__current = (BattleAction)(object)<damageAction>5__2; <>1__state = 2; return true; } if (((Unit)source).Battle.BattleShouldEnd || ((Unit)source).IsNotAlive) { return false; } <damageAction2>5__3 = new DamageAction((Unit)(object)source, targets, DamageInfo.Attack((float)damage, isAccuracy), gunName, (GunType)1); <damageActions>5__1.Add(<damageAction2>5__3); <>2__current = (BattleAction)(object)<damageAction2>5__3; <>1__state = 3; return 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() { <AttackTargetActions>d__15 <AttackTargetActions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <AttackTargetActions>d__ = this; } else { <AttackTargetActions>d__ = new <AttackTargetActions>d__15(0); } <AttackTargetActions>d__.source = <>3__source; <AttackTargetActions>d__.targets = <>3__targets; <AttackTargetActions>d__.move = <>3__move; <AttackTargetActions>d__.gunName = <>3__gunName; <AttackTargetActions>d__.damage = <>3__damage; <AttackTargetActions>d__.times = <>3__times; <AttackTargetActions>d__.isAccuracy = <>3__isAccuracy; <AttackTargetActions>d__.followGunName = <>3__followGunName; return <AttackTargetActions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <ChangeSeLevelActions>d__2 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private Type statusEffect; public Type <>3__statusEffect; private int level; public int <>3__level; private Unit unit; public Unit <>3__unit; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ChangeSeLevelActions>d__2(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; StatusEffect obj = unit.GetStatusEffect(statusEffect); obj.Level += level; 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() { <ChangeSeLevelActions>d__2 <ChangeSeLevelActions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <ChangeSeLevelActions>d__ = this; } else { <ChangeSeLevelActions>d__ = new <ChangeSeLevelActions>d__2(0); } <ChangeSeLevelActions>d__.statusEffect = <>3__statusEffect; <ChangeSeLevelActions>d__.level = <>3__level; <ChangeSeLevelActions>d__.unit = <>3__unit; return <ChangeSeLevelActions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <ManaActions>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private Unit unit; public Unit <>3__unit; private Mana mana; public Mana <>3__mana; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ManaActions>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; if (mana.manaW != 0) { ManaWSe statusEffect = unit.GetStatusEffect<ManaWSe>(); ((StatusEffect)statusEffect).Level = ((StatusEffect)statusEffect).Level + mana.manaW; } if (mana.manaU != 0) { ManaUSe statusEffect2 = unit.GetStatusEffect<ManaUSe>(); ((StatusEffect)statusEffect2).Level = ((StatusEffect)statusEffect2).Level + mana.manaU; } if (mana.manaB != 0) { ManaBSe statusEffect3 = unit.GetStatusEffect<ManaBSe>(); ((StatusEffect)statusEffect3).Level = ((StatusEffect)statusEffect3).Level + mana.manaB; } if (mana.manaR != 0) { ManaRSe statusEffect4 = unit.GetStatusEffect<ManaRSe>(); ((StatusEffect)statusEffect4).Level = ((StatusEffect)statusEffect4).Level + mana.manaR; } if (mana.manaG != 0) { ManaGSe statusEffect5 = unit.GetStatusEffect<ManaGSe>(); ((StatusEffect)statusEffect5).Level = ((StatusEffect)statusEffect5).Level + mana.manaG; } if (mana.manaC != 0) { ManaCSe statusEffect6 = unit.GetStatusEffect<ManaCSe>(); ((StatusEffect)statusEffect6).Level = ((StatusEffect)statusEffect6).Level + mana.manaC; } if (mana.manaP != 0) { ManaPSe statusEffect7 = unit.GetStatusEffect<ManaPSe>(); ((StatusEffect)statusEffect7).Level = ((StatusEffect)statusEffect7).Level + mana.manaP; } 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() { <ManaActions>d__1 <ManaActions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <ManaActions>d__ = this; } else { <ManaActions>d__ = new <ManaActions>d__1(0); } <ManaActions>d__.unit = <>3__unit; <ManaActions>d__.mana = <>3__mana; return <ManaActions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <ShowCardActions>d__3 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private Type cardType; public Type <>3__cardType; private bool upgraded; public bool <>3__upgraded; private Unit unit; public Unit <>3__unit; private Mana mana; public Mana <>3__mana; private Card <card>5__1; private IEnumerator<BattleAction> <>s__2; private BattleAction <action>5__3; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ShowCardActions>d__3(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 3) { try { } finally { <>m__Finally1(); } } <card>5__1 = null; <>s__2 = null; <action>5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <card>5__1 = Library.CreateCard(cardType, upgraded); <>2__current = (BattleAction)new AddCardsToExileAction((Card[])(object)new Card[1] { <card>5__1 }); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = (BattleAction)new RemoveCardAction(<card>5__1); <>1__state = 2; return true; case 2: <>1__state = -1; <>s__2 = ManaActions(unit, mana).GetEnumerator(); <>1__state = -3; break; case 3: <>1__state = -3; <action>5__3 = null; break; } if (<>s__2.MoveNext()) { <action>5__3 = <>s__2.Current; <>2__current = <action>5__3; <>1__state = 3; return true; } <>m__Finally1(); <>s__2 = null; return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__2 != null) { <>s__2.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <ShowCardActions>d__3 <ShowCardActions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <ShowCardActions>d__ = this; } else { <ShowCardActions>d__ = new <ShowCardActions>d__3(0); } <ShowCardActions>d__.cardType = <>3__cardType; <ShowCardActions>d__.upgraded = <>3__upgraded; <ShowCardActions>d__.unit = <>3__unit; <ShowCardActions>d__.mana = <>3__mana; return <ShowCardActions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <ShowCardAndAddCardActions>d__8 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private Type cardType; public Type <>3__cardType; private bool upgraded; public bool <>3__upgraded; private EnemyUnit enemyUnit; public EnemyUnit <>3__enemyUnit; private Mana mana; public Mana <>3__mana; private string move; public string <>3__move; private IEnumerable<Card> cards; public IEnumerable<Card> <>3__cards; private AddCardZone zone; public AddCardZone <>3__zone; private PerformAction perform; public PerformAction <>3__perform; private IEnumerator<BattleAction> <>s__1; private BattleAction <action>5__2; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ShowCardAndAddCardActions>d__8(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <>s__1 = null; <action>5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Expected I4, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Expected O, but got Unknown //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Expected O, but got Unknown //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Expected O, but got Unknown //IL_0193: Unknown result type (might be due to invalid IL or missing references) try { AddCardZone val; BattleAction val2; switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>s__1 = ShowCardActions(cardType, upgraded, (Unit)(object)enemyUnit, mana).GetEnumerator(); <>1__state = -3; goto IL_00b4; case 1: <>1__state = -3; <action>5__2 = null; goto IL_00b4; case 2: <>1__state = -1; goto IL_010b; case 3: <>1__state = -1; goto IL_013b; case 4: { <>1__state = -1; return false; } IL_00b4: if (<>s__1.MoveNext()) { <action>5__2 = <>s__1.Current; <>2__current = <action>5__2; <>1__state = 1; return true; } <>m__Finally1(); <>s__1 = null; if (move != null) { <>2__current = (BattleAction)new EnemyMoveAction(enemyUnit, move, true); <>1__state = 2; return true; } goto IL_010b; IL_013b: if (1 == 0) { } val = zone; val2 = (BattleAction)((int)val switch { 0 => (object)new AddCardsToDiscardAction(cards, (AddCardsType)0), 1 => (object)new AddCardsToDrawZoneAction(cards, (DrawZoneTarget)2, (AddCardsType)0), 2 => (object)new AddCardsToHandAction(cards, (AddCardsType)0), _ => throw new ArgumentOutOfRangeException("zone", zone, null), }); if (1 == 0) { } <>2__current = val2; <>1__state = 4; return true; IL_010b: if (perform != null) { <>2__current = (BattleAction)(object)perform; <>1__state = 3; return true; } goto IL_013b; } } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__1 != null) { <>s__1.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) <ShowCardAndAddCardActions>d__8 <ShowCardAndAddCardActions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <ShowCardAndAddCardActions>d__ = this; } else { <ShowCardAndAddCardActions>d__ = new <ShowCardAndAddCardActions>d__8(0); } <ShowCardAndAddCardActions>d__.cardType = <>3__cardType; <ShowCardAndAddCardActions>d__.upgraded = <>3__upgraded; <ShowCardAndAddCardActions>d__.enemyUnit = <>3__enemyUnit; <ShowCardAndAddCardActions>d__.mana = <>3__mana; <ShowCardAndAddCardActions>d__.move = <>3__move; <ShowCardAndAddCardActions>d__.cards = <>3__cards; <ShowCardAndAddCardActions>d__.zone = <>3__zone; <ShowCardAndAddCardActions>d__.perform = <>3__perform; return <ShowCardAndAddCardActions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <ShowCardAndAttackActions>d__6 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private Type cardType; public Type <>3__cardType; private bool upgraded; public bool <>3__upgraded; private EnemyUnit enemyUnit; public EnemyUnit <>3__enemyUnit; private Mana mana; public Mana <>3__mana; private string move; public string <>3__move; private string gunName; public string <>3__gunName; private int damage; public int <>3__damage; private int times; public int <>3__times; private bool isAccuracy; public bool <>3__isAccuracy; private string followGunName; public string <>3__followGunName; private List<DamageAction> <damageActions>5__1; private IEnumerator<BattleAction> <>s__2; private BattleAction <action>5__3; private DamageAction <damageAction>5__4; private DamageAction <damageAction2>5__5; private DamageAction <damageAction4>5__6; private int <i>5__7; private DamageAction <damageAction3>5__8; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ShowCardAndAttackActions>d__6(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <damageActions>5__1 = null; <>s__2 = null; <action>5__3 = null; <damageAction>5__4 = null; <damageAction2>5__5 = null; <damageAction4>5__6 = null; <damageAction3>5__8 = null; <>1__state = -2; } private bool MoveNext() { //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_046f: Expected O, but got Unknown //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Expected O, but got Unknown //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Expected O, but got Unknown //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_040a: Expected O, but got Unknown //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>s__2 = ShowCardActions(cardType, upgraded, (Unit)(object)enemyUnit, mana).GetEnumerator(); <>1__state = -3; goto IL_00d2; case 1: <>1__state = -3; <action>5__3 = null; goto IL_00d2; case 2: <>1__state = -1; goto IL_0134; case 3: <>1__state = -1; <damageAction>5__4 = null; goto IL_0449; case 4: <>1__state = -1; if (times > 2) { <i>5__7 = 0; goto IL_0373; } goto IL_038d; case 5: <>1__state = -1; <damageAction3>5__8 = null; <i>5__7++; goto IL_0373; case 6: <>1__state = -1; <damageAction2>5__5 = null; <damageAction4>5__6 = null; goto IL_0449; case 7: { <>1__state = -1; break; } IL_0373: if (<i>5__7 < times - 2) { if (((Unit)enemyUnit).Battle.BattleShouldEnd || ((Unit)enemyUnit).IsNotAlive) { return false; } <damageAction3>5__8 = new DamageAction((Unit)(object)enemyUnit, (Unit)(object)((Unit)enemyUnit).Battle.Player, DamageInfo.Attack((float)damage, isAccuracy), BasicTypeExtensions.IsNullOrEmpty(followGunName) ? gunName : followGunName, (GunType)2); <damageActions>5__1.Add(<damageAction3>5__8); <>2__current = (BattleAction)(object)<damageAction3>5__8; <>1__state = 5; return true; } goto IL_038d; IL_0134: if (times < 2) { if (((Unit)enemyUnit).Battle.BattleShouldEnd || ((Unit)enemyUnit).IsNotAlive) { return false; } <damageAction>5__4 = new DamageAction((Unit)(object)enemyUnit, (Unit)(object)((Unit)enemyUnit).Battle.Player, DamageInfo.Attack((float)damage, isAccuracy), gunName, (GunType)0); <damageActions>5__1.Add(<damageAction>5__4); <>2__current = (BattleAction)(object)<damageAction>5__4; <>1__state = 3; return true; } if (((Unit)enemyUnit).Battle.BattleShouldEnd || ((Unit)enemyUnit).IsNotAlive) { return false; } <damageAction2>5__5 = new DamageAction((Unit)(object)enemyUnit, (Unit)(object)((Unit)enemyUnit).Battle.Player, DamageInfo.Attack((float)damage, isAccuracy), gunName, (GunType)1); <damageActions>5__1.Add(<damageAction2>5__5); <>2__current = (BattleAction)(object)<damageAction2>5__5; <>1__state = 4; return true; IL_0449: if (!CollectionsExtensions.Empty<DamageAction>((IReadOnlyCollection<DamageAction>)<damageActions>5__1)) { <>2__current = (BattleAction)new StatisticalTotalDamageAction((IEnumerable<DamageAction>)<damageActions>5__1); <>1__state = 7; return true; } break; IL_00d2: if (<>s__2.MoveNext()) { <action>5__3 = <>s__2.Current; <>2__current = <action>5__3; <>1__state = 1; return true; } <>m__Finally1(); <>s__2 = null; <damageActions>5__1 = new List<DamageAction>(); if (move != null) { <>2__current = (BattleAction)new EnemyMoveAction(enemyUnit, move, true); <>1__state = 2; return true; } goto IL_0134; IL_038d: if (((Unit)enemyUnit).Battle.BattleShouldEnd || ((Unit)enemyUnit).IsNotAlive) { return false; } <damageAction4>5__6 = new DamageAction((Unit)(object)enemyUnit, (Unit)(object)((Unit)enemyUnit).Battle.Player, DamageInfo.Attack((float)damage, isAccuracy), BasicTypeExtensions.IsNullOrEmpty(followGunName) ? gunName : followGunName, (GunType)3); <damageActions>5__1.Add(<damageAction4>5__6); <>2__current = (BattleAction)(object)<damageAction4>5__6; <>1__state = 6; return true; } return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__2 != null) { <>s__2.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <ShowCardAndAttackActions>d__6 <ShowCardAndAttackActions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <ShowCardAndAttackActions>d__ = this; } else { <ShowCardAndAttackActions>d__ = new <ShowCardAndAttackActions>d__6(0); } <ShowCardAndAttackActions>d__.cardType = <>3__cardType; <ShowCardAndAttackActions>d__.upgraded = <>3__upgraded; <ShowCardAndAttackActions>d__.enemyUnit = <>3__enemyUnit; <ShowCardAndAttackActions>d__.mana = <>3__mana; <ShowCardAndAttackActions>d__.move = <>3__move; <ShowCardAndAttackActions>d__.gunName = <>3__gunName; <ShowCardAndAttackActions>d__.damage = <>3__damage; <ShowCardAndAttackActions>d__.times = <>3__times; <ShowCardAndAttackActions>d__.isAccuracy = <>3__isAccuracy; <ShowCardAndAttackActions>d__.followGunName = <>3__followGunName; return <ShowCardAndAttackActions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <ShowCardAndBattleActions>d__12 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private Type cardType; public Type <>3__cardType; private bool upgraded; public bool <>3__upgraded; private EnemyUnit enemyUnit; public EnemyUnit <>3__enemyUnit; private Mana mana; public Mana <>3__mana; private string move; public string <>3__move; private BattleAction battleAction; public BattleAction <>3__battleAction; private IEnumerator<BattleAction> <>s__1; private BattleAction <action>5__2; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ShowCardAndBattleActions>d__12(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <>s__1 = null; <action>5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>s__1 = ShowCardActions(cardType, upgraded, (Unit)(object)enemyUnit, mana).GetEnumerator(); <>1__state = -3; goto IL_00ab; case 1: <>1__state = -3; <action>5__2 = null; goto IL_00ab; case 2: <>1__state = -1; goto IL_00ff; case 3: { <>1__state = -1; break; } IL_00ab: if (<>s__1.MoveNext()) { <action>5__2 = <>s__1.Current; <>2__current = <action>5__2; <>1__state = 1; return true; } <>m__Finally1(); <>s__1 = null; if (move != null) { <>2__current = (BattleAction)new EnemyMoveAction(enemyUnit, move, true); <>1__state = 2; return true; } goto IL_00ff; IL_00ff: if (battleAction != null) { <>2__current = battleAction; <>1__state = 3; return true; } break; } return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__1 != null) { <>s__1.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <ShowCardAndBattleActions>d__12 <ShowCardAndBattleActions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <ShowCardAndBattleActions>d__ = this; } else { <ShowCardAndBattleActions>d__ = new <ShowCardAndBattleActions>d__12(0); } <ShowCardAndBattleActions>d__.cardType = <>3__cardType; <ShowCardAndBattleActions>d__.upgraded = <>3__upgraded; <ShowCardAndBattleActions>d__.enemyUnit = <>3__enemyUnit; <ShowCardAndBattleActions>d__.mana = <>3__mana; <ShowCardAndBattleActions>d__.move = <>3__move; <ShowCardAndBattleActions>d__.battleAction = <>3__battleAction; return <ShowCardAndBattleActions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <ShowCardAndBattleActions>d__13 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private Type cardType; public Type <>3__cardType; private bool upgraded; public bool <>3__upgraded; private EnemyUnit enemyUnit; public EnemyUnit <>3__enemyUnit; private Mana mana; public Mana <>3__mana; private string move; public string <>3__move; private IEnumerable<BattleAction> battleActions; public IEnumerable<BattleAction> <>3__battleActions; private IEnumerator<BattleAction> <>s__1; private BattleAction <action>5__2; private IEnumerator<BattleAction> <>s__3; private BattleAction <battleAction>5__4; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ShowCardAndBattleActions>d__13(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { switch (<>1__state) { case -3: case 1: try { } finally { <>m__Finally1(); } break; case -4: case 3: try { } finally { <>m__Finally2(); } break; } <>s__1 = null; <action>5__2 = null; <>s__3 = null; <battleAction>5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>s__1 = ShowCardActions(cardType, upgraded, (Unit)(object)enemyUnit, mana).GetEnumerator(); <>1__state = -3; goto IL_00ab; case 1: <>1__state = -3; <action>5__2 = null; goto IL_00ab; case 2: <>1__state = -1; goto IL_0102; case 3: { <>1__state = -4; <battleAction>5__4 = null; goto IL_0164; } IL_00ab: if (<>s__1.MoveNext()) { <action>5__2 = <>s__1.Current; <>2__current = <action>5__2; <>1__state = 1; return true; } <>m__Finally1(); <>s__1 = null; if (move != null) { <>2__current = (BattleAction)new EnemyMoveAction(enemyUnit, move, true); <>1__state = 2; return true; } goto IL_0102; IL_0164: if (<>s__3.MoveNext()) { <battleAction>5__4 = <>s__3.Current; <>2__current = <battleAction>5__4; <>1__state = 3; return true; } <>m__Finally2(); <>s__3 = null; break; IL_0102: if (battleActions == null) { break; } <>s__3 = battleActions.GetEnumerator(); <>1__state = -4; goto IL_0164; } return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__1 != null) { <>s__1.Dispose(); } } private void <>m__Finally2() { <>1__state = -1; if (<>s__3 != null) { <>s__3.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <ShowCardAndBattleActions>d__13 <ShowCardAndBattleActions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <ShowCardAndBattleActions>d__ = this; } else { <ShowCardAndBattleActions>d__ = new <ShowCardAndBattleActions>d__13(0); } <ShowCardAndBattleActions>d__.cardType = <>3__cardType; <ShowCardAndBattleActions>d__.upgraded = <>3__upgraded; <ShowCardAndBattleActions>d__.enemyUnit = <>3__enemyUnit; <ShowCardAndBattleActions>d__.mana = <>3__mana; <ShowCardAndBattleActions>d__.move = <>3__move; <ShowCardAndBattleActions>d__.battleActions = <>3__battleActions; return <ShowCardAndBattleActions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <ShowCardAndChangeSeLevelActions>d__4 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private Type cardType; public Type <>3__cardType; private bool upgraded; public bool <>3__upgraded; private Unit unit; public Unit <>3__unit; private Mana mana; public Mana <>3__mana; private Type statusEffect; public Type <>3__statusEffect; private int level; public int <>3__level; private Card <card>5__1; private IEnumerator<BattleAction> <>s__2; private BattleAction <action>5__3; private IEnumerator<BattleAction> <>s__4; private BattleAction <action>5__5; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ShowCardAndChangeSeLevelActions>d__4(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { switch (<>1__state) { case -3: case 3: try { } finally { <>m__Finally1(); } break; case -4: case 4: try { } finally { <>m__Finally2(); } break; } <card>5__1 = null; <>s__2 = null; <action>5__3 = null; <>s__4 = null; <action>5__5 = null; <>1__state = -2; } private bool MoveNext() { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <card>5__1 = Library.CreateCard(cardType, upgraded); <>2__current = (BattleAction)new AddCardsToExileAction((Card[])(object)new Card[1] { <card>5__1 }); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = (BattleAction)new RemoveCardAction(<card>5__1); <>1__state = 2; return true; case 2: <>1__state = -1; <>s__2 = ManaActions(unit, mana).GetEnumerator(); <>1__state = -3; goto IL_0111; case 3: <>1__state = -3; <action>5__3 = null; goto IL_0111; case 4: { <>1__state = -4; <action>5__5 = null; break; } IL_0111: if (<>s__2.MoveNext()) { <action>5__3 = <>s__2.Current; <>2__current = <action>5__3; <>1__state = 3; return true; } <>m__Finally1(); <>s__2 = null; <>s__4 = ChangeSeLevelActions(statusEffect, level, unit).GetEnumerator(); <>1__state = -4; break; } if (<>s__4.MoveNext()) { <action>5__5 = <>s__4.Current; <>2__current = <action>5__5; <>1__state = 4; return true; } <>m__Finally2(); <>s__4 = null; return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__2 != null) { <>s__2.Dispose(); } } private void <>m__Finally2() { <>1__state = -1; if (<>s__4 != null) { <>s__4.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <ShowCardAndChangeSeLevelActions>d__4 <ShowCardAndChangeSeLevelActions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <ShowCardAndChangeSeLevelActions>d__ = this; } else { <ShowCardAndChangeSeLevelActions>d__ = new <ShowCardAndChangeSeLevelActions>d__4(0); } <ShowCardAndChangeSeLevelActions>d__.cardType = <>3__cardType; <ShowCardAndChangeSeLevelActions>d__.upgraded = <>3__upgraded; <ShowCardAndChangeSeLevelActions>d__.unit = <>3__unit; <ShowCardAndChangeSeLevelActions>d__.mana = <>3__mana; <ShowCardAndChangeSeLevelActions>d__.statusEffect = <>3__statusEffect; <ShowCardAndChangeSeLevelActions>d__.level = <>3__level; return <ShowCardAndChangeSeLevelActions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <ShowCardAndDefendActions>d__7 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private Type cardType; public Type <>3__cardType; private bool upgraded; public bool <>3__upgraded; private EnemyUnit enemyUnit; public EnemyUnit <>3__enemyUnit; private Mana mana; public Mana <>3__mana; private Unit target; public Unit <>3__target; private string move; public string <>3__move; private int block; public int <>3__block; private int shield; public int <>3__shield; private int graze; public int <>3__graze; private bool cast; public bool <>3__cast; private PerformAction performAction; public PerformAction <>3__performAction; private IEnumerator<BattleAction> <>s__1; private BattleAction <action>5__2; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ShowCardAndDefendActions>d__7(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <>s__1 = null; <action>5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>s__1 = ShowCardActions(cardType, upgraded, (Unit)(object)enemyUnit, mana).GetEnumerator(); <>1__state = -3; goto IL_00c0; case 1: <>1__state = -3; <action>5__2 = null; goto IL_00c0; case 2: <>1__state = -1; goto IL_0117; case 3: <>1__state = -1; goto IL_017b; case 4: <>1__state = -1; goto IL_01ad; case 5: { <>1__state = -1; break; } IL_00c0: if (<>s__1.MoveNext()) { <action>5__2 = <>s__1.Current; <>2__current = <action>5__2; <>1__state = 1; return true; } <>m__Finally1(); <>s__1 = null; if (move != null) { <>2__current = (BattleAction)new EnemyMoveAction(enemyUnit, move, true); <>1__state = 2; return true; } goto IL_0117; IL_017b: if (performAction != null) { <>2__current = (BattleAction)(object)performAction; <>1__state = 4; return true; } goto IL_01ad; IL_01ad: if (graze > 0) { <>2__current = (BattleAction)(object)new ApplyStatusEffectAction<Graze>((Unit)(((object)target) ?? ((object)enemyUnit)), (int?)graze, (int?)null, (int?)null, (int?)null, 0f, true); <>1__state = 5; return true; } break; IL_0117: if (block > 0 || shield > 0) { <>2__current = (BattleAction)new CastBlockShieldAction((Unit)(object)enemyUnit, (Unit)(((object)target) ?? ((object)enemyUnit)), block, shield, (BlockShieldType)1, cast); <>1__state = 3; return true; } goto IL_017b; } return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__1 != null) { <>s__1.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <ShowCardAndDefendActions>d__7 <ShowCardAndDefendActions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <ShowCardAndDefendActions>d__ = this; } else { <ShowCardAndDefendActions>d__ = new <ShowCardAndDefendActions>d__7(0); } <ShowCardAndDefendActions>d__.cardType = <>3__cardType; <ShowCardAndDefendActions>d__.upgraded = <>3__upgraded; <ShowCardAndDefendActions>d__.enemyUnit = <>3__enemyUnit; <ShowCardAndDefendActions>d__.mana = <>3__mana; <ShowCardAndDefendActions>d__.target = <>3__target; <ShowCardAndDefendActions>d__.move = <>3__move; <ShowCardAndDefendActions>d__.block = <>3__block; <ShowCardAndDefendActions>d__.shield = <>3__shield; <ShowCardAndDefendActions>d__.graze = <>3__graze; <ShowCardAndDefendActions>d__.cast = <>3__cast; <ShowCardAndDefendActions>d__.performAction = <>3__performAction; return <ShowCardAndDefendActions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <ShowCardAndNegativeActions>d__10 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private Type cardType; public Type <>3__cardType; private bool upgraded; public bool <>3__upgraded; private EnemyUnit enemyUnit; public EnemyUnit <>3__enemyUnit; private Mana mana; public Mana <>3__mana; private string move; public string <>3__move; private Type type; public Type <>3__type; private int? level; public int? <>3__level; private int? duration; public int? <>3__duration; private bool startAutoDecreasing; public bool <>3__startAutoDecreasing; private PerformAction performAction; public PerformAction <>3__performAction; private IEnumerator<BattleAction> <>s__1; private BattleAction <action>5__2; private EnemyUnit <lastAliveEnemy>5__3; private int? <limit>5__4; private EnemyUnit <target>5__5; private EnemyUnit <target2>5__6; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ShowCardAndNegativeActions>d__10(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <>s__1 = null; <action>5__2 = null; <lastAliveEnemy>5__3 = null; <target>5__5 = null; <target2>5__6 = null; <>1__state = -2; } private bool MoveNext() { //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>s__1 = ShowCardActions(cardType, upgraded, (Unit)(object)enemyUnit, mana).GetEnumerator(); <>1__state = -3; goto IL_00c9; case 1: <>1__state = -3; <action>5__2 = null; goto IL_00c9; case 2: <>1__state = -1; goto IL_0120; case 3: <>1__state = -1; goto IL_0150; case 4: <>1__state = -1; return false; case 5: <>1__state = -1; return false; case 6: { <>1__state = -1; return false; } IL_00c9: if (<>s__1.MoveNext()) { <action>5__2 = <>s__1.Current; <>2__current = <action>5__2; <>1__state = 1; return true; } <>m__Finally1(); <>s__1 = null; if (move != null) { <>2__current = (BattleAction)new EnemyMoveAction(enemyUnit, move, true); <>1__state = 2; return true; } goto IL_0120; IL_0150: if (type == typeof(Vulnerable) || type == typeof(LockedOn)) { <lastAliveEnemy>5__3 = ((Unit)enemyUnit).Battle.LastAliveEnemy; if (<lastAliveEnemy>5__3 != null && <lastAliveEnemy>5__3 != enemyUnit) { if (type == typeof(Vulnerable)) { <target>5__5 = enemyUnit; <limit>5__4 = (startAutoDecreasing ? 1 : 0); <>2__current = (BattleAction)(object)new ApplyStatusEffectAction<EnemyVulnerable>((Unit)(object)<target>5__5, duration, (int?)null, (int?)null, <limit>5__4, 0f, true); <>1__state = 4; return true; } if (type == typeof(LockedOn)) { <target2>5__6 = enemyUnit; <limit>5__4 = (startAutoDecreasing ? 1 : 0); <>2__current = (BattleAction)(object)new ApplyStatusEffectAction<EnemyLockedOn>((Unit)(object)<target2>5__6, level, (int?)null, (int?)null, <limit>5__4, 0f, true); <>1__state = 5; return true; } } <lastAliveEnemy>5__3 = null; } <>2__current = (BattleAction)new ApplyStatusEffectAction(type, (Unit)(object)((Unit)enemyUnit).Battle.Player, level, duration, (int?)null, (int?)null, 0f, startAutoDecreasing); <>1__state = 6; return true; IL_0120: if (performAction != null) { <>2__current = (BattleAction)(object)performAction; <>1__state = 3; return true; } goto IL_0150; } } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__1 != null) { <>s__1.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <ShowCardAndNegativeActions>d__10 <ShowCardAndNegativeActions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <ShowCardAndNegativeActions>d__ = this; } else { <ShowCardAndNegativeActions>d__ = new <ShowCardAndNegativeActions>d__10(0); } <ShowCardAndNegativeActions>d__.cardType = <>3__cardType; <ShowCardAndNegativeActions>d__.upgraded = <>3__upgraded; <ShowCardAndNegativeActions>d__.enemyUnit = <>3__enemyUnit; <ShowCardAndNegativeActions>d__.mana = <>3__mana; <ShowCardAndNegativeActions>d__.move = <>3__move; <ShowCardAndNegativeActions>d__.type = <>3__type; <ShowCardAndNegativeActions>d__.level = <>3__level; <ShowCardAndNegativeActions>d__.duration = <>3__duration; <ShowCardAndNegativeActions>d__.startAutoDecreasing = <>3__startAutoDecreasing; <ShowCardAndNegativeActions>d__.performAction = <>3__performAction; return <ShowCardAndNegativeActions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <ShowCardAndPerformActions>d__11 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private Type cardType; public Type <>3__cardType; private bool upgraded; public bool <>3__upgraded; private EnemyUnit enemyUnit; public EnemyUnit <>3__enemyUnit; private Mana mana; public Mana <>3__mana; private string move; public string <>3__move; private PerformAction performAction; public PerformAction <>3__performAction; private IEnumerator<BattleAction> <>s__1; private BattleAction <action>5__2; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ShowCardAndPerformActions>d__11(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <>s__1 = null; <action>5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>s__1 = ShowCardActions(cardType, upgraded, (Unit)(object)enemyUnit, mana).GetEnumerator(); <>1__state = -3; goto IL_00ab; case 1: <>1__state = -3; <action>5__2 = null; goto IL_00ab; case 2: <>1__state = -1; goto IL_00ff; case 3: { <>1__state = -1; break; } IL_00ab: if (<>s__1.MoveNext()) { <action>5__2 = <>s__1.Current; <>2__current = <action>5__2; <>1__state = 1; return true; } <>m__Finally1(); <>s__1 = null; if (move != null) { <>2__current = (BattleAction)new EnemyMoveAction(enemyUnit, move, true); <>1__state = 2; return true; } goto IL_00ff; IL_00ff: if (performAction != null) { <>2__current = (BattleAction)(object)performAction; <>1__state = 3; return true; } break; } return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__1 != null) { <>s__1.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <ShowCardAndPerformActions>d__11 <ShowCardAndPerformActions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <ShowCardAndPerformActions>d__ = this; } else { <ShowCardAndPerformActions>d__ = new <ShowCardAndPerformActions>d__11(0); } <ShowCardAndPerformActions>d__.cardType = <>3__cardType; <ShowCardAndPerformActions>d__.upgraded = <>3__upgraded; <ShowCardAndPerformActions>d__.enemyUnit = <>3__enemyUnit; <ShowCardAndPerformActions>d__.mana = <>3__mana; <ShowCardAndPerformActions>d__.move = <>3__move; <ShowCardAndPerformActions>d__.performAction = <>3__performAction; return <ShowCardAndPerformActions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <ShowCardAndPositiveActions>d__9 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private Type cardType; public Type <>3__cardType; private bool upgraded; public bool <>3__upgraded; private EnemyUnit enemyUnit; public EnemyUnit <>3__enemyUnit; private Mana mana; public Mana <>3__mana; private string move; public string <>3__move; private Type type; public Type <>3__type; private int? level; public int? <>3__level; private int? duration; public int? <>3__duration; private float occupationTime; public float <>3__occupationTime; private PerformAction performAction; public PerformAction <>3__performAction; private IEnumerator<BattleAction> <>s__1; private BattleAction <action>5__2; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ShowCardAndPositiveActions>d__9(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <>s__1 = null; <action>5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>s__1 = ShowCardActions(cardType, upgraded, (Unit)(object)enemyUnit, mana).GetEnumerator(); <>1__state = -3; goto IL_00b4; case 1: <>1__state = -3; <action>5__2 = null; goto IL_00b4; case 2: <>1__state = -1; goto IL_010b; case 3: <>1__state = -1; goto IL_0138; case 4: { <>1__state = -1; return false; } IL_00b4: if (<>s__1.MoveNext()) { <action>5__2 = <>s__1.Current; <>2__current = <action>5__2; <>1__state = 1; return true; } <>m__Finally1(); <>s__1 = null; if (move != null) { <>2__current = (BattleAction)new EnemyMoveAction(enemyUnit, move, true); <>1__state = 2; return true; } goto IL_010b; IL_0138: <>2__current = (BattleAction)new ApplyStatusEffectAction(type, (Unit)(object)enemyUnit, level, duration, (int?)null, (int?)null, occupationTime, true); <>1__state = 4; return true; IL_010b: if (performAction != null) { <>2__current = (BattleAction)(object)performAction; <>1__state = 3; return true; } goto IL_0138; } } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__1 != null) { <>s__1.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <ShowCardAndPositiveActions>d__9 <ShowCardAndPositiveActions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <ShowCardAndPositiveActions>d__ = this; } else { <ShowCardAndPositiveActions>d__ = new <ShowCardAndPositiveActions>d__9(0); } <ShowCardAndPositiveActions>d__.cardType = <>3__cardType; <ShowCardAndPositiveActions>d__.upgraded = <>3__upgraded; <ShowCardAndPositiveActions>d__.enemyUnit = <>3__enemyUnit; <ShowCardAndPositiveActions>d__.mana = <>3__mana; <ShowCardAndPositiveActions>d__.move = <>3__move; <ShowCardAndPositiveActions>d__.type = <>3__type; <ShowCardAndPositiveActions>d__.level = <>3__level; <ShowCardAndPositiveActions>d__.duration = <>3__duration; <ShowCardAndPositiveActions>d__.occupationTime = <>3__occupationTime; <ShowCardAndPositiveActions>d__.performAction = <>3__performAction; return <ShowCardAndPositiveActions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <ShowManyCardActions>d__5 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private Type[] cardTypes; public Type[] <>3__cardTypes; private bool upgraded; public bool <>3__upgraded; private Unit unit; public Unit <>3__unit; private Mana mana; public Mana <>3__mana; private Card[] <cards>5__1; private int <i>5__2; private Card <card>5__3; private Card[] <>s__4; private int <>s__5; private Card <card1>5__6; private IEnumerator<BattleAction> <>s__7; private BattleAction <action>5__8; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <ShowManyCardActions>d__5(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 3) { try { } finally { <>m__Finally1(); } } <cards>5__1 = null; <card>5__3 = null; <>s__4 = null; <card1>5__6 = null; <>s__7 = null; <action>5__8 = null; <>1__state = -2; } private bool MoveNext() { //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <cards>5__1 = (Card[])(object)new Card[cardTypes.Length]; <i>5__2 = 0; while (<i>5__2 <= cardTypes.Length) { <card>5__3 = Library.CreateCard(cardTypes[<i>5__2], upgraded); <cards>5__1[<i>5__2] = <card>5__3; <card>5__3 = null; <i>5__2++; } <>2__current = (BattleAction)new AddCardsToExileAction(<cards>5__1); <>1__state = 1; return true; case 1: <>1__state = -1; <>s__4 = <cards>5__1; <>s__5 = 0; goto IL_0148; case 2: <>1__state = -1; <card1>5__6 = null; <>s__5++; goto IL_0148; case 3: { <>1__state = -3; <action>5__8 = null; break; } IL_0148: if (<>s__5 < <>s__4.Length) { <card1>5__6 = <>s__4[<>s__5]; <>2__current = (BattleAction)new RemoveCardAction(<card1>5__6); <>1__state = 2; return true; } <>s__4 = null; <>s__7 = ManaActions(unit, mana).GetEnumerator(); <>1__state = -3; break; } if (<>s__7.MoveNext()) { <action>5__8 = <>s__7.Current; <>2__current = <action>5__8; <>1__state = 3; return true; } <>m__Finally1(); <>s__7 = null; return false; } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__7 != null) { <>s__7.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <ShowManyCardActions>d__5 <ShowManyCardActions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <ShowManyCardActions>d__ = this; } else { <ShowManyCardActions>d__ = new <ShowManyCardActions>d__5(0); } <ShowManyCardActions>d__.cardTypes = <>3__cardTypes; <ShowManyCardActions>d__.upgraded = <>3__upgraded; <ShowManyCardActions>d__.unit = <>3__unit; <ShowManyCardActions>d__.mana = <>3__mana; return <ShowManyCardActions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [IteratorStateMachine(typeof(<ManaActions>d__1))] public static IEnumerable<BattleAction> ManaActions(Unit unit, Mana mana) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ManaActions>d__1(-2) { <>3__unit = unit, <>3__mana = mana }; } [IteratorStateMachine(typeof(<ChangeSeLevelActions>d__2))] public static IEnumerable<BattleAction> ChangeSeLevelActions(Type statusEffect, int level, Unit unit) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ChangeSeLevelActions>d__2(-2) { <>3__statusEffect = statusEffect, <>3__level = level, <>3__unit = unit }; } [IteratorStateMachine(typeof(<ShowCardActions>d__3))] public static IEnumerable<BattleAction> ShowCardActions(Type cardType, bool upgraded, Unit unit, Mana mana) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ShowCardActions>d__3(-2) { <>3__cardType = cardType, <>3__upgraded = upgraded, <>3__unit = unit, <>3__mana = mana }; } [IteratorStateMachine(typeof(<ShowCardAndChangeSeLevelActions>d__4))] public static IEnumerable<BattleAction> ShowCardAndChangeSeLevelActions(Type cardType, bool upgraded, Unit unit, Mana mana, Type statusEffect, int level) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ShowCardAndChangeSeLevelActions>d__4(-2) { <>3__cardType = cardType, <>3__upgraded = upgraded, <>3__unit = unit, <>3__mana = mana, <>3__statusEffect = statusEffect, <>3__level = level }; } [IteratorStateMachine(typeof(<ShowManyCardActions>d__5))] public static IEnumerable<BattleAction> ShowManyCardActions(Type[] cardTypes, bool upgraded, Unit unit, Mana mana) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ShowManyCardActions>d__5(-2) { <>3__cardTypes = cardTypes, <>3__upgraded = upgraded, <>3__unit = unit, <>3__mana = mana }; } [IteratorStateMachine(typeof(<ShowCardAndAttackActions>d__6))] public static IEnumerable<BattleAction> ShowCardAndAttackActions(Type cardType, bool upgraded, EnemyUnit enemyUnit, Mana mana, string move, string gunName, int damage, int times = 1, bool isAccuracy = false, string followGunName = "Instant") { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ShowCardAndAttackActions>d__6(-2) { <>3__cardType = cardType, <>3__upgraded = upgraded, <>3__enemyUnit = enemyUnit, <>3__mana = mana, <>3__move = move, <>3__gunName = gunName, <>3__damage = damage, <>3__times = times, <>3__isAccuracy = isAccuracy, <>3__followGunName = followGunName }; } [IteratorStateMachine(typeof(<ShowCardAndDefendActions>d__7))] public static IEnumerable<BattleAction> ShowCardAndDefendActions(Type cardType, bool upgraded, EnemyUnit enemyUnit, Mana mana, Unit target, string move, int block = 0, int shield = 0, int graze = 0, bool cast = true, PerformAction? performAction = null) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ShowCardAndDefendActions>d__7(-2) { <>3__cardType = cardType, <>3__upgraded = upgraded, <>3__enemyUnit = enemyUnit, <>3__mana = mana, <>3__target = target, <>3__move = move, <>3__block = block, <>3__shield = shield, <>3__graze = graze, <>3__cast = cast, <>3__performAction = performAction }; } [IteratorStateMachine(typeof(<ShowCardAndAddCardActions>d__8))] public static IEnumerable<BattleAction> ShowCardAndAddCardActions(Type cardType, bool upgraded, EnemyUnit enemyUnit, Mana mana, string move, IEnumerable<Card> cards, AddCardZone zone = 0, PerformAction? perform = null) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ShowCardAndAddCardActions>d__8(-2) { <>3__cardType = cardType, <>3__upgraded = upgraded, <>3__enemyUnit = enemyUnit, <>3__mana = mana, <>3__move = move, <>3__cards = cards, <>3__zone = zone, <>3__perform = perform }; } [IteratorStateMachine(typeof(<ShowCardAndPositiveActions>d__9))] public static IEnumerable<BattleAction> ShowCardAndPositiveActions(Type cardType, bool upgraded, EnemyUnit enemyUnit, Mana mana, string move, Type type, int? level = null, int? duration = null, float occupationTime = 0f, PerformAction? performAction = null) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ShowCardAndPositiveActions>d__9(-2) { <>3__cardType = cardType, <>3__upgraded = upgraded, <>3__enemyUnit = enemyUnit, <>3__mana = mana, <>3__move = move, <>3__type = type, <>3__level = level, <>3__duration = duration, <>3__occupationTime = occupationTime, <>3__performAction = performAction }; } [IteratorStateMachine(typeof(<ShowCardAndNegativeActions>d__10))] public static IEnumerable<BattleAction> ShowCardAndNegativeActions(Type cardType, bool upgraded, EnemyUnit enemyUnit, Mana mana, string move, Type type, int? level = null, int? duration = null, bool startAutoDecreasing = true, PerformAction? performAction = null) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ShowCardAndNegativeActions>d__10(-2) { <>3__cardType = cardType, <>3__upgraded = upgraded, <>3__enemyUnit = enemyUnit, <>3__mana = mana, <>3__move = move, <>3__type = type, <>3__level = level, <>3__duration = duration, <>3__startAutoDecreasing = startAutoDecreasing, <>3__performAction = performAction }; } [IteratorStateMachine(typeof(<ShowCardAndPerformActions>d__11))] public static IEnumerable<BattleAction> ShowCardAndPerformActions(Type cardType, bool upgraded, EnemyUnit enemyUnit, Mana mana, string move, PerformAction? performAction) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ShowCardAndPerformActions>d__11(-2) { <>3__cardType = cardType, <>3__upgraded = upgraded, <>3__enemyUnit = enemyUnit, <>3__mana = mana, <>3__move = move, <>3__performAction = performAction }; } [IteratorStateMachine(typeof(<ShowCardAndBattleActions>d__12))] public static IEnumerable<BattleAction> ShowCardAndBattleActions(Type cardType, bool upgraded, EnemyUnit enemyUnit, Mana mana, string move, BattleAction battleAction) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ShowCardAndBattleActions>d__12(-2) { <>3__cardType = cardType, <>3__upgraded = upgraded, <>3__enemyUnit = enemyUnit, <>3__mana = mana, <>3__move = move, <>3__battleAction = battleAction }; } [IteratorStateMachine(typeof(<ShowCardAndBattleActions>d__13))] public static IEnumerable<BattleAction> ShowCardAndBattleActions(Type cardType, bool upgraded, EnemyUnit enemyUnit, Mana mana, string move, IEnumerable<BattleAction> battleActions) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <ShowCardAndBattleActions>d__13(-2) { <>3__cardType = cardType, <>3__upgraded = upgraded, <>3__enemyUnit = enemyUnit, <>3__mana = mana, <>3__move = move, <>3__battleActions = battleActions }; } [IteratorStateMachine(typeof(<AttackTargetActions>d__14))] public static IEnumerable<BattleAction> AttackTargetActions(Type cardType, bool upgraded, EnemyUnit enemyUnit, Mana mana, Unit target, string move, string gunName, int damage, int times = 1, bool isAccuracy = false, string followGunName = "Instant") { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <AttackTargetActions>d__14(-2) { <>3__cardType = cardType, <>3__upgraded = upgraded, <>3__enemyUnit = enemyUnit, <>3__mana = mana, <>3__target = target, <>3__move = move, <>3__gunName = gunName, <>3__damage = damage, <>3__times = times, <>3__isAccuracy = isAccuracy, <>3__followGunName = followGunName }; } [IteratorStateMachine(typeof(<AttackTargetActions>d__15))] public static IEnumerable<BattleAction> AttackTargetActions(EnemyUnit source, IEnumerable<Unit> targets, string move, string gunName, int damage, int times = 1, bool isAccuracy = false, string followGunName = "Instant") { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <AttackTargetActions>d__15(-2) { <>3__source = source, <>3__targets = targets, <>3__move = move, <>3__gunName = gunName, <>3__damage = damage, <>3__times = times, <>3__isAccuracy = isAccuracy, <>3__followGunName = followGunName }; } } } namespace OpponentPlayingCard.StatuEffects { public sealed class ManaWSeDef : StatusEffectTemplate { 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("ManaWSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("ManaWSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown ConstructorInfo constructorInfo = typeof(StatusEffectConfig).GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic)[0]; return (StatusEffectConfig)constructorInfo.Invoke(new object[22] { BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 0, (object)(StatusEffectType)2, false, true, null, true, (object)(StackType)0, false, null, (object)(DurationDecreaseTiming)0, false, null, null, false, (object)(Keyword)0, new List<string>(), null, "", "Default", "" }); } } [EntityLogic(typeof(ManaWSeDef))] public sealed class ManaWSe : StatusEffect { [UsedImplicitly] public ManaGroup ManaW => ManaGroup.Single((ManaColor)1); protected override void OnAdded(Unit unit) { } } public sealed class ManaUSeDef : StatusEffectTemplate { 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("ManaUSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("ManaUSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown ConstructorInfo constructorInfo = typeof(StatusEffectConfig).GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic)[0]; return (StatusEffectConfig)constructorInfo.Invoke(new object[22] { BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 0, (object)(StatusEffectType)2, false, true, null, true, (object)(StackType)0, false, null, (object)(DurationDecreaseTiming)0, false, null, null, false, (object)(Keyword)0, new List<string>(), null, "", "Default", "" }); } } [EntityLogic(typeof(ManaUSeDef))] public sealed class ManaUSe : StatusEffect { [UsedImplicitly] public ManaGroup ManaU => ManaGroup.Single((ManaColor)2); protected override void OnAdded(Unit unit) { } } public sealed class ManaBSeDef : StatusEffectTemplate { 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("ManaBSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("ManaBSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown ConstructorInfo constructorInfo = typeof(StatusEffectConfig).GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic)[0]; return (StatusEffectConfig)constructorInfo.Invoke(new object[22] { BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 0, (object)(StatusEffectType)2, false, true, null, true, (object)(StackType)0, false, null, (object)(DurationDecreaseTiming)0, false, null, null, false, (object)(Keyword