Decompiled source of Aya Shameimaru v0.4.83
AyaShameimaru.dll
Decompiled a day 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.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AddWatermark; using AyaShameimaru.Cards; using AyaShameimaru.EnemyUnits; using AyaShameimaru.Exhibits; using AyaShameimaru.PlayerUnits; using AyaShameimaru.Stages; using AyaShameimaru.StatusEffects; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks.CompilerServices; using DG.Tweening; using DG.Tweening.Core; using DG.Tweening.Plugins.Options; using HarmonyLib; using JetBrains.Annotations; using LBoL.Base; using LBoL.Base.Extensions; using LBoL.ConfigData; using LBoL.Core; using LBoL.Core.Adventures; using LBoL.Core.Battle; using LBoL.Core.Battle.BattleActions; using LBoL.Core.Battle.Interactions; using LBoL.Core.Cards; using LBoL.Core.Helpers; using LBoL.Core.Intentions; using LBoL.Core.Randoms; using LBoL.Core.Stations; using LBoL.Core.StatusEffects; using LBoL.Core.Units; using LBoL.EntityLib.Adventures.Common; using LBoL.EntityLib.Adventures.FirstPlace; using LBoL.EntityLib.Adventures.Shared23; using LBoL.EntityLib.Adventures.Stage2; using LBoL.EntityLib.Adventures.Stage3; using LBoL.EntityLib.Cards; using LBoL.EntityLib.Cards.Adventure; using LBoL.EntityLib.Cards.Enemy; using LBoL.EntityLib.Cards.Neutral.Black; using LBoL.EntityLib.Cards.Neutral.Blue; using LBoL.EntityLib.Cards.Neutral.Green; using LBoL.EntityLib.Cards.Neutral.MultiColor; using LBoL.EntityLib.Cards.Neutral.NoColor; using LBoL.EntityLib.Cards.Neutral.Red; using LBoL.EntityLib.Cards.Neutral.TwoColor; using LBoL.EntityLib.Cards.Neutral.White; using LBoL.EntityLib.EnemyUnits.Character; using LBoL.EntityLib.EnemyUnits.Lore; using LBoL.EntityLib.EnemyUnits.Opponent; using LBoL.EntityLib.Exhibits; using LBoL.EntityLib.Exhibits.Adventure; using LBoL.EntityLib.Exhibits.Shining; using LBoL.EntityLib.StatusEffects.Basic; using LBoL.EntityLib.StatusEffects.Cirno; using LBoL.EntityLib.StatusEffects.Enemy; using LBoL.EntityLib.StatusEffects.Enemy.Seija; using LBoL.EntityLib.StatusEffects.ExtraTurn; using LBoL.EntityLib.StatusEffects.Koishi; using LBoL.EntityLib.StatusEffects.Marisa; using LBoL.EntityLib.StatusEffects.Neutral.Black; using LBoL.EntityLib.StatusEffects.Neutral.Blue; using LBoL.EntityLib.StatusEffects.Neutral.Green; using LBoL.EntityLib.StatusEffects.Neutral.MultiColor; using LBoL.EntityLib.StatusEffects.Neutral.Red; using LBoL.EntityLib.StatusEffects.Neutral.TwoColor; using LBoL.EntityLib.StatusEffects.Neutral.White; using LBoL.EntityLib.StatusEffects.Others; using LBoL.EntityLib.StatusEffects.Reimu; using LBoL.EntityLib.StatusEffects.Sakuya; using LBoL.Presentation; using LBoL.Presentation.Effect; using LBoL.Presentation.UI; using LBoL.Presentation.UI.ExtraWidgets; using LBoL.Presentation.UI.Panels; using LBoL.Presentation.UI.Widgets; using LBoL.Presentation.Units; using LBoLEntitySideloader; using LBoLEntitySideloader.Attributes; using LBoLEntitySideloader.Entities; using LBoLEntitySideloader.PersistentValues; using LBoLEntitySideloader.ReflectionHelpers; using LBoLEntitySideloader.Resource; using LBoLEntitySideloader.Utils; using Spine.Unity; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.InputSystem; using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; using UnityEngine.UI; [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("AyaShameimaru")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("AyaShameimaru")] [assembly: AssemblyTitle("AyaShameimaru")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace AyaShameimaru { public sealed class AyaSaveData : CustomGameRunSaveData { public Type[] Types = new Type[0]; public int? AyaStory; public int? FlandreStory; public bool TakaneDefeated; public bool TakaneTalked; public override void Restore(GameRunController gameRun) { AyaStageHakureiShrineDef.AyaStageHakureiShrine.BattleController_LoseAllExhibits_Patch.types = Types; PlayerUnit player = gameRun.Player; if (player is AyaPlayerUnitDef.AyaPlayerUnit ayaPlayerUnit) { ayaPlayerUnit.Story = AyaStory; } else if (player is FlandrePlayerUnitDef.FlandrePlayerUnit flandrePlayerUnit) { flandrePlayerUnit.Story = FlandreStory; flandrePlayerUnit.TakaneDefeated = TakaneDefeated; flandrePlayerUnit.TakaneTalked = TakaneTalked; } } public override void Save(GameRunController gameRun) { Types = AyaStageHakureiShrineDef.AyaStageHakureiShrine.BattleController_LoseAllExhibits_Patch.types; PlayerUnit player = gameRun.Player; if (player is AyaPlayerUnitDef.AyaPlayerUnit ayaPlayerUnit) { AyaStory = ayaPlayerUnit.Story; } else if (player is FlandrePlayerUnitDef.FlandrePlayerUnit flandrePlayerUnit) { FlandreStory = flandrePlayerUnit.Story; TakaneDefeated = flandrePlayerUnit.TakaneDefeated; TakaneTalked = flandrePlayerUnit.TakaneTalked; } } } [BepInPlugin("intoxicatedkid.ayashameimaru", "Aya Shameimaru", "0.4.83")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInProcess("LBoL.exe")] public class BepinexPlugin : BaseUnityPlugin { private static readonly Harmony harmony = PluginInfo.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("intoxicatedkid.ayashameimaru", ""); internal static AssetBundle ayaShameimaru; internal static BatchLocalization cardLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(CardTemplate), false); internal static BatchLocalization enemyUnitLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(EnemyUnitTemplate), false); internal static BatchLocalization exhibitLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(ExhibitTemplate), false); internal static BatchLocalization intentionLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(IntentionTemplate), false); internal static BatchLocalization playerUnitLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(PlayerUnitTemplate), false); internal static BatchLocalization stageLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(StageTemplate), false); internal static BatchLocalization statusEffectLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(StatusEffectTemplate), false); internal static BatchLocalization ultimateSkillLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(UltimateSkillTemplate), false); internal static BatchLocalization unitModelLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(UnitModelTemplate), false); public static ConfigEntry<bool> AyaPhantasmMode; public static ConfigEntry<string> AyaRecords; public static int LastInput = 0; public static bool StoryWait = false; public static bool AprilFools => DateTime.Now.Month == 4 && DateTime.Now.Day == 1; public static bool NormalAyaPlayerUnit => AyaRecords.Value.Contains("NormalAyaPlayerUnit"); public static bool HardAyaPlayerUnit => AyaRecords.Value.Contains("HardAyaPlayerUnit"); public static bool LunaticAyaPlayerUnit => AyaRecords.Value.Contains("LunaticAyaPlayerUnit"); public static bool PhantasmAyaPlayerUnit => AyaRecords.Value.Contains("PhantasmAyaPlayerUnit"); public static bool Chapter1AyaPlayerUnit => AyaRecords.Value.Contains("Chapter1AyaPlayerUnit"); public static bool NormalFlandrePlayerUnit => AyaRecords.Value.Contains("NormalFlandrePlayerUnit"); public static bool HardFlandrePlayerUnit => AyaRecords.Value.Contains("HardFlandrePlayerUnit"); public static bool LunaticFlandrePlayerUnit => AyaRecords.Value.Contains("LunaticFlandrePlayerUnit"); public static bool PhantasmFlandrePlayerUnit => AyaRecords.Value.Contains("PhantasmFlandrePlayerUnit"); public static bool AyaUltAdventBgm => AyaRecords.Value.Contains("AyaUltAdventBgm"); public static bool FlandreUltRipplesBgm => AyaRecords.Value.Contains("FlandreUltRipplesBgm"); public static bool AyaBossFlandre => AyaRecords.Value.Contains("AyaBossFlandre"); public static bool AyaBossKoishi => AyaRecords.Value.Contains("AyaBossKoishi"); public static bool AyaBossZUN => AyaRecords.Value.Contains("AyaBossZUN"); public static bool AyaTakane => AyaRecords.Value.Contains("AyaTakane"); private void Awake() { log = ((BaseUnityPlugin)this).Logger; Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; AyaPhantasmMode = ((BaseUnityPlugin)this).Config.Bind<bool>("Phantasm Mode", "Phantasm Mode", false, "Weakens many cards and exhibits."); AyaRecords = ((BaseUnityPlugin)this).Config.Bind<string>("Records", "Records", "", "May cause an error if edited manually."); EntityManager.RegisterSelf(); harmony.PatchAll(); if (Chainloader.PluginInfos.ContainsKey("neo.lbol.tools.watermark")) { WatermarkWrapper.ActivateWatermark(); } ayaShameimaru = ResourceLoader.LoadAssetBundle("ayaShameimaru", directorySource); AyaBackgrounds.AddAyaBackgrounds(); cardLoc.DiscoverAndLoadLocFiles("Card"); enemyUnitLoc.DiscoverAndLoadLocFiles("EnemyUnit"); exhibitLoc.DiscoverAndLoadLocFiles("Exhibit"); intentionLoc.DiscoverAndLoadLocFiles("Intention"); playerUnitLoc.DiscoverAndLoadLocFiles("PlayerUnit"); stageLoc.DiscoverAndLoadLocFiles("Stage"); statusEffectLoc.DiscoverAndLoadLocFiles("StatusEffect"); ultimateSkillLoc.DiscoverAndLoadLocFiles("UltimateSkill"); unitModelLoc.DiscoverAndLoadLocFiles("UnitModel"); ((CustomGameRunSaveData)new AyaSaveData()).RegisterSelf("intoxicatedkid.ayashameimaru"); } private void OnDestroy() { Harmony obj = harmony; if (obj != null) { obj.UnpatchSelf(); } AssetBundle obj2 = ayaShameimaru; if (obj2 != null) { obj2.Unload(false); } } private void Update() { if (UnityInput.Current.anyKeyDown) { LastInput = 0; } } } public static class PluginInfo { public const string GUID = "intoxicatedkid.ayashameimaru"; public const string Name = "Aya Shameimaru"; public const string version = "0.4.83"; public static readonly Harmony harmony = new Harmony("intoxicatedkid.ayashameimaru"); } internal class WatermarkWrapper { [MethodImpl(MethodImplOptions.NoInlining)] internal static void ActivateWatermark() { API.ActivateWatermark(); } } } namespace AyaShameimaru.StatusEffects { public sealed class AyaAccelerationSeDef : StatusEffectTemplate { [EntityLogic(typeof(AyaAccelerationSeDef))] public sealed class AyaAccelerationSe : StatusEffect { [CompilerGenerated] private sealed class <Activate>d__2 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; public AyaAccelerationSe <>4__this; private Graze <statusEffect>5__1; private int <num>5__2; private int <num2>5__3; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Activate>d__2(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <statusEffect>5__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (((StatusEffect)<>4__this).Battle.BattleShouldEnd) { return false; } <statusEffect>5__1 = ((StatusEffect)<>4__this).Owner.GetStatusEffect<Graze>(); <num>5__2 = ((<statusEffect>5__1 != null) ? ((StatusEffect)<statusEffect>5__1).Level : 0); <num2>5__3 = MathExtensions.RoundToInt(Math.Truncate((float)((StatusEffect)<>4__this).Level / 4f)); if (<num>5__2 < <num2>5__3) { <>2__current = (BattleAction)(object)new ApplyStatusEffectAction<Graze>(((StatusEffect)<>4__this).Owner, (int?)(<num2>5__3 - <num>5__2), (int?)null, (int?)null, (int?)null, 0f, true); <>1__state = 1; return true; } break; case 1: <>1__state = -1; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <Activate>d__2 result; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; result = this; } else { result = new <Activate>d__2(0) { <>4__this = <>4__this }; } return result; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <OnOwnerDamageReceived>d__3 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private DamageEventArgs args; public DamageEventArgs <>3__args; public AyaAccelerationSe <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnOwnerDamageReceived>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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: { <>1__state = -1; DamageInfo damageInfo = args.DamageInfo; if (((DamageInfo)(ref damageInfo)).IsGrazed && !((Unit)((StatusEffect)<>4__this).Battle.Player).HasStatusEffect<AyaInstantShotJournalistSeDef.AyaInstantShotJournalistSe>()) { ((StatusEffect)<>4__this).Level = Math.Max(((StatusEffect)<>4__this).Level - 2, 0); if (((StatusEffect)<>4__this).Level <= 0) { <>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)<>4__this, true, 0f); <>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() { <OnOwnerDamageReceived>d__3 <OnOwnerDamageReceived>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnOwnerDamageReceived>d__ = this; } else { <OnOwnerDamageReceived>d__ = new <OnOwnerDamageReceived>d__3(0) { <>4__this = <>4__this }; } <OnOwnerDamageReceived>d__.args = <>3__args; return <OnOwnerDamageReceived>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <OnOwnerTurnEnding>d__1 : 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 AyaAccelerationSe <>4__this; 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 <OnOwnerTurnEnding>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; <action>5__2 = null; <>1__state = -2; } private bool MoveNext() { try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>s__1 = <>4__this.Activate().GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; <action>5__2 = null; break; } 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; 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() { <OnOwnerTurnEnding>d__1 <OnOwnerTurnEnding>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnOwnerTurnEnding>d__ = this; } else { <OnOwnerTurnEnding>d__ = new <OnOwnerTurnEnding>d__1(0) { <>4__this = <>4__this }; } <OnOwnerTurnEnding>d__.args = <>3__args; return <OnOwnerTurnEnding>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } protected override void OnAdded(Unit unit) { ((StatusEffect)this).HandleOwnerEvent<StatusEffectApplyEventArgs>(((StatusEffect)this).Owner.StatusEffectAdded, (GameEventHandler<StatusEffectApplyEventArgs>)delegate { int count3 = MathExtensions.RoundToInt(Math.Truncate((float)((StatusEffect)this).Level / 4f)); ((StatusEffect)this).Count = count3; }); ((StatusEffect)this).HandleOwnerEvent<StatusEffectEventArgs>(((StatusEffect)this).Owner.StatusEffectChanged, (GameEventHandler<StatusEffectEventArgs>)delegate { int count2 = MathExtensions.RoundToInt(Math.Truncate((float)((StatusEffect)this).Level / 4f)); ((StatusEffect)this).Count = count2; }); ((StatusEffect)this).HandleOwnerEvent<StatusEffectEventArgs>(((StatusEffect)this).Owner.StatusEffectRemoved, (GameEventHandler<StatusEffectEventArgs>)delegate { int count = MathExtensions.RoundToInt(Math.Truncate((float)((StatusEffect)this).Level / 4f)); ((StatusEffect)this).Count = count; }); ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnEnding, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnEnding); ((StatusEffect)this).ReactOwnerEvent<DamageEventArgs>(((StatusEffect)this).Owner.DamageReceived, (EventSequencedReactor<DamageEventArgs>)OnOwnerDamageReceived); } [IteratorStateMachine(typeof(<OnOwnerTurnEnding>d__1))] private IEnumerable<BattleAction> OnOwnerTurnEnding(GameEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnOwnerTurnEnding>d__1(-2) { <>4__this = this, <>3__args = args }; } [IteratorStateMachine(typeof(<Activate>d__2))] public IEnumerable<BattleAction> Activate() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <Activate>d__2(-2) { <>4__this = this }; } [IteratorStateMachine(typeof(<OnOwnerDamageReceived>d__3))] private IEnumerable<BattleAction> OnOwnerDamageReceived(DamageEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnOwnerDamageReceived>d__3(-2) { <>4__this = this, <>3__args = args }; } public OpposeResult Oppose(AyaDecelerationSeDef.AyaDecelerationSe other) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) if (((StatusEffect)this).Level < ((StatusEffect)other).Level) { ((StatusEffect)other).Level = ((StatusEffect)other).Level - ((StatusEffect)this).Level; return (OpposeResult)1; } if (((StatusEffect)this).Level == ((StatusEffect)other).Level) { return (OpposeResult)2; } ((StatusEffect)this).Level = ((StatusEffect)this).Level - ((StatusEffect)other).Level; return (OpposeResult)0; } } 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("AyaAccelerationSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.AyaAccelerationSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 0, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, true, (StackType?)(StackType)4, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Graze" }, (string)null, "Graze", "Default", "Graze"); } } public sealed class AyaDecelerationSeDef : StatusEffectTemplate { [EntityLogic(typeof(AyaDecelerationSeDef))] public sealed class AyaDecelerationSe : StatusEffect { public OpposeResult Oppose(AyaAccelerationSeDef.AyaAccelerationSe other) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) if (((StatusEffect)this).Level < ((StatusEffect)other).Level) { ((StatusEffect)other).Level = ((StatusEffect)other).Level - ((StatusEffect)this).Level; return (OpposeResult)1; } if (((StatusEffect)this).Level == ((StatusEffect)other).Level) { return (OpposeResult)2; } ((StatusEffect)this).Level = ((StatusEffect)this).Level - ((StatusEffect)other).Level; return (OpposeResult)0; } } 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("AyaDecelerationSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.AyaDecelerationSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 1, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (string)null, "Default", "Default", "Default"); } } public sealed class AyaPassiveSeDef : StatusEffectTemplate { [EntityLogic(typeof(AyaPassiveSeDef))] public sealed class AyaPassiveSe : StatusEffect { [HarmonyPatch(typeof(Card), "LocalizeProperty")] private class Card_LocalizeProperty_Patch { private static bool Prefix(Card __instance, ref string key, ref bool decorated, ref bool required, ref string __result) { if (((GameEntity)__instance).Id == "AyaNews" && key == "Description" && Singleton<GameMaster>.Instance.CurrentGameRun != null && (Singleton<GameMaster>.Instance.CurrentGameRun.Player is AyaPlayerUnitDef.AyaPlayerUnit || Singleton<GameMaster>.Instance.CurrentGameRun.Player.HasExhibit<AyaGDef.AyaG>() || Singleton<GameMaster>.Instance.CurrentGameRun.Player.HasExhibit<AyaRDef.AyaR>())) { __result = TypeFactory<Card>.LocalizeProperty("AyaNewsSpecial", "AyaNewsDescription", decorated, required); return false; } return true; } } [CompilerGenerated] private sealed class <OnPlayerStatusEffectRemoving>d__6 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private StatusEffectEventArgs args; public StatusEffectEventArgs <>3__args; public AyaPassiveSe <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnPlayerStatusEffectRemoving>d__6(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 (args.Effect == <>4__this) { ((GameEventArgs)args).CanCancel = true; ((GameEventArgs)args).CancelBy((GameEntity)(object)<>4__this); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnPlayerStatusEffectRemoving>d__6 <OnPlayerStatusEffectRemoving>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnPlayerStatusEffectRemoving>d__ = this; } else { <OnPlayerStatusEffectRemoving>d__ = new <OnPlayerStatusEffectRemoving>d__6(0) { <>4__this = <>4__this }; } <OnPlayerStatusEffectRemoving>d__.args = <>3__args; return <OnPlayerStatusEffectRemoving>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } public int Value1 => 12; public int Value2 => 1; protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<StatusEffectEventArgs>(((Unit)((StatusEffect)this).Battle.Player).StatusEffectRemoving, (EventSequencedReactor<StatusEffectEventArgs>)OnPlayerStatusEffectRemoving); } [IteratorStateMachine(typeof(<OnPlayerStatusEffectRemoving>d__6))] private IEnumerable<BattleAction> OnPlayerStatusEffectRemoving(StatusEffectEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnPlayerStatusEffectRemoving>d__6(-2) { <>4__this = this, <>3__args = args }; } } 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("AyaPassiveSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.AyaPassiveSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", -2, (StatusEffectType)2, false, true, (int?)null, false, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)8388608, (IReadOnlyList<string>)new List<string> { "LockedOn" }, (string)null, "Default", "Default", "Default"); } } public sealed class AyaPerfectGrazeSeDef : StatusEffectTemplate { [EntityLogic(typeof(AyaPerfectGrazeSeDef))] public sealed class AyaPerfectGrazeSe : StatusEffect { [HarmonyPatch(typeof(Unit), "MeasureDamage")] private class Unit_MeasureDamage_Patch { private static bool Prefix(Unit __instance, ref DamageInfo info, ref DamageInfo __result) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (__instance.HasStatusEffect<AyaPerfectGrazeSe>() && (int)((DamageInfo)(ref info)).DamageType == 2 && MathExtensions.Round(((DamageInfo)(ref info)).Damage, MidpointRounding.AwayFromZero) > 0f && ((DamageInfo)(ref info)).IsAccuracy) { DamageInfo val = new DamageInfo(0f, ((DamageInfo)(ref info)).DamageType, true, ((DamageInfo)(ref info)).IsAccuracy, false); val = ((DamageInfo)(ref val)).BlockBy(__instance.Block); __result = ((DamageInfo)(ref val)).ShieldBy(__instance.Shield); return false; } return true; } } [HarmonyPatch(typeof(Unit), "TakeDamage")] private class Unit_TakeDamage_Patch { private static int CheckGraze(Unit unit) { return unit.HasStatusEffect<Graze>() ? 2 : (-1); } private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Expected O, but got Unknown return new CodeMatcher(instructions, generator).MatchForward(true, (CodeMatch[])(object)new CodeMatch[5] { new CodeMatch((OpCode?)OpCodes.Ldstr, (object)"Taking grazed accurary DamageInfo {0}.", (string)null), CodeMatch.op_Implicit(OpCodes.Ldarg_1), CodeMatch.op_Implicit(OpCodes.Box), CodeMatch.op_Implicit(OpCodes.Call), CodeMatch.op_Implicit(OpCodes.Call) }).Set(OpCodes.Pop, (object)null).MatchForward(true, (CodeMatch[])(object)new CodeMatch[3] { CodeMatch.op_Implicit(OpCodes.Ldarga_S), new CodeMatch((OpCode?)OpCodes.Call, (object)AccessTools.PropertyGetter(typeof(DamageInfo), "DamageType"), (string)null), CodeMatch.op_Implicit(OpCodes.Ldc_I4_2) }) .Set(OpCodes.Call, (object)AccessTools.Method(typeof(Unit_TakeDamage_Patch), "CheckGraze", (Type[])null, (Type[])null)) .Insert((CodeInstruction[])(object)new CodeInstruction[1] { new CodeInstruction(OpCodes.Ldarg_0, (object)null) }) .InstructionEnumeration(); } private static void Postfix(Unit __instance, ref DamageInfo info) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 if ((int)((DamageInfo)(ref info)).DamageType == 2 && __instance.HasStatusEffect<AyaPerfectGrazeSe>() && ((DamageInfo)(ref info)).IsGrazed && ((DamageInfo)(ref info)).IsAccuracy) { __instance.GetStatusEffect<AyaPerfectGrazeSe>().Activate(); } } } public void Activate() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown int level = ((StatusEffect)this).Level; ((StatusEffect)this).Level = level - 1; if (((StatusEffect)this).Level > 0) { ((StatusEffect)this).NotifyActivating(); } else { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f))); } } } 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("AyaPerfectGrazeSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.AyaPerfectGrazeSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 0, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)256, (IReadOnlyList<string>)new List<string>(), (string)null, "Graze", "Default", "Graze"); } } public sealed class FlandreBrimstoneSeDef : StatusEffectTemplate { [EntityLogic(typeof(FlandreBrimstoneSeDef))] public sealed class FlandreBrimstoneSe : StatusEffect { public int Value => 2; } 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("FlandreBrimstoneSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.FlandreBrimstoneSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 9, (StatusEffectType)2, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string> { "FlandreHellfireSe" }, (string)null, "Default", "Default", "Default"); } } public sealed class FlandreDestroySeDef : StatusEffectTemplate { [EntityLogic(typeof(FlandreDestroySeDef))] public sealed class FlandreDestroySe : StatusEffect { } 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("FlandreDestroySe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return null; } public override StatusEffectConfig MakeConfig() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 10, (StatusEffectType)0, false, true, (int?)null, false, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (string)null, "Default", "Default", "Default"); } } public sealed class FlandreDoomSeDef : StatusEffectTemplate { [EntityLogic(typeof(FlandreDoomSeDef))] public sealed class FlandreDoomSe : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarting, (GameEventHandler<UnitEventArgs>)OnOwnerTurnStarting); foreach (EnemyUnit allAliveEnemy in ((StatusEffect)this).Battle.AllAliveEnemies) { ((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(((Unit)allAliveEnemy).DamageTaking, (GameEventHandler<DamageEventArgs>)OnEnemyDamageTaking, (GameEventPriority)int.MaxValue); } ((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(((StatusEffect)this).Battle.EnemySpawned, (GameEventHandler<UnitEventArgs>)OnEnemySpawned); } private void OnOwnerTurnStarting(UnitEventArgs args) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown if (((StatusEffect)this).IsAutoDecreasing) { int level = ((StatusEffect)this).Level; ((StatusEffect)this).Level = level - 1; if (((StatusEffect)this).Level <= 0) { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0f))); } } else { ((StatusEffect)this).IsAutoDecreasing = true; } } private void OnEnemyDamageTaking(DamageEventArgs args) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_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_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) DamageInfo val = args.DamageInfo; float num = ((DamageInfo)(ref val)).Amount + (float)((StatusEffect)this).Level; val = args.DamageInfo; DamageType damageType = ((DamageInfo)(ref val)).DamageType; val = args.DamageInfo; bool isGrazed = ((DamageInfo)(ref val)).IsGrazed; val = args.DamageInfo; bool isAccuracy = ((DamageInfo)(ref val)).IsAccuracy; val = args.DamageInfo; val = new DamageInfo(num, damageType, isGrazed, isAccuracy, ((DamageInfo)(ref val)).DontBreakPerfect); DamageInfo damageInfo = args.DamageInfo; val = ((DamageInfo)(ref val)).BlockBy(((int)((DamageInfo)(ref damageInfo)).DamageType != 0) ? args.Target.Block : 0); damageInfo = args.DamageInfo; args.DamageInfo = ((DamageInfo)(ref val)).ShieldBy(((int)((DamageInfo)(ref damageInfo)).DamageType != 0) ? args.Target.Shield : 0); ((GameEventArgs)args).AddModifier((GameEntity)(object)this); } private void OnEnemySpawned(UnitEventArgs args) { ((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(args.Unit.DamageTaking, (GameEventHandler<DamageEventArgs>)OnEnemyDamageTaking, (GameEventPriority)99); } } 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("FlandreDoomSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.FlandreDoomSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 1, (StatusEffectType)2, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (string)null, "BuffBlue", "Default", "Firepower"); } } public sealed class FlandreHellfireSeDef : StatusEffectTemplate { [EntityLogic(typeof(FlandreHellfireSeDef))] public sealed class FlandreHellfireSe : StatusEffect { [CompilerGenerated] private sealed class <OnOwnerTurnStarted>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 FlandreHellfireSe <>4__this; private IEnumerator<BattleAction> <>s__1; private BattleAction <battleAction>5__2; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnOwnerTurnStarted>d__2(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <>s__1 = null; <battleAction>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).Owner == null || (((StatusEffect)<>4__this).Owner is EnemyUnit && !((StatusEffect)<>4__this).Owner.IsExtraTurn)) { return false; } <>s__1 = <>4__this.TakeEffect().GetEnumerator(); <>1__state = -3; break; case 1: <>1__state = -3; <battleAction>5__2 = null; break; } if (<>s__1.MoveNext()) { <battleAction>5__2 = <>s__1.Current; <>2__current = <battleAction>5__2; <>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__2 <OnOwnerTurnStarted>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnOwnerTurnStarted>d__ = this; } else { <OnOwnerTurnStarted>d__ = new <OnOwnerTurnStarted>d__2(0) { <>4__this = <>4__this }; } <OnOwnerTurnStarted>d__.args = <>3__args; return <OnOwnerTurnStarted>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <TakeEffect>d__3 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; public FlandreHellfireSe <>4__this; private int <i>5__1; private FlandreBrimstoneSeDef.FlandreBrimstoneSe <brimstoneSe>5__2; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <TakeEffect>d__3(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <brimstoneSe>5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Expected O, but got Unknown //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (((StatusEffect)<>4__this).Owner == null || ((StatusEffect)<>4__this).Battle.BattleShouldEnd) { return false; } ((StatusEffect)<>4__this).NotifyActivating(); <i>5__1 = 0; break; case 1: <>1__state = -1; <>2__current = (BattleAction)new DamageAction(((StatusEffect)<>4__this).Owner, (IEnumerable<Unit>)((StatusEffect)<>4__this).Battle.AllAliveEnemies, DamageInfo.HpLose((float)(((StatusEffect)<>4__this).Level * <brimstoneSe>5__2.Value), false), "Instant", (GunType)0); <>1__state = 2; return true; case 2: { <>1__state = -1; FlandreBrimstoneSeDef.FlandreBrimstoneSe flandreBrimstoneSe = <brimstoneSe>5__2; int level = ((StatusEffect)flandreBrimstoneSe).Level; ((StatusEffect)flandreBrimstoneSe).Level = level - 1; if (((StatusEffect)<brimstoneSe>5__2).Level <= 0) { <>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)<brimstoneSe>5__2, true, 0f); <>1__state = 3; return true; } goto IL_0256; } case 3: <>1__state = -1; goto IL_0256; case 4: <>1__state = -1; <>2__current = (BattleAction)(object)DamageAction.LoseLife(((StatusEffect)<>4__this).Owner, ((StatusEffect)<>4__this).Level, "Instant"); <>1__state = 5; return true; case 5: { <>1__state = -1; goto IL_0256; } IL_0256: <brimstoneSe>5__2 = null; <i>5__1++; break; } int num = <i>5__1; BattleController battle = ((StatusEffect)<>4__this).Battle; int? obj; if (battle == null) { obj = null; } else { PlayerUnit player = battle.Player; if (player == null) { obj = null; } else { FlandreHellonEarthSeDef.FlandreHellonEarthSe statusEffect = ((Unit)player).GetStatusEffect<FlandreHellonEarthSeDef.FlandreHellonEarthSe>(); obj = ((statusEffect != null) ? new int?(((StatusEffect)statusEffect).Level) : null); } } int? num2 = obj; if (num < 1 + num2.GetValueOrDefault()) { if (((StatusEffect)<>4__this).Owner == null || !((StatusEffect)<>4__this).Owner.IsAlive) { return false; } <brimstoneSe>5__2 = ((StatusEffect)<>4__this).Owner.GetStatusEffect<FlandreBrimstoneSeDef.FlandreBrimstoneSe>(); if (<brimstoneSe>5__2 != null) { ((StatusEffect)<brimstoneSe>5__2).NotifyActivating(); <>2__current = (BattleAction)(object)PerformAction.Effect(((StatusEffect)<>4__this).Owner, "HitNuclearbomb", 0f, "NuclearbombHit", 0f, (EffectBehavior)0, 0f); <>1__state = 1; return true; } <>2__current = (BattleAction)(object)PerformAction.Effect(((StatusEffect)<>4__this).Owner, "HitFire", 0f, "FlameHit", 0f, (EffectBehavior)0, 0f); <>1__state = 4; 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() { <TakeEffect>d__3 result; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; result = this; } else { result = new <TakeEffect>d__3(0) { <>4__this = <>4__this }; } return result; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } protected override void OnAdded(Unit unit) { if (((StatusEffect)this).Owner is EnemyUnit) { ((StatusEffect)this).ReactOwnerEvent<GameEventArgs>(((StatusEffect)this).Battle.AllEnemyTurnStarted, (EventSequencedReactor<GameEventArgs>)OnAllEnemyTurnStarted); } ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted); } private IEnumerable<BattleAction> OnAllEnemyTurnStarted(GameEventArgs args) { return TakeEffect(); } [IteratorStateMachine(typeof(<OnOwnerTurnStarted>d__2))] private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnOwnerTurnStarted>d__2(-2) { <>4__this = this, <>3__args = args }; } [IteratorStateMachine(typeof(<TakeEffect>d__3))] public IEnumerable<BattleAction> TakeEffect() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <TakeEffect>d__3(-2) { <>4__this = this }; } } 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("FlandreHellfireSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.FlandreHellfireSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 8, (StatusEffectType)2, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (string)null, "DebuffRed", "Default", "FirepowerNegative"); } } public sealed class FlandrePassiveSeDef : StatusEffectTemplate { [EntityLogic(typeof(FlandrePassiveSeDef))] public sealed class FlandrePassiveSe : StatusEffect { [CompilerGenerated] private sealed class <OnPlayerStatusEffectRemoving>d__5 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private StatusEffectEventArgs args; public StatusEffectEventArgs <>3__args; public FlandrePassiveSe <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnPlayerStatusEffectRemoving>d__5(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 (args.Effect == <>4__this) { ((GameEventArgs)args).CanCancel = true; ((GameEventArgs)args).CancelBy((GameEntity)(object)<>4__this); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnPlayerStatusEffectRemoving>d__5 <OnPlayerStatusEffectRemoving>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnPlayerStatusEffectRemoving>d__ = this; } else { <OnPlayerStatusEffectRemoving>d__ = new <OnPlayerStatusEffectRemoving>d__5(0) { <>4__this = <>4__this }; } <OnPlayerStatusEffectRemoving>d__.args = <>3__args; return <OnPlayerStatusEffectRemoving>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } public int Value1 => 1; public int Value2 => 25; protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<StatusEffectEventArgs>(((Unit)((StatusEffect)this).Battle.Player).StatusEffectRemoving, (EventSequencedReactor<StatusEffectEventArgs>)OnPlayerStatusEffectRemoving); } [IteratorStateMachine(typeof(<OnPlayerStatusEffectRemoving>d__5))] private IEnumerable<BattleAction> OnPlayerStatusEffectRemoving(StatusEffectEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnPlayerStatusEffectRemoving>d__5(-2) { <>4__this = this, <>3__args = args }; } } 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("FlandrePassiveSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.FlandrePassiveSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", -2, (StatusEffectType)2, false, true, (int?)null, false, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Vulnerable" }, (string)null, "Default", "Default", "Default"); } } public sealed class FlandreRuinSeDef : StatusEffectTemplate { [EntityLogic(typeof(FlandreRuinSeDef))] public sealed class FlandreRuinSe : StatusEffect { [CompilerGenerated] private sealed class <OnOwnerHpChanged>d__1 : 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 FlandreRuinSe <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnOwnerHpChanged>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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (((StatusEffect)<>4__this).Owner != null && !((StatusEffect)<>4__this).Battle.BattleShouldEnd && ((StatusEffect)<>4__this).Owner.IsAlive && ((StatusEffect)<>4__this).Owner.Hp <= ((StatusEffect)<>4__this).Level) { ((StatusEffect)<>4__this).NotifyActivating(); <>2__current = (BattleAction)new ForceKillAction((Unit)(object)((StatusEffect)<>4__this).Battle.Player, ((StatusEffect)<>4__this).Owner); <>1__state = 1; return true; } break; case 1: <>1__state = -1; if (((StatusEffect)<>4__this).Owner != null && ((StatusEffect)<>4__this).Owner.IsAlive) { <>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)<>4__this, true, 0f); <>1__state = 2; return true; } break; case 2: <>1__state = -1; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnOwnerHpChanged>d__1 <OnOwnerHpChanged>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnOwnerHpChanged>d__ = this; } else { <OnOwnerHpChanged>d__ = new <OnOwnerHpChanged>d__1(0) { <>4__this = <>4__this }; } <OnOwnerHpChanged>d__.args = <>3__args; return <OnOwnerHpChanged>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } protected override void OnAdded(Unit unit) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown if (((StatusEffect)this).Owner.Hp <= ((StatusEffect)this).Level) { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new ForceKillAction((Unit)(object)((StatusEffect)this).Battle.Player, ((StatusEffect)this).Owner))); } ((StatusEffect)this).ReactOwnerEvent<DamageEventArgs>(((StatusEffect)this).Owner.DamageReceived, (EventSequencedReactor<DamageEventArgs>)(object)new EventSequencedReactor<GameEventArgs>(OnOwnerHpChanged)); ((StatusEffect)this).ReactOwnerEvent<HealEventArgs>(((StatusEffect)this).Owner.HealingReceived, (EventSequencedReactor<HealEventArgs>)(object)new EventSequencedReactor<GameEventArgs>(OnOwnerHpChanged)); } [IteratorStateMachine(typeof(<OnOwnerHpChanged>d__1))] private IEnumerable<BattleAction> OnOwnerHpChanged(GameEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnOwnerHpChanged>d__1(-2) { <>4__this = this, <>3__args = args }; } public override bool Stack(StatusEffect other) { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown bool flag = ((StatusEffect)this).Stack(other); if (flag && ((StatusEffect)this).Owner != null && !((StatusEffect)this).Battle.BattleShouldEnd && ((StatusEffect)this).Owner.IsAlive && ((StatusEffect)this).Owner.Hp <= ((StatusEffect)this).Level) { ((StatusEffect)this).NotifyActivating(); ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new ForceKillAction((Unit)(object)((StatusEffect)this).Battle.Player, ((StatusEffect)this).Owner))); if (((StatusEffect)this).Owner != null && ((StatusEffect)this).Owner.IsAlive) { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0f))); } } return flag; } } 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("FlandreRuinSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.FlandreRuinSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 99, (StatusEffectType)2, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string> { "FlandreDestroySe" }, (string)null, "Default", "Default", "Default"); } } public sealed class OkinaPassiveSeDef : StatusEffectTemplate { [EntityLogic(typeof(OkinaPassiveSeDef))] public sealed class OkinaPassiveSe : StatusEffect { [CompilerGenerated] private sealed class <OnPlayerStatusEffectRemoving>d__5 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private StatusEffectEventArgs args; public StatusEffectEventArgs <>3__args; public OkinaPassiveSe <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnPlayerStatusEffectRemoving>d__5(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 (args.Effect == <>4__this) { ((GameEventArgs)args).CanCancel = true; ((GameEventArgs)args).CancelBy((GameEntity)(object)<>4__this); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnPlayerStatusEffectRemoving>d__5 <OnPlayerStatusEffectRemoving>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnPlayerStatusEffectRemoving>d__ = this; } else { <OnPlayerStatusEffectRemoving>d__ = new <OnPlayerStatusEffectRemoving>d__5(0) { <>4__this = <>4__this }; } <OnPlayerStatusEffectRemoving>d__.args = <>3__args; return <OnPlayerStatusEffectRemoving>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } public int Value1 => 1; public int Value2 => 25; protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<StatusEffectEventArgs>(((Unit)((StatusEffect)this).Battle.Player).StatusEffectRemoving, (EventSequencedReactor<StatusEffectEventArgs>)OnPlayerStatusEffectRemoving); } [IteratorStateMachine(typeof(<OnPlayerStatusEffectRemoving>d__5))] private IEnumerable<BattleAction> OnPlayerStatusEffectRemoving(StatusEffectEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnPlayerStatusEffectRemoving>d__5(-2) { <>4__this = this, <>3__args = args }; } } 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("OkinaPassiveSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return null; } public override StatusEffectConfig MakeConfig() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", -3, (StatusEffectType)2, false, true, (int?)null, false, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (string)null, "Default", "Default", "Default"); } } public sealed class ShinkiPassiveSeDef : StatusEffectTemplate { [EntityLogic(typeof(ShinkiPassiveSeDef))] public sealed class ShinkiPassiveSe : StatusEffect { [CompilerGenerated] private sealed class <OnPlayerStatusEffectRemoving>d__5 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private StatusEffectEventArgs args; public StatusEffectEventArgs <>3__args; public ShinkiPassiveSe <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnPlayerStatusEffectRemoving>d__5(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 (args.Effect == <>4__this) { ((GameEventArgs)args).CanCancel = true; ((GameEventArgs)args).CancelBy((GameEntity)(object)<>4__this); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnPlayerStatusEffectRemoving>d__5 <OnPlayerStatusEffectRemoving>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnPlayerStatusEffectRemoving>d__ = this; } else { <OnPlayerStatusEffectRemoving>d__ = new <OnPlayerStatusEffectRemoving>d__5(0) { <>4__this = <>4__this }; } <OnPlayerStatusEffectRemoving>d__.args = <>3__args; return <OnPlayerStatusEffectRemoving>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } public int Value1 => 1; public int Value2 => 25; protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<StatusEffectEventArgs>(((Unit)((StatusEffect)this).Battle.Player).StatusEffectRemoving, (EventSequencedReactor<StatusEffectEventArgs>)OnPlayerStatusEffectRemoving); } [IteratorStateMachine(typeof(<OnPlayerStatusEffectRemoving>d__5))] private IEnumerable<BattleAction> OnPlayerStatusEffectRemoving(StatusEffectEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnPlayerStatusEffectRemoving>d__5(-2) { <>4__this = this, <>3__args = args }; } } 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("ShinkiPassiveSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return null; } public override StatusEffectConfig MakeConfig() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", -2, (StatusEffectType)2, false, true, (int?)null, false, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (string)null, "Default", "Default", "Default"); } } } namespace AyaShameimaru.Stages { internal static class BattleManager { internal static FieldRef<BattleController, PlayerUnit> battlePlayerRef = AccessTools.FieldRefAccess<BattleController, PlayerUnit>(ConfigReflection.BackingWrap("Player")); internal static void SetPlayer(this BattleController battle, PlayerUnit player) { battlePlayerRef.Invoke(battle) = player; } } public class AyaMisc { [HarmonyPatch(typeof(StartGamePanel), "ConfirmSelectCharacter")] private class StartGamePanel_ConfirmSelectCharacter_Patch { [CompilerGenerated] private sealed class <<Postfix>g__Hide|2_2>d : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public StartGamePanel startGamePanel; private <>c__DisplayClass2_0 <>8__1; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <<Postfix>g__Hide|2_2>d(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass2_0(); <>8__1.startGamePanel = startGamePanel; <>2__current = (object)new WaitUntil((Func<bool>)(() => !((UiBase)<>8__1.startGamePanel).IsVisible || <>8__1.startGamePanel._currentPanelPhase != 3)); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)PhantasmModeSwitch != (Object)null) { Object.Destroy((Object)(object)((Component)PhantasmModeSwitch).gameObject); } 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(); } } [CompilerGenerated] private sealed class <<Postfix>g__coroutine|2_0>d : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public StartGamePanel __instance; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <<Postfix>g__coroutine|2_0>d(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_006e: 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) if (<>1__state != 0) { return false; } <>1__state = -1; PhantasmModeSwitch = Object.Instantiate<SwitchWidget>(__instance.gameModeSwitch, ((Component)__instance).transform); PhantasmModeSwitch.AddListener((UnityAction<bool>)<Postfix>g__SetPhantasmMode|2_1); ((Component)PhantasmModeSwitch).transform.position = new Vector3(2.2452f, -4.7611f, ((Component)PhantasmModeSwitch).transform.position.z); ((TMP_Text)PhantasmModeSwitch.textOff).text = AyaPhantasmModeTooltip.PhantasmModeName; ((TMP_Text)PhantasmModeSwitch.textOn).text = AyaPhantasmModeTooltip.PhantasmModeName; PhantasmModeSwitch.SetValueWithoutNotifier(BepinexPlugin.AyaPhantasmMode.Value, true); PhantasmModeTooltip = SimpleTooltipSource.CreateDirect(((Component)PhantasmModeSwitch).gameObject, AyaPhantasmModeTooltip.PhantasmModeName, AyaPhantasmModeTooltip.PhantasmModeDescription).WithPosition((TooltipDirection)3, (TooltipAlignment)2); ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(<Postfix>g__Hide|2_2(__instance)); 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(); } } [CompilerGenerated] private sealed class <>c__DisplayClass2_0 { public StartGamePanel startGamePanel; internal bool <Postfix>b__4() { return !((UiBase)startGamePanel).IsVisible || startGamePanel._currentPanelPhase != 3; } } public static SwitchWidget PhantasmModeSwitch; public static SimpleTooltipSource PhantasmModeTooltip; private static void Postfix(StartGamePanel __instance) { if ((__instance._player is AyaPlayerUnitDef.AyaPlayerUnit || __instance._player is FlandrePlayerUnitDef.FlandrePlayerUnit) && (Object)(object)PhantasmModeSwitch == (Object)null) { ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(coroutine(__instance)); } [IteratorStateMachine(typeof(<<Postfix>g__coroutine|2_0>d))] static IEnumerator coroutine(StartGamePanel __instance) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <<Postfix>g__coroutine|2_0>d(0) { __instance = __instance }; } } [IteratorStateMachine(typeof(<<Postfix>g__Hide|2_2>d))] [CompilerGenerated] internal static IEnumerator <Postfix>g__Hide|2_2(StartGamePanel startGamePanel) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <<Postfix>g__Hide|2_2>d(0) { startGamePanel = startGamePanel }; } } [HarmonyPatch(/*Could not decode attribute arguments.*/)] private class ShopPanel_CoShowAnimation_Patch { [CompilerGenerated] private sealed class <<Postfix>g__Hide|2_2>d : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private <>c__DisplayClass2_0 <>8__1; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <<Postfix>g__Hide|2_2>d(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass2_0(); <>8__1.shopPanel = UiManager.GetPanel<ShopPanel>(); <>2__current = (object)new WaitUntil((Func<bool>)(() => !((UiBase)<>8__1.shopPanel).IsVisible)); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)AttackButton != (Object)null) { Object.Destroy((Object)(object)((Component)AttackButton).gameObject); } 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(); } } [CompilerGenerated] private sealed class <<Postfix>g__coroutine|2_0>d : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private Image <attackImage>5__1; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <<Postfix>g__coroutine|2_0>d(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <attackImage>5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown //IL_015c: 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_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Expected O, but got Unknown if (<>1__state != 0) { return false; } <>1__state = -1; AttackButton = Object.Instantiate<Button>(UiManager.GetPanel<ShopPanel>().returnButton, UiManager.GetPanel<ShopPanel>().shopBoard.transform); ((Selectable)AttackButton).image.sprite = BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("RedButton.png"); ((Component)AttackButton).transform.position = new Vector3(((Component)UiManager.GetPanel<ShopPanel>().returnButton).transform.position.x + 3.25f, ((Component)UiManager.GetPanel<ShopPanel>().returnButton).transform.position.y, ((Component)AttackButton).transform.position.z); ((Component)((Component)AttackButton).transform).GetComponent<RectTransform>().sizeDelta = new Vector2(-2660f, -1500f); ((TMP_Text)((Component)AttackButton).GetComponentInChildren<TextMeshProUGUI>()).text = "Attack"; AttackImage = new GameObject(); <attackImage>5__1 = AttackImage.AddComponent<Image>(); <attackImage>5__1.sprite = BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("FlandreAttack.png"); ((Transform)AttackImage.GetComponent<RectTransform>()).SetParent(((Component)AttackButton).transform); AttackImage.transform.localScale = new Vector3(3f, 3f, 3f); AttackImage.transform.position = new Vector3(((Component)AttackButton).transform.position.x, ((Component)AttackButton).transform.position.y + 1.5f, ((Component)AttackButton).transform.position.z); AttackImage.SetActive(true); ((UnityEvent)AttackButton.onClick).AddListener(new UnityAction(<Postfix>g__OnClicked|2_1)); ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(<Postfix>g__Hide|2_2()); 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(); } } [CompilerGenerated] private sealed class <>c__DisplayClass2_0 { public ShopPanel shopPanel; internal bool <Postfix>b__11() { return !((UiBase)shopPanel).IsVisible; } } public static Button AttackButton; public static GameObject AttackImage; private static void Postfix(ShopPanel __instance) { if (Singleton<GameMaster>.Instance.CurrentGameRun.Player is FlandrePlayerUnitDef.FlandrePlayerUnit flandrePlayerUnit && !flandrePlayerUnit.TakaneDefeated && (Object)(object)AttackButton == (Object)null) { ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(coroutine()); } [IteratorStateMachine(typeof(<<Postfix>g__coroutine|2_0>d))] static IEnumerator coroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <<Postfix>g__coroutine|2_0>d(0); } } [IteratorStateMachine(typeof(<<Postfix>g__Hide|2_2>d))] [CompilerGenerated] internal static IEnumerator <Postfix>g__Hide|2_2() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <<Postfix>g__Hide|2_2>d(0); } } [HarmonyPatch(typeof(GameMaster), "SwitchToStation", new Type[] { typeof(Station) })] private class GameMaster_SwitchToStation_Patch { [CompilerGenerated] private sealed class <<Prefix>g__coroutine|0_0>d : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private FlandrePlayerUnitDef.FlandrePlayerUnit <flandrePlayerUnit>5__1; private UnitView <unitView>5__2; private int <>s__3; private int <>s__4; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <<Prefix>g__coroutine|0_0>d(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <flandrePlayerUnit>5__1 = null; <unitView>5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Expected O, but got Unknown //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Expected O, but got Unknown //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = UniTaskExtensions.ToCoroutine<UnitView>(GameDirector.LoadLoreCharacterAsync(typeof(Takane), (Action)delegate { }, 0), (Action<UnitView>)null, (Action<Exception>)null); <>1__state = 1; return true; case 1: <>1__state = -1; UiManager.GetPanel<UltimateSkillPanel>().HideInDialog(); <>2__current = (object)new WaitUntil((Func<bool>)(() => GameDirector.Enemies.Any((UnitView u) => u.Unit is Takane))); <>1__state = 2; return true; case 2: { <>1__state = -1; <flandrePlayerUnit>5__1 = Singleton<GameMaster>.Instance.CurrentGameRun.Player as FlandrePlayerUnitDef.FlandrePlayerUnit; <unitView>5__2 = GameDirector.Enemies.First((UnitView u) => u.Unit is Takane); int num = Random.Range(0, 3); <>s__3 = num; switch (<>s__3) { case 0: <unitView>5__2.Chat(<flandrePlayerUnit>5__1.FlandreTakane1Takane, 2.5f, (CloudType)3, 0f); break; case 1: <unitView>5__2.Chat(<flandrePlayerUnit>5__1.FlandreTakane2Takane, 2.5f, (CloudType)3, 0f); break; case 2: <unitView>5__2.Chat(<flandrePlayerUnit>5__1.FlandreTakane3Takane, 2.5f, (CloudType)3, 0f); break; } <>2__current = (object)new WaitForSecondsRealtime(2.5f); <>1__state = 3; return true; } case 3: <>1__state = -1; ((Unit)<flandrePlayerUnit>5__1).GetView<UnitView>().spriteRenderer.sprite = FlandrePlayerUnitUnitModelDef.flandrePlayerUnitSpriteShoot ?? ((Unit)<flandrePlayerUnit>5__1).GetView<UnitView>().spriteRenderer.sprite; ((Unit)<flandrePlayerUnit>5__1).GetView<UnitView>().Chat(<flandrePlayerUnit>5__1.FlandreTakane4Flandre, 2f, (CloudType)2, 0f); <>2__current = (object)new WaitForSecondsRealtime(1f); <>1__state = 4; return true; case 4: { <>1__state = -1; int num2 = Random.Range(0, 3); <>s__4 = num2; switch (<>s__4) { case 0: <unitView>5__2.Chat(<flandrePlayerUnit>5__1.FlandreTakane5Takane, 2.5f, (CloudType)3, 0f); break; case 1: <unitView>5__2.Chat(<flandrePlayerUnit>5__1.FlandreTakane6Takane, 2.5f, (CloudType)3, 0f); break; case 2: <unitView>5__2.Chat(<flandrePlayerUnit>5__1.FlandreTakane7Takane, 2.5f, (CloudType)3, 0f); break; } <>2__current = (object)new WaitForSecondsRealtime(1f); <>1__state = 5; return true; } case 5: <>1__state = -1; ((Unit)<flandrePlayerUnit>5__1).GetView<UnitView>().spriteRenderer.sprite = FlandrePlayerUnitUnitModelDef.flandrePlayerUnitSprite ?? ((Unit)<flandrePlayerUnit>5__1).GetView<UnitView>().spriteRenderer.sprite; <>2__current = (object)new WaitForSecondsRealtime(1.5f); <>1__state = 6; return true; case 6: { <>1__state = -1; <flandrePlayerUnit>5__1.TakaneTalked = true; UnitView obj = <unitView>5__2; obj.ClickHandler = (Action)Delegate.Combine(obj.ClickHandler, (Action)delegate { ShopPanel panel = UiManager.GetPanel<ShopPanel>(); Station currentStation = Singleton<GameMaster>.Instance.CurrentGameRun.CurrentStation; ((UiPanel<ShopStation>)(object)panel).Show((ShopStation)(object)((currentStation is ShopStation) ? currentStation : null)); }); GameDirector.ShopChat(); 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(); } } private static bool Prefix(GameMaster __instance, ref Station station) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Invalid comparison between Unknown and I4 if (Singleton<GameMaster>.Instance.CurrentGameRun.Player is FlandrePlayerUnitDef.FlandrePlayerUnit flandrePlayerUnit && flandrePlayerUnit.TakaneDefeated && !flandrePlayerUnit.TakaneTalked && (int)station.Type == 5) { ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(coroutine()); return false; } return true; [IteratorStateMachine(typeof(<<Prefix>g__coroutine|0_0>d))] static IEnumerator coroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <<Prefix>g__coroutine|0_0>d(0); } } } [HarmonyPatch(typeof(GameMap), "SetAdjacentNodesStatus")] private class GameMap_SetAdjacentNodesStatus_Patch { private static bool Prefix(GameMap __instance) { return !BepinexPlugin.StoryWait; } } [HarmonyPatch(typeof(GameRunController), "Create")] private class GameRunController_Create_Patch { private static void Prefix(GameRunController __instance, ref GameRunStartupParameters parameters) { if (parameters.Player is AyaPlayerUnitDef.AyaPlayerUnit) { foreach (CardConfig item in from c in CardConfig.AllConfig() where c.Owner == "AyaPlayerUnit" select c) { item.DebugLevel = 0; } foreach (ExhibitConfig item2 in from e in ExhibitConfig.AllConfig() where e.Owner == "AyaPlayerUnit" select e) { item2.IsDebug = false; } } else { foreach (CardConfig item3 in from c in CardConfig.AllConfig() where c.Owner == "AyaPlayerUnit" select c) { item3.DebugLevel = 2; } foreach (ExhibitConfig item4 in from e in ExhibitConfig.AllConfig() where e.Owner == "AyaPlayerUnit" select e) { item4.IsDebug = true; } } if (parameters.Player is FlandrePlayerUnitDef.FlandrePlayerUnit) { foreach (CardConfig item5 in from c in CardConfig.AllConfig() where c.Owner == "FlandrePlayerUnit" select c) { item5.DebugLevel = 0; } { foreach (ExhibitConfig item6 in from e in ExhibitConfig.AllConfig() where e.Owner == "FlandrePlayerUnit" select e) { item6.IsDebug = false; } return; } } foreach (CardConfig item7 in from c in CardConfig.AllConfig() where c.Owner == "FlandrePlayerUnit" select c) { item7.DebugLevel = 2; } foreach (ExhibitConfig item8 in from e in ExhibitConfig.AllConfig() where e.Owner == "FlandrePlayerUnit" select e) { item8.IsDebug = true; } } } [HarmonyPatch(typeof(UiManager), "EnterGameRun")] private class UiManager_EnterGameRun_Patch { private static void Postfix(UiManager __instance) { GameRunController currentGameRun = Singleton<GameMaster>.Instance.CurrentGameRun; if (((currentGameRun != null) ? currentGameRun.Player : null) is AyaPlayerUnitDef.AyaPlayerUnit) { foreach (CardConfig item in from c in CardConfig.AllConfig() where c.Owner == "AyaPlayerUnit" select c) { item.DebugLevel = 0; } foreach (ExhibitConfig item2 in from e in ExhibitConfig.AllConfig() where e.Owner == "AyaPlayerUnit" select e) { item2.IsDebug = false; } } else { foreach (CardConfig item3 in from c in CardConfig.AllConfig() where c.Owner == "AyaPlayerUnit" select c) { item3.DebugLevel = 2; } foreach (ExhibitConfig item4 in from e in ExhibitConfig.AllConfig() where e.Owner == "AyaPlayerUnit" select e) { item4.IsDebug = true; } } GameRunController currentGameRun2 = Singleton<GameMaster>.Instance.CurrentGameRun; if (((currentGameRun2 != null) ? currentGameRun2.Player : null) is FlandrePlayerUnitDef.FlandrePlayerUnit) { foreach (CardConfig item5 in from c in CardConfig.AllConfig() where c.Owner == "FlandrePlayerUnit" select c) { item5.DebugLevel = 0; } { foreach (ExhibitConfig item6 in from e in ExhibitConfig.AllConfig() where e.Owner == "FlandrePlayerUnit" select e) { item6.IsDebug = false; } return; } } foreach (CardConfig item7 in from c in CardConfig.AllConfig() where c.Owner == "FlandrePlayerUnit" select c) { item7.DebugLevel = 2; } foreach (ExhibitConfig item8 in from e in ExhibitConfig.AllConfig() where e.Owner == "FlandrePlayerUnit" select e) { item8.IsDebug = true; } } } [HarmonyPatch(typeof(UiManager), "LeaveGameRun")] private class UiManager_LeaveGameRun_Patch { private static void Postfix(UiManager __instance) { foreach (CardConfig item in from c in CardConfig.AllConfig() where c.Owner == "AyaPlayerUnit" || c.Owner == "FlandrePlayerUnit" select c) { item.DebugLevel = 0; } foreach (ExhibitConfig item2 in from e in ExhibitConfig.AllConfig() where e.Owner == "AyaPlayerUnit" || e.Owner == "FlandrePlayerUnit" select e) { item2.IsDebug = false; } } } [HarmonyPatch(typeof(TargetSelector), "DisableSelector")] private class