Decompiled source of ValonadsKomachiMod v0.2.1
KomachiMod.dll
Decompiled a week 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 System.Security; using System.Security.Permissions; using AddWatermark; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using Cysharp.Threading.Tasks; using HarmonyLib; using KomachiMod.BattleActions; using KomachiMod.Cards; using KomachiMod.Cards.Template; using KomachiMod.Config; using KomachiMod.Enemies.Template; using KomachiMod.GunName; using KomachiMod.ImageLoader; using KomachiMod.Localization; using KomachiMod.Source.BattleActions.EventManager; using KomachiMod.Source.BattleActions.Helpers; using KomachiMod.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.Randoms; using LBoL.Core.StatusEffects; using LBoL.Core.Units; using LBoL.EntityLib.Cards; using LBoL.EntityLib.Cards.Character.Cirno; using LBoL.EntityLib.Cards.Neutral.NoColor; using LBoL.EntityLib.EnemyUnits.Normal.Guihuos; using LBoL.EntityLib.EnemyUnits.Normal.Shenlings; using LBoL.EntityLib.Exhibits; using LBoL.EntityLib.StatusEffects.Basic; using LBoL.EntityLib.StatusEffects.Cirno; using LBoL.EntityLib.StatusEffects.Others; using LBoL.Presentation; using LBoLEntitySideloader; using LBoLEntitySideloader.Attributes; using LBoLEntitySideloader.Entities; using LBoLEntitySideloader.Resource; using LBoLEntitySideloader.Utils; using UnityEngine; using UnityEngine.Experimental.Rendering; [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: 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("KomachiMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+a016afc47a8daeedd02fac8d4a8da4ed52eb6552")] [assembly: AssemblyProduct("KomachiMod")] [assembly: AssemblyTitle("KomachiMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace KomachiMod { [BepInPlugin("valon.LBoL.character.Komachi", "KomachiMod", "0.0.1")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInProcess("LBoL.exe")] public class BepinexPlugin : BaseUnityPlugin { public static string modUniqueID = "KomachiMod"; public static string playerName = "Komachi"; public static bool useInGameModel = false; public static string modelName = "Rin"; public static bool modelIsFlipped = true; public static List<ManaColor> offColors = new List<ManaColor> { (ManaColor)1, (ManaColor)5, (ManaColor)2, (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 TemplateSequenceTable sequenceTable = new TemplateSequenceTable(0); internal static IResourceSource embeddedSource = (IResourceSource)new EmbeddedSource(Assembly.GetExecutingAssembly()); internal static DirectorySource directorySource = new DirectorySource("valon.LBoL.character.Komachi", ""); private void Awake() { 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(); harmony.PatchAll(); if (Chainloader.PluginInfos.ContainsKey("neo.lbol.tools.watermark")) { WatermarkWrapper.ActivateWatermark(); } Func<Sprite> func = () => ResourceLoader.LoadSprite("BossIcon.png", (IResourceSource)(object)directorySource, (Rect?)null, 1, (Vector2?)null); EnemyUnitTemplate.AddBossNodeIcon("KomachiModBoss", func, (Assembly)null); } private void OnDestroy() { if (harmony != null) { harmony.UnpatchSelf(); } } } public static class PInfo { public const string GUID = "valon.LBoL.character.Komachi"; public const string Name = "KomachiMod"; public const string version = "0.0.1"; public static readonly Harmony harmony = new Harmony("valon.LBoL.character.Komachi"); } public class KomachiModLoadouts { public static string UltimateSkillA = "KomachiModUltA"; public static string UltimateSkillB = "KomachiModUltB"; public static string ExhibitA = "KomachiModExhibitR"; public static string ExhibitB = "KomachiModExhibitB"; public static List<string> DeckA = new List<string> { "Shoot", "Shoot", "Boundary", "Boundary", "KomachiModAttackR", "KomachiModAttackR", "KomachiModBlockB", "KomachiModBlockB", "KomachiModMoveAndShoot", "KomachiModRetreat" }; public static List<string> DeckB = new List<string> { "Shoot", "Shoot", "Boundary", "Boundary", "KomachiModAttackB", "KomachiModAttackB", "KomachiModBlockR", "KomachiModBlockR", "KomachiModGrudgingStrike", "KomachiModSpiritDefence" }; public static PlayerUnitConfig playerUnitConfig; static KomachiModLoadouts() { //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Expected O, but got Unknown string modUniqueID = BepinexPlugin.modUniqueID; int? num = 0; ManaGroup val = default(ManaGroup); ((ManaGroup)(ref val)).Black = 2; ((ManaGroup)(ref val)).Red = 2; ManaGroup val2 = val; playerUnitConfig = new PlayerUnitConfig(modUniqueID, true, "", 0, 8, num, true, (int?)null, (ManaColor)4, (ManaColor)3, val2, "#e58c27", 70, 120, 0, UltimateSkillA, UltimateSkillB, ExhibitA, ExhibitB, (IReadOnlyList<string>)DeckA, (IReadOnlyList<string>)DeckB, 2, 3); } } public sealed class KomachiModDef : PlayerUnitTemplate { [EntityLogic(typeof(KomachiModDef))] public sealed class KomachiMod : PlayerUnit { } 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)KomachiLocalization.PlayerUnitBatchLoc.AddEntity((EntityDefinition)(object)this); } public override PlayerImages LoadPlayerImages() { return KomachiImageLoader.LoadPlayerImages(BepinexPlugin.playerName); } public override PlayerUnitConfig MakeConfig() { return KomachiModLoadouts.playerUnitConfig; } } internal class WatermarkWrapper { [MethodImpl(MethodImplOptions.NoInlining)] internal static void ActivateWatermark() { API.ActivateWatermark(); } } } namespace KomachiMod.KomachiUlt { public sealed class KomachiModUltHalfLifeDef : KomachiUltTemplate { public override UltimateSkillConfig MakeConfig() { UltimateSkillConfig defaulUltConfig = GetDefaulUltConfig(); defaulUltConfig.Damage = 1; defaulUltConfig.RelativeEffects = new List<string> { "Weak" }; return defaulUltConfig; } } [EntityLogic(typeof(KomachiModUltHalfLifeDef))] public sealed class KomachiModUltHalfLife : UltimateSkill { [CompilerGenerated] private sealed class <Actions>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private UnitSelector selector; public UnitSelector <>3__selector; public KomachiModUltHalfLife <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Actions>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>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__1 <Actions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Actions>d__ = this; } else { <Actions>d__ = new <Actions>d__1(0) { <>4__this = <>4__this }; } <Actions>d__.selector = <>3__selector; return <Actions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } public KomachiModUltHalfLife() { ((UltimateSkill)this).TargetType = (TargetType)1; ((UltimateSkill)this).GunName = GunNameID.GetGunFromId(13201); } [IteratorStateMachine(typeof(<Actions>d__1))] protected override IEnumerable<BattleAction> Actions(UnitSelector selector) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <Actions>d__1(-2) { <>4__this = this, <>3__selector = selector }; } } public sealed class KomachiModUltADef : KomachiUltTemplate { public override UltimateSkillConfig MakeConfig() { UltimateSkillConfig defaulUltConfig = GetDefaulUltConfig(); defaulUltConfig.Damage = 12; defaulUltConfig.Value1 = 1; defaulUltConfig.RelativeCards = new List<string> { "KomachiModManDistance" }; defaulUltConfig.RelativeEffects = new List<string> { "KomachiDisplacementKeyword", "KomachiDistanceKeyword" }; defaulUltConfig.Keywords = (Keyword)256; return defaulUltConfig; } } [EntityLogic(typeof(KomachiModUltADef))] public sealed class KomachiModUltA : UltimateSkill { [CompilerGenerated] private sealed class <Actions>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private UnitSelector selector; public UnitSelector <>3__selector; public KomachiModUltA <>4__this; private Unit[] <>s__1; private int <>s__2; private Unit <enemy>5__3; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Actions>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = null; <enemy>5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (BattleAction)(object)PerformAction.Spell((Unit)(object)((UltimateSkill)<>4__this).Owner, "KomachiModUltA"); <>1__state = 1; return true; case 1: <>1__state = -1; <>s__1 = selector.GetUnits(((UltimateSkill)<>4__this).Battle); <>s__2 = 0; goto IL_0115; case 2: <>1__state = -1; <>2__current = (BattleAction)new AddCardsToHandAction((Card[])(object)new Card[1] { Library.CreateCard<KomachiModManDistance>() }); <>1__state = 3; return true; case 3: <>1__state = -1; <enemy>5__3 = null; <>s__2++; goto IL_0115; case 4: { <>1__state = -1; return false; } IL_0115: if (<>s__2 < <>s__1.Length) { <enemy>5__3 = <>s__1[<>s__2]; <>2__current = (BattleAction)(object)new DistanceChangeAction(<enemy>5__3, 1 - KomachiModDistanceSe.GetDistanceLevel(<enemy>5__3)); <>1__state = 2; return true; } <>s__1 = null; <>2__current = (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)<>4__this).Owner, (IEnumerable<Unit>)selector.GetUnits(((UltimateSkill)<>4__this).Battle), ((UltimateSkill)<>4__this).Damage, ((UltimateSkill)<>4__this).GunName, (GunType)0); <>1__state = 4; return true; } } 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__1 <Actions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Actions>d__ = this; } else { <Actions>d__ = new <Actions>d__1(0) { <>4__this = <>4__this }; } <Actions>d__.selector = <>3__selector; return <Actions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } public KomachiModUltA() { ((UltimateSkill)this).TargetType = (TargetType)2; ((UltimateSkill)this).GunName = GunNameID.GetGunFromId(4158); } [IteratorStateMachine(typeof(<Actions>d__1))] protected override IEnumerable<BattleAction> Actions(UnitSelector selector) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <Actions>d__1(-2) { <>4__this = this, <>3__selector = selector }; } } public sealed class KomachiModUltBDef : KomachiUltTemplate { public override UltimateSkillConfig MakeConfig() { UltimateSkillConfig defaulUltConfig = GetDefaulUltConfig(); defaulUltConfig.Damage = 0; defaulUltConfig.Value1 = 5; defaulUltConfig.RelativeEffects = new List<string> { "KomachiModVengefulSpiritSe", "KomachiDetonationKeyword", "KomachiModDivineSpiritSe" }; return defaulUltConfig; } } [EntityLogic(typeof(KomachiModUltBDef))] public sealed class KomachiModUltB : UltimateSkill { [CompilerGenerated] private sealed class <Actions>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private UnitSelector selector; public UnitSelector <>3__selector; public KomachiModUltB <>4__this; private int <divineSpiritAmount>5__1; private EnemyUnit[] <>s__2; private int <>s__3; private EnemyUnit <enemy>5__4; private Amulet <amulet>5__5; private EnemyUnit[] <>s__6; private int <>s__7; private EnemyUnit <enemy>5__8; private DetonateVengefulSpiritAction <detonateAction>5__9; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Actions>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>s__2 = null; <enemy>5__4 = null; <amulet>5__5 = null; <>s__6 = null; <enemy>5__8 = null; <detonateAction>5__9 = null; <>1__state = -2; } private bool MoveNext() { //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (BattleAction)(object)PerformAction.Spell((Unit)(object)((UltimateSkill)<>4__this).Owner, "KomachiModUltB"); <>1__state = 1; return true; case 1: <>1__state = -1; <>s__2 = selector.GetEnemies(((UltimateSkill)<>4__this).Battle); <>s__3 = 0; goto IL_0186; case 2: <>1__state = -1; goto IL_0101; case 3: <>1__state = -1; <>2__current = (BattleAction)(object)new ApplyVengefulSpiritAction((Unit)(object)<enemy>5__4, ((UltimateSkill)<>4__this).Value1); <>1__state = 4; return true; case 4: <>1__state = -1; <amulet>5__5 = null; <enemy>5__4 = null; <>s__3++; goto IL_0186; case 5: <>1__state = -1; <divineSpiritAmount>5__1 += ((EventBattleAction<DetonateVengefulSpiritEventArgs>)(object)<detonateAction>5__9).Args.amountDetonated; <detonateAction>5__9 = null; <enemy>5__8 = null; <>s__7++; goto IL_0248; case 6: { <>1__state = -1; return false; } IL_0186: if (<>s__3 < <>s__2.Length) { <enemy>5__4 = <>s__2[<>s__3]; <amulet>5__5 = ((Unit)<enemy>5__4).GetStatusEffect<Amulet>(); if (<amulet>5__5 != null) { <>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)<amulet>5__5, true, 0.1f); <>1__state = 2; return true; } goto IL_0101; } <>s__2 = null; <divineSpiritAmount>5__1 = 0; <>s__6 = selector.GetEnemies(((UltimateSkill)<>4__this).Battle); <>s__7 = 0; goto IL_0248; IL_0101: <>2__current = (BattleAction)(object)PerformAction.Gun((Unit)(object)((UltimateSkill)<>4__this).Owner, (Unit)(object)<enemy>5__4, ((UltimateSkill)<>4__this).GunName, 0.5f); <>1__state = 3; return true; IL_0248: if (<>s__7 < <>s__6.Length) { <enemy>5__8 = <>s__6[<>s__7]; <detonateAction>5__9 = new DetonateVengefulSpiritAction((Unit)(object)<enemy>5__8); <>2__current = (BattleAction)(object)<detonateAction>5__9; <>1__state = 5; return true; } <>s__6 = null; <>2__current = (BattleAction)(object)new ApplyStatusEffectAction<KomachiModDivineSpiritSe>((Unit)(object)((UltimateSkill)<>4__this).Owner, (int?)<divineSpiritAmount>5__1, (int?)null, (int?)null, (int?)null, 0f, true); <>1__state = 6; return true; } } 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__1 <Actions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Actions>d__ = this; } else { <Actions>d__ = new <Actions>d__1(0) { <>4__this = <>4__this }; } <Actions>d__.selector = <>3__selector; return <Actions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } public KomachiModUltB() { ((UltimateSkill)this).TargetType = (TargetType)2; ((UltimateSkill)this).GunName = GunNameID.GetGunFromId(7121); } [IteratorStateMachine(typeof(<Actions>d__1))] protected override IEnumerable<BattleAction> Actions(UnitSelector selector) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <Actions>d__1(-2) { <>4__this = this, <>3__selector = selector }; } } public class KomachiUltTemplate : 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(KomachiDefaultConfig.DefaultID((EntityDefinition)(object)this)); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)KomachiLocalization.UltimateSkillsBatchLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return KomachiImageLoader.LoadUltLoader((UltimateSkillTemplate)(object)this); } public override UltimateSkillConfig MakeConfig() { throw new NotImplementedException(); } public UltimateSkillConfig GetDefaulUltConfig() { return KomachiDefaultConfig.DefaultUltConfig(); } } } namespace KomachiMod.StatusEffects { public sealed class KomachiModBoundSpiritsOfEarthSeDef : KomachiStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = KomachiStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)0; return defaultStatusEffectConfig; } } [EntityLogic(typeof(KomachiModBoundSpiritsOfEarthSeDef))] public sealed class KomachiModBoundSpiritsOfEarthSe : StatusEffect { [CompilerGenerated] private sealed class <OnTurnEnded>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private UnitEventArgs args; public UnitEventArgs <>3__args; public KomachiModBoundSpiritsOfEarthSe <>4__this; private IEnumerator<EnemyUnit> <>s__1; private EnemyUnit <enemy>5__2; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnTurnEnded>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <>s__1 = null; <enemy>5__2 = null; <>1__state = -2; } private bool MoveNext() { try { int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -3; goto IL_00d1; } <>1__state = -1; if (!((StatusEffect)<>4__this).Battle.BattleShouldEnd) { <>4__this.<>n__0(); <>s__1 = ((StatusEffect)<>4__this).Battle.AllAliveEnemies.GetEnumerator(); <>1__state = -3; goto IL_00d9; } goto IL_00f5; IL_00d1: <enemy>5__2 = null; goto IL_00d9; IL_00d9: if (<>s__1.MoveNext()) { <enemy>5__2 = <>s__1.Current; if (((Unit)<enemy>5__2).HasStatusEffect(typeof(KomachiModVengefulSpiritSe))) { <>2__current = (BattleAction)(object)new ApplyVengefulSpiritAction((Unit)(object)<enemy>5__2, ((StatusEffect)<>4__this).Level); <>1__state = 1; return true; } goto IL_00d1; } <>m__Finally1(); <>s__1 = null; goto IL_00f5; IL_00f5: 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() { <OnTurnEnded>d__1 <OnTurnEnded>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnTurnEnded>d__ = this; } else { <OnTurnEnded>d__ = new <OnTurnEnded>d__1(0) { <>4__this = <>4__this }; } <OnTurnEnded>d__.args = <>3__args; return <OnTurnEnded>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).TurnEnded, (EventSequencedReactor<UnitEventArgs>)OnTurnEnded); } [IteratorStateMachine(typeof(<OnTurnEnded>d__1))] private IEnumerable<BattleAction> OnTurnEnded(UnitEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnTurnEnded>d__1(-2) { <>4__this = this, <>3__args = args }; } [CompilerGenerated] [DebuggerHidden] private void <>n__0() { ((StatusEffect)this).NotifyActivating(); } } public sealed class KomachiModBWBridgeSeDef : KomachiStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = KomachiStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)0; return defaultStatusEffectConfig; } } [EntityLogic(typeof(KomachiModBWBridgeSeDef))] public sealed class KomachiModBWBridgeSe : StatusEffect { [CompilerGenerated] private sealed class <OnTurnStarted>d__3 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private UnitEventArgs args; public UnitEventArgs <>3__args; public KomachiModBWBridgeSe <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnTurnStarted>d__3(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (!((StatusEffect)<>4__this).Battle.BattleShouldEnd) { <>4__this.<>n__0(); <>2__current = (BattleAction)new GainManaAction(ManaGroup.Whites(((StatusEffect)<>4__this).Level)); <>1__state = 1; return true; } break; case 1: <>1__state = -1; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnTurnStarted>d__3 <OnTurnStarted>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnTurnStarted>d__ = this; } else { <OnTurnStarted>d__ = new <OnTurnStarted>d__3(0) { <>4__this = <>4__this }; } <OnTurnStarted>d__.args = <>3__args; return <OnTurnStarted>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } public ManaGroup Mana => ManaGroup.Single((ManaColor)1); protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnTurnStarted); } [IteratorStateMachine(typeof(<OnTurnStarted>d__3))] private IEnumerable<BattleAction> OnTurnStarted(UnitEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnTurnStarted>d__3(-2) { <>4__this = this, <>3__args = args }; } [CompilerGenerated] [DebuggerHidden] private void <>n__0() { ((StatusEffect)this).NotifyActivating(); } } public sealed class KomachiModDetonateFirepowerSeDef : KomachiStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = KomachiStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)0; return defaultStatusEffectConfig; } } [EntityLogic(typeof(KomachiModDetonateFirepowerSeDef))] public sealed class KomachiModDetonateFirepowerSe : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).HandleOwnerEvent<DetonateVengefulSpiritEventArgs>(KomachiEventsManager.DetonatedSpirits, (GameEventHandler<DetonateVengefulSpiritEventArgs>)OnDetonatingVengefulSpirits); } public void OnDetonatingVengefulSpirits(DetonateVengefulSpiritEventArgs args) { if (args.noFizzle) { ApplyStatusEffectAction<Firepower> val = new ApplyStatusEffectAction<Firepower>(((StatusEffect)this).Owner, (int?)((StatusEffect)this).Level, (int?)null, (int?)null, (int?)null, 0f, true); ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)(object)val)); } } } public sealed class KomachiModDetonateInfiniteSeDef : KomachiStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = KomachiStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)0; return defaultStatusEffectConfig; } } [EntityLogic(typeof(KomachiModDetonateInfiniteSeDef))] public sealed class KomachiModDetonateInfiniteSe : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).HandleOwnerEvent<DetonateVengefulSpiritEventArgs>(KomachiEventsManager.DetonatedSpirits, (GameEventHandler<DetonateVengefulSpiritEventArgs>)OnDetonatingVengefulSpirits); } public void OnDetonatingVengefulSpirits(DetonateVengefulSpiritEventArgs args) { if (args.noFizzle) { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)(object)new ApplyVengefulSpiritAction(args.Target, ((StatusEffect)this).Level))); } } } public sealed class KomachiModDistanceBlockSeDef : KomachiStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = KomachiStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.RelativeEffects = new List<string> { "KomachiDistanceKeyword" }; defaultStatusEffectConfig.Type = (StatusEffectType)0; return defaultStatusEffectConfig; } } [EntityLogic(typeof(KomachiModDistanceBlockSeDef))] public sealed class KomachiModDistanceBlockSe : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).HandleOwnerEvent<DistanceChangedEventArgs>(KomachiEventsManager.DistanceChanged, (GameEventHandler<DistanceChangedEventArgs>)OnEnemyDistanceChange); } private void OnEnemyDistanceChange(DistanceChangedEventArgs args) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown if (!((StatusEffect)this).Battle.BattleShouldEnd && ((object)args.Effect).GetType() == typeof(KomachiModDistanceSe)) { ((StatusEffect)this).NotifyActivating(); ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new CastBlockShieldAction((Unit)(object)((StatusEffect)this).Battle.Player, ((StatusEffect)this).Level * args.distanceChangeAbs, 0, (BlockShieldType)2, false))); } } } public sealed class KomachiModDistanceFlowSeDef : KomachiStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = KomachiStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.RelativeEffects = new List<string> { "KomachiDistanceKeyword" }; defaultStatusEffectConfig.Type = (StatusEffectType)0; return defaultStatusEffectConfig; } } [EntityLogic(typeof(KomachiModDistanceFlowSeDef))] public sealed class KomachiModDistanceFlowSe : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).HandleOwnerEvent<DistanceChangedEventArgs>(KomachiEventsManager.DistanceChanged, (GameEventHandler<DistanceChangedEventArgs>)OnEnemyDistanceChange); } private void OnEnemyDistanceChange(DistanceChangedEventArgs args) { if (!((StatusEffect)this).Battle.BattleShouldEnd && ((object)args.Effect).GetType() == typeof(KomachiModDistanceSe)) { ((StatusEffect)this).NotifyActivating(); if (args.distanceChange > 0) { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)(object)new ApplyStatusEffectAction<TempSpirit>(((StatusEffect)this).Owner, (int?)((StatusEffect)this).Level, (int?)null, (int?)null, (int?)null, 0f, true))); } else if (args.distanceChange < 0) { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)(object)new ApplyStatusEffectAction<TempFirepower>(((StatusEffect)this).Owner, (int?)((StatusEffect)this).Level, (int?)null, (int?)null, (int?)null, 0f, true))); } } } } public sealed class KomachiModDistanceGeneratorSeDef : KomachiStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = KomachiStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)0; return defaultStatusEffectConfig; } } [EntityLogic(typeof(KomachiModDistanceGeneratorSeDef))] public sealed class KomachiModDistanceGeneratorSe : StatusEffect { [CompilerGenerated] private sealed class <OnOwnerTurnStarted>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private UnitEventArgs args; public UnitEventArgs <>3__args; public KomachiModDistanceGeneratorSe <>4__this; private List<KomachiModManDistance> <list>5__1; 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() { <list>5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (((StatusEffect)<>4__this).Battle.BattleShouldEnd) { return false; } <list>5__1 = ((StatusEffect)<>4__this).Battle.HandZone.OfType<KomachiModManDistance>().ToList(); if (<list>5__1.Count < ((StatusEffect)<>4__this).Level) { <>4__this.<>n__0(); <>2__current = (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<KomachiModManDistance>(((StatusEffect)<>4__this).Level - <list>5__1.Count, false), (AddCardsType)0); <>1__state = 1; return true; } break; case 1: <>1__state = -1; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <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 }; } [CompilerGenerated] [DebuggerHidden] private void <>n__0() { ((StatusEffect)this).NotifyActivating(); } } public sealed class KomachiModExileDoppelgangerSeDef : KomachiStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = KomachiStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)0; defaultStatusEffectConfig.HasCount = true; return defaultStatusEffectConfig; } } [EntityLogic(typeof(KomachiModExileDoppelgangerSeDef))] public sealed class KomachiModExileDoppelgangerSe : StatusEffect { [CompilerGenerated] private sealed class <>c__DisplayClass4_0 { public CardUsingEventArgs args; internal bool <OnCardUsing>b__0(Card card) { return ((object)card).GetType() == ((object)args.Card).GetType(); } } [CompilerGenerated] private sealed class <OnCardUsing>d__4 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private CardUsingEventArgs args; public CardUsingEventArgs <>3__args; public KomachiModExileDoppelgangerSe <>4__this; private <>c__DisplayClass4_0 <>8__1; private List<Card> <sameCardList>5__2; private MiniSelectCardInteraction <interaction>5__3; private Card <exiledCopy>5__4; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnCardUsing>d__4(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <sameCardList>5__2 = null; <interaction>5__3 = null; <exiledCopy>5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Expected O, but got Unknown //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Expected O, but got Unknown //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Expected O, but got Unknown //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass4_0(); <>8__1.args = args; if (<>8__1.args.Card.HasKeyword((Keyword)128)) { return false; } <sameCardList>5__2 = ((StatusEffect)<>4__this).Battle.ExileZone.Where((Card card) => ((object)card).GetType() == ((object)<>8__1.args.Card).GetType()).ToList(); Debug.Log((object)$"Using ExileDoppelganger. The amount of cards with the same name as {((GameEntity)<>8__1.args.Card).Name} in exile is {<sameCardList>5__2.Count}"); if (<>4__this.count2 > 0 && <sameCardList>5__2.Count > 0) { <>4__this.<>n__0(); <interaction>5__3 = new MiniSelectCardInteraction((IEnumerable<Card>)<sameCardList>5__2, false, false, false); <>2__current = (BattleAction)new InteractionAction((Interaction)(object)<interaction>5__3, true) { Source = (GameEntity)(object)<>4__this }; <>1__state = 1; return true; } if (((StatusEffect)<>4__this).Count > 0 && <sameCardList>5__2.Count == 0) { <>4__this.<>n__0(); <>2__current = (BattleAction)(object)PerformAction.Sfx("二重身回合开始", 0f); <>1__state = 4; return true; } break; case 1: <>1__state = -1; if (!((Interaction)<interaction>5__3).IsCanceled) { <>2__current = (BattleAction)(object)PerformAction.Sfx("二重身回合开始", 0f); <>1__state = 2; return true; } goto IL_01da; case 2: <>1__state = -1; <>2__current = (BattleAction)new MoveCardAction(<interaction>5__3.SelectedCard, (CardZone)2); <>1__state = 3; return true; case 3: <>1__state = -1; <>4__this.effectUse = 2; goto IL_01da; case 4: <>1__state = -1; <>2__current = (BattleAction)(object)PerformAction.Effect((Unit)(object)((StatusEffect)<>4__this).Battle.Player, "JinziMirror", 0f, (string)null, 0f, (EffectBehavior)0, 0f); <>1__state = 5; return true; case 5: { <>1__state = -1; <exiledCopy>5__4 = <>8__1.args.Card.CloneBattleCard(); ManaGroup cost = <exiledCopy>5__4.Cost; if (((ManaGroup)(ref cost)).Amount > 0) { <exiledCopy>5__4.SetBaseCost(<>4__this.Mana); } <exiledCopy>5__4.RemoveFromBattleAfterPlay = true; <>2__current = (BattleAction)new AddCardsToExileAction((IEnumerable<Card>)new List<Card> { <exiledCopy>5__4 }, (AddCardsType)0); <>1__state = 6; return true; } case 6: { <>1__state = -1; <>4__this.effectUse = 1; <exiledCopy>5__4 = null; break; } IL_01da: <interaction>5__3 = null; 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() { <OnCardUsing>d__4 <OnCardUsing>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnCardUsing>d__ = this; } else { <OnCardUsing>d__ = new <OnCardUsing>d__4(0) { <>4__this = <>4__this }; } <OnCardUsing>d__.args = <>3__args; return <OnCardUsing>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } private int count2; private int effectUse; private ManaGroup Mana; protected override void OnAdded(Unit unit) { ((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarting, (GameEventHandler<UnitEventArgs>)delegate { ((StatusEffect)this).Count = ((StatusEffect)this).Level; count2 = ((StatusEffect)this).Level; ((StatusEffect)this).Highlight = true; }); ((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsing, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsing); ((StatusEffect)this).HandleOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsed, (GameEventHandler<CardUsingEventArgs>)OnCardUsed); } [IteratorStateMachine(typeof(<OnCardUsing>d__4))] private IEnumerable<BattleAction> OnCardUsing(CardUsingEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnCardUsing>d__4(-2) { <>4__this = this, <>3__args = args }; } private void OnCardUsed(CardUsingEventArgs args) { if (effectUse == 1 && ((StatusEffect)this).Count > 0) { int count = ((StatusEffect)this).Count; ((StatusEffect)this).Count = count - 1; } if (effectUse == 2 && count2 > 0) { count2--; } if (((StatusEffect)this).Count == 0 && count2 == 0) { ((StatusEffect)this).Highlight = false; } effectUse = 0; } public KomachiModExileDoppelgangerSe() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) ManaGroup mana = default(ManaGroup); ((ManaGroup)(ref mana)).Any = 1; Mana = mana; ((StatusEffect)this)..ctor(); } [CompilerGenerated] [DebuggerHidden] private void <>n__0() { ((StatusEffect)this).NotifyActivating(); } } public sealed class KomachiModInfernoTempestSeDef : KomachiStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = KomachiStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)0; return defaultStatusEffectConfig; } } [EntityLogic(typeof(KomachiModInfernoTempestSeDef))] public sealed class KomachiModInfernoTempestSe : StatusEffect { [CompilerGenerated] private sealed class <>c__DisplayClass1_0 { public Random rng; internal int <OnOwnerTurnStarted>b__1(Card _) { return rng.Next(); } } [CompilerGenerated] private sealed class <OnOwnerTurnStarted>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private UnitEventArgs args; public UnitEventArgs <>3__args; public KomachiModInfernoTempestSe <>4__this; private <>c__DisplayClass1_0 <>8__1; private List<Card> <list>5__2; private SelectCardInteraction <interaction>5__3; private IReadOnlyList<Card> <cards>5__4; private List<Card> <shuffledcards>5__5; private List<Card> <drawPileCards>5__6; private List<Card> <discardPileCards>5__7; private List<Card> <handCards>5__8; private List<Card> <basicMisfortuneList>5__9; private int <i>5__10; private int <location>5__11; private int <>s__12; private int <i>5__13; private int <location>5__14; private int <>s__15; private List<Card>.Enumerator <>s__16; private Card <card>5__17; private List<Card>.Enumerator <>s__18; private Card <card>5__19; private List<Card>.Enumerator <>s__20; private Card <card>5__21; private List<Card>.Enumerator <>s__22; private Card <card>5__23; 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() { switch (<>1__state) { case -3: case 2: try { } finally { <>m__Finally1(); } break; case -4: case 3: try { } finally { <>m__Finally2(); } break; case -5: case 4: try { } finally { <>m__Finally3(); } break; case -6: case 5: try { } finally { <>m__Finally4(); } break; } <>8__1 = null; <list>5__2 = null; <interaction>5__3 = null; <cards>5__4 = null; <shuffledcards>5__5 = null; <drawPileCards>5__6 = null; <discardPileCards>5__7 = null; <handCards>5__8 = null; <basicMisfortuneList>5__9 = null; <>s__16 = default(List<Card>.Enumerator); <card>5__17 = null; <>s__18 = default(List<Card>.Enumerator); <card>5__19 = null; <>s__20 = default(List<Card>.Enumerator); <card>5__21 = null; <>s__22 = default(List<Card>.Enumerator); <card>5__23 = null; <>1__state = -2; } private bool MoveNext() { //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Expected O, but got Unknown //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_044f: Expected O, but got Unknown //IL_04c3: Unknown result type (might be due to invalid IL or missing references) //IL_04cd: Expected O, but got Unknown //IL_0580: Unknown result type (might be due to invalid IL or missing references) //IL_058a: Expected O, but got Unknown //IL_05d2: Unknown result type (might be due to invalid IL or missing references) //IL_05dc: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass1_0(); if (((StatusEffect)<>4__this).Battle.BattleShouldEnd) { return false; } <list>5__2 = ((StatusEffect)<>4__this).Battle.ExileZone.Where((Card card) => !card.HasKeyword((Keyword)1)).ToList(); <interaction>5__3 = new SelectCardInteraction(0, ((StatusEffect)<>4__this).Level, (IEnumerable<Card>)<list>5__2, (SelectedCardHandling)0); <>2__current = (BattleAction)new InteractionAction((Interaction)(object)<interaction>5__3, false); <>1__state = 1; return true; case 1: <>1__state = -1; <cards>5__4 = <interaction>5__3.SelectedCards; <>8__1.rng = new Random(); <shuffledcards>5__5 = <cards>5__4.OrderBy((Card _) => <>8__1.rng.Next()).ToList(); <drawPileCards>5__6 = new List<Card>(); <discardPileCards>5__7 = new List<Card>(); <handCards>5__8 = new List<Card>(); if (<shuffledcards>5__5.Count >= 3) { <drawPileCards>5__6.Add(<shuffledcards>5__5[0]); <discardPileCards>5__7.Add(<shuffledcards>5__5[1]); <handCards>5__8.Add(<shuffledcards>5__5[2]); <i>5__10 = 3; while (<i>5__10 < <shuffledcards>5__5.Count) { <location>5__11 = <>8__1.rng.Next(3); int num = <location>5__11; <>s__12 = num; switch (<>s__12) { case 0: <drawPileCards>5__6.Add(<shuffledcards>5__5[<i>5__10]); break; case 1: <discardPileCards>5__7.Add(<shuffledcards>5__5[<i>5__10]); break; case 2: <handCards>5__8.Add(<shuffledcards>5__5[<i>5__10]); break; } <i>5__10++; } } else { <i>5__13 = 0; while (<i>5__13 < <shuffledcards>5__5.Count) { <location>5__14 = <>8__1.rng.Next(3); int num2 = <location>5__14; <>s__15 = num2; switch (<>s__15) { case 0: <drawPileCards>5__6.Add(<shuffledcards>5__5[<i>5__13]); break; case 1: <discardPileCards>5__7.Add(<shuffledcards>5__5[<i>5__13]); break; case 2: <handCards>5__8.Add(<shuffledcards>5__5[<i>5__13]); break; } <i>5__13++; } } <>s__16 = <drawPileCards>5__6.GetEnumerator(); <>1__state = -3; goto IL_03ef; case 2: <>1__state = -3; <card>5__17 = null; goto IL_03ef; case 3: <>1__state = -4; <card>5__19 = null; goto IL_046d; case 4: <>1__state = -5; <card>5__21 = null; goto IL_04eb; case 5: <>1__state = -6; <card>5__23 = null; goto IL_05a5; case 6: { <>1__state = -1; return false; } IL_046d: if (<>s__18.MoveNext()) { <card>5__19 = <>s__18.Current; <>2__current = (BattleAction)new MoveCardAction(<card>5__19, (CardZone)2); <>1__state = 3; return true; } <>m__Finally2(); <>s__18 = default(List<Card>.Enumerator); <>s__20 = <discardPileCards>5__7.GetEnumerator(); <>1__state = -5; goto IL_04eb; IL_04eb: if (<>s__20.MoveNext()) { <card>5__21 = <>s__20.Current; <>2__current = (BattleAction)new MoveCardAction(<card>5__21, (CardZone)3); <>1__state = 4; return true; } <>m__Finally3(); <>s__20 = default(List<Card>.Enumerator); <basicMisfortuneList>5__9 = ((StatusEffect)<>4__this).Battle.ExileZone.Where((Card card) => card.HasKeyword((Keyword)1) || (int)card.CardType == 8).ToList(); <>s__22 = <basicMisfortuneList>5__9.GetEnumerator(); <>1__state = -6; goto IL_05a5; IL_05a5: if (<>s__22.MoveNext()) { <card>5__23 = <>s__22.Current; <>2__current = (BattleAction)new MoveCardToDrawZoneAction(<card>5__23, (DrawZoneTarget)2); <>1__state = 5; return true; } <>m__Finally4(); <>s__22 = default(List<Card>.Enumerator); <>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)<>4__this, true, 0.1f); <>1__state = 6; return true; IL_03ef: if (<>s__16.MoveNext()) { <card>5__17 = <>s__16.Current; <>2__current = (BattleAction)new MoveCardToDrawZoneAction(<card>5__17, (DrawZoneTarget)2); <>1__state = 2; return true; } <>m__Finally1(); <>s__16 = default(List<Card>.Enumerator); <>s__18 = <handCards>5__8.GetEnumerator(); <>1__state = -4; goto IL_046d; } } 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; ((IDisposable)<>s__16).Dispose(); } private void <>m__Finally2() { <>1__state = -1; ((IDisposable)<>s__18).Dispose(); } private void <>m__Finally3() { <>1__state = -1; ((IDisposable)<>s__20).Dispose(); } private void <>m__Finally4() { <>1__state = -1; ((IDisposable)<>s__22).Dispose(); } [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 KomachiModMidsummerLilySeDef : KomachiStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = KomachiStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)0; return defaultStatusEffectConfig; } } [EntityLogic(typeof(KomachiModMidsummerLilySeDef))] public sealed class KomachiModMidsummerLilySe : StatusEffect { [CompilerGenerated] private sealed class <OnCardUsed>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private CardUsingEventArgs args; public CardUsingEventArgs <>3__args; public KomachiModMidsummerLilySe <>4__this; private List<SummerFlower> <midsummerCards>5__1; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnCardUsed>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <midsummerCards>5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (!((StatusEffect)<>4__this).Battle.BattleShouldEnd && args.Card is KomachiModSpiderLily) { <midsummerCards>5__1 = Library.CreateCards<SummerFlower>(((StatusEffect)<>4__this).Level, false).ToList(); <>2__current = (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)<midsummerCards>5__1, (AddCardsType)0); <>1__state = 1; return true; } break; case 1: <>1__state = -1; <midsummerCards>5__1 = null; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnCardUsed>d__1 <OnCardUsed>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnCardUsed>d__ = this; } else { <OnCardUsed>d__ = new <OnCardUsed>d__1(0) { <>4__this = <>4__this }; } <OnCardUsed>d__.args = <>3__args; return <OnCardUsed>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed); } [IteratorStateMachine(typeof(<OnCardUsed>d__1))] private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnCardUsed>d__1(-2) { <>4__this = this, <>3__args = args }; } } public sealed class KomachiModPushNPullSeDef : KomachiStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = KomachiStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)0; defaultStatusEffectConfig.RelativeEffects = new List<string> { "KomachiDistanceKeyword" }; return defaultStatusEffectConfig; } } [EntityLogic(typeof(KomachiModPushNPullSeDef))] public sealed class KomachiModPushNPullSe : StatusEffect { [CompilerGenerated] private sealed class <OnOwnerTurnEnded>d__2 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private UnitEventArgs args; public UnitEventArgs <>3__args; public KomachiModPushNPullSe <>4__this; private IEnumerator<EnemyUnit> <>s__1; private EnemyUnit <enemy>5__2; 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() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <>s__1 = null; <enemy>5__2 = null; <>1__state = -2; } private bool MoveNext() { try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (((StatusEffect)<>4__this).Battle.BattleShouldEnd) { return false; } <>4__this.<>n__0(); <>s__1 = ((StatusEffect)<>4__this).Battle.AllAliveEnemies.GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; <enemy>5__2 = null; break; } if (<>s__1.MoveNext()) { <enemy>5__2 = <>s__1.Current; <>2__current = (BattleAction)(object)new DistanceChangeAction((Unit)(object)<enemy>5__2, ((StatusEffect)<>4__this).Level); <>1__state = 1; return true; } <>m__Finally1(); <>s__1 = 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__1 != null) { <>s__1.Dispose(); } } [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(); } } [CompilerGenerated] private sealed class <OnOwnerTurnStarted>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private UnitEventArgs args; public UnitEventArgs <>3__args; public KomachiModPushNPullSe <>4__this; private IEnumerator<EnemyUnit> <>s__1; private EnemyUnit <enemy>5__2; 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() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <>s__1 = null; <enemy>5__2 = null; <>1__state = -2; } private bool MoveNext() { try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (((StatusEffect)<>4__this).Battle.BattleShouldEnd) { return false; } <>4__this.<>n__0(); <>s__1 = ((StatusEffect)<>4__this).Battle.AllAliveEnemies.GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; <enemy>5__2 = null; break; } if (<>s__1.MoveNext()) { <enemy>5__2 = <>s__1.Current; <>2__current = (BattleAction)(object)new DistanceChangeAction((Unit)(object)<enemy>5__2, -((StatusEffect)<>4__this).Level); <>1__state = 1; return true; } <>m__Finally1(); <>s__1 = 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__1 != null) { <>s__1.Dispose(); } } [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); ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnEnded, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnEnded); } [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 }; } [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 KomachiModReviveSeDef : KomachiStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = KomachiStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)0; defaultStatusEffectConfig.LevelStackType = (StackType)0; defaultStatusEffectConfig.HasCount = true; return defaultStatusEffectConfig; } } [EntityLogic(typeof(KomachiModReviveSeDef))] public sealed class KomachiModReviveSe : StatusEffect { [CompilerGenerated] private sealed class <OnEnemyDied>d__5 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private DieEventArgs arg; public DieEventArgs <>3__arg; public KomachiModReviveSe <>4__this; private bool <isSummon>5__1; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnEnemyDied>d__5(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; Debug.Log((object)"Activating God of Death to heal"); <>4__this.<>n__0(); <isSummon>5__1 = arg.Unit.HasStatusEffect<Servant>(); if (<isSummon>5__1) { Debug.Log((object)$"Getting {((StatusEffect)<>4__this).Level} shield."); <>2__current = (BattleAction)new CastBlockShieldAction((Unit)(object)((StatusEffect)<>4__this).Battle.Player, new ShieldInfo(((StatusEffect)<>4__this).Level, (BlockShieldType)2), false); <>1__state = 1; return true; } Debug.Log((object)$"Getting {((StatusEffect)<>4__this).Level} health."); ((StatusEffect)<>4__this).Owner.Heal(((StatusEffect)<>4__this).Level); break; case 1: <>1__state = -1; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnEnemyDied>d__5 <OnEnemyDied>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnEnemyDied>d__ = this; } else { <OnEnemyDied>d__ = new <OnEnemyDied>d__5(0) { <>4__this = <>4__this }; } <OnEnemyDied>d__.arg = <>3__arg; return <OnEnemyDied>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } private int revived = 1; private float reviveHeal = 0.5f; private int flawlessTurns = 2; protected override void OnAdded(Unit unit) { ((StatusEffect)this).HandleOwnerEvent<DieEventArgs>(((StatusEffect)this).Owner.Dying, (GameEventHandler<DieEventArgs>)OnDying); ((StatusEffect)this).ReactOwnerEvent<DieEventArgs>(((StatusEffect)this).Battle.EnemyDied, (EventSequencedReactor<DieEventArgs>)OnEnemyDied, (GameEventPriority)int.MaxValue); ((StatusEffect)this).Count = 1; } private void OnDying(DieEventArgs args) { if (revived == 1) { ((StatusEffect)this).NotifyActivating(); int hp = MathExtensions.RoundToInt((float)args.Unit.MaxHp * reviveHeal); ((Unit)((GameEntity)this).GameRun.Player).Hp = hp; ((GameEventArgs)args).CancelBy((GameEntity)(object)this); revived = 2; ((StatusEffect)this).Count = 0; if (((GameEntity)this).GameRun.Battle != null) { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)(object)new ApplyStatusEffectAction<Invincible>(((StatusEffect)this).Owner, (int?)0, (int?)flawlessTurns, (int?)null, (int?)null, 0f, true))); } Card deckCardByInstanceId = ((GameEntity)this).GameRun.GetDeckCardByInstanceId(((StatusEffect)this).SourceCard.InstanceId); if (deckCardByInstanceId != null) { ((GameEntity)this).GameRun.RemoveDeckCardByInstanceId(deckCardByInstanceId.InstanceId); } } } [IteratorStateMachine(typeof(<OnEnemyDied>d__5))] private IEnumerable<BattleAction> OnEnemyDied(DieEventArgs arg) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnEnemyDied>d__5(-2) { <>4__this = this, <>3__arg = arg }; } [CompilerGenerated] [DebuggerHidden] private void <>n__0() { ((StatusEffect)this).NotifyActivating(); } } public sealed class KomachiModRiversideGardenSeDef : KomachiStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = KomachiStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)0; defaultStatusEffectConfig.LevelStackType = (StackType)0; return defaultStatusEffectConfig; } } [EntityLogic(typeof(KomachiModRiversideGardenSeDef))] public sealed class KomachiModRiversideGardenSe : StatusEffect { [CompilerGenerated] private sealed class <OnAddCard>d__3 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private CardsEventArgs args; public CardsEventArgs <>3__args; public KomachiModRiversideGardenSe <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnAddCard>d__3(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 = <>4__this.Upgrade(args.Cards); <>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() { <OnAddCard>d__3 <OnAddCard>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnAddCard>d__ = this; } else { <OnAddCard>d__ = new <OnAddCard>d__3(0) { <>4__this = <>4__this }; } <OnAddCard>d__.args = <>3__args; return <OnAddCard>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <OnBattleEnding>d__6 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private GameEventArgs args; public GameEventArgs <>3__args; public KomachiModRiversideGardenSe <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnBattleEnding>d__6(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (((Unit)((StatusEffect)<>4__this).Battle.Player).IsAlive) { <>4__this.<>n__0(); <>2__current = (BattleAction)new HealAction((Unit)(object)((StatusEffect)<>4__this).Battle.Player, (Unit)(object)((StatusEffect)<>4__this).Battle.Player, ((StatusEffect)<>4__this).Level * <>4__this.SpiderLilyCount, (HealType)0, 0.2f); <>1__state = 1; return true; } break; case 1: <>1__state = -1; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnBattleEnding>d__6 <OnBattleEnding>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnBattleEnding>d__ = this; } else { <OnBattleEnding>d__ = new <OnBattleEnding>d__6(0) { <>4__this = <>4__this }; } <OnBattleEnding>d__.args = <>3__args; return <OnBattleEnding>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <OnCardsAddedToDrawZone>d__4 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private CardsAddingToDrawZoneEventArgs args; public CardsAddingToDrawZoneEventArgs <>3__args; public KomachiModRiversideGardenSe <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnCardsAddedToDrawZone>d__4(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 = <>4__this.Upgrade(args.Cards); <>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() { <OnCardsAddedToDrawZone>d__4 <OnCardsAddedToDrawZone>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnCardsAddedToDrawZone>d__ = this; } else { <OnCardsAddedToDrawZone>d__ = new <OnCardsAddedToDrawZone>d__4(0) { <>4__this = <>4__this }; } <OnCardsAddedToDrawZone>d__.args = <>3__args; return <OnCardsAddedToDrawZone>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } private int SpiderLilyCount { get { if (((StatusEffect)this).Battle == null) { return 0; } return ((StatusEffect)this).Battle.EnumerateAllCards().Count((Card card) => card is KomachiModSpiderLily); } } protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToDiscard, (EventSequencedReactor<CardsEventArgs>)OnAddCard); ((StatusEffect)this).ReactOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToHand, (EventSequencedReactor<CardsEventArgs>)OnAddCard); ((StatusEffect)this).ReactOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToExile, (EventSequencedReactor<CardsEventArgs>)OnAddCard); ((StatusEffect)this).ReactOwnerEvent<CardsAddingToDrawZoneEventArgs>(((StatusEffect)this).Battle.CardsAddedToDrawZone, (EventSequencedReactor<CardsAddingToDrawZoneEventArgs>)OnCardsAddedToDrawZone); ((StatusEffect)this).ReactOwnerEvent<GameEventArgs>(((StatusEffect)this).Battle.BattleEnding, (EventSequencedReactor<GameEventArgs>)OnBattleEnding); } [IteratorStateMachine(typeof(<OnAddCard>d__3))] private IEnumerable<BattleAction> OnAddCard(CardsEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnAddCard>d__3(-2) { <>4__this = this, <>3__args = args }; } [IteratorStateMachine(typeof(<OnCardsAddedToDrawZone>d__4))] private IEnumerable<BattleAction> OnCardsAddedToDrawZone(CardsAddingToDrawZoneEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnCardsAddedToDrawZone>d__4(-2) { <>4__this = this, <>3__args = args }; } private BattleAction Upgrade(IEnumerable<Card> cards) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown List<Card> list = cards.Where((Card card) => card.CanUpgradeAndPositive && card is KomachiModSpiderLily).ToList(); if (list.Count == 0) { return null; } ((StatusEffect)this).NotifyActivating(); return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)list); } [IteratorStateMachine(typeof(<OnBattleEnding>d__6))] private IEnumerable<BattleAction> OnBattleEnding(GameEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnBattleEnding>d__6(-2) { <>4__this = this, <>3__args = args }; } [CompilerGenerated] [DebuggerHidden] private void <>n__0() { ((StatusEffect)this).NotifyActivating(); } } public sealed class KomachiModShinigamiTacticsSeDef : KomachiStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = KomachiStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)0; return defaultStatusEffectConfig; } } [EntityLogic(typeof(KomachiModShinigamiTacticsSeDef))] public sealed class KomachiModShinigamiTacticsSe : StatusEffect { [CompilerGenerated] private sealed class <OnCardUsed>d__3 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private CardUsingEventArgs args; public CardUsingEventArgs <>3__args; public KomachiModShinigamiTacticsSe <>4__this; private KomachiModManDistance <manDist>5__1; private Card[] <array>5__2; private Card[] <>s__3; private int <>s__4; private Card <card>5__5; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnCardUsed>d__3(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <manDist>5__1 = null; <array>5__2 = null; <>s__3 = null; <card>5__5 = null; <>1__state = -2; } private bool MoveNext() { //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_0176: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -1; } else { <>1__state = -1; if (((StatusEffect)<>4__this).Battle.BattleShouldEnd || !(args.Card is KomachiModManDistance)) { goto IL_01fc; } <manDist>5__1 = (KomachiModManDistance)(object)args.Card; <>4__this.<>n__0(); if (<manDist>5__1.lastDistanceChange == 0) { return false; } if (<manDist>5__1.lastDistanceChange < 0) { <array>5__2 = ((StatusEffect)<>4__this).Battle.RollCards(new CardWeightTable(RarityWeightTable.BattleCard, OwnerWeightTable.Valid, CardTypeWeightTable.OnlyAttack, false), ((StatusEffect)<>4__this).Level, (Predicate<CardConfig>)null); } else { <array>5__2 = ((StatusEffect)<>4__this).Battle.RollCards(new CardWeightTable(RarityWeightTable.BattleCard, OwnerWeightTable.Valid, CardTypeWeightTable.OnlyDefense, false), ((StatusEffect)<>4__this).Level, (Predicate<CardConfig>)null); } if (<array>5__2.Length != 0) { <>s__3 = <array>5__2; for (<>s__4 = 0; <>s__4 < <>s__3.Length; <>s__4++) { <card>5__5 = <>s__3[<>s__4]; ManaGroup cost = <card>5__5.Cost; if (((ManaGroup)(ref cost)).Amount > 0) { <card>5__5.SetTurnCost(<>4__this.Mana); } <card>5__5.IsEthereal = true; <card>5__5.IsExile = true; <card>5__5 = null; } <>s__3 = null; <>2__current = (BattleAction)new AddCardsToHandAction(<array>5__2); <>1__state = 1; return true; } } <manDist>5__1 = null; <array>5__2 = null; goto IL_01fc; IL_01fc: return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnCardUsed>d__3 <OnCardUsed>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnCardUsed>d__ = this; } else { <OnCardUsed>d__ = new <OnCardUsed>d__3(0) { <>4__this = <>4__this }; } <OnCardUsed>d__.args = <>3__args; return <OnCardUsed>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } public ManaGroup Mana => ManaGroup.Single((ManaColor)0); protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed); } [IteratorStateMachine(typeof(<OnCardUsed>d__3))] private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnCardUsed>d__3(-2) { <>4__this = this, <>3__args = args }; } [CompilerGenerated] [DebuggerHidden] private void <>n__0() { ((StatusEffect)this).NotifyActivating(); } } public sealed class KomachiModSpiritReturnSeDef : KomachiStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = KomachiStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)0; return defaultStatusEffectConfig; } } [EntityLogic(typeof(KomachiModSpiritReturnSeDef))] public sealed class KomachiModSpiritReturnSe : StatusEffect { [CompilerGenerated] private sealed class <OnTurnStarted>d__2 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private UnitEventArgs args; public UnitEventArgs <>3__args; public KomachiModSpiritReturnSe <>4__this; private List<Card> <list>5__1; private SelectCardInteraction <interaction>5__2; private IReadOnlyList<Card> <cards>5__3; private int <i>5__4; private IEnumerator<Card> <>s__5; private Card <card>5__6; 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() { int num = <>1__state; if (num == -3 || num == 3) { try { } finally { <>m__Finally1(); } } <list>5__1 = null; <interaction>5__2 = null; <cards>5__3 = null; <>s__5 = null; <card>5__6 = null; <>1__state = -2; } private bool MoveNext() { //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (((StatusEffect)<>4__this).Battle.BattleShouldEnd) { break; } <>4__this.<>n__0(); <i>5__4 = 1; goto IL_00c6; case 1: <>1__state = -1; <i>5__4++; goto IL_00c6; case 2: <>1__state = -1; <cards>5__3 = <interaction>5__2.SelectedCards; <>s__5 = <cards>5__3.GetEnumerator(); <>1__state = -3; goto IL_022c; case 3: { <>1__state = -3; <card>5__6.IncreaseBaseCost(<>4__this.Mana); <card>5__6.RemoveFromBattleAfterPlay = true; <card>5__6 = null; goto IL_022c; } IL_022c: if (<>s__5.MoveNext()) { <card>5__6 = <>s__5.Current; <>2__current = (BattleAction)new MoveCardAction(<card>5__6, (CardZone)2); <>1__state = 3; return true; } <>m__Finally1(); <>s__5 = null; <list>5__1 = null; <interaction>5__2 = null; <cards>5__3 = null; break; IL_00c6: if (<i>5__4 <= ((StatusEffect)<>4__this).Level) { IReadOnlyList<Card> handZone = ((StatusEffect)<>4__this).Battle.HandZone; int num = <i>5__4; <>2__current = (BattleAction)new MoveCardToDrawZoneAction(handZone[handZone.Count - num], (DrawZoneTarget)1); <>1__state = 1; return true; } if (((StatusEffect)<>4__this).Battle.ExileZone.Count <= 0) { return false; } <list>5__1 = ((StatusEffect)<>4__this).Battle.ExileZone.Where(delegate(Card card) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) ManaGroup cost = card.Cost; return ((ManaGroup)(ref cost)).Amount < 2; }).ToList(); <interaction>5__2 = new SelectCardInteraction(0, ((StatusEffect)<>4__this).Level, (IEnumerable<Card>)<list>5__1, (SelectedCardHandling)0); <>2__current = (BattleAction)new InteractionAction((Interaction)(object)<interaction>5__2, false) { Source = (GameEntity)(object)<>4__this }; <>1__state = 2; 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__5 != null) { <>s__5.Dispose(); } } [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(); } } private ManaGroup Mana; protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnTurnStarted); } [IteratorStateMachine(typeof(<OnTurnStarted>d__2))] private IEnumerable<BattleAction> OnTurnStarted(UnitEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnTurnStarted>d__2(-2) { <>4__this = this, <>3__args = args }; } public KomachiModSpiritReturnSe() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) ManaGroup mana = default(ManaGroup); ((ManaGroup)(ref mana)).Any = 1; Mana = mana; ((StatusEffect)this)..ctor(); } [CompilerGenerated] [DebuggerHidden] private void <>n__0() { ((StatusEffect)this).NotifyActivating(); } } public sealed class KomachiModGuidedGeneratorNextTurnSeDef : KomachiStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = KomachiStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)0; return defaultStatusEffectConfig; } } [EntityLogic(typeof(KomachiModGuidedGeneratorNextTurnSeDef))] public sealed class KomachiModGuidedGeneratorNextTurnSe : StatusEffect { [CompilerGenerated] private sealed class <OnOwnerTurnStarted>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private UnitEventArgs args; public UnitEventArgs <>3__args; public KomachiModGuidedGeneratorNextTurnSe <>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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (((StatusEffect)<>4__this).Battle.BattleShouldEnd) { return false; } <>2__current = (BattleAction)(object)new ApplyStatusEffectAction<KomachiModGuidedSpiritSe>(((StatusEffect)<>4__this).Owner, (int?)((StatusEffect)<>4__this).Level, (int?)null, (int?)null, (int?)null, 0f, true); <>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 KomachiModTalkativeFerrymanSeDef : KomachiStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = KomachiStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)0; return defaultStatusEffectConfig; } } [EntityLogic(typeof(Komachi