Decompiled source of StS Stuff Mod v1.3.0
StSStuffMod.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AddWatermark; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Logging; using Cysharp.Threading.Tasks; using HarmonyLib; using JetBrains.Annotations; using 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.GapOptions; using LBoL.Core.Intentions; using LBoL.Core.Randoms; using LBoL.Core.Stations; using LBoL.Core.StatusEffects; using LBoL.Core.Units; using LBoL.EntityLib.Cards.Character.Sakuya; using LBoL.EntityLib.Cards.Enemy; using LBoL.EntityLib.Cards.Neutral.NoColor; using LBoL.EntityLib.Exhibits; using LBoL.EntityLib.Exhibits.Adventure; using LBoL.EntityLib.Exhibits.Shining; using LBoL.EntityLib.Stages.NormalStages; using LBoL.EntityLib.StatusEffects.Basic; using LBoL.EntityLib.StatusEffects.Enemy; using LBoL.EntityLib.StatusEffects.Koishi; using LBoL.EntityLib.StatusEffects.Others; using LBoL.Presentation; using LBoL.Presentation.UI; using LBoL.Presentation.UI.Panels; using LBoL.Presentation.UI.Widgets; using LBoL.Presentation.Units; using LBoLEntitySideloader; using LBoLEntitySideloader.Attributes; using LBoLEntitySideloader.Entities; using LBoLEntitySideloader.ReflectionHelpers; using LBoLEntitySideloader.Resource; using StSStuffMod.Cards; using UnityEngine; using UnityEngine.Events; 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("StSStuffMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("StSStuffMod")] [assembly: AssemblyTitle("StSStuffMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace StSStuffMod { [BepInPlugin("intoxicatedkid.stsstuffmod", "StS Stuff Mod", "1.3.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInProcess("LBoL.exe")] public class BepinexPlugin : BaseUnityPlugin { public static class Helpers { public static void FakeQueueConsumingMana(ManaGroup manaGroup) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown BattleManaPanel panel = UiManager.GetPanel<BattleManaPanel>(); List<ConsumingManaWidgets> consumingDeque = panel._consumingDeque; ManaGroup val = default(ManaGroup); ((ManaGroup)(ref val)).Any = 0; consumingDeque.Insert(0, new ConsumingManaWidgets(new ConsumingMana(manaGroup, val), new List<BattleManaWidget>(), new List<BattleManaWidget>())); } } 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("intoxicatedkid.stsstuffmod", ""); 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 statusEffectLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(StatusEffectTemplate), false); internal static BatchLocalization unitModelLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(UnitModelTemplate), false); private void Awake() { log = ((BaseUnityPlugin)this).Logger; Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; EntityManager.RegisterSelf(); harmony.PatchAll(); if (Chainloader.PluginInfos.ContainsKey("neo.lbol.tools.watermark")) { WatermarkWrapper.ActivateWatermark(); } cardLoc.DiscoverAndLoadLocFiles("Card"); enemyUnitLoc.DiscoverAndLoadLocFiles("EnemyUnit"); exhibitLoc.DiscoverAndLoadLocFiles("Exhibit"); statusEffectLoc.DiscoverAndLoadLocFiles("StatusEffect"); unitModelLoc.DiscoverAndLoadLocFiles("UnitModel"); } private void OnDestroy() { if (harmony != null) { harmony.UnpatchSelf(); } } } public static class PInfo { public const string GUID = "intoxicatedkid.stsstuffmod"; public const string Name = "StS Stuff Mod"; public const string version = "1.3.0"; public static readonly Harmony harmony = new Harmony("intoxicatedkid.stsstuffmod"); } internal class WatermarkWrapper { [MethodImpl(MethodImplOptions.NoInlining)] internal static void ActivateWatermark() { API.ActivateWatermark(); } } } namespace StSStuffMod.Exhibits { public sealed class StSBustedCrownDef : ExhibitTemplate { [EntityLogic(typeof(StSBustedCrownDef))] [UsedImplicitly] [ExhibitInfo(WeighterType = typeof(StSBustedCrownWeighter))] public sealed class StSBustedCrown : ShiningExhibit { private class StSBustedCrownWeighter : IExhibitWeighter { public float WeightFor(Type type, GameRunController gameRun) { if (gameRun.CurrentStage.Level > 2 || gameRun.Player.HasExhibit<StSBustedCrown>() || gameRun.Player.HasExhibit<StSCursedKeyDef.StSCursedKey>() || gameRun.Player.HasExhibit<StSEctoplasmDef.StSEctoplasm>() || gameRun.Player.HasExhibit<StSPhilosophersStoneDef.StSPhilosophersStone>() || gameRun.Player.HasExhibit<StSRunicDomeDef.StSRunicDome>() || gameRun.Player.HasExhibit<StSVelvetChokerDef.StSVelvetChoker>()) { return 0f; } return 1f; } } protected override void OnAdded(PlayerUnit player) { GameRunController gameRun = ((GameEntity)this).GameRun; gameRun.AdditionalRewardCardCount -= ((Exhibit)this).Value1; } protected override void OnRemoved(PlayerUnit player) { GameRunController gameRun = ((GameEntity)this).GameRun; gameRun.AdditionalRewardCardCount += ((Exhibit)this).Value1; } } 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("StSBustedCrown"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 10, false, false, false, false, (AppearanceType)0, "", (ExhibitLosableType)2, (Rarity)3, (int?)1, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)(ManaColor)1, 2, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } public sealed class StSCauldronDef : ExhibitTemplate { [EntityLogic(typeof(StSCauldronDef))] [UsedImplicitly] public sealed class StSCauldron : Exhibit { [CompilerGenerated] private sealed class <SpecialGain>d__0 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PlayerUnit player; public StSCauldron <>4__this; private Card[] <cards>5__1; private SelectCardInteraction <interaction>5__2; private IReadOnlyList<Card> <selectedCards>5__3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <SpecialGain>d__0(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <cards>5__1 = null; <interaction>5__2 = null; <selectedCards>5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; ((Exhibit)<>4__this).OnGain(player); <cards>5__1 = ((GameEntity)<>4__this).GameRun.RollCards(((GameEntity)<>4__this).GameRun.GameRunEventRng, new CardWeightTable(RarityWeightTable.ShopCard, OwnerWeightTable.Valid, CardTypeWeightTable.OnlyTool, false), ((Exhibit)<>4__this).Value1, false, false, (Predicate<CardConfig>)null); <interaction>5__2 = new SelectCardInteraction(0, ((Exhibit)<>4__this).Value1, (IEnumerable<Card>)<cards>5__1, (SelectedCardHandling)0) { Source = (GameEntity)(object)<>4__this, CanCancel = false }; <>2__current = ((GameEntity)<>4__this).GameRun.InteractionViewer.View((Interaction)(object)<interaction>5__2); <>1__state = 1; return true; case 1: <>1__state = -1; <selectedCards>5__3 = <interaction>5__2.SelectedCards; if (<selectedCards>5__3.Count == 0) { return false; } ((GameEntity)<>4__this).GameRun.AddDeckCards((IEnumerable<Card>)<selectedCards>5__3, true, (VisualSourceData)null); 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(); } } [IteratorStateMachine(typeof(<SpecialGain>d__0))] protected override IEnumerator SpecialGain(PlayerUnit player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <SpecialGain>d__0(0) { <>4__this = this, player = player }; } } 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("StSCauldron"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 10, false, true, false, false, (AppearanceType)1, "", (ExhibitLosableType)0, (Rarity)0, (int?)5, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)null, 0, false, (int?)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } public sealed class StSCeramicFishDef : ExhibitTemplate { [EntityLogic(typeof(StSCeramicFishDef))] [UsedImplicitly] [ExhibitInfo(ExpireStageLevel = 3, ExpireStationLevel = 4)] public sealed class StSCeramicFish : Exhibit { protected override void OnAdded(PlayerUnit player) { ((Exhibit)this).HandleGameRunEvent<CardsEventArgs>(((GameEntity)this).GameRun.DeckCardsAdded, (GameEventHandler<CardsEventArgs>)delegate(CardsEventArgs args) { //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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown int num = args.Cards.Length; if (num > 0) { ((Exhibit)this).NotifyActivating(); ((GameEntity)this).GameRun.GainMoney(num * ((Exhibit)this).Value1, true, new VisualSourceData { SourceType = (VisualSourceType)7, Source = (GameEntity)(object)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("StSCeramicFish"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 10, false, true, false, false, (AppearanceType)0, "", (ExhibitLosableType)0, (Rarity)0, (int?)10, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)null, 0, false, (int?)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } public sealed class StSCoffeeDripperDef : ExhibitTemplate { [EntityLogic(typeof(StSCoffeeDripperDef))] [UsedImplicitly] public sealed class StSCoffeeDripper : Exhibit { [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 StSCoffeeDripper <>4__this; private ManaGroup <manaGroup>5__1; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnOwnerTurnStarted>d__2(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0042: 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_0053: 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_0062: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; ((Exhibit)<>4__this).NotifyActivating(); <manaGroup>5__1 = ManaGroup.Single(CollectionsExtensions.Sample<ManaColor>((IEnumerable<ManaColor>)ManaColors.Colors, ((GameEntity)<>4__this).GameRun.BattleRng)); <>2__current = (BattleAction)new GainManaAction(<manaGroup>5__1); <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnOwnerTurnStarted>d__2 <OnOwnerTurnStarted>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnOwnerTurnStarted>d__ = this; } else { <OnOwnerTurnStarted>d__ = new <OnOwnerTurnStarted>d__2(0) { <>4__this = <>4__this }; } <OnOwnerTurnStarted>d__.args = <>3__args; return <OnOwnerTurnStarted>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } protected override void OnAdded(PlayerUnit player) { ((Exhibit)this).HandleGameRunEvent<StationEventArgs>(((GameEntity)this).GameRun.GapOptionsGenerating, (GameEventHandler<StationEventArgs>)delegate(StationEventArgs args) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) ((Exhibit)this).NotifyActivating(); ((GapStation)args.Station).GapOptions.RemoveAll((GapOption o) => (int)o.Type == 0); args.Station.Finish(); }); ((Exhibit)this).HandleGameRunEvent<StationEventArgs>(((GameEntity)this).GameRun.StationEntered, (GameEventHandler<StationEventArgs>)delegate(StationEventArgs args) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Invalid comparison between Unknown and I4 //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown if ((int)args.Station.Type == 4 && CollectionsExtensions.Empty<GapOption>((IReadOnlyCollection<GapOption>)((GapStation)args.Station).GapOptions) && player.HasExhibit<WaijieYanshuang>() && !player.HasExhibit<JingjieGanzhiyi>()) { ((Station)(GapStation)args.Station).PreDialogs.Add(new StationDialogSource("YukariProvide", (object)new YanshuangCommandHandler(((GameEntity)this).GameRun))); } }); } protected override void OnEnterBattle() { ((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Owner).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted); } [IteratorStateMachine(typeof(<OnOwnerTurnStarted>d__2))] private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnOwnerTurnStarted>d__2(-2) { <>4__this = this, <>3__args = args }; } } public 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("StSCoffeeDripper"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 10, false, true, false, false, (AppearanceType)1, "", (ExhibitLosableType)2, (Rarity)0, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)null, 0, false, (int?)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } public sealed class StSCultistHeadpieceDef : ExhibitTemplate { [EntityLogic(typeof(StSCultistHeadpieceDef))] [UsedImplicitly] public sealed class StSCultistHeadpiece : Exhibit { [CompilerGenerated] private sealed class <OnBattleStarted>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 StSCultistHeadpiece <>4__this; private IEnumerator<EnemyUnit> <>s__1; private EnemyUnit <enemyUnit>5__2; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnBattleStarted>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 == 6) { try { } finally { <>m__Finally1(); } } <>s__1 = null; <enemyUnit>5__2 = null; <>1__state = -2; } private bool MoveNext() { try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; ((Exhibit)<>4__this).NotifyActivating(); <>2__current = (BattleAction)(object)PerformAction.Chat((Unit)(object)((Exhibit)<>4__this).Battle.Player, "CAW!\nCAAAW", 2f, 0f, 0f, true); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = (BattleAction)(object)PerformAction.Sfx("Raven", 0f); <>1__state = 2; return true; case 2: <>1__state = -1; <>2__current = (BattleAction)(object)PerformAction.Sfx("Raven", 0f); <>1__state = 3; return true; case 3: <>1__state = -1; <>2__current = (BattleAction)(object)PerformAction.Sfx("Raven", 0.75f); <>1__state = 4; return true; case 4: <>1__state = -1; <>2__current = (BattleAction)(object)PerformAction.Sfx("Raven", 0f); <>1__state = 5; return true; case 5: <>1__state = -1; <>s__1 = ((Exhibit)<>4__this).Battle.EnemyGroup.GetEnumerator(); <>1__state = -3; goto IL_01f9; case 6: { <>1__state = -3; goto IL_01f1; } IL_01f9: if (<>s__1.MoveNext()) { <enemyUnit>5__2 = <>s__1.Current; if (((Unit)<enemyUnit>5__2).IsAlive) { <>2__current = (BattleAction)(object)new ApplyStatusEffectAction<TempFirepowerNegative>((Unit)(object)<enemyUnit>5__2, (int?)((Exhibit)<>4__this).Value1, (int?)null, (int?)null, (int?)null, 0f, true); <>1__state = 6; return true; } goto IL_01f1; } <>m__Finally1(); <>s__1 = null; return false; IL_01f1: <enemyUnit>5__2 = null; goto IL_01f9; } } 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() { <OnBattleStarted>d__1 <OnBattleStarted>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnBattleStarted>d__ = this; } else { <OnBattleStarted>d__ = new <OnBattleStarted>d__1(0) { <>4__this = <>4__this }; } <OnBattleStarted>d__.args = <>3__args; return <OnBattleStarted>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } protected override void OnEnterBattle() { ((Exhibit)this).ReactBattleEvent<GameEventArgs>(((Exhibit)this).Battle.BattleStarted, (EventSequencedReactor<GameEventArgs>)OnBattleStarted); } [IteratorStateMachine(typeof(<OnBattleStarted>d__1))] private IEnumerable<BattleAction> OnBattleStarted(GameEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnBattleStarted>d__1(-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("StSCultistHeadpiece"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 10, false, true, false, false, (AppearanceType)2, "", (ExhibitLosableType)0, (Rarity)0, (int?)3, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)null, 0, false, (int?)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "TempFirepowerNegative" }, (IReadOnlyList<string>)new List<string>()); } } public sealed class StSCursedKeyDef : ExhibitTemplate { [EntityLogic(typeof(StSCursedKeyDef))] [UsedImplicitly] [ExhibitInfo(WeighterType = typeof(StSCursedKeyWeighter))] public sealed class StSCursedKey : ShiningExhibit { private class StSCursedKeyWeighter : IExhibitWeighter { public float WeightFor(Type type, GameRunController gameRun) { if (gameRun.CurrentStage.Level > 2 || gameRun.Player.HasExhibit<StSBustedCrownDef.StSBustedCrown>() || gameRun.Player.HasExhibit<StSCursedKey>() || gameRun.Player.HasExhibit<StSEctoplasmDef.StSEctoplasm>() || gameRun.Player.HasExhibit<StSPhilosophersStoneDef.StSPhilosophersStone>() || gameRun.Player.HasExhibit<StSRunicDomeDef.StSRunicDome>() || gameRun.Player.HasExhibit<StSVelvetChokerDef.StSVelvetChoker>()) { return 0f; } return 1f; } } protected override void OnAdded(PlayerUnit player) { ((Exhibit)this).HandleGameRunEvent<StationEventArgs>(((GameEntity)this).GameRun.StationEntered, (GameEventHandler<StationEventArgs>)delegate(StationEventArgs args) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Invalid comparison between Unknown and I4 if ((int)args.Station.Type == 3) { ((Exhibit)this).NotifyActivating(); Card randomCurseCard = ((GameEntity)this).GameRun.GetRandomCurseCard(((GameEntity)this).GameRun.GameRunEventRng, false); ((GameEntity)this).GameRun.AddDeckCard(randomCurseCard, false, (VisualSourceData)null); } }); } } 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("StSCursedKey"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 10, false, false, false, false, (AppearanceType)0, "", (ExhibitLosableType)2, (Rarity)3, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)(ManaColor)3, 2, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } public sealed class StSDamaruDef : ExhibitTemplate { [EntityLogic(typeof(StSDamaruDef))] [UsedImplicitly] [ExhibitInfo(WeighterType = typeof(StSDamaruWeighter))] public sealed class StSDamaru : Exhibit { private class StSDamaruWeighter : IExhibitWeighter { public float WeightFor(Type type, GameRunController gameRun) { if (gameRun.Player.HasExhibit<MarisaR>()) { return 1f; } if (gameRun.BaseDeck.Any((Card card) => card.IsUpgraded ? card.Config.UpgradedRelativeEffects.Contains("Charging") : card.Config.RelativeEffects.Contains("Charging"))) { return 1f; } return 0f; } } [CompilerGenerated] private sealed class <OnPlayerTurnStarting>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 StSDamaru <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnPlayerTurnStarting>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; ((Exhibit)<>4__this).NotifyActivating(); <>2__current = (BattleAction)(object)new ApplyStatusEffectAction<Charging>((Unit)(object)((Exhibit)<>4__this).Owner, (int?)((Exhibit)<>4__this).Value1, (int?)null, (int?)null, (int?)null, 0f, true); <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnPlayerTurnStarting>d__1 <OnPlayerTurnStarting>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnPlayerTurnStarting>d__ = this; } else { <OnPlayerTurnStarting>d__ = new <OnPlayerTurnStarting>d__1(0) { <>4__this = <>4__this }; } <OnPlayerTurnStarting>d__.args = <>3__args; return <OnPlayerTurnStarting>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } protected override void OnEnterBattle() { ((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Battle.Player).TurnStarting, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarting); } [IteratorStateMachine(typeof(<OnPlayerTurnStarting>d__1))] private IEnumerable<BattleAction> OnPlayerTurnStarting(UnitEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnPlayerTurnStarting>d__1(-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("StSDamaru"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 10, false, true, false, false, (AppearanceType)0, "", (ExhibitLosableType)0, (Rarity)0, (int?)1, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)null, 0, false, (int?)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Charging" }, (IReadOnlyList<string>)new List<string>()); } } public sealed class StSEctoplasmDef : ExhibitTemplate { [EntityLogic(typeof(StSEctoplasmDef))] [UsedImplicitly] [ExhibitInfo(WeighterType = typeof(StSEctoplasmWeighter))] public sealed class StSEctoplasm : ShiningExhibit { [HarmonyPatch(typeof(GameRunController), "InternalGainMoney")] private class GameRunController_InternalGainMoney_Patch { private static bool Prefix() { if (Singleton<GameMaster>.Instance.CurrentGameRun != null && Singleton<GameMaster>.Instance.CurrentGameRun.Player.HasExhibit<StSEctoplasm>()) { return false; } return true; } } [HarmonyPatch(typeof(GapStation), "OnEnter")] private class GapStation_OnEnter_Patch { private static void Postfix(GapStation __instance) { if (Singleton<GameMaster>.Instance.CurrentGameRun != null && Singleton<GameMaster>.Instance.CurrentGameRun.Player.HasExhibit<StSEctoplasm>()) { GapOption? obj = ((IEnumerable<GapOption>)__instance.GapOptions).FirstOrDefault((Func<GapOption, bool>)((GapOption gapOption) => (int)gapOption.Type == 1)); UpgradeCard val = (UpgradeCard)(object)((obj is UpgradeCard) ? obj : null); if (val != null) { val.Price = 0; } } } } private class StSEctoplasmWeighter : IExhibitWeighter { public float WeightFor(Type type, GameRunController gameRun) { if (gameRun.CurrentStage.Level > 2 || gameRun.Player.HasExhibit<StSBustedCrownDef.StSBustedCrown>() || gameRun.Player.HasExhibit<StSCursedKeyDef.StSCursedKey>() || gameRun.Player.HasExhibit<StSEctoplasm>() || gameRun.Player.HasExhibit<StSPhilosophersStoneDef.StSPhilosophersStone>() || gameRun.Player.HasExhibit<StSRunicDomeDef.StSRunicDome>() || gameRun.Player.HasExhibit<StSVelvetChokerDef.StSVelvetChoker>()) { return 0f; } return 1f; } } protected override void OnAdded(PlayerUnit player) { ((Exhibit)this).HandleGameRunEvent<GameEventArgs>(((GameEntity)this).GameRun.MoneyGained, (GameEventHandler<GameEventArgs>)delegate { ((Exhibit)this).NotifyActivating(); }); } } 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("StSEctoplasm"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 10, false, false, false, false, (AppearanceType)0, "", (ExhibitLosableType)2, (Rarity)3, (int?)0, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)(ManaColor)5, 2, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } public sealed class StSEmotionChipDef : ExhibitTemplate { [EntityLogic(typeof(StSEmotionChipDef))] [UsedImplicitly] [ExhibitInfo(WeighterType = typeof(StSEmotionChipWeighter))] public sealed class StSEmotionChip : Exhibit { private class StSEmotionChipWeighter : IExhibitWeighter { public float WeightFor(Type type, GameRunController gameRun) { if (gameRun.BaseDeck.Any((Card card) => (int)card.CardType == 5)) { return 1f; } return 0f; } } [CompilerGenerated] private sealed class <OnPlayerDamageReceived>d__1 : 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 StSEmotionChip <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnPlayerDamageReceived>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_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) if (<>1__state != 0) { return false; } <>1__state = -1; DamageInfo damageInfo = args.DamageInfo; if (((DamageInfo)(ref damageInfo)).Damage > 0f) { ((Exhibit)<>4__this).Active = 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() { <OnPlayerDamageReceived>d__1 <OnPlayerDamageReceived>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnPlayerDamageReceived>d__ = this; } else { <OnPlayerDamageReceived>d__ = new <OnPlayerDamageReceived>d__1(0) { <>4__this = <>4__this }; } <OnPlayerDamageReceived>d__.args = <>3__args; return <OnPlayerDamageReceived>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <OnPlayerTurnStarted>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 StSEmotionChip <>4__this; private List<Card> <list>5__1; private List<Card>.Enumerator <>s__2; private Card <card>5__3; private IEnumerable<BattleAction> <passiveActions>5__4; private IEnumerator<BattleAction> <>s__5; private BattleAction <battleAction>5__6; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnPlayerTurnStarted>d__2(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if ((uint)(num - -4) <= 1u || num == 1) { try { if (num == -4 || num == 1) { try { } finally { <>m__Finally2(); } } } finally { <>m__Finally1(); } } <list>5__1 = null; <>s__2 = default(List<Card>.Enumerator); <card>5__3 = null; <passiveActions>5__4 = null; <>s__5 = null; <battleAction>5__6 = null; <>1__state = -2; } private bool MoveNext() { try { int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -4; <battleAction>5__6 = null; goto IL_0143; } <>1__state = -1; if (((Exhibit)<>4__this).Active && !((Exhibit)<>4__this).Battle.BattleShouldEnd) { ((Exhibit)<>4__this).NotifyActivating(); <list>5__1 = ((Exhibit)<>4__this).Battle.HandZone.Where((Card card) => (int)card.CardType == 5 && card.Summoned).ToList(); <>s__2 = <list>5__1.GetEnumerator(); <>1__state = -3; goto IL_016e; } goto IL_0199; IL_016e: if (<>s__2.MoveNext()) { <card>5__3 = <>s__2.Current; <passiveActions>5__4 = <card>5__3.GetPassiveActions(); if (<passiveActions>5__4 != null) { <>s__5 = <passiveActions>5__4.GetEnumerator(); <>1__state = -4; goto IL_0143; } goto IL_015f; } <>m__Finally1(); <>s__2 = default(List<Card>.Enumerator); <list>5__1 = null; goto IL_0199; IL_0199: ((Exhibit)<>4__this).Active = false; return false; IL_015f: <passiveActions>5__4 = null; <card>5__3 = null; goto IL_016e; IL_0143: if (<>s__5.MoveNext()) { <battleAction>5__6 = <>s__5.Current; <>2__current = <battleAction>5__6; <>1__state = 1; return true; } <>m__Finally2(); <>s__5 = null; goto IL_015f; } 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__2).Dispose(); } private void <>m__Finally2() { <>1__state = -3; if (<>s__5 != null) { <>s__5.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnPlayerTurnStarted>d__2 <OnPlayerTurnStarted>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnPlayerTurnStarted>d__ = this; } else { <OnPlayerTurnStarted>d__ = new <OnPlayerTurnStarted>d__2(0) { <>4__this = <>4__this }; } <OnPlayerTurnStarted>d__.args = <>3__args; return <OnPlayerTurnStarted>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } protected override void OnEnterBattle() { ((Exhibit)this).ReactBattleEvent<DamageEventArgs>(((Unit)((Exhibit)this).Battle.Player).DamageReceived, (EventSequencedReactor<DamageEventArgs>)OnPlayerDamageReceived); ((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted); } [IteratorStateMachine(typeof(<OnPlayerDamageReceived>d__1))] private IEnumerable<BattleAction> OnPlayerDamageReceived(DamageEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnPlayerDamageReceived>d__1(-2) { <>4__this = this, <>3__args = args }; } [IteratorStateMachine(typeof(<OnPlayerTurnStarted>d__2))] private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnPlayerTurnStarted>d__2(-2) { <>4__this = this, <>3__args = args }; } protected override void OnLeaveBattle() { ((Exhibit)this).Active = false; } } 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("StSEmotionChip"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 10, false, true, false, false, (AppearanceType)0, "", (ExhibitLosableType)0, (Rarity)2, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)null, 0, false, (int?)0, (Keyword)281474976710656L, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } public sealed class StSEnchiridionDef : ExhibitTemplate { [EntityLogic(typeof(StSEnchiridionDef))] [UsedImplicitly] public sealed class StSEnchiridion : Exhibit { [CompilerGenerated] private sealed class <OnBattleStarted>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 StSEnchiridion <>4__this; private Card <card>5__1; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnBattleStarted>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <card>5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Expected O, but got Unknown //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; ((Exhibit)<>4__this).NotifyActivating(); <card>5__1 = ((Exhibit)<>4__this).Battle.RollCard(new CardWeightTable(RarityWeightTable.BattleCard, OwnerWeightTable.Valid, CardTypeWeightTable.OnlyAbility, false), (Predicate<CardConfig>)null); <card>5__1.SetTurnCost(((Exhibit)<>4__this).Mana); if (((Exhibit)<>4__this).Battle.HandZone.Count >= ((Exhibit)<>4__this).Battle.MaxHand) { <>2__current = (BattleAction)new AddCardsToDiscardAction((Card[])(object)new Card[1] { <card>5__1 }); <>1__state = 1; return true; } <>2__current = (BattleAction)new AddCardsToHandAction((Card[])(object)new Card[1] { <card>5__1 }); <>1__state = 2; return true; case 1: <>1__state = -1; break; case 2: <>1__state = -1; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnBattleStarted>d__1 <OnBattleStarted>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnBattleStarted>d__ = this; } else { <OnBattleStarted>d__ = new <OnBattleStarted>d__1(0) { <>4__this = <>4__this }; } <OnBattleStarted>d__.args = <>3__args; return <OnBattleStarted>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } protected override void OnEnterBattle() { ((Exhibit)this).ReactBattleEvent<GameEventArgs>(((Exhibit)this).Battle.BattleStarted, (EventSequencedReactor<GameEventArgs>)OnBattleStarted); } [IteratorStateMachine(typeof(<OnBattleStarted>d__1))] private IEnumerable<BattleAction> OnBattleStarted(GameEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnBattleStarted>d__1(-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("StSEnchiridion"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown int num = BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)); int? num2 = 1; ManaGroup value = default(ManaGroup); ((ManaGroup)(ref value)).Any = 0; return new ExhibitConfig(num, "", 10, false, true, false, false, (AppearanceType)2, "", (ExhibitLosableType)0, (Rarity)1, num2, (int?)null, (int?)null, (ManaGroup?)value, (ManaColor?)null, (ManaColor?)null, 0, false, (int?)0, (Keyword)4, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } public sealed class StSFusionHammerDef : ExhibitTemplate { [EntityLogic(typeof(StSFusionHammerDef))] [UsedImplicitly] public sealed class StSFusionHammer : Exhibit { [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 StSFusionHammer <>4__this; private ManaGroup <manaGroup>5__1; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnOwnerTurnStarted>d__2(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0042: 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_0053: 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_0062: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; ((Exhibit)<>4__this).NotifyActivating(); <manaGroup>5__1 = ManaGroup.Single(CollectionsExtensions.Sample<ManaColor>((IEnumerable<ManaColor>)ManaColors.Colors, ((GameEntity)<>4__this).GameRun.BattleRng)); <>2__current = (BattleAction)new GainManaAction(<manaGroup>5__1); <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnOwnerTurnStarted>d__2 <OnOwnerTurnStarted>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnOwnerTurnStarted>d__ = this; } else { <OnOwnerTurnStarted>d__ = new <OnOwnerTurnStarted>d__2(0) { <>4__this = <>4__this }; } <OnOwnerTurnStarted>d__.args = <>3__args; return <OnOwnerTurnStarted>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } protected override void OnAdded(PlayerUnit player) { ((Exhibit)this).HandleGameRunEvent<StationEventArgs>(((GameEntity)this).GameRun.GapOptionsGenerating, (GameEventHandler<StationEventArgs>)delegate(StationEventArgs args) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) ((Exhibit)this).NotifyActivating(); ((GapStation)args.Station).GapOptions.RemoveAll((GapOption o) => (int)o.Type == 1); args.Station.Finish(); }); } protected override void OnEnterBattle() { ((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Owner).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted); } [IteratorStateMachine(typeof(<OnOwnerTurnStarted>d__2))] private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnOwnerTurnStarted>d__2(-2) { <>4__this = this, <>3__args = args }; } } public 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("StSFusionHammer"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 10, false, true, false, false, (AppearanceType)1, "", (ExhibitLosableType)2, (Rarity)0, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)null, 0, false, (int?)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } public sealed class StSIncenseBurnerDef : ExhibitTemplate { [EntityLogic(typeof(StSIncenseBurnerDef))] [UsedImplicitly] public sealed class StSIncenseBurner : Exhibit { [CompilerGenerated] private sealed class <OnPlayerTurnStarted>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private UnitEventArgs args; public UnitEventArgs <>3__args; public StSIncenseBurner <>4__this; private (int, int) <valueTuple>5__1; private int <item>5__2; private int <item2>5__3; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnPlayerTurnStarted>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: { <>1__state = -1; int counter = ((Exhibit)<>4__this).Counter; ((Exhibit)<>4__this).Counter = counter + 1; <valueTuple>5__1 = MathExtensions.DivRem(((Exhibit)<>4__this).Counter, ((Exhibit)<>4__this).Value1); <item>5__2 = <valueTuple>5__1.Item1; <item2>5__3 = <valueTuple>5__1.Item2; ((Exhibit)<>4__this).Counter = <item2>5__3; if (<item>5__2 != 0) { ((Exhibit)<>4__this).NotifyActivating(); <>2__current = (BattleAction)(object)new ApplyStatusEffectAction<Invincible>((Unit)(object)((Exhibit)<>4__this).Owner, (int?)null, (int?)((Exhibit)<>4__this).Value2, (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() { <OnPlayerTurnStarted>d__1 <OnPlayerTurnStarted>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnPlayerTurnStarted>d__ = this; } else { <OnPlayerTurnStarted>d__ = new <OnPlayerTurnStarted>d__1(0) { <>4__this = <>4__this }; } <OnPlayerTurnStarted>d__.args = <>3__args; return <OnPlayerTurnStarted>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } protected override void OnEnterBattle() { ((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted); } [IteratorStateMachine(typeof(<OnPlayerTurnStarted>d__1))] private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnPlayerTurnStarted>d__1(-2) { <>4__this = this, <>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("StSIncenseBurner"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 10, false, true, false, false, (AppearanceType)0, "", (ExhibitLosableType)0, (Rarity)2, (int?)5, (int?)1, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)null, 0, true, (int?)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Invincible" }, (IReadOnlyList<string>)new List<string>()); } } public sealed class StSNecronomiconDef : ExhibitTemplate { [EntityLogic(typeof(StSNecronomiconDef))] [UsedImplicitly] public sealed class StSNecronomicon : Exhibit { [CompilerGenerated] private sealed class <OnCardUsing>d__2 : 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 StSNecronomicon <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnCardUsing>d__2(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Invalid comparison between Unknown and I4 //IL_004b: 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) if (<>1__state != 0) { return false; } <>1__state = -1; if (((Exhibit)<>4__this).Active && (int)args.Card.CardType == 1 && !args.PlayTwice) { ManaGroup consumingMana = args.ConsumingMana; if (((ManaGroup)(ref consumingMana)).Amount >= ((Exhibit)<>4__this).Value1) { ((Exhibit)<>4__this).Active = false; ((Exhibit)<>4__this).NotifyActivating(); args.PlayTwice = true; ((GameEventArgs)args).AddModifier((GameEntity)(object)<>4__this); } } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnCardUsing>d__2 <OnCardUsing>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnCardUsing>d__ = this; } else { <OnCardUsing>d__ = new <OnCardUsing>d__2(0) { <>4__this = <>4__this }; } <OnCardUsing>d__.args = <>3__args; return <OnCardUsing>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } protected override void OnGain(PlayerUnit player) { List<Card> list = new List<Card> { (Card)(object)Library.CreateCard<StSNecronomicurse>() }; ((GameEntity)this).GameRun.AddDeckCards((IEnumerable<Card>)list, false, (VisualSourceData)null); } protected override void OnEnterBattle() { ((Exhibit)this).HandleBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Battle.Player).TurnStarting, (GameEventHandler<UnitEventArgs>)delegate { ((Exhibit)this).Active = true; }); ((Exhibit)this).ReactBattleEvent<CardUsingEventArgs>(((Exhibit)this).Battle.CardUsing, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsing); } [IteratorStateMachine(typeof(<OnCardUsing>d__2))] private IEnumerable<BattleAction> OnCardUsing(CardUsingEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnCardUsing>d__2(-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("StSNecronomicon"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown int num = BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)); int? num2 = 3; ManaGroup value = default(ManaGroup); ((ManaGroup)(ref value)).Any = 0; return new ExhibitConfig(num, "", 10, false, true, false, false, (AppearanceType)2, "", (ExhibitLosableType)2, (Rarity)2, num2, (int?)null, (int?)null, (ManaGroup?)value, (ManaColor?)null, (ManaColor?)null, 0, false, (int?)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "StSNecronomicurse" }); } } public sealed class StSNeowsLamentDef : ExhibitTemplate { [EntityLogic(typeof(StSNeowsLamentDef))] [UsedImplicitly] [ExhibitInfo(ExpireStageLevel = 2, ExpireStationLevel = 0)] public sealed class StSNeowsLament : Exhibit { [CompilerGenerated] private sealed class <OnBattleEnded>d__2 : 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 StSNeowsLament <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnBattleEnded>d__2(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnBattleEnded>d__2 <OnBattleEnded>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnBattleEnded>d__ = this; } else { <OnBattleEnded>d__ = new <OnBattleEnded>d__2(0) { <>4__this = <>4__this }; } <OnBattleEnded>d__.args = <>3__args; return <OnBattleEnded>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <OnBattleStarted>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 StSNeowsLament <>4__this; private int <num>5__1; private IEnumerator<EnemyUnit> <>s__2; private EnemyUnit <enemyUnit>5__3; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnBattleStarted>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>s__2 = null; <enemyUnit>5__3 = null; <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; if (((Exhibit)<>4__this).Counter > 0) { <num>5__1 = ((Exhibit)<>4__this).Counter - 1; ((Exhibit)<>4__this).Counter = <num>5__1; ((Exhibit)<>4__this).NotifyActivating(); <>s__2 = ((Exhibit)<>4__this).Battle.AllAliveEnemies.GetEnumerator(); try { while (<>s__2.MoveNext()) { <enemyUnit>5__3 = <>s__2.Current; ((GameEntity)<>4__this).GameRun.SetEnemyHpAndMaxHp(((Exhibit)<>4__this).Value2, ((Unit)<enemyUnit>5__3).MaxHp, <enemyUnit>5__3, false); <enemyUnit>5__3 = null; } } finally { if (<>s__2 != null) { <>s__2.Dispose(); } } <>s__2 = null; } 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() { <OnBattleStarted>d__1 <OnBattleStarted>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnBattleStarted>d__ = this; } else { <OnBattleStarted>d__ = new <OnBattleStarted>d__1(0) { <>4__this = <>4__this }; } <OnBattleStarted>d__.args = <>3__args; return <OnBattleStarted>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } protected override void OnEnterBattle() { ((Exhibit)this).ReactBattleEvent<GameEventArgs>(((Exhibit)this).Battle.BattleStarted, (EventSequencedReactor<GameEventArgs>)OnBattleStarted); ((Exhibit)this).ReactBattleEvent<GameEventArgs>(((Exhibit)this).Battle.BattleEnded, (EventSequencedReactor<GameEventArgs>)OnBattleEnded); } [IteratorStateMachine(typeof(<OnBattleStarted>d__1))] private IEnumerable<BattleAction> OnBattleStarted(GameEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnBattleStarted>d__1(-2) { <>4__this = this, <>3__args = args }; } [IteratorStateMachine(typeof(<OnBattleEnded>d__2))] private IEnumerable<BattleAction> OnBattleEnded(GameEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnBattleEnded>d__2(-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("StSNeowsLament"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 10, false, true, false, false, (AppearanceType)2, "", (ExhibitLosableType)0, (Rarity)0, (int?)3, (int?)1, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)null, 0, true, (int?)3, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } public sealed class StSNinjaScrollDef : ExhibitTemplate { [EntityLogic(typeof(StSNinjaScrollDef))] [UsedImplicitly] [ExhibitInfo(WeighterType = typeof(StSNinjaScrollWeighter))] public sealed class StSNinjaScroll : Exhibit { private class StSNinjaScrollWeighter : IExhibitWeighter { public float WeightFor(Type type, GameRunController gameRun) { if (gameRun.Player.HasExhibit<SakuyaW>()) { return 1f; } if (gameRun.BaseDeck.Any((Card card) => card.IsUpgraded ? card.Config.UpgradedRelativeCards.Contains("Knife") : card.Config.RelativeCards.Contains("Knife"))) { return 1f; } return 0f; } } [CompilerGenerated] private sealed class <OnBattleStarted>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 StSNinjaScroll <>4__this; private List<Card> <cards>5__1; private List<Card>.Enumerator <>s__2; private Card <card>5__3; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnBattleStarted>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <cards>5__1 = null; <>s__2 = default(List<Card>.Enumerator); <card>5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; ((Exhibit)<>4__this).NotifyActivating(); <cards>5__1 = ((IEnumerable<Card>)Library.CreateCards<Knife>(((Exhibit)<>4__this).Value1, false)).ToList(); <>s__2 = <cards>5__1.GetEnumerator(); try { while (<>s__2.MoveNext()) { <card>5__3 = <>s__2.Current; <card>5__3.IsAutoExile = true; <card>5__3 = null; } } finally { ((IDisposable)<>s__2).Dispose(); } <>s__2 = default(List<Card>.Enumerator); <>2__current = (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)<cards>5__1, (AddCardsType)0); <>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() { <OnBattleStarted>d__1 <OnBattleStarted>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnBattleStarted>d__ = this; } else { <OnBattleStarted>d__ = new <OnBattleStarted>d__1(0) { <>4__this = <>4__this }; } <OnBattleStarted>d__.args = <>3__args; return <OnBattleStarted>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } protected override void OnEnterBattle() { ((Exhibit)this).ReactBattleEvent<GameEventArgs>(((Exhibit)this).Battle.BattleStarted, (EventSequencedReactor<GameEventArgs>)OnBattleStarted); } [IteratorStateMachine(typeof(<OnBattleStarted>d__1))] private IEnumerable<BattleAction> OnBattleStarted(GameEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnBattleStarted>d__1(-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("StSNinjaScroll"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 10, false, true, false, false, (AppearanceType)0, "", (ExhibitLosableType)0, (Rarity)1, (int?)3, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)null, 0, false, (int?)0, (Keyword)33554432, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "Knife" }); } } public sealed class StSNlothsGiftDef : ExhibitTemplate { [EntityLogic(typeof(StSNlothsGiftDef))] [UsedImplicitly] [ExhibitInfo(ExpireStageLevel = 3, ExpireStationLevel = 9)] public sealed class StSNlothsGift : Exhibit { [HarmonyPatch(typeof(GameRunController), "BaseCardWeight")] private class GameRunController_BaseCardWeight_Patch { private static bool Prefix() { if (Singleton<GameMaster>.Instance.CurrentGameRun != null && Singleton<GameMaster>.Instance.CurrentGameRun.Player.HasExhibit<StSNlothsGift>()) { Singleton<GameMaster>.Instance.CurrentGameRun._cardRareWeightFactor = 3f; } return true; } } } 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("StSNlothsGift"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 10, false, true, false, false, (AppearanceType)2, "", (ExhibitLosableType)0, (Rarity)1, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)null, 0, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } public sealed class StSOrangePelletsDef : ExhibitTemplate { [EntityLogic(typeof(StSOrangePelletsDef))] [UsedImplicitly] public sealed class StSOrangePellets : Exhibit { [CompilerGenerated] private sealed class <OnCardUsed>d__10 : 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 StSOrangePellets <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnCardUsed>d__10(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Invalid comparison between Unknown and I4 //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Invalid comparison between Unknown and I4 //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Invalid comparison between Unknown and I4 //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Invalid comparison between Unknown and I4 //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Invalid comparison between Unknown and I4 //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Invalid comparison between Unknown and I4 //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Invalid comparison between Unknown and I4 //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Invalid comparison between Unknown and I4 switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (((Unit)((Exhibit)<>4__this).Owner).IsInTurn) { if ((int)args.Card.CardType == 0 && !<>4__this.unknown) { <>4__this.unknown = true; ((Exhibit)<>4__this).Counter = ((Exhibit)<>4__this).Counter + 1; } else if ((int)args.Card.CardType == 1 && !<>4__this.attack) { <>4__this.attack = true; ((Exhibit)<>4__this).Counter = ((Exhibit)<>4__this).Counter + 1; } else if ((int)args.Card.CardType == 2 && !<>4__this.defense) { <>4__this.defense = true; ((Exhibit)<>4__this).Counter = ((Exhibit)<>4__this).Counter + 1; } else if ((int)args.Card.CardType == 3 && !<>4__this.skill) { <>4__this.skill = true; ((Exhibit)<>4__this).Counter = ((Exhibit)<>4__this).Counter + 1; } else if ((int)args.Card.CardType == 4 && !<>4__this.ability) { <>4__this.ability = true; ((Exhibit)<>4__this).Counter = ((Exhibit)<>4__this).Counter + 1; } else if ((int)args.Card.CardType == 5 && !<>4__this.friend) { <>4__this.friend = true; ((Exhibit)<>4__this).Counter = ((Exhibit)<>4__this).Counter + 1; } else if ((int)args.Card.CardType == 6 && !<>4__this.tool) { <>4__this.tool = true; ((Exhibit)<>4__this).Counter = ((Exhibit)<>4__this).Counter + 1; } else if ((int)args.Card.CardType == 7 && !<>4__this.status) { <>4__this.status = true; ((Exhibit)<>4__this).Counter = ((Exhibit)<>4__this).Counter + 1; } else if ((int)args.Card.CardType == 8 && !<>4__this.misfortune) { <>4__this.misfortune = true; ((Exhibit)<>4__this).Counter = ((Exhibit)<>4__this).Counter + 1; } if (((Exhibit)<>4__this).Counter >= ((Exhibit)<>4__this).Value1) { ((Exhibit)<>4__this).NotifyActivating(); ((Exhibit)<>4__this).Counter = 0; <>4__this.unknown = false; <>4__this.attack = false; <>4__this.defense = false; <>4__this.skill = false; <>4__this.ability = false; <>4__this.friend = false; <>4__this.tool = false; <>4__this.status = false; <>4__this.misfortune = false; <>2__current = (BattleAction)new RemoveAllNegativeStatusEffectAction((Unit)(object)((Exhibit)<>4__this).Battle.Player, 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() { <OnCardUsed>d__10 <OnCardUsed>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnCardUsed>d__ = this; } else { <OnCardUsed>d__ = new <OnCardUsed>d__10(0) { <>4__this = <>4__this }; } <OnCardUsed>d__.args = <>3__args; return <OnCardUsed>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } private bool unknown = false; private bool attack = false; private bool defense = false; private bool skill = false; private bool ability = false; private bool friend = false; private bool tool = false; private bool status = false; private bool misfortune = false; protected override void OnEnterBattle() { ((Exhibit)this).ReactBattleEvent<CardUsingEventArgs>(((Exhibit)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed); ((Exhibit)this).HandleBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Battle.Player).TurnEnding, (GameEventHandler<UnitEventArgs>)delegate { ((Exhibit)this).Counter = 0; unknown = false; attack = false; defense = false; skill = false; ability = false; friend = false; tool = false; status = false; misfortune = false; }); } [IteratorStateMachine(typeof(<OnCardUsed>d__10))] private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnCardUsed>d__10(-2) { <>4__this = this, <>3__args = args }; } protected override void OnLeaveBattle() { ((Exhibit)this).Counter = 0; unknown = false; attack = false; defense = false; skill = false; ability = false; friend = false; tool = false; status = false; misfortune = false; } } 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("StSOrangePellets"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 10, false, true, false, false, (AppearanceType)1, "", (ExhibitLosableType)0, (Rarity)0, (int?)4, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)null, 0, true, (int?)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } public sealed class StSOrreryDef : ExhibitTemplate { [EntityLogic(typeof(StSOrreryDef))] [UsedImplicitly] public sealed class StSOrrery : Exhibit { [CompilerGenerated] private sealed class <SpecialGain>d__0 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PlayerUnit player; public StSOrrery <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <SpecialGain>d__0(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown if (<>1__state != 0) { return false; } <>1__state = -1; ((Exhibit)<>4__this).Active = true; ((Exhibit)<>4__this).OnGain(player); ((UiPanelBase)UiManager.GetPanel<ShopPanel>()).Hide(); ((Exhibit)<>4__this).HandleGameRunEvent<CardsEventArgs>(((GameEntity)<>4__this).GameRun.DeckCardsAdded, (GameEventHandler<CardsEventArgs>)delegate { if (((Exhibit)<>4__this).Active) { ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(<>4__this.Wait()); } }); ((GameEntity)<>4__this).GameRun.CurrentStation.ClearReward