Decompiled source of Mima v0.2.10
lvalonmima.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.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Cryptography; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using Cysharp.Threading.Tasks; using DG.Tweening; using DG.Tweening.Core; using DG.Tweening.Plugins.Options; using HarmonyLib; using LBoL.Base; using LBoL.Base.Extensions; using LBoL.ConfigData; using LBoL.Core; using LBoL.Core.Battle; using LBoL.Core.Battle.BattleActionRecord; using LBoL.Core.Battle.BattleActions; using LBoL.Core.Battle.Interactions; using LBoL.Core.Cards; using LBoL.Core.GapOptions; using LBoL.Core.Randoms; using LBoL.Core.SaveData; using LBoL.Core.Stations; using LBoL.Core.StatusEffects; using LBoL.Core.Units; using LBoL.EntityLib.Cards.Character.Cirno; using LBoL.EntityLib.Cards.Enemy; using LBoL.EntityLib.Cards.Neutral.Black; using LBoL.EntityLib.EnemyUnits.Character; using LBoL.EntityLib.EnemyUnits.Normal; using LBoL.EntityLib.EnemyUnits.Normal.Bats; using LBoL.EntityLib.EnemyUnits.Normal.Drones; using LBoL.EntityLib.EnemyUnits.Normal.Guihuos; using LBoL.EntityLib.EnemyUnits.Normal.Maoyus; using LBoL.EntityLib.EnemyUnits.Normal.Ravens; using LBoL.EntityLib.EnemyUnits.Normal.Shenlings; using LBoL.EntityLib.EnemyUnits.Normal.Yinyangyus; using LBoL.EntityLib.EnemyUnits.Opponent; using LBoL.EntityLib.Exhibits; using LBoL.EntityLib.Exhibits.Common; 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.Others; using LBoL.EntityLib.StatusEffects.Sakuya; using LBoL.Presentation; using LBoL.Presentation.Bullet; using LBoL.Presentation.I10N; using LBoL.Presentation.InputSystemExtend; using LBoL.Presentation.UI; using LBoL.Presentation.UI.Dialogs; 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.CustomHandlers; using LBoLEntitySideloader.CustomKeywords; using LBoLEntitySideloader.Entities; using LBoLEntitySideloader.PersistentValues; using LBoLEntitySideloader.Resource; using LBoLEntitySideloader.Utils; using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.Experimental.Rendering; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; using UnityEngine.UI; using YamlDotNet.Serialization; using lvalonmima.Cards; using lvalonmima.Cards.Template; using lvalonmima.Config; using lvalonmima.Exhibits; using lvalonmima.GunName; using lvalonmima.ImageLoader; using lvalonmima.Localization; using lvalonmima.Packs; using lvalonmima.Patches; using lvalonmima.SFX; using lvalonmima.SFX.Template; using lvalonmima.Source.Patches; using lvalonmima.StatusEffects; using lvalonmima.lvalonmimaUlt; [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("lvalonmima")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+a12ffbdcf56f77afc68fdab6645b82767353703e")] [assembly: AssemblyProduct("lvalonmima")] [assembly: AssemblyTitle("lvalonmima")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace lvalonmima { [BepInPlugin("llbol.char.mima", "Mima", "0.2.10")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInProcess("LBoL.exe")] public class BepinexPlugin : BaseUnityPlugin { [CompilerGenerated] private sealed class <FollowupPopups>d__26 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public UnitView target; public Color color; public Vector3 basePosition; public Vector2 initialOffset; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <FollowupPopups>d__26(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0052: 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_005e: 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) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(-0.6f); <>1__state = 1; return true; case 1: <>1__state = -1; SpawnFollowup(target, color, basePosition, initialOffset * 0.6f, 2f); <>2__current = (object)new WaitForSeconds(0.6f); <>1__state = 2; return true; case 2: <>1__state = -1; SpawnFollowup(target, color, basePosition, initialOffset * 0.25f, 2f); 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(); } } public static string modUniqueID = "lvalonmima"; public static string playerName = "Mima"; public static bool useInGameModel = false; public static string modelName = "Youmu"; public static bool modelIsFlipped = true; public static List<ManaColor> offColors = new List<ManaColor> { (ManaColor)1, (ManaColor)2, (ManaColor)4 }; public static ManaGroup offColorsMana; public static ConfigEntry<double> mimaCardMult; public static CustomConfigEntry<double> mimaCardMultEntry; private static readonly Harmony harmony; internal static ManualLogSource log; internal static TemplateSequenceTable sequenceTable; internal static IResourceSource embeddedSource; internal static DirectorySource directorySource; public static bool u50; public static bool u25; public static bool u10; private void Awake() { log = ((BaseUnityPlugin)this).Logger; mimaCardMult = ((BaseUnityPlugin)this).Config.Bind<double>(mimaCardMultEntry.Section, mimaCardMultEntry.Key, mimaCardMultEntry.Value, mimaCardMultEntry.Description); Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; CardIndexGenerator.PromiseClearIndexSet(); EntityManager.RegisterSelf(); new LiteProfileSaveData().RegisterSelf("llbol.char.mima"); harmony.PatchAll(); CHandlerManager.RegisterGameEventHandler<StationEventArgs>((EventProvider<StationEventArgs, GameRunController>)((GameRunController gr) => gr.StationEntering), (GameEventHandler<StationEventArgs>)ShopModHandlers.StationEntering, (GameEventPriority)10); CHandlerManager.RegisterGameEventHandler<StationEventArgs>((EventProvider<StationEventArgs, GameRunController>)((GameRunController gr) => gr.StationEntered), (GameEventHandler<StationEventArgs>)ShopModHandlers.StationEntered, (GameEventPriority)10); CHandlerManager.RegisterGameEventHandler<StationEventArgs>((EventProvider<StationEventArgs, GameRunController>)((GameRunController gr) => gr.StationEntered), (GameEventHandler<StationEventArgs>)ShopModHandlers.StationEnteredBlitz, (GameEventPriority)int.MinValue); CHandlerManager.RegisterGameEventHandler<CardsEventArgs>((EventProvider<CardsEventArgs, GameRunController>)((GameRunController gr) => gr.DeckCardsAdded), (GameEventHandler<CardsEventArgs>)ShopModHandlers.DeckCardsAdded, (GameEventPriority)10); ShopModHandlers.addreactors(); } private void OnDestroy() { if (harmony != null) { harmony.UnpatchSelf(); } } public void Reload(PluginInfo scriptEngineInfo, bool hardReload = false) { MiniTracker.DestroySelf(); } private void Update() { //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018a: 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_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) GameMaster instance = Singleton<GameMaster>.Instance; GameRunController val = ((instance != null) ? instance.CurrentGameRun : null); if (val == null) { ResetFlags(); return; } HandleDeckCleanup(Singleton<GameMaster>.Instance); BattleController battle = val.Battle; if (battle == null) { ResetFlags(); return; } PlayerUnit player = battle.Player; int hp = ((Unit)player).Hp; if (player.GetExhibit<exmimab>() != null && hp == 0) { Random random = new Random(); if (random.Next(1, ((Unit)player).MaxHp * 100) <= ((Exhibit)player.GetExhibit<exmimab>()).Counter) { UnitView unit = GameDirector.GetUnit((Unit)(object)player); Color val2 = Color.HSVToRGB(Random.value, Random.Range(0.8f, 1f), Random.Range(0.85f, 1f)); Camera main = Camera.main; float num = (((Object)(object)main != (Object)null) ? main.orthographicSize : 5f); float num2 = Mathf.Pow(Random.value, 0.25f); Vector2 insideUnitCircle = Random.insideUnitCircle; Vector2 normalized = ((Vector2)(ref insideUnitCircle)).normalized; Vector2 val3 = normalized * num2 * num * (float)((Exhibit)player.GetExhibit<exmimab>()).Counter / (float)((Unit)player).MaxHp; PopupHud.Instance.PopupFromScene(int.MinValue, val2, ((Component)unit).transform.position + Vector2.op_Implicit(val3)); ((MonoBehaviour)PopupHud.Instance).StartCoroutine(FollowupPopups(unit, val2, ((Component)unit).transform.position, Vector2.op_Implicit(Vector2.op_Implicit(val3)))); } } int num3 = toolbox.hpfrompercent((Unit)(object)player, 50); int num4 = toolbox.hpfrompercent((Unit)(object)player, 25); int num5 = toolbox.hpfrompercent((Unit)(object)player, 10); UpdateHighlight(battle, hp < num3, ref u50, typeof(sehl50), typeof(exhl50)); UpdateHighlight(battle, hp < num4, ref u25, typeof(sehl25), typeof(exhl25)); UpdateHighlight(battle, hp < num5, ref u10, typeof(sehl10), typeof(exhl10)); } private void ResetFlags() { u50 = false; u25 = false; u10 = false; } private void HandleDeckCleanup(GameMaster gamerun2) { GameMaster instance = Singleton<GameMaster>.Instance; GameRunController val = ((instance != null) ? instance.CurrentGameRun : null); if (val == null) { return; } List<string> packs = val.Packs; string text = "packtrumpDef"; if (!packs.Contains(text.Substring(0, text.Length - 3))) { return; } RemoveDuplicates(gamerun2, "cardmimaexa"); RemoveDuplicates(gamerun2, "cardmimaexb"); if (((Unit)val.Player).MaxHp < 12 && !(((GameEntity)val.Player).Id != modUniqueID)) { if (val.Player.HasExhibit<exmimaa>() && !HasCard(gamerun2, "cardmimaexa")) { val.AddDeckCard((Card)(object)Library.CreateCard<cardmimaexa>(), false, (VisualSourceData)null); } if (val.Player.HasExhibit<exmimab>() && !HasCard(gamerun2, "cardmimaexb")) { val.AddDeckCard((Card)(object)Library.CreateCard<cardmimaexb>(), false, (VisualSourceData)null); } } } private void RemoveDuplicates(GameMaster gamerun2, string cardId) { GameMaster instance = Singleton<GameMaster>.Instance; GameRunController val = ((instance != null) ? instance.CurrentGameRun : null); if (val == null) { return; } bool flag = false; for (int num = val.BaseDeck.Count - 1; num >= 0; num--) { if (!(((GameEntity)val.BaseDeck[num]).Id != cardId)) { if (!flag) { flag = true; } else { val.RemoveDeckCard(val.BaseDeck[num], true); } } } } private bool HasCard(GameMaster gamerun2, string cardId) { GameMaster instance = Singleton<GameMaster>.Instance; GameRunController val = ((instance != null) ? instance.CurrentGameRun : null); if (val == null) { return false; } for (int i = 0; i < val.BaseDeck.Count; i++) { if (((GameEntity)val.BaseDeck[i]).Id == cardId) { return true; } } return false; } private void UpdateHighlight(BattleController battle, bool shouldBeActive, ref bool flag, Type t1, Type t2) { if (flag == shouldBeActive) { return; } flag = shouldBeActive; foreach (Unit allAliveUnit in battle.AllAliveUnits) { foreach (StatusEffect statusEffect in allAliveUnit.StatusEffects) { if ((((object)statusEffect).GetType() == t1 || ((object)statusEffect).GetType() == t2) && statusEffect.Highlight != shouldBeActive) { statusEffect.Highlight = shouldBeActive; } } } } [IteratorStateMachine(typeof(<FollowupPopups>d__26))] private static IEnumerator FollowupPopups(UnitView target, Color color, Vector3 basePosition, Vector2 initialOffset) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <FollowupPopups>d__26(0) { target = target, color = color, basePosition = basePosition, initialOffset = initialOffset }; } private static void SpawnFollowup(UnitView target, Color color, Vector3 basePosition, Vector2 offset, float scale) { //IL_0021: 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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_003c: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) DamagePopup val = Object.Instantiate<DamagePopup>(PopupHud.Instance.damagePopup, ((Component)PopupHud.Instance).transform); ((Component)val).transform.localPosition = CameraController.ScenePositionToLocalPositionInRectTransform(basePosition + Vector2.op_Implicit(offset), (RectTransform)((Component)PopupHud.Instance).transform); ((TMP_Text)val.tmp).text = toolbox.gibberish(); ((Graphic)val.tmp).color = color; ((Component)val).transform.localScale = Vector3.one * scale; val.rb.linearVelocity = new Vector2(0f, 0f); val.rb.gravityScale = 0f; ((Component)val).gameObject.SetActive(true); Object.Destroy((Object)(object)((Component)val).gameObject, 0.1f); } static BepinexPlugin() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Expected O, but got Unknown //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown ManaGroup val = default(ManaGroup); ((ManaGroup)(ref val)).White = 1; ((ManaGroup)(ref val)).Blue = 1; ((ManaGroup)(ref val)).Red = 1; offColorsMana = val; mimaCardMultEntry = new CustomConfigEntry<double>(0.1, "1. Content Modifications 內容設定", "Mima card weight multiplier when playing as another character 遊玩其他角色時的魅魔卡牌比重倍率", "Weight multiplier of Mima cards appearing when playing as another character (normal weight is 1). 以其他角色遊玩時魅魔卡牌的比重倍率(正常為 1)。"); harmony = PInfo.harmony; sequenceTable = new TemplateSequenceTable(0); embeddedSource = (IResourceSource)new EmbeddedSource(Assembly.GetExecutingAssembly()); directorySource = new DirectorySource("llbol.char.mima", ""); u50 = false; u25 = false; u10 = false; } } public static class PInfo { public const string GUID = "llbol.char.mima"; public const string Name = "Mima"; public const string version = "0.2.10"; public static readonly Harmony harmony = new Harmony("llbol.char.mima"); } public class lvalonmimaLoadouts { public static string UltimateSkillA = "ultmimaa"; public static string UltimateSkillB = "ultmimab"; public static string ExhibitA = "exmimaa"; public static string ExhibitB = "exmimab"; public static int maxhp = 33; public static List<string> DeckA = new List<string> { "Shoot", "Shoot", "Shoot", "Boundary", "Boundary", "cardmimaa", "cardmimaa", "cardmimaa", "carderosion", "cardchannelling" }; public static List<string> DeckB = new List<string> { "Shoot", "Shoot", "Shoot", "Boundary", "Boundary", "cardmimab", "cardmimab", "cardmimab", "cardwheresleep", "cardoncetime" }; public static PlayerUnitConfig playerUnitConfig; static lvalonmimaLoadouts() { //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Expected O, but got Unknown string modUniqueID = BepinexPlugin.modUniqueID; int? num = 10; int num2 = maxhp; ManaGroup val = default(ManaGroup); ((ManaGroup)(ref val)).Black = 2; ((ManaGroup)(ref val)).Green = 2; ManaGroup val2 = val; playerUnitConfig = new PlayerUnitConfig(modUniqueID, false, "", 0, int.MaxValue, num, true, (int?)null, (ManaColor)7, (ManaColor)6, val2, "#ffffff", num2, 66, 0, UltimateSkillA, UltimateSkillB, ExhibitA, ExhibitB, (IReadOnlyList<string>)DeckA, (IReadOnlyList<string>)DeckB, 6, 6); } } public sealed class lvalonmimaDef : PlayerUnitTemplate { [EntityLogic(typeof(lvalonmimaDef))] public sealed class lvalonmima : PlayerUnit { protected override void OnEnterBattle(BattleController battle) { ((Unit)this).HandleBattleEvent<StatusEffectApplyEventArgs>(((Unit)((Unit)this).Battle.Player).StatusEffectAdding, (GameEventHandler<StatusEffectApplyEventArgs>)OnSEAdding, (GameEventPriority)int.MinValue); ((Unit)this).HandleBattleEvent<StatusEffectEventArgs>(((Unit)((Unit)this).Battle.Player).StatusEffectRemoving, (GameEventHandler<StatusEffectEventArgs>)OnSERemoving, (GameEventPriority)int.MinValue); ((Unit)this).HandleBattleEvent<GameEventArgs>(((Unit)this).Battle.BattleStarting, (GameEventHandler<GameEventArgs>)OnBattleStarting, (GameEventPriority)int.MinValue); } private void OnBattleStarting(GameEventArgs args) { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)(object)new ApplyStatusEffectAction<seevilspirit>((Unit)(object)((Unit)this).Battle.Player, (int?)1, (int?)0, (int?)0, (int?)0, 0f, true))); ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)(object)new ApplyStatusEffectAction<secreative>((Unit)(object)((Unit)this).Battle.Player, (int?)1, (int?)0, (int?)0, (int?)0, 0f, true))); } private void OnSEAdding(StatusEffectApplyEventArgs args) { if (args.Effect is seevilspirit || args.Effect is secreative) { ((GameEventArgs)args).CanCancel = false; } } private void OnSERemoving(StatusEffectEventArgs args) { if (args.Effect is seevilspirit || args.Effect is secreative) { ((GameEventArgs)args).CancelBy((GameEntity)(object)this); } } } public UniTask<Sprite>? LoadSpellPortraitAsync { get; private set; } public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit(BepinexPlugin.modUniqueID); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)lvalonmimaLocalization.PlayerUnitBatchLoc.AddEntity((EntityDefinition)(object)this); } public override PlayerImages LoadPlayerImages() { return lvalonmimaImageLoader.LoadPlayerImages(BepinexPlugin.playerName); } public override PlayerUnitConfig MakeConfig() { return lvalonmimaLoadouts.playerUnitConfig; } } public abstract class toolbox { [CompilerGenerated] private sealed class <EnumerateALLCardTypes>d__9 : IEnumerable<(Type, CardConfig)>, IEnumerable, IEnumerator<(Type, CardConfig)>, IEnumerator, IDisposable { private int <>1__state; private (Type, CardConfig) <>2__current; private int <>l__initialThreadId; private IEnumerator<CardConfig> <>s__1; private CardConfig <item>5__2; private Type <type2>5__3; (Type, CardConfig) IEnumerator<(Type, CardConfig)>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <EnumerateALLCardTypes>d__9(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <>s__1 = null; <item>5__2 = null; <type2>5__3 = null; <>1__state = -2; } private bool MoveNext() { try { int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -3; goto IL_00a4; } <>1__state = -1; <>s__1 = CardConfig.AllConfig().GetEnumerator(); <>1__state = -3; goto IL_00b3; IL_00a4: <type2>5__3 = null; <item>5__2 = null; goto IL_00b3; IL_00b3: if (<>s__1.MoveNext()) { <item>5__2 = <>s__1.Current; <type2>5__3 = TypeFactory<Card>.TryGetType(<item>5__2.Id); if ((object)<type2>5__3 != null) { <>2__current = (<type2>5__3, <item>5__2); <>1__state = 1; return true; } goto IL_00a4; } <>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<(Type, CardConfig)> IEnumerable<(Type, CardConfig)>.GetEnumerator() { if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; return this; } return new <EnumerateALLCardTypes>d__9(0); } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<(Type, CardConfig)>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <EnumerateALLExhibitTypes>d__10 : IEnumerable<(Type, ExhibitConfig)>, IEnumerable, IEnumerator<(Type, ExhibitConfig)>, IEnumerator, IDisposable { private int <>1__state; private (Type, ExhibitConfig) <>2__current; private int <>l__initialThreadId; private IEnumerator<ExhibitConfig> <>s__1; private ExhibitConfig <item>5__2; private Type <type>5__3; (Type, ExhibitConfig) IEnumerator<(Type, ExhibitConfig)>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <EnumerateALLExhibitTypes>d__10(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <>s__1 = null; <item>5__2 = null; <type>5__3 = null; <>1__state = -2; } private bool MoveNext() { try { int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -3; goto IL_00a4; } <>1__state = -1; <>s__1 = ExhibitConfig.AllConfig().GetEnumerator(); <>1__state = -3; goto IL_00b3; IL_00a4: <type>5__3 = null; <item>5__2 = null; goto IL_00b3; IL_00b3: if (<>s__1.MoveNext()) { <item>5__2 = <>s__1.Current; <type>5__3 = TypeFactory<Exhibit>.TryGetType(<item>5__2.Id); if ((object)<type>5__3 != null) { <>2__current = (<type>5__3, <item>5__2); <>1__state = 1; return true; } goto IL_00a4; } <>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<(Type, ExhibitConfig)> IEnumerable<(Type, ExhibitConfig)>.GetEnumerator() { if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; return this; } return new <EnumerateALLExhibitTypes>d__10(0); } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<(Type, ExhibitConfig)>)this).GetEnumerator(); } } public static string gibberish() { Random random = new Random(); float num = Mathf.Pow((float)random.NextDouble(), 2.5f); int num2 = Mathf.RoundToInt(Mathf.Lerp(3f, 24f, num)); StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < num2; i++) { switch (random.Next(3)) { case 0: stringBuilder.Append((char)random.Next(33, 127)); break; case 1: stringBuilder.Append((char)random.Next(8704, 8959)); break; default: stringBuilder.Append((char)random.Next(9632, 9727)); break; } } return stringBuilder.ToString(); } public static int Round(double i) { return Convert.ToInt32(Math.Round(i, MidpointRounding.AwayFromZero)); } public static int Round(float i) { return Convert.ToInt32(Math.Round(i, MidpointRounding.AwayFromZero)); } public static int hpfrompercent(Unit unit, int percent, bool maxhp = true) { if (unit == null) { return 0; } if (maxhp) { return Convert.ToInt32(Math.Round((double)unit.MaxHp * (double)percent / 100.0, MidpointRounding.AwayFromZero)); } return Convert.ToInt32(Math.Round((double)unit.Hp * (double)percent / 100.0, MidpointRounding.AwayFromZero)); } public static Card[] RollCardsCustomIgnore(RandomGen rng, CardWeightTable weightTable, int count, ManaGroup? manaLimit = null, bool colorLimit = false, bool applyFactors = false, bool battleRolling = false, bool ensureCount = false, Predicate<Card> filter = null) { GameMaster instance = Singleton<GameMaster>.Instance; GameRunController val = ((instance != null) ? instance.CurrentGameRun : null) ?? throw new InvalidOperationException("Rolling cards when run is not started."); UniqueRandomPool<Type> val2 = val.CreateValidCardsPool(weightTable, manaLimit, colorLimit, applyFactors, battleRolling, (Predicate<CardConfig>)null); UniqueRandomPool<Card> val3 = new UniqueRandomPool<Card>(false); foreach (RandomPoolEntry<Type> item in val2) { Card val4 = Library.CreateCard(item.Elem); if (filter(val4)) { ((GameEntity)val4).GameRun = val; val3.Add(val4, item.Weight); } } return val3.SampleMany(rng, count, ensureCount); } public static Card[] RollCardsCustom(RandomGen rng, CardWeightTable weightTable, int count, ManaGroup? manaLimit = null, bool colorLimit = false, bool applyFactors = false, bool battleRolling = false, bool ensureCount = false, Predicate<Card> filter = null) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) GameMaster instance = Singleton<GameMaster>.Instance; GameRunController val = ((instance != null) ? instance.CurrentGameRun : null) ?? throw new InvalidOperationException("Rolling cards when run is not started."); UniqueRandomPool<Type> val2 = val.CreateValidCardsPool(weightTable, manaLimit, colorLimit, applyFactors, battleRolling, (Predicate<CardConfig>)null); UniqueRandomPool<Card> val3 = new UniqueRandomPool<Card>(false); foreach (RandomPoolEntry<Type> item in val2) { Card val4 = Library.CreateCard(item.Elem); if (filter(val4)) { ManaGroup baseMana = val.BaseMana; if (((ManaGroup)(ref baseMana)).CanAfford(val4.Cost)) { ((GameEntity)val4).GameRun = val; val3.Add(val4, item.Weight); } } } return val3.SampleMany(rng, count, ensureCount); } public static Card[] RepeatableAllCards(RandomGen rng, CardWeightTable weightTable, int count, bool ensureCount = false, Predicate<Card> filter = null) { GameMaster instance = Singleton<GameMaster>.Instance; GameRunController gameRun = ((instance != null) ? instance.CurrentGameRun : null) ?? throw new InvalidOperationException("Rolling cards when run is not started."); UniqueRandomPool<Type> val = CreateAllCardsPool(weightTable); RepeatableRandomPool<Card> val2 = new RepeatableRandomPool<Card>(); foreach (RandomPoolEntry<Type> item in val) { Card val3 = Library.CreateCard(item.Elem); if (filter(val3)) { ((GameEntity)val3).GameRun = gameRun; val2.Add(val3, item.Weight); } } return val2.SampleMany(rng, count, ensureCount); } public static Card[] UniqueAllCards(RandomGen rng, CardWeightTable weightTable, int count, bool ensureCount = false, Predicate<Card> filter = null) { GameMaster instance = Singleton<GameMaster>.Instance; GameRunController gameRun = ((instance != null) ? instance.CurrentGameRun : null) ?? throw new InvalidOperationException("Rolling cards when run is not started."); UniqueRandomPool<Type> val = CreateAllCardsPool(weightTable); UniqueRandomPool<Card> val2 = new UniqueRandomPool<Card>(false); foreach (RandomPoolEntry<Type> item in val) { Card val3 = Library.CreateCard(item.Elem); if (filter(val3)) { ((GameEntity)val3).GameRun = gameRun; val2.Add(val3, item.Weight); } } return val2.SampleMany(rng, count, ensureCount); } public static UniqueRandomPool<Type> CreateAllCardsPool(CardWeightTable weightTable, [MaybeNull] Predicate<CardConfig> filter = null) { GameRunController currentGameRun = Singleton<GameMaster>.Instance.CurrentGameRun; HashSet<string> hashSet = new HashSet<string>(from e in currentGameRun.Player.Exhibits where e.OwnerId != null select e.OwnerId); UniqueRandomPool<Type> val = new UniqueRandomPool<Type>(false); foreach (var (type, val2) in EnumerateALLCardTypes()) { if (filter == null || filter(val2)) { float num = weightTable.WeightFor(val2, ((GameEntity)currentGameRun.Player).Id, (ISet<string>)hashSet); if (num > 0f) { float num2 = currentGameRun.BaseCardWeight(val2, false); val.Add(type, num * num2); } } } return val; } [IteratorStateMachine(typeof(<EnumerateALLCardTypes>d__9))] public static IEnumerable<(Type, CardConfig)> EnumerateALLCardTypes() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <EnumerateALLCardTypes>d__9(-2); } [IteratorStateMachine(typeof(<EnumerateALLExhibitTypes>d__10))] public static IEnumerable<(Type, ExhibitConfig)> EnumerateALLExhibitTypes() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <EnumerateALLExhibitTypes>d__10(-2); } public static UniqueRandomPool<Type> CreateAllExhibitsPool(ExhibitWeightTable weightTable, [MaybeNull] Predicate<ExhibitConfig> filter = null) { UniqueRandomPool<Type> result = new UniqueRandomPool<Type>(false); foreach (var item2 in EnumerateALLExhibitTypes()) { ExhibitConfig item = item2.Item2; if (filter != null && filter(item)) { } } return result; } public static Card createcardwithidBACKUP(string id) { UniqueRandomPool<Type> val = new UniqueRandomPool<Type>(false); foreach (var (type, val2) in EnumerateALLCardTypes()) { if (val2.Id == id) { val.Add(type, 1f); } } UniqueRandomPool<Card> val3 = new UniqueRandomPool<Card>(false); foreach (RandomPoolEntry<Type> item in val) { Card val4 = Library.CreateCard(item.Elem); val3.Add(val4, item.Weight); } return val3.Sample(RandomGen.InitGen); } public static Card createcardwithid(string id) { Type type = TypeFactory<Card>.TryGetType(id); if (type == null) { return null; } return TypeFactory<Card>.CreateInstance(type); } public static Exhibit CreateExhibitById(string id) { if (string.IsNullOrEmpty(id)) { return null; } Type type = TypeFactory<Exhibit>.TryGetType(id); if (type == null) { return null; } return TypeFactory<Exhibit>.CreateInstance(type); } } } namespace lvalonmima.lvalonmimaUlt { public sealed class ultmimaaDef : lvalonmimaUltTemplate { public override UltimateSkillConfig MakeConfig() { UltimateSkillConfig defaulUltConfig = GetDefaulUltConfig(); defaulUltConfig.Value1 = 2; defaulUltConfig.Value2 = 9; defaulUltConfig.PowerCost = 120; defaulUltConfig.PowerPerLevel = 120; defaulUltConfig.Keywords = (Keyword)0; defaulUltConfig.RelativeEffects = new List<string> { "Cold", "Poison", "TimeAuraSe" }; return defaulUltConfig; } } [EntityLogic(typeof(ultmimaaDef))] public sealed class ultmimaa : UltimateSkill { [CompilerGenerated] private sealed class <Actions>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private UnitSelector selector; public UnitSelector <>3__selector; public ultmimaa <>4__this; private int <i>5__1; private IEnumerator<Unit> <>s__2; private Unit <unit>5__3; private IEnumerator<EnemyUnit> <>s__4; private Unit <unit>5__5; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Actions>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { switch (<>1__state) { case -3: case 2: try { } finally { <>m__Finally1(); } break; case -4: case 3: try { } finally { <>m__Finally2(); } break; } <>s__2 = null; <unit>5__3 = null; <>s__4 = null; <unit>5__5 = null; <>1__state = -2; } private bool MoveNext() { try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (BattleAction)(object)PerformAction.Spell((Unit)(object)((UltimateSkill)<>4__this).Battle.Player, "ultmimaa"); <>1__state = 1; return true; case 1: <>1__state = -1; <i>5__1 = 0; goto IL_0165; case 2: <>1__state = -3; <unit>5__3 = null; goto IL_0136; case 3: <>1__state = -4; <unit>5__5 = null; goto IL_023c; case 4: { <>1__state = -1; return false; } IL_0165: if (<i>5__1 < ((UltimateSkill)<>4__this).Value1) { <>s__2 = ((UltimateSkill)<>4__this).Battle.AllAliveUnits.GetEnumerator(); <>1__state = -3; goto IL_0136; } <>s__4 = ((UltimateSkill)<>4__this).Battle.AllAliveEnemies.GetEnumerator(); <>1__state = -4; goto IL_023c; IL_023c: while (<>s__4.MoveNext()) { <unit>5__5 = (Unit)(object)<>s__4.Current; if (!<unit>5__5.IsAlive || ((UltimateSkill)<>4__this).Battle.BattleShouldEnd) { continue; } <>2__current = (BattleAction)(object)new ApplyStatusEffectAction<Poison>(<unit>5__5, (int?)((UltimateSkill)<>4__this).Value2, (int?)0, (int?)0, (int?)0, 0f, true); <>1__state = 3; return true; } <>m__Finally2(); <>s__4 = null; if (((UltimateSkill)<>4__this).Battle.BattleShouldEnd) { return false; } <>2__current = (BattleAction)(object)new ApplyStatusEffectAction<TimeAuraSe>((Unit)(object)((UltimateSkill)<>4__this).Battle.Player, (int?)((UltimateSkill)<>4__this).Value2, (int?)0, (int?)0, (int?)0, 0f, true); <>1__state = 4; return true; IL_0136: while (<>s__2.MoveNext()) { <unit>5__3 = <>s__2.Current; if (!<unit>5__3.IsAlive || ((UltimateSkill)<>4__this).Battle.BattleShouldEnd) { continue; } <>2__current = (BattleAction)(object)new ApplyStatusEffectAction<Cold>(<unit>5__3, (int?)0, (int?)0, (int?)0, (int?)0, 0f, true); <>1__state = 2; return true; } <>m__Finally1(); <>s__2 = null; <i>5__1++; goto IL_0165; } } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__2 != null) { <>s__2.Dispose(); } } private void <>m__Finally2() { <>1__state = -1; if (<>s__4 != null) { <>s__4.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <Actions>d__1 <Actions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Actions>d__ = this; } else { <Actions>d__ = new <Actions>d__1(0) { <>4__this = <>4__this }; } <Actions>d__.selector = <>3__selector; return <Actions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } public ultmimaa() { ((UltimateSkill)this).TargetType = (TargetType)2; } [IteratorStateMachine(typeof(<Actions>d__1))] protected override IEnumerable<BattleAction> Actions(UnitSelector selector) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <Actions>d__1(-2) { <>4__this = this, <>3__selector = selector }; } } public sealed class ultmimabDef : lvalonmimaUltTemplate { public override UltimateSkillConfig MakeConfig() { UltimateSkillConfig defaulUltConfig = GetDefaulUltConfig(); defaulUltConfig.Keywords = (Keyword)0; defaulUltConfig.PowerCost = 150; defaulUltConfig.PowerPerLevel = 150; defaulUltConfig.Value1 = 0; return defaulUltConfig; } } [EntityLogic(typeof(ultmimabDef))] public sealed class ultmimab : UltimateSkill { [CompilerGenerated] private sealed class <Actions>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private UnitSelector selector; public UnitSelector <>3__selector; public ultmimab <>4__this; private bool <gohard>5__1; private int <diff>5__2; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <Actions>d__1(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00c9: 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_00de: Expected O, but got Unknown //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (BattleAction)(object)PerformAction.Spell((Unit)(object)((UltimateSkill)<>4__this).Battle.Player, "ultmimab"); <>1__state = 1; return true; case 1: <>1__state = -1; <gohard>5__1 = ((Unit)((UltimateSkill)<>4__this).Battle.Player).Hp == 0; <diff>5__2 = ((Unit)((UltimateSkill)<>4__this).Battle.Player).Hp; <>2__current = (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)<>4__this).Battle.Player, (Unit)(object)((UltimateSkill)<>4__this).Battle.Player, DamageInfo.HpLose((float)<diff>5__2, false), "Sacrifice", (GunType)0); <>1__state = 2; return true; case 2: <>1__state = -1; if (((UltimateSkill)<>4__this).Battle.BattleShouldEnd) { return false; } <>2__current = (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)<>4__this).Battle.Player, (IEnumerable<Unit>)((UltimateSkill)<>4__this).Battle.AllAliveEnemies, DamageInfo.HpLose((float)(<gohard>5__1 ? ((Unit)((UltimateSkill)<>4__this).Battle.Player).MaxHp : <diff>5__2), false), "Instant", (GunType)0); <>1__state = 3; return true; case 3: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <Actions>d__1 <Actions>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <Actions>d__ = this; } else { <Actions>d__ = new <Actions>d__1(0) { <>4__this = <>4__this }; } <Actions>d__.selector = <>3__selector; return <Actions>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } public ultmimab() { ((UltimateSkill)this).TargetType = (TargetType)2; } [IteratorStateMachine(typeof(<Actions>d__1))] protected override IEnumerable<BattleAction> Actions(UnitSelector selector) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <Actions>d__1(-2) { <>4__this = this, <>3__selector = selector }; } } public class lvalonmimaUltTemplate : UltimateSkillTemplate { public override IdContainer GetId() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit(lvalonmimaDefaultConfig.DefaultID((EntityDefinition)(object)this)); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)lvalonmimaLocalization.UltimateSkillsBatchLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return lvalonmimaImageLoader.LoadUltLoader((UltimateSkillTemplate)(object)this); } public override UltimateSkillConfig MakeConfig() { throw new NotImplementedException(); } public UltimateSkillConfig GetDefaulUltConfig() { return lvalonmimaDefaultConfig.DefaultUltConfig(); } } } namespace lvalonmima.StatusEffects { public sealed class seabilityplayedDef : lvalonmimaStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = lvalonmimaStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)2; defaultStatusEffectConfig.HasCount = true; return defaultStatusEffectConfig; } } [EntityLogic(typeof(seabilityplayedDef))] public sealed class seabilityplayed : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).Count = 0; ((StatusEffect)this).HandleOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsed, (GameEventHandler<CardUsingEventArgs>)OnCardUsed); } private void OnCardUsed(CardUsingEventArgs 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.Card.CardType != 4) { return; } int count = ((StatusEffect)this).Count; ((StatusEffect)this).Count = count + 1; if (((StatusEffect)this).Count == ((StatusEffect)this).Level) { ((StatusEffect)this).Highlight = true; } else { ((StatusEffect)this).Highlight = false; } if (((StatusEffect)this).Battle.Player.HasExhibit<exquesting>() && ((StatusEffect)this).Count == 1) { exquesting exhibit = ((StatusEffect)this).Battle.Player.GetExhibit<exquesting>(); cardquest25 cardquest = Library.CreateCard<cardquest25>(); ((StatusEffect)this).Highlight = false; seabilityplayed seabilityplayed2 = default(seabilityplayed); sedamagereceived sedamagereceived2 = default(sedamagereceived); sehealreceived sehealreceived2 = default(sehealreceived); seblockgained seblockgained2 = default(seblockgained); if (exhibit.PendingQuestProgress.TryGetValue(((GameEntity)cardquest).Id, out var value) && ((Unit)((StatusEffect)this).Battle.Player).TryGetStatusEffect<seabilityplayed>(ref seabilityplayed2) && ((StatusEffect)seabilityplayed2).Count > 0 && ((Unit)((StatusEffect)this).Battle.Player).TryGetStatusEffect<sedamagereceived>(ref sedamagereceived2) && ((StatusEffect)sedamagereceived2).Count > 0 && ((Unit)((StatusEffect)this).Battle.Player).TryGetStatusEffect<sehealreceived>(ref sehealreceived2) && ((StatusEffect)sehealreceived2).Count > 0 && ((Unit)((StatusEffect)this).Battle.Player).TryGetStatusEffect<seblockgained>(ref seblockgained2) && ((StatusEffect)seblockgained2).Count > 0 && ((StatusEffect)seblockgained2).Level > 0 && (exhibit.PendingQuestProgress[((GameEntity)cardquest).Id] = value + 1) >= ((Card)cardquest).Config.Value1) { exhibit.PendingQuestModifiers.TryGetValue(((GameEntity)cardquest).Id, out var value2); value2 = (exhibit.PendingQuestModifiers[((GameEntity)cardquest).Id] = value2 + 1); exhibit.FinalizeQuestByCardId(((GameEntity)cardquest).Id); exhibit.MarkQuestCompleted(((GameEntity)cardquest).Id); ShopModHandlers.RecordRewardedQuestCompletion(((GameEntity)cardquest).Id); } } } } public sealed class seabyssDef : lvalonmimaStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = lvalonmimaStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Keywords = (Keyword)549772591104L; defaultStatusEffectConfig.Type = (StatusEffectType)0; return defaultStatusEffectConfig; } } [EntityLogic(typeof(seabyssDef))] public sealed class seabyss : StatusEffect { [CompilerGenerated] private sealed class <>c__DisplayClass5_0 { public int level; public Func<Card, bool> <>9__0; internal bool <FirstGain>b__0(Card card) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I4 return (int)card.Zone == 2 && (card.IsPurified || level > 1) && !card.IsXCost; } } [CompilerGenerated] private sealed class <>c__DisplayClass6_0 { public int level; public Func<Card, bool> <>9__0; internal bool <StackGain>b__0(Card card) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I4 return (int)card.Zone == 2 && (card.IsPurified || level > 1) && !card.IsXCost; } } [CompilerGenerated] private sealed class <FirstGain>d__5 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private int level; public int <>3__level; public seabyss <>4__this; private <>c__DisplayClass5_0 <>8__1; private IEnumerator<Card> <>s__2; private Card <card>5__3; private IEnumerator<Card> <>s__4; private Card <card>5__5; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <FirstGain>d__5(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>s__2 = null; <card>5__3 = null; <>s__4 = null; <card>5__5 = null; <>1__state = -2; } private bool MoveNext() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass5_0(); <>8__1.level = level; ((StatusEffect)<>4__this).NotifyActivating(); <>2__current = (BattleAction)new GainManaAction(<>4__this.Mana * <>8__1.level); <>1__state = 1; return true; case 1: <>1__state = -1; <>s__2 = (from card in ((StatusEffect)<>4__this).Battle.EnumerateAllCards() where (int)card.Zone == 2 && (card.IsPurified || <>8__1.level > 1) && !card.IsXCost select card).GetEnumerator(); try { while (<>s__2.MoveNext()) { <card>5__3 = <>s__2.Current; <card>5__3.BaseCost = default(ManaGroup); <card>5__3 = null; } } finally { if (<>s__2 != null) { <>s__2.Dispose(); } } <>s__2 = null; <>s__4 = (from card in ((StatusEffect)<>4__this).Battle.EnumerateAllCards() where (int)card.Zone == 2 && !card.IsPurified && !card.IsXCost select card).GetEnumerator(); try { while (<>s__4.MoveNext()) { <card>5__5 = <>s__4.Current; ((GameEntity)<card>5__5).NotifyChanged(); <card>5__5.IsPurified = true; <card>5__5 = null; } } finally { if (<>s__4 != null) { <>s__4.Dispose(); } } <>s__4 = 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() { <FirstGain>d__5 <FirstGain>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <FirstGain>d__ = this; } else { <FirstGain>d__ = new <FirstGain>d__5(0) { <>4__this = <>4__this }; } <FirstGain>d__.level = <>3__level; return <FirstGain>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <OnTurnEnded>d__7 : 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 seabyss <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnTurnEnded>d__7(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: { <>1__state = -1; if (((StatusEffect)<>4__this).Level <= 1) { <>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)<>4__this, true, 0.1f); <>1__state = 1; return true; } int level = ((StatusEffect)<>4__this).Level; ((StatusEffect)<>4__this).Level = level - 1; 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() { <OnTurnEnded>d__7 <OnTurnEnded>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnTurnEnded>d__ = this; } else { <OnTurnEnded>d__ = new <OnTurnEnded>d__7(0) { <>4__this = <>4__this }; } <OnTurnEnded>d__.args = <>3__args; return <OnTurnEnded>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <OnTurnStarted>d__3 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private UnitEventArgs args; public UnitEventArgs <>3__args; public seabyss <>4__this; private IEnumerator<Card> <>s__1; private Card <card>5__2; private IEnumerator<Card> <>s__3; private Card <card>5__4; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnTurnStarted>d__3(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = null; <card>5__2 = null; <>s__3 = null; <card>5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; ((StatusEffect)<>4__this).NotifyActivating(); <>2__current = (BattleAction)new GainManaAction(<>4__this.Mana); <>1__state = 1; return true; case 1: <>1__state = -1; <>s__1 = (from card in ((StatusEffect)<>4__this).Battle.EnumerateAllCards() where (int)card.Zone == 2 && card.IsPurified && !card.IsXCost select card).GetEnumerator(); try { while (<>s__1.MoveNext()) { <card>5__2 = <>s__1.Current; <card>5__2.BaseCost = default(ManaGroup); <card>5__2 = null; } } finally { if (<>s__1 != null) { <>s__1.Dispose(); } } <>s__1 = null; <>s__3 = (from card in ((StatusEffect)<>4__this).Battle.EnumerateAllCards() where (int)card.Zone == 2 && !card.IsPurified && !card.IsXCost select card).GetEnumerator(); try { while (<>s__3.MoveNext()) { <card>5__4 = <>s__3.Current; ((GameEntity)<card>5__4).NotifyChanged(); <card>5__4.IsPurified = true; <card>5__4 = null; } } finally { if (<>s__3 != null) { <>s__3.Dispose(); } } <>s__3 = 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() { <OnTurnStarted>d__3 <OnTurnStarted>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnTurnStarted>d__ = this; } else { <OnTurnStarted>d__ = new <OnTurnStarted>d__3(0) { <>4__this = <>4__this }; } <OnTurnStarted>d__.args = <>3__args; return <OnTurnStarted>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <StackGain>d__6 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private int level; public int <>3__level; public seabyss <>4__this; private <>c__DisplayClass6_0 <>8__1; private IEnumerator<Card> <>s__2; private Card <card>5__3; private IEnumerator<Card> <>s__4; private Card <card>5__5; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <StackGain>d__6(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>s__2 = null; <card>5__3 = null; <>s__4 = null; <card>5__5 = null; <>1__state = -2; } private bool MoveNext() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass6_0(); <>8__1.level = level; ((StatusEffect)<>4__this).NotifyActivating(); <>2__current = (BattleAction)new GainManaAction(<>4__this.Mana * <>8__1.level); <>1__state = 1; return true; case 1: <>1__state = -1; <>s__2 = (from card in ((StatusEffect)<>4__this).Battle.EnumerateAllCards() where (int)card.Zone == 2 && (card.IsPurified || <>8__1.level > 1) && !card.IsXCost select card).GetEnumerator(); try { while (<>s__2.MoveNext()) { <card>5__3 = <>s__2.Current; <card>5__3.BaseCost = default(ManaGroup); <card>5__3 = null; } } finally { if (<>s__2 != null) { <>s__2.Dispose(); } } <>s__2 = null; <>s__4 = (from card in ((StatusEffect)<>4__this).Battle.EnumerateAllCards() where (int)card.Zone == 2 && !card.IsPurified && !card.IsXCost select card).GetEnumerator(); try { while (<>s__4.MoveNext()) { <card>5__5 = <>s__4.Current; ((GameEntity)<card>5__5).NotifyChanged(); <card>5__5.IsPurified = true; <card>5__5 = null; } } finally { if (<>s__4 != null) { <>s__4.Dispose(); } } <>s__4 = 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() { <StackGain>d__6 <StackGain>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <StackGain>d__ = this; } else { <StackGain>d__ = new <StackGain>d__6(0) { <>4__this = <>4__this }; } <StackGain>d__.level = <>3__level; return <StackGain>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } public ManaGroup Mana { get { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) ManaGroup result = default(ManaGroup); ((ManaGroup)(ref result)).Colorless = 2; return result; } } protected override void OnAdded(Unit unit) { ((StatusEffect)this).Highlight = true; ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnEnded, (EventSequencedReactor<UnitEventArgs>)OnTurnEnded); ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnTurnStarted); ((GameEntity)this).React(FirstGain(((StatusEffect)this).Level)); } [IteratorStateMachine(typeof(<OnTurnStarted>d__3))] private IEnumerable<BattleAction> OnTurnStarted(UnitEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnTurnStarted>d__3(-2) { <>4__this = this, <>3__args = args }; } public override bool Stack(StatusEffect other) { bool flag = ((StatusEffect)this).Stack(other); if (flag) { ((GameEntity)this).React(StackGain(other.Level)); } return flag; } [IteratorStateMachine(typeof(<FirstGain>d__5))] public IEnumerable<BattleAction> FirstGain(int level = 1) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <FirstGain>d__5(-2) { <>4__this = this, <>3__level = level }; } [IteratorStateMachine(typeof(<StackGain>d__6))] public IEnumerable<BattleAction> StackGain(int level = 1) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <StackGain>d__6(-2) { <>4__this = this, <>3__level = level }; } [IteratorStateMachine(typeof(<OnTurnEnded>d__7))] private IEnumerable<BattleAction> OnTurnEnded(UnitEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnTurnEnded>d__7(-2) { <>4__this = this, <>3__args = args }; } } public sealed class seabyssdwellerDef : lvalonmimaStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = lvalonmimaStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)2; return defaultStatusEffectConfig; } } [EntityLogic(typeof(seabyssdwellerDef))] public sealed class seabyssdweller : StatusEffect { [CompilerGenerated] private sealed class <OnCardExiled>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private CardEventArgs args; public CardEventArgs <>3__args; public seabyssdweller <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnCardExiled>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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (BattleAction)new MoveCardAction(args.Card, (CardZone)3); <>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() { <OnCardExiled>d__1 <OnCardExiled>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnCardExiled>d__ = this; } else { <OnCardExiled>d__ = new <OnCardExiled>d__1(0) { <>4__this = <>4__this }; } <OnCardExiled>d__.args = <>3__args; return <OnCardExiled>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <OnTurnEnded>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 seabyssdweller <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnTurnEnded>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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: { <>1__state = -1; if (((StatusEffect)<>4__this).Level <= 1) { <>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)<>4__this, true, 0.1f); <>1__state = 1; return true; } int level = ((StatusEffect)<>4__this).Level; ((StatusEffect)<>4__this).Level = level - 1; 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() { <OnTurnEnded>d__2 <OnTurnEnded>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnTurnEnded>d__ = this; } else { <OnTurnEnded>d__ = new <OnTurnEnded>d__2(0) { <>4__this = <>4__this }; } <OnTurnEnded>d__.args = <>3__args; return <OnTurnEnded>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnEnded, (EventSequencedReactor<UnitEventArgs>)OnTurnEnded); ((StatusEffect)this).ReactOwnerEvent<CardEventArgs>(((StatusEffect)this).Battle.CardExiled, (EventSequencedReactor<CardEventArgs>)OnCardExiled); } [IteratorStateMachine(typeof(<OnCardExiled>d__1))] private IEnumerable<BattleAction> OnCardExiled(CardEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnCardExiled>d__1(-2) { <>4__this = this, <>3__args = args }; } [IteratorStateMachine(typeof(<OnTurnEnded>d__2))] private IEnumerable<BattleAction> OnTurnEnded(UnitEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnTurnEnded>d__2(-2) { <>4__this = this, <>3__args = args }; } } public sealed class seaccumulateDef : lvalonmimaStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = lvalonmimaStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)2; defaultStatusEffectConfig.Keywords = (Keyword)17729624997888L; defaultStatusEffectConfig.HasCount = true; defaultStatusEffectConfig.CountStackType = (StackType)0; defaultStatusEffectConfig.RelativeEffects = new List<string> { "seunder" }; return defaultStatusEffectConfig; } } [EntityLogic(typeof(seaccumulateDef))] public sealed class seaccumulate : sehl25 { [CompilerGenerated] private sealed class <OnBattleEnding>d__3 : 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 seaccumulate <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnBattleEnding>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_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; ((StatusEffect)<>4__this).NotifyActivating(); <>2__current = (BattleAction)new GainMoneyAction(((StatusEffect)<>4__this).Count, (SpecialSourceType)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() { <OnBattleEnding>d__3 <OnBattleEnding>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnBattleEnding>d__ = this; } else { <OnBattleEnding>d__ = new <OnBattleEnding>d__3(0) { <>4__this = <>4__this }; } <OnBattleEnding>d__.args = <>3__args; return <OnBattleEnding>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } [CompilerGenerated] private sealed class <OnTurnStarted>d__4 : 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 seaccumulate <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnTurnStarted>d__4(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; ((StatusEffect)<>4__this).NotifyActivating(); <>2__current = (BattleAction)new GainManaAction(<>4__this.Mana); <>1__state = 1; return true; case 1: <>1__state = -1; if (!BepinexPlugin.u25) { <>2__current = (BattleAction)new LockRandomTurnManaAction(((StatusEffect)<>4__this).Level); <>1__state = 2; return true; } goto IL_00f7; case 2: { <>1__state = -1; ManaGroup battleMana = ((StatusEffect)<>4__this).Battle.BattleMana; if (((ManaGroup)(ref battleMana)).HasTrivial) { <>2__current = (BattleAction)(object)ConvertManaAction.Purify(((StatusEffect)<>4__this).Battle.BattleMana, ((StatusEffect)<>4__this).Level); <>1__state = 3; return true; } goto IL_00f7; } case 3: <>1__state = -1; goto IL_00f7; case 4: { <>1__state = -1; return false; } IL_00f7: <>2__current = (BattleAction)new AddCardsToDrawZoneAction((IEnumerable<Card>)Library.CreateCards<cardpurediamond>(((StatusEffect)<>4__this).Level, false), (DrawZoneTarget)2, (AddCardsType)0); <>1__state = 4; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnTurnStarted>d__4 <OnTurnStarted>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnTurnStarted>d__ = this; } else { <OnTurnStarted>d__ = new <OnTurnStarted>d__4(0) { <>4__this = <>4__this }; } <OnTurnStarted>d__.args = <>3__args; return <OnTurnStarted>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } public ManaGroup Mana { get { //IL_002a: 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_003f: 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_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) if (((StatusEffect)this).Owner == null) { return ManaGroup.Whites(1) + ManaGroup.Greens(1); } return ManaGroup.Whites(((StatusEffect)this).Level) + ManaGroup.Greens(((StatusEffect)this).Level); } } protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnTurnStarted); ((StatusEffect)this).ReactOwnerEvent<GameEventArgs>(((StatusEffect)this).Battle.BattleEnding, (EventSequencedReactor<GameEventArgs>)OnBattleEnding); } [IteratorStateMachine(typeof(<OnBattleEnding>d__3))] private IEnumerable<BattleAction> OnBattleEnding(GameEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnBattleEnding>d__3(-2) { <>4__this = this, <>3__args = args }; } [IteratorStateMachine(typeof(<OnTurnStarted>d__4))] private IEnumerable<BattleAction> OnTurnStarted(UnitEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnTurnStarted>d__4(-2) { <>4__this = this, <>3__args = args }; } } public sealed class sealgophobiaDef : lvalonmimaStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = lvalonmimaStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)2; return defaultStatusEffectConfig; } } [EntityLogic(typeof(sealgophobiaDef))] public sealed class sealgophobia : StatusEffect { [CompilerGenerated] private sealed class <OnDmgReceived>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 sealgophobia <>4__this; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnDmgReceived>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_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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: { <>1__state = -1; DamageInfo damageInfo = args.DamageInfo; if (((DamageInfo)(ref damageInfo)).Amount > 0f && ((GameEventArgs)args).ActionSource != <>4__this) { ((StatusEffect)<>4__this).NotifyActivating(); <>2__current = (BattleAction)new DamageAction((Unit)(object)((StatusEffect)<>4__this).Battle.Player, (IEnumerable<Unit>)new List<Unit> { (Unit)(object)((StatusEffect)<>4__this).Battle.Player }, DamageInfo.HpLose((float)((StatusEffect)<>4__this).Level, false), "Instant", (GunType)0); <>1__state = 1; return true; } break; } case 1: <>1__state = -1; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnDmgReceived>d__1 <OnDmgReceived>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnDmgReceived>d__ = this; } else { <OnDmgReceived>d__ = new <OnDmgReceived>d__1(0) { <>4__this = <>4__this }; } <OnDmgReceived>d__.args = <>3__args; return <OnDmgReceived>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<DamageEventArgs>(((Unit)((StatusEffect)this).Battle.Player).DamageReceived, (EventSequencedReactor<DamageEventArgs>)OnDmgReceived); } [IteratorStateMachine(typeof(<OnDmgReceived>d__1))] private IEnumerable<BattleAction> OnDmgReceived(DamageEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnDmgReceived>d__1(-2) { <>4__this = this, <>3__args = args }; } } public sealed class sealgophobia2Def : lvalonmimaStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = lvalonmimaStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)2; defaultStatusEffectConfig.RelativeEffects = new List<string> { "Poison" }; return defaultStatusEffectConfig; } } [EntityLogic(typeof(sealgophobia2Def))] public sealed class sealgophobia2 : StatusEffect { [CompilerGenerated] private sealed class <OnDmgReceived>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 sealgophobia2 <>4__this; private IEnumerator<EnemyUnit> <>s__1; private Unit <unit>5__2; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnDmgReceived>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; <unit>5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) try { int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -3; <unit>5__2 = null; } else { <>1__state = -1; DamageInfo damageInfo = args.DamageInfo; if (!(((DamageInfo)(ref damageInfo)).Amount > 0f)) { goto IL_012d; } ((StatusEffect)<>4__this).NotifyActivating(); <>s__1 = ((StatusEffect)<>4__this).Battle.AllAliveEnemies.GetEnumerator(); <>1__state = -3; } while (<>s__1.MoveNext()) { <unit>5__2 = (Unit)(object)<>s__1.Current; if (!<unit>5__2.IsAlive || ((StatusEffect)<>4__this).Battle.BattleShouldEnd) { continue; } <>2__current = (BattleAction)(object)new ApplyStatusEffectAction<Poison>(<unit>5__2, (int?)((StatusEffect)<>4__this).Level, (int?)0, (int?)0, (int?)0, 0f, true); <>1__state = 1; return true; } <>m__Finally1(); <>s__1 = null; goto IL_012d; IL_012d: 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() { <OnDmgReceived>d__1 <OnDmgReceived>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnDmgReceived>d__ = this; } else { <OnDmgReceived>d__ = new <OnDmgReceived>d__1(0) { <>4__this = <>4__this }; } <OnDmgReceived>d__.args = <>3__args; return <OnDmgReceived>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<DamageEventArgs>(((Unit)((StatusEffect)this).Battle.Player).DamageReceived, (EventSequencedReactor<DamageEventArgs>)OnDmgReceived); } [IteratorStateMachine(typeof(<OnDmgReceived>d__1))] private IEnumerable<BattleAction> OnDmgReceived(DamageEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnDmgReceived>d__1(-2) { <>4__this = this, <>3__args = args }; } } public sealed class seattackplayedDef : lvalonmimaStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = lvalonmimaStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)2; defaultStatusEffectConfig.HasCount = true; return defaultStatusEffectConfig; } } [EntityLogic(typeof(seattackplayedDef))] public sealed class seattackplayed : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).Count = 0; ((StatusEffect)this).HandleOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsed, (GameEventHandler<CardUsingEventArgs>)OnCardUsed); } private void OnCardUsed(CardUsingEventArgs 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.Card.CardType == 1) { int count = ((StatusEffect)this).Count; ((StatusEffect)this).Count = count + 1; if (((StatusEffect)this).Count == ((StatusEffect)this).Level) { ((StatusEffect)this).Highlight = true; } else { ((StatusEffect)this).Highlight = false; } } } } public sealed class seAyaDef : lvalonmimaStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = lvalonmimaStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)0; return defaultStatusEffectConfig; } } [EntityLogic(typeof(seAyaDef))] public sealed class seAya : StatusEffect { [CompilerGenerated] private sealed class <OnTurnEnded>d__3 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable { private int <>1__state; private BattleAction <>2__current; private int <>l__initialThreadId; private UnitEventArgs args; public UnitEventArgs <>3__args; public seAya <>4__this; private bool <hasShield>5__1; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnTurnEnded>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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <hasShield>5__1 = false; if (((StatusEffect)<>4__this).Owner.Shield > 0) { <hasShield>5__1 = true; ((StatusEffect)<>4__this).NotifyActivating(); <>2__current = (BattleAction)new LoseBlockShieldAction(((StatusEffect)<>4__this).Owner, 0, ((StatusEffect)<>4__this).Owner.Shield, false); <>1__state = 1; return true; } goto IL_0099; case 1: <>1__state = -1; goto IL_0099; case 2: { <>1__state = -1; break; } IL_0099: if (((StatusEffect)<>4__this).Battle.DiscardZone.Count((Card c) => (int)c.CardType == 7) > 0) { if (!<hasShield>5__1) { ((StatusEffect)<>4__this).NotifyActivating(); } <>2__current = (BattleAction)new CastBlockShieldAction(((StatusEffect)<>4__this).Owner, new ShieldInfo(((StatusEffect)<>4__this).Battle.DiscardZone.Count((Card c) => (int)c.CardType == 7), (BlockShieldType)2), true); <>1__state = 2; return true; } break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator() { <OnTurnEnded>d__3 <OnTurnEnded>d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; <OnTurnEnded>d__ = this; } else { <OnTurnEnded>d__ = new <OnTurnEnded>d__3(0) { <>4__this = <>4__this }; } <OnTurnEnded>d__.args = <>3__args; return <OnTurnEnded>d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable<BattleAction>)this).GetEnumerator(); } } public override bool ForceNotShowDownText => true; protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnEnded, (EventSequencedReactor<UnitEventArgs>)OnTurnEnded); } [IteratorStateMachine(typeof(<OnTurnEnded>d__3))] private IEnumerable<BattleAction> OnTurnEnded(UnitEventArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <OnTurnEnded>d__3(-2) { <>4__this = this, <>3__args = args }; } } public sealed class sebackgroundDef : lvalonmimaStatusEffectTemplate { public override StatusEffectConfig MakeConfig() { StatusEffectConfig defaultStatusEffectConfig = lvalonmimaStatusEffectTemplate.GetDefaultStatusEffectConfig(); defaultStatusEffectConfig.Type = (StatusEffectType)2; defaultStatusEffectConfig.RelativeEffects = new List<string> { "Poison" }; return defaultStatusEffectConfig; } } [EntityLogic(typeof(sebackgroundDef))] public sealed class sebackground : StatusEffect { [CompilerGenerated] private sealed class <OnDamageDealt>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 sebackground <>4__this; private DamageInfo <damageInfo>5__1; BattleAction IEnumerator<BattleAction>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <OnDamageDealt>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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Invalid comparison between Unknown and I4 switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (((StatusEffect)<>4__this).Battle.AllAliveEnemies.Count() > 0 && args.Target.IsAlive && ((GameEventArgs)args).ActionSource != <>4__this && args.Target.HasStatusEffect<Poison>()) { <damageInfo>5__1 = args.DamageInfo; if ((int)((DamageInfo)(ref <damageInfo>5__1)).DamageType == 2) { ((StatusEffect)<>4__this).NotifyActivating(); <>2__current = (BattleAction)(object)DamageAction.LoseLife((Unit)(object)((StatusEffect)<>4__this).Battle.Player, ((StatusEffect)<>4__this).Level, "Instant"); <>1__state = 1; return true; } } break; case 1: <>1__state = -1; <>2__current = (BattleAction)new DamageAction((Unit)(object)((StatusEffect)<>4__this).Battle.Player, args.Target, DamageInfo.Attack((float)((StatusEffect)<>4__this).Level, false), "Poison", (GunType)0); <>1__state = 2; return true; 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();