Decompiled source of UtsuhoCharacter v1.5.2
Utsuho character mod.dll
Decompiled a day ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AddWatermark; using 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.Randoms; using LBoL.Core.StatusEffects; using LBoL.Core.Units; using LBoL.EntityLib.Cards.Neutral.NoColor; using LBoL.EntityLib.Exhibits; using LBoL.EntityLib.StatusEffects.ExtraTurn; using LBoL.Presentation; using LBoL.Presentation.UI; using LBoL.Presentation.UI.Panels; using LBoL.Presentation.UI.Widgets; using LBoLEntitySideloader; using LBoLEntitySideloader.Attributes; using LBoLEntitySideloader.Entities; using LBoLEntitySideloader.Resource; using LBoLEntitySideloader.Utils; using UnityEngine; using UnityEngine.Experimental.Rendering; using UnityEngine.UI; using Utsuho_character_mod.CardsB; using Utsuho_character_mod.CardsU; using Utsuho_character_mod.Status; using Utsuho_character_mod.Util; [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("Utsuho character mod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("Utsuho character mod")] [assembly: AssemblyTitle("Utsuho character mod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace PullFix.Patches { public static class Helpers { public static CodeMatcher LeaveJumpFix(this CodeMatcher matcher) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown matcher.Start(); while (matcher.IsValid) { matcher.MatchEndForward((CodeMatch[])(object)new CodeMatch[1] { CodeMatch.op_Implicit(OpCodes.Leave) }).Advance(1); if (matcher.IsInvalid) { break; } matcher.InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[1] { new CodeInstruction(OpCodes.Nop, (object)null) }); } return matcher; } } } namespace Utsuho_character_mod { [BepInPlugin("zosit.lbol.test.utsuho", "Character Mod", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInProcess("LBoL.exe")] public class BepinexPlugin : BaseUnityPlugin { private static readonly Harmony harmony = PInfo.harmony; 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("zosit.lbol.test.utsuho", ""); internal static AssetBundle utsuhoAB; 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(); } AssetManager.Load(); Func<Sprite> func = () => ResourceLoader.LoadSprite("BossIcon.png", (IResourceSource)(object)directorySource, (Rect?)null, 1, (Vector2?)null); EnemyUnitTemplate.AddBossNodeIcon("Utsuho", func, (Assembly)null); IntentionTemplate.CreateIntention<VentIntentionDef.VentIntention>(); IntentionTemplate.CreateIntention<PullIntentionDef.PullIntention>(); } private void OnDestroy() { if (harmony != null) { harmony.UnpatchSelf(); } AssetBundle obj = utsuhoAB; if (obj != null) { obj.Unload(false); } } } public static class PInfo { public const string GUID = "zosit.lbol.test.utsuho"; public const string Name = "Character Mod"; public const string version = "1.0.0"; public static readonly Harmony harmony = new Harmony("zosit.lbol.test.utsuho"); } public sealed class UtsuhoUltRDef : UltimateSkillTemplate { public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("UtsuhoUltR"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)UsefulFunctions.LocalizationUlt(BepinexPlugin.directorySource); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Nuclear.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override UltimateSkillConfig MakeConfig() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown return new UltimateSkillConfig("", 10, 100, 100, 2, (UsRepeatableType)1, 30, 30, 0, (Keyword)256, (IReadOnlyList<string>)new List<string> { "HeatStatus" }, (IReadOnlyList<string>)new List<string>()); } } [EntityLogic(typeof(UtsuhoUltRDef))] public sealed class UtsuhoUltR : UltimateSkill { public UtsuhoUltR() { ((UltimateSkill)this).TargetType = (TargetType)1; ((UltimateSkill)this).GunName = "Simple1"; } protected override IEnumerable<BattleAction> Actions(UnitSelector selector) { yield return (BattleAction)(object)PerformAction.Spell((Unit)(object)((UltimateSkill)this).Battle.Player, "UtsuhoUltR"); yield return (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)this).Owner, (Unit)(object)selector.GetEnemy(((UltimateSkill)this).Battle), ((UltimateSkill)this).Damage, ((UltimateSkill)this).GunName, (GunType)0); if (!((UltimateSkill)this).Battle.BattleShouldEnd) { yield return (BattleAction)(object)new ApplyStatusEffectAction<HeatStatus>((Unit)(object)((UltimateSkill)this).Battle.Player, (int?)((UltimateSkill)this).Value1, (int?)null, (int?)null, (int?)null, 0f, true); } } private IEnumerator DeactivateDeez(GameObject go) { yield return (object)new WaitForSeconds(5f); go.SetActive(false); } } public sealed class UtsuhoUltBDef : UltimateSkillTemplate { public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("UtsuhoUltB"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)UsefulFunctions.LocalizationUlt(BepinexPlugin.directorySource); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Nuclear.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override UltimateSkillConfig MakeConfig() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown return new UltimateSkillConfig("", 10, 100, 100, 2, (UsRepeatableType)1, 30, 0, 0, (Keyword)256, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "DarkMatter" }); } } [EntityLogic(typeof(UtsuhoUltBDef))] public sealed class UtsuhoUltB : UltimateSkill { public UtsuhoUltB() { ((UltimateSkill)this).TargetType = (TargetType)2; ((UltimateSkill)this).GunName = "Simple1"; } protected override IEnumerable<BattleAction> Actions(UnitSelector selector) { yield return (BattleAction)(object)PerformAction.Spell((Unit)(object)((UltimateSkill)this).Battle.Player, "UtsuhoUltB"); yield return (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)this).Owner, (IEnumerable<Unit>)((UltimateSkill)this).Battle.EnemyGroup.Alives, ((UltimateSkill)this).Damage, ((UltimateSkill)this).GunName, (GunType)0); if (!((UltimateSkill)this).Battle.BattleShouldEnd) { Card[] cards = (Card[])(object)new Card[1] { Library.CreateCard("DarkMatter") }; yield return (BattleAction)new AddCardsToDrawZoneAction((IEnumerable<Card>)cards, (DrawZoneTarget)2, (AddCardsType)0); yield return (BattleAction)new AddCardsToHandAction((Card[])(object)new Card[1] { Library.CreateCard("DarkMatter") }); yield return (BattleAction)new AddCardsToDiscardAction((Card[])(object)new Card[1] { Library.CreateCard("DarkMatter") }); } } private IEnumerator DeactivateDeez(GameObject go) { yield return (object)new WaitForSeconds(5f); go.SetActive(false); } } public sealed class UtsuhoGroupDef : EnemyGroupTemplate { public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("Utsuho"); } public override EnemyGroupConfig MakeConfig() { //IL_0041: 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_0052: Expected O, but got Unknown IReadOnlyList<string> readOnlyList = new List<string> { "Utsuho" }; Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(-4f, 0.5f); return new EnemyGroupConfig("", false, (IReadOnlyList<string>)new List<string>(), "UtsuhoBoss", "Single", readOnlyList, (EnemyType)3, 1f, true, val, "", ""); } } public sealed class UtsuhoBossDef : EnemyUnitTemplate { [EntityLogic(typeof(UtsuhoBossDef))] public sealed class Utsuho : EnemyUnit { public enum MoveType { Reactor, Aggregate, Bunker, Flare, Night, Wait, Giant } private int _spellTimes = 0; private MoveType Next; private string SpellCardName => ((EnemyUnit)this).GetSpellCardName((int?)5, 6); protected override void OnEnterBattle(BattleController battle) { ((Unit)this).ReactBattleEvent<CardEventArgs>(battle.CardDrawn, (Func<CardEventArgs, IEnumerable<BattleAction>>)new Func<GameEventArgs, IEnumerable<BattleAction>>(OnCardTouched)); ((Unit)this).ReactBattleEvent<CardUsingEventArgs>(battle.CardUsed, (Func<CardUsingEventArgs, IEnumerable<BattleAction>>)new Func<GameEventArgs, IEnumerable<BattleAction>>(OnCardTouched)); ((Unit)this).ReactBattleEvent<CardsEventArgs>(battle.CardsAddedToHand, (Func<CardsEventArgs, IEnumerable<BattleAction>>)new Func<GameEventArgs, IEnumerable<BattleAction>>(OnCardTouched)); ((Unit)this).ReactBattleEvent<CardEventArgs>(((Unit)this).Battle.CardExiled, (Func<CardEventArgs, IEnumerable<BattleAction>>)new Func<GameEventArgs, IEnumerable<BattleAction>>(OnCardTouched)); } private IEnumerable<BattleAction> OnCardTouched(GameEventArgs arg) { if (Next == MoveType.Giant) { ((EnemyUnit)this).UpdateTurnMoves(); } yield break; } private IEnumerable<BattleAction> OkuuDefend() { yield return (BattleAction)new EnemyMoveAction((EnemyUnit)(object)this, ((EnemyUnit)this).GetMove(2), true); yield return (BattleAction)new CastBlockShieldAction((Unit)(object)this, ((EnemyUnit)this).Defend, ((EnemyUnit)this).Defend, (BlockShieldType)1, true); } protected override IEnumerable<IEnemyMove> GetTurnMoves() { switch (Next) { case MoveType.Reactor: { GameDifficulty difficulty = ((GameEntity)this).GameRun.Difficulty; if ((int)difficulty == 3) { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new ApplyStatusEffectAction(typeof(ChargingStatus), (Unit)(object)this, (int?)((EnemyUnit)this).Count1, (int?)null, (int?)null, (int?)null, 0f, true))); ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new ApplyStatusEffectAction(typeof(HeatStatus), (Unit)(object)this, (int?)((EnemyUnit)this).Count1, (int?)null, (int?)null, (int?)null, 0f, true))); Next = MoveType.Aggregate; yield return ((EnemyUnit)this).AttackMove(((EnemyUnit)this).GetMove(1), ((EnemyUnit)this).Gun1, ((EnemyUnit)this).Damage1, 1, false, "Instant", true); yield return ((EnemyUnit)this).DefendMove((Unit)(object)this, (string)null, ((EnemyUnit)this).Damage1, 0, 0, false, (PerformAction)null); } else { yield return ((EnemyUnit)this).PositiveMove(((EnemyUnit)this).GetMove(0), typeof(ChargingStatus), (int?)((EnemyUnit)this).Count1, (int?)null, true, (PerformAction)null); } break; } case MoveType.Aggregate: yield return ((EnemyUnit)this).AttackMove(((EnemyUnit)this).GetMove(1), ((EnemyUnit)this).Gun1, ((EnemyUnit)this).Damage1, 1, false, "Instant", true); yield return ((EnemyUnit)this).DefendMove((Unit)(object)this, (string)null, ((EnemyUnit)this).Damage1, 0, 0, false, (PerformAction)null); break; case MoveType.Bunker: yield return (IEnemyMove)new SimpleEnemyMove(Intention.Defend().WithMoveName(((EnemyUnit)this).GetMove(2)), OkuuDefend()); break; case MoveType.Flare: { yield return ((EnemyUnit)this).AttackMove(((EnemyUnit)this).GetMove(3), ((EnemyUnit)this).Gun2, ((StatusEffect)((Unit)this).GetStatusEffect<HeatStatus>()).Level, 1, false, "Instant", true); yield return (IEnemyMove)new SimpleEnemyMove(IntentionTemplate.CreateIntention(typeof(VentIntentionDef.VentIntention)), ((EnemyUnit)this).PositiveActions((string)null, typeof(HeatStatus), (int?)(-((StatusEffect)((Unit)this).GetStatusEffect<HeatStatus>()).Level), (int?)0, 0f, (PerformAction)null)); Type typeFromHandle = typeof(Weak); Type typeFromHandle2 = typeof(Vulnerable); yield return ((EnemyUnit)this).NegativeMove((string)null, typeFromHandle, (int?)null, (int?)((EnemyUnit)this).Power, false, false, (PerformAction)null); yield return ((EnemyUnit)this).NegativeMove((string)null, typeFromHandle2, (int?)null, (int?)((EnemyUnit)this).Power, false, false, (PerformAction)null); break; } case MoveType.Night: yield return ((EnemyUnit)this).AttackMove(((EnemyUnit)this).GetMove(4), ((EnemyUnit)this).Gun3, ((EnemyUnit)this).Damage3, 1, false, "Instant", true); yield return ((EnemyUnit)this).AddCardMove((string)null, typeof(DarkMatterDef.DarkMatter), ((EnemyUnit)this).Count2, (AddCardZone)2, (PerformAction)null, false); break; case MoveType.Wait: yield return (IEnemyMove)new SimpleEnemyMove(Intention.CountDown(1)); break; case MoveType.Giant: { Card[] array = CollectionsExtensions.SampleManyOrAll<Card>((IEnumerable<Card>)((Unit)this).Battle.HandZone, 999, ((GameEntity)this).GameRun.BattleRng); int mass = 0; Card[] array2 = array; foreach (Card card in array2) { if (card is UtsuhoCard uCard && uCard.isMass) { mass++; } } yield return (IEnemyMove)new SimpleEnemyMove(Intention.SpellCard(SpellCardName, (int?)(((EnemyUnit)this).Damage4 + mass * 5 + _spellTimes * 4), true), ((EnemyUnit)this).AttackActions(SpellCardName, ((EnemyUnit)this).Gun4, ((EnemyUnit)this).Damage4 + mass * 5, 1, true, "Instant")); yield return (IEnemyMove)new SimpleEnemyMove(IntentionTemplate.CreateIntention(typeof(PullIntentionDef.PullIntention))); break; } default: throw new ArgumentOutOfRangeException(); } } protected override void UpdateMoveCounters() { MoveType next; switch (Next) { case MoveType.Reactor: next = MoveType.Aggregate; break; case MoveType.Aggregate: next = MoveType.Bunker; break; case MoveType.Bunker: next = MoveType.Flare; break; case MoveType.Flare: next = MoveType.Night; break; case MoveType.Night: next = MoveType.Wait; break; case MoveType.Wait: next = MoveType.Giant; break; case MoveType.Giant: _spellTimes++; next = MoveType.Aggregate; break; default: throw new ArgumentOutOfRangeException(); } Next = next; } } public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("Utsuho"); } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override EnemyUnitConfig MakeConfig() { //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Expected O, but got Unknown return new EnemyUnitConfig("", true, false, (IReadOnlyList<ManaColor>)new List<ManaColor> { (ManaColor)4, (ManaColor)3 }, 10, "", "#cc0000", (EnemyType)3, true, (float?)null, (int?)null, 240, (int?)6, (int?)null, (int?)12, (int?)10, (int?)1, (int?)15, (int?)4, (int?)5, (int?)250, (int?)8, (int?)null, (int?)14, (int?)10, (int?)1, (int?)18, (int?)5, (int?)6, (int?)260, (int?)10, (int?)null, (int?)16, (int?)15, (int?)2, (int?)20, (int?)6, (int?)7, new MinMax(100, 100), new MinMax(100, 100), (IReadOnlyList<string>)new List<string> { "Sunny1" }, (IReadOnlyList<string>)new List<string> { "火激光" }, (IReadOnlyList<string>)new List<string> { "病气A" }, (IReadOnlyList<string>)new List<string> { "陨星锤" }); } } public sealed class VentIntentionDef : IntentionTemplate { [EntityLogic(typeof(VentIntentionDef))] public sealed class VentIntention : Intention { public override IntentionType Type => (IntentionType)0; } public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("VentIntention"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override IntentionImages LoadSprites() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown return new IntentionImages { main = ResourceLoader.LoadSprite("VentIntention.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null) }; } } public sealed class PullIntentionDef : IntentionTemplate { [EntityLogic(typeof(PullIntentionDef))] public sealed class PullIntention : Intention { public override IntentionType Type => (IntentionType)0; } public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("PullIntention"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override IntentionImages LoadSprites() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown return new IntentionImages { main = ResourceLoader.LoadSprite("PullIntention.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null) }; } } public sealed class UtsuhoPlayerDef : PlayerUnitTemplate { [EntityLogic(typeof(UtsuhoPlayerDef))] public sealed class Utsuho : PlayerUnit { } public static string name = "Utsuho"; public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("Utsuho"); } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override PlayerImages LoadPlayerImages() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_0171: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) PlayerImages val = new PlayerImages(); Sprite imprint = ResourceLoader.LoadSprite("CardImprint.png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 1, (Vector2?)null); Sprite collectionIconLoading = ResourceLoader.LoadSprite("CollectionIcon.png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 1, (Vector2?)null); Sprite selectionCircleIconLoading = ResourceLoader.LoadSprite("SelectionCircleIcon.png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 1, (Vector2?)null); Sprite avatarLoading = ResourceLoader.LoadSprite("Avatar.png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 1, (Vector2?)null); UniTask<Sprite> value = ResourceLoader.LoadSpriteAsync("Stand.png", BepinexPlugin.directorySource, 100, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://"); UniTask<Sprite> value2 = ResourceLoader.LoadSpriteAsync("WinStand.png", BepinexPlugin.directorySource, 100, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://"); UniTask<Sprite> value3 = ResourceLoader.LoadSpriteAsync("DefeatedStand.png", BepinexPlugin.directorySource, 100, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://"); UniTask<Sprite> value4 = ResourceLoader.LoadSpriteAsync("PerfectWinIcon.png", BepinexPlugin.directorySource, 100, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://"); UniTask<Sprite> value5 = ResourceLoader.LoadSpriteAsync("WinIcon.png", BepinexPlugin.directorySource, 100, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://"); UniTask<Sprite> value6 = ResourceLoader.LoadSpriteAsync("DefeatedIcon.png", BepinexPlugin.directorySource, 100, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://"); val.SetStartPanelStand((UniTask<Sprite>?)value, (Func<Sprite>)null); val.SetDeckStand((UniTask<Sprite>?)value, (Func<Sprite>)null); val.SetWinStand((UniTask<Sprite>?)value2, (Func<Sprite>)null); val.SetDefeatedStand((UniTask<Sprite>?)value3, (Func<Sprite>)null); val.SetPerfectWinIcon((UniTask<Sprite>?)value4, (Func<Sprite>)null); val.SetWinIcon((UniTask<Sprite>?)value5, (Func<Sprite>)null); val.SetDefeatedIcon((UniTask<Sprite>?)value6, (Func<Sprite>)null); val.SetCollectionIcon((Func<Sprite>)(() => collectionIconLoading)); val.SetSelectionCircleIcon((Func<Sprite>)(() => selectionCircleIconLoading)); val.SetInRunAvatarPic((Func<Sprite>)(() => avatarLoading)); val.SetCardImprint((Func<Sprite>)(() => imprint)); return val; } public override PlayerUnitConfig MakeConfig() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Expected O, but got Unknown PlayerUnitConfig val = ObjectExtensions.Copy<PlayerUnitConfig>(PlayerUnitConfig.FromId("Reimu")); int? num = 0; ManaGroup val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Red = 2; ((ManaGroup)(ref val2)).Black = 2; return new PlayerUnitConfig("", 6, 0, num, "", "#e58c27", true, 80, val2, 10, 0, "UtsuhoUltR", "UtsuhoUltB", "ControlRod", "BlackSun", (IReadOnlyList<string>)new List<string> { "Shoot", "Shoot", "Boundary", "Boundary", "FireBurst", "FireBurst", "Gridlock", "Gridlock", "Gridlock", "HellGeyser" }, (IReadOnlyList<string>)new List<string> { "Shoot", "Shoot", "Boundary", "Boundary", "InverseBeam", "InverseBeam", "BlowAway", "BlowAway", "BlowAway", "ShootingStar" }, 2, 3); } public override EikiSummonInfo AssociateEikiSummon() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown return new EikiSummonInfo(typeof(UtsuhoBossDef.Utsuho), (string)null); } } public sealed class UtsuhoModelDef : UnitModelTemplate { public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return ((EntityDefinition)new UtsuhoPlayerDef()).UniqueId; } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)UsefulFunctions.LocalizationModel(BepinexPlugin.directorySource); } public override ModelOption LoadModelOptions() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return new ModelOption(ResourceLoader.LoadSpriteAsync("Utsuho_Sprite.png", BepinexPlugin.directorySource, 56, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://")); } public override UniTask<Sprite> LoadSpellSprite() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSpriteAsync("SpellCard.png", BepinexPlugin.directorySource, 336, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://"); } public override UnitModelConfig MakeConfig() { //IL_002c: 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) //IL_006c: 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) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_009b: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) UnitModelConfig val = ObjectExtensions.Copy<UnitModelConfig>(UnitModelConfig.FromName("Reimu")); val.Flip = true; val.Type = 0; val.Offset = new Vector2(0f, 0.04f); val.SpellPosition = new Vector2(-1000f, 300f); val.SpellScale = 0.7f; val.SpellColor = (IReadOnlyList<Color32>)(object)new Color32[4] { new Color32((byte)104, (byte)15, (byte)5, byte.MaxValue), new Color32(byte.MaxValue, (byte)46, (byte)72, byte.MaxValue), new Color32((byte)74, (byte)0, (byte)1, (byte)150), new Color32(byte.MaxValue, (byte)46, (byte)72, byte.MaxValue) }; return val; } } internal class WatermarkWrapper { [MethodImpl(MethodImplOptions.NoInlining)] internal static void ActivateWatermark() { API.ActivateWatermark(); } } } namespace Utsuho_character_mod.Util { public static class AssetManager { public static ExtraAssets Assets { get; private set; } public static void Load() { Assets = new ExtraAssets(); Assets.massBorder = ResourceLoader.LoadSprite("MassBorder.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } } public class ExtraAssets { public Sprite massBorder; } [HarmonyPatch] public static class CardOverlay { private static readonly string OverlayName = "CardOverlayOkuu"; [HarmonyPatch(typeof(CardWidget), "LazySetCard")] [HarmonyPostfix] private static void AddOverlay(CardWidget __instance) { if (__instance.Card != null) { Transform val = ((Transform)__instance.root).Find(OverlayName); if ((Object)null == (Object)(object)val) { GameObject val2 = Object.Instantiate<GameObject>(((Component)__instance.cardMainBg).gameObject, ((Component)__instance.cardMainBg).transform.parent, true); ((Object)val2).name = OverlayName; val = val2.transform; val.SetSiblingIndex(((Component)__instance.cardSubBg).transform.GetSiblingIndex() + 1); RawImage component = val2.GetComponent<RawImage>(); component.texture = (Texture)(object)AssetManager.Assets.massBorder.texture; } ((Component)val).gameObject.SetActive(__instance.Card is UtsuhoCard utsuhoCard && utsuhoCard.isMass); } } } public abstract class UsefulFunctions { public static Card RandomUtsuho(Card[] cards) { foreach (Card val in cards) { if (val is UtsuhoCard utsuhoCard && utsuhoCard.isMass) { return val; } } return CollectionsExtensions.Sample<Card>((IEnumerable<Card>)cards, ((GameEntity)cards[0]).GameRun.BattleRng); } public static Card RandomUtsuho(IReadOnlyList<Card> cards) { foreach (Card card in cards) { if (card is UtsuhoCard utsuhoCard && utsuhoCard.isMass) { return card; } } return CollectionsExtensions.Sample<Card>((IEnumerable<Card>)cards, ((GameEntity)cards[0]).GameRun.BattleRng); } public static IEnumerable<BattleAction> RandomCheck(Card card, BattleController battle) { UtsuhoCard uCard = card as UtsuhoCard; if (!(uCard?.isMass ?? false)) { yield break; } int totalIterations = 1; if (((Unit)battle.Player).HasStatusEffect<MassDriverStatus>()) { MassDriverStatus status = ((Unit)battle.Player).GetStatusEffect<MassDriverStatus>(); for (int j = 0; j < totalIterations; j++) { yield return (BattleAction)new DamageAction((Unit)(object)battle.Player, (IEnumerable<Unit>)battle.EnemyGroup.Alives, DamageInfo.Reaction((float)((StatusEffect)status).Level, false), "厄运之轮", (GunType)0); } } for (int i = 0; i < totalIterations; i++) { foreach (BattleAction item in uCard.OnPull()) { yield return item; } } } public static GlobalLocalization LocalizationCard(DirectorySource dirsorc) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)dirsorc); val.LocalizationFiles.AddLocaleFile((Locale)0, "CardEn.yaml"); val.LocalizationFiles.AddLocaleFile((Locale)10, "CardKo.yaml"); val.LocalizationFiles.AddLocaleFile((Locale)3, "CardJa.yaml"); return val; } public static GlobalLocalization LocalizationStatus(DirectorySource dirsorc) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)dirsorc); val.LocalizationFiles.AddLocaleFile((Locale)0, "StatusEffectEn.yaml"); val.LocalizationFiles.AddLocaleFile((Locale)10, "StatusEffectKo.yaml"); val.LocalizationFiles.AddLocaleFile((Locale)3, "StatusEffectJa.yaml"); return val; } public static GlobalLocalization LocalizationExhibit(DirectorySource dirsorc) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)dirsorc); val.LocalizationFiles.AddLocaleFile((Locale)0, "ExhibitEn.yaml"); val.LocalizationFiles.AddLocaleFile((Locale)10, "ExhibitKo.yaml"); val.LocalizationFiles.AddLocaleFile((Locale)3, "ExhibitJa.yaml"); return val; } public static GlobalLocalization LocalizationUlt(DirectorySource dirsorc) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)dirsorc); val.LocalizationFiles.AddLocaleFile((Locale)0, "UltimateSkillEn.yaml"); val.LocalizationFiles.AddLocaleFile((Locale)10, "UltimateSkillKo.yaml"); val.LocalizationFiles.AddLocaleFile((Locale)3, "UltimateSkillJa.yaml"); return val; } public static GlobalLocalization LocalizationPlayer(DirectorySource dirsorc) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)dirsorc); val.LocalizationFiles.AddLocaleFile((Locale)0, "PlayerUnitEn.yaml"); val.LocalizationFiles.AddLocaleFile((Locale)10, "PlayerUnitKo.yaml"); val.LocalizationFiles.AddLocaleFile((Locale)3, "PlayerUnitJa.yaml"); return val; } public static GlobalLocalization LocalizationModel(DirectorySource dirsorc) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)dirsorc); val.LocalizationFiles.AddLocaleFile((Locale)0, "UnitModelEn.yaml"); val.LocalizationFiles.AddLocaleFile((Locale)10, "UnitModelKo.yaml"); val.LocalizationFiles.AddLocaleFile((Locale)3, "UnitModelJa.yaml"); return val; } } public abstract class UtsuhoCard : Card { public virtual bool isMass { get; set; } public UtsuhoCard() { isMass = false; } public virtual IEnumerable<BattleAction> OnPull() { yield break; } } } namespace Utsuho_character_mod.Status { public sealed class CautionEffect : StatusEffectTemplate { public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("CautionStatus"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } [DontOverwrite] public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("CautionSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, false, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)48, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } [EntityLogic(typeof(CautionEffect))] public sealed class CautionStatus : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarting, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarting); } private IEnumerable<BattleAction> OnOwnerTurnStarting(UnitEventArgs args) { if (!((StatusEffect)this).Battle.BattleShouldEnd) { yield return (BattleAction)(object)new ApplyStatusEffectAction<Burst>(((StatusEffect)this).Owner, (int?)1, (int?)null, (int?)null, (int?)null, 0f, true); yield return (BattleAction)(object)new ApplyStatusEffectAction<TimeIsLimited>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)1, (int?)null, (int?)null, (int?)null, 0f, true); } } } public sealed class ChargingEffect : StatusEffectTemplate { public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("ChargingStatus"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } [DontOverwrite] public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("ReactorStartSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown return new StatusEffectConfig(0, "", 11, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string> { "HeatStatus" }, "Default", "Default", "Default"); } } [EntityLogic(typeof(ChargingEffect))] public sealed class ChargingStatus : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnEnding, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnEnding); } private IEnumerable<BattleAction> OnOwnerTurnEnding(UnitEventArgs args) { if (!((StatusEffect)this).Battle.BattleShouldEnd) { ((StatusEffect)this).NotifyActivating(); int level = ((StatusEffect)this).Level; yield return (BattleAction)(object)new ApplyStatusEffectAction<HeatStatus>(((StatusEffect)this).Owner, (int?)level, (int?)null, (int?)null, (int?)null, 0f, true); } } } public sealed class FixedStarEffect : StatusEffectTemplate { public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("FixedStarStatus"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } [DontOverwrite] public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("ReactorStartSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } [EntityLogic(typeof(FixedStarEffect))] public sealed class FixedStarStatus : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnEnding, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnEnding); ((StatusEffect)this).HandleOwnerEvent<CardEventArgs>(((StatusEffect)this).Battle.CardDrawn, (GameEventHandler<CardEventArgs>)OnDrawCard); } private IEnumerable<BattleAction> OnOwnerTurnEnding(UnitEventArgs args) { if (((StatusEffect)this).Battle.BattleShouldEnd) { yield break; } ((StatusEffect)this).NotifyActivating(); IReadOnlyList<Card> selectedCards = null; List<Card> list = ((StatusEffect)this).Battle.HandZone.ToList(); if (!CollectionsExtensions.Empty<Card>((IReadOnlyCollection<Card>)list)) { SelectHandInteraction interaction = new SelectHandInteraction(0, ((StatusEffect)this).Level, (IEnumerable<Card>)list) { Source = (GameEntity)(object)this }; yield return (BattleAction)new InteractionAction((Interaction)(object)interaction, false); selectedCards = interaction.SelectedCards.ToList(); } if (selectedCards == null) { yield break; } foreach (Card card in selectedCards) { card.IsTempRetain = true; } } private void OnDrawCard(CardEventArgs args) { if (args.Card is DarkMatterDef.DarkMatter) { args.Card.IsAutoExile = true; } } } public sealed class GravityWellEffect : StatusEffectTemplate { public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("GravityWellStatus"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } [DontOverwrite] public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("GravityWellSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } [EntityLogic(typeof(GravityWellEffect))] public sealed class GravityWellStatus : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnEnded, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnEnded); } private IEnumerable<BattleAction> OnOwnerTurnEnded(UnitEventArgs args) { if (!((StatusEffect)this).Battle.BattleShouldEnd) { ((StatusEffect)this).NotifyActivating(); yield return (BattleAction)new CastBlockShieldAction(((StatusEffect)this).Owner, ((StatusEffect)this).Owner, 0, ((StatusEffect)this).Level, (BlockShieldType)2, false); yield return (BattleAction)new AddCardsToHandAction((Card[])(object)new Card[1] { Library.CreateCard("DarkMatter") }); } } } public sealed class EnergyEffect : StatusEffectTemplate { public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("HeatStatus"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } [DontOverwrite] public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("EnergyStatus.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } [EntityLogic(typeof(EnergyEffect))] public sealed class HeatStatus : StatusEffect { private string GunName => "GuihuoExplodeR2"; public int HeatDamage => ((StatusEffect)this).Level / 5; protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnEnding, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnEnding); } private IEnumerable<BattleAction> OnOwnerTurnEnding(UnitEventArgs args) { int level = ((StatusEffect)this).Level; if (!((StatusEffect)this).Battle.BattleShouldEnd && level >= 5) { if (((StatusEffect)this).Owner == ((StatusEffect)this).Battle.Player) { yield return (BattleAction)new DamageAction(((StatusEffect)this).Owner, (IEnumerable<Unit>)((StatusEffect)this).Battle.EnemyGroup.Alives, DamageInfo.Reaction((float)(level / 5), false), GunName, (GunType)0); } else { yield return (BattleAction)new DamageAction(((StatusEffect)this).Owner, (Unit)(object)((StatusEffect)this).Battle.Player, DamageInfo.Reaction((float)(level / 5), false), GunName, (GunType)0); } } if (!((StatusEffect)this).Battle.BattleShouldEnd) { yield return (BattleAction)(object)new ApplyStatusEffectAction<HeatStatus>(((StatusEffect)this).Owner, (int?)(-(level / 5)), (int?)null, (int?)null, (int?)null, 0f, true); } } } public sealed class HeatVisorEffect : StatusEffectTemplate { public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("HeatVisorStatus"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } [DontOverwrite] public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("EnergyStatus.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } [EntityLogic(typeof(HeatVisorEffect))] public sealed class HeatVisorStatus : StatusEffect { private int ActiveTimes { get; set; } protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarting, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarting); ((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(((Unit)((StatusEffect)this).Battle.Player).DamageTaking, (GameEventHandler<DamageEventArgs>)OnPlayerDamageTaking); ((StatusEffect)this).ReactOwnerEvent<DamageEventArgs>(((Unit)((StatusEffect)this).Battle.Player).DamageReceived, (EventSequencedReactor<DamageEventArgs>)OnPlayerDamageReceived); } private IEnumerable<BattleAction> OnOwnerTurnStarting(UnitEventArgs args) { yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f); } private void OnPlayerDamageTaking(DamageEventArgs args) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) DamageInfo damageInfo = args.DamageInfo; int num = MathExtensions.RoundToInt(((DamageInfo)(ref damageInfo)).Damage); if (num >= 1 && ActiveTimes < ((StatusEffect)this).Level) { ((StatusEffect)this).NotifyActivating(); int activeTimes = ActiveTimes + 1; ActiveTimes = activeTimes; args.DamageInfo = ((DamageInfo)(ref damageInfo)).ReduceActualDamageBy(num); ((GameEventArgs)args).AddModifier((GameEntity)(object)this); } } private IEnumerable<BattleAction> OnPlayerDamageReceived(DamageEventArgs args) { ((StatusEffect)this).Level = ((StatusEffect)this).Level - ActiveTimes; ActiveTimes = 0; if (((StatusEffect)this).Level <= 0) { yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f); } } } public sealed class HotSpringEffect : StatusEffectTemplate { public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("HotSpringStatus"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } [DontOverwrite] public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("ChargingStatus.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string> { "RadiationStatus" }, "Default", "Default", "Default"); } } [EntityLogic(typeof(HotSpringEffect))] public sealed class HotSpringStatus : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted); } private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args) { if (!((StatusEffect)this).Battle.BattleShouldEnd) { ((StatusEffect)this).NotifyActivating(); int level = ((StatusEffect)this).GetSeLevel<HotSpringStatus>(); yield return (BattleAction)(object)new ApplyStatusEffectAction<RadiationStatus>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)level, (int?)null, (int?)null, (int?)null, 0f, true); yield return (BattleAction)(object)new ApplyStatusEffectAction<HotSpringStatus>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)1, (int?)null, (int?)null, (int?)null, 0f, true); } } } public sealed class MaintainReactionEffect : StatusEffectTemplate { public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("MaintainReactionStatus"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } [DontOverwrite] public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("ChargingStatus.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string> { "HeatStatus" }, "Default", "Default", "Default"); } } [EntityLogic(typeof(MaintainReactionEffect))] public sealed class MaintainReactionStatus : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<CardEventArgs>(((StatusEffect)this).Battle.CardRetaining, (EventSequencedReactor<CardEventArgs>)OnCardRetaining); } private IEnumerable<BattleAction> OnCardRetaining(CardEventArgs args) { if (!((StatusEffect)this).Battle.BattleShouldEnd) { ((StatusEffect)this).NotifyActivating(); int level = ((StatusEffect)this).GetSeLevel<MaintainReactionStatus>(); yield return (BattleAction)(object)new ApplyStatusEffectAction<HeatStatus>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)level, (int?)null, (int?)null, (int?)null, 0f, true); } } } public sealed class MassDriverEffect : StatusEffectTemplate { public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("MassDriverStatus"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } [DontOverwrite] public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("ChargingStatus.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } [EntityLogic(typeof(MassDriverEffect))] public sealed class MassDriverStatus : StatusEffect { } public sealed class PointDeviceEffect : StatusEffectTemplate { public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("PointDeviceStatus"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } [DontOverwrite] public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("ChargingStatus.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, false, (StackType?)(StackType)0, true, (StackType?)(StackType)0, (DurationDecreaseTiming)48, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } [EntityLogic(typeof(PointDeviceEffect))] public sealed class PointDeviceStatus : StatusEffect { protected override void OnAdded(Unit unit) { CardToFree(((StatusEffect)this).Battle.EnumerateAllCards()); ((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed); ((StatusEffect)this).HandleOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToDiscard, (GameEventHandler<CardsEventArgs>)OnAddCard); ((StatusEffect)this).HandleOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToHand, (GameEventHandler<CardsEventArgs>)OnAddCard); ((StatusEffect)this).HandleOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToExile, (GameEventHandler<CardsEventArgs>)OnAddCard); ((StatusEffect)this).HandleOwnerEvent<CardsAddingToDrawZoneEventArgs>(((StatusEffect)this).Battle.CardsAddedToDrawZone, (GameEventHandler<CardsAddingToDrawZoneEventArgs>)OnAddCardToDraw); } private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args) { if (((GameEntity)args.Card).Id == "DarkMatter") { yield return (BattleAction)new MoveCardAction(args.Card, (CardZone)3); yield return (BattleAction)new DrawCardAction(); } } private void OnAddCardToDraw(CardsAddingToDrawZoneEventArgs args) { CardToFree(args.Cards); } private void OnAddCard(CardsEventArgs args) { CardToFree(args.Cards); } private void CardToFree(IEnumerable<Card> cards) { foreach (Card card in cards) { if (((GameEntity)card).Id == "DarkMatter") { card.FreeCost = true; } } } protected override void OnRemoved(Unit unit) { foreach (Card item in ((StatusEffect)this).Battle.EnumerateAllCards()) { if (((GameEntity)item).Id == "DarkMatter") { item.FreeCost = false; } } } } public sealed class RadiationEffect : StatusEffectTemplate { public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("RadiationStatus"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } [DontOverwrite] public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("ChargingStatus.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } [EntityLogic(typeof(RadiationEffect))] public sealed class RadiationStatus : StatusEffect { private string GunName => "GuihuoExplodeG2"; protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnEnding, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnEnded); } private IEnumerable<BattleAction> OnOwnerTurnEnded(UnitEventArgs args) { if (!((StatusEffect)this).Battle.BattleShouldEnd) { ((StatusEffect)this).NotifyActivating(); ((StatusEffect)this).GetSeLevel<RadiationStatus>(); yield return (BattleAction)new DamageAction(((StatusEffect)this).Owner, (IEnumerable<Unit>)((StatusEffect)this).Battle.EnemyGroup.Alives, DamageInfo.Reaction((float)((StatusEffect)this).Level, false), GunName, (GunType)0); } } } public sealed class ResonancePlusEffect : StatusEffectTemplate { public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("ResonancePlusStatus"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } [DontOverwrite] public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("ChargingStatus.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } [EntityLogic(typeof(ResonancePlusEffect))] public sealed class ResonancePlusStatus : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<CardEventArgs>(((StatusEffect)this).Battle.CardExiled, (EventSequencedReactor<CardEventArgs>)OnCardExiled); } private IEnumerable<BattleAction> OnCardExiled(CardEventArgs args) { if (!((StatusEffect)this).Battle.BattleShouldEnd && (int)((GameEventArgs)args).Cause != 3 && ((GameEntity)args.Card).BaseName != "Resonance") { <>n__0(); yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<ResonanceDef.Resonance>(1, true), (AddCardsType)0); } } [CompilerGenerated] [DebuggerHidden] private void <>n__0() { ((StatusEffect)this).NotifyActivating(); } } public sealed class ResonanceEffect : StatusEffectTemplate { public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("ResonanceStatus"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } [DontOverwrite] public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("ChargingStatus.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } [EntityLogic(typeof(ResonanceEffect))] public sealed class ResonanceStatus : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<CardEventArgs>(((StatusEffect)this).Battle.CardExiled, (EventSequencedReactor<CardEventArgs>)OnCardExiled); } private IEnumerable<BattleAction> OnCardExiled(CardEventArgs args) { if (!((StatusEffect)this).Battle.BattleShouldEnd && (int)((GameEventArgs)args).Cause != 3 && ((GameEntity)args.Card).BaseName != "Resonance") { <>n__0(); yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<ResonanceDef.Resonance>(1, false), (AddCardsType)0); } } [CompilerGenerated] [DebuggerHidden] private void <>n__0() { ((StatusEffect)this).NotifyActivating(); } } public sealed class SunSpotEffect : StatusEffectTemplate { public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("SunSpotStatus"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } [DontOverwrite] public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("EnergyStatus.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string> { "HeatStatus" }, "Default", "Default", "Default"); } } [EntityLogic(typeof(SunSpotEffect))] public sealed class SunSpotStatus : StatusEffect { private string GunName { get { if (((StatusEffect)this).Level <= 50) { return "无差别起火"; } return "无差别起火B"; } } protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed); } private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args) { if (!(((GameEntity)args.Card).Id == "DarkMatter")) { yield break; } int dyLevel = ((StatusEffect)this).GetSeLevel<SunSpotStatus>(); for (int i = 0; i < dyLevel; i++) { int level = ((StatusEffect)this).GetSeLevel<HeatStatus>(); ((StatusEffect)this).NotifyActivating(); if (level >= 5) { yield return (BattleAction)new DamageAction(((StatusEffect)this).Owner, (IEnumerable<Unit>)((StatusEffect)this).Battle.EnemyGroup.Alives, DamageInfo.Reaction((float)(level / 5), false), GunName, (GunType)0); } if (((StatusEffect)this).Battle.BattleShouldEnd) { break; } } } } public sealed class TokamakEffect : StatusEffectTemplate { public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("TokamakStatus"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } [DontOverwrite] public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("ReactorStartSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string> { "HeatStatus" }, "Default", "Default", "Default"); } } [EntityLogic(typeof(TokamakEffect))] public sealed class TokamakStatus : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted); } private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args) { if (!((StatusEffect)this).Battle.BattleShouldEnd) { ((StatusEffect)this).NotifyActivating(); yield return (BattleAction)(object)new ApplyStatusEffectAction<HeatStatus>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)((StatusEffect)this).Level, (int?)null, (int?)null, (int?)null, 0f, true); yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f); } } } public sealed class TurboFuelEffect : StatusEffectTemplate { public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("TurboFuelStatus"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } [DontOverwrite] public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("ChargingStatus.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)48, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)65536, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } [EntityLogic(typeof(TurboFuelEffect))] public sealed class TurboFuelStatus : StatusEffect { public ManaGroup manatype { get { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) ManaGroup result = default(ManaGroup); ((ManaGroup)(ref result)).Philosophy = 1; return result; } } protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted); } private IEnumerator ResetTrigger() { yield return (object)new WaitForSecondsRealtime(1f); ((GameEntity)this).NotifyChanged(); } private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args) { yield return (BattleAction)new DrawManyCardAction(((StatusEffect)this).Level); ManaGroup val = default(ManaGroup); ((ManaGroup)(ref val)).Philosophy = ((StatusEffect)this).Level; yield return (BattleAction)new GainManaAction(val); Card card = UsefulFunctions.RandomUtsuho(((StatusEffect)this).Battle.HandZone); foreach (BattleAction item in UsefulFunctions.RandomCheck(card, ((StatusEffect)this).Battle)) { yield return item; } card.NotifyActivating(); ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(ResetTrigger()); yield return (BattleAction)new ExileCardAction(card); } } public sealed class WasteNotEffect : StatusEffectTemplate { public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("WasteNotStatus"); } [DontOverwrite] public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } [DontOverwrite] public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("WasteNotSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string> { "HeatStatus" }, "Default", "Default", "Default"); } } [EntityLogic(typeof(WasteNotEffect))] public sealed class WasteNotStatus : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<CardEventArgs>(((StatusEffect)this).Battle.CardExiled, (EventSequencedReactor<CardEventArgs>)OnCardExiled); } private IEnumerable<BattleAction> OnCardExiled(CardEventArgs args) { if (!((StatusEffect)this).Battle.BattleShouldEnd) { <>n__0(); int level = ((StatusEffect)this).GetSeLevel<WasteNotStatus>(); yield return (BattleAction)(object)new ApplyStatusEffectAction<HeatStatus>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)level, (int?)null, (int?)null, (int?)null, 0f, true); } } [CompilerGenerated] [DebuggerHidden] private void <>n__0() { ((StatusEffect)this).NotifyActivating(); } } } namespace Utsuho_character_mod.Exhibits { public sealed class BlackSunDefinition : ExhibitTemplate { [EntityLogic(typeof(BlackSunDefinition))] public sealed class BlackSun : ShiningExhibit { private string GunName => "无差别起火"; protected override void OnEnterBattle() { ((Exhibit)this).ReactBattleEvent<GameEventArgs>(((Exhibit)this).Battle.Reshuffling, (EventSequencedReactor<GameEventArgs>)Reshuffling); } private IEnumerable<BattleAction> Reshuffling(GameEventArgs args) { List<Card> cards = ((Exhibit)this).Battle.DiscardZone.ToList(); int total = cards.Count; yield return (BattleAction)new DamageAction((Unit)(object)((Exhibit)this).Owner, (IEnumerable<Unit>)((Exhibit)this).Battle.EnemyGroup.Alives, DamageInfo.Reaction((float)(((Exhibit)this).Value1 * total), false), GunName, (GunType)0); } } public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("BlackSun"); } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } 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 = "Resources."; 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_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown int? num = 1; ManaGroup value = default(ManaGroup); ((ManaGroup)(ref value)).Black = 1; return new ExhibitConfig(0, "", 10, false, false, false, false, (AppearanceType)3, "Utsuho", (ExhibitLosableType)1, (Rarity)3, num, (int?)null, (int?)null, (ManaGroup?)value, (ManaColor?)null, (ManaColor?)(ManaColor)3, 1, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "DarkMatter" }); } } public sealed class ControlRodDefinition : ExhibitTemplate { [EntityLogic(typeof(ControlRodDefinition))] public sealed class ControlRod : ShiningExhibit { private bool triggered; protected override void OnEnterBattle() { ((Exhibit)this).ReactBattleEvent<CardUsingEventArgs>(((Exhibit)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed); } private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args) { ((Exhibit)this).NotifyActivating(); triggered = true; ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(ResetTrigger()); yield return (BattleAction)(object)new ApplyStatusEffectAction<HeatStatus>((Unit)(object)((Exhibit)this).Battle.Player, (int?)((Exhibit)this).Value1, (int?)null, (int?)null, (int?)null, 0f, true); } private IEnumerator ResetTrigger() { yield return (object)new WaitForSeconds(1.5f); triggered = false; ((GameEntity)this).NotifyChanged(); } } 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("ControlRod"); } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } 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 = "Resources."; 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_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown int? num = 1; ManaGroup value = default(ManaGroup); ((ManaGroup)(ref value)).Red = 1; return new ExhibitConfig(0, "", 10, false, false, false, false, (AppearanceType)3, "Utsuho", (ExhibitLosableType)1, (Rarity)3, num, (int?)null, (int?)null, (ManaGroup?)value, (ManaColor?)null, (ManaColor?)(ManaColor)4, 1, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string> { "HeatStatus" }, (IReadOnlyList<string>)new List<string>()); } } } namespace Utsuho_character_mod.CardsW { public sealed class CautionDef : CardTemplate { [EntityLogic(typeof(CautionDef))] public sealed class Caution : Card { protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) yield return ((Card)this).BuffAction<CautionStatus>(((Card)this).Value1, 0, 0, 0, 0.2f); } } 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("Caution"); } public override CardImages LoadCardImages() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown CardImages val = new CardImages(BepinexPlugin.embeddedSource); val.AutoLoad((CardTemplate)(object)this, ".png", "", false); return val; } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override CardConfig MakeConfig() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Expected O, but got Unknown string[][] array = new string[0][]; TargetType? val = (TargetType)0; List<ManaColor> obj = new List<ManaColor> { (ManaColor)1 }; ManaGroup val2 = default(ManaGroup); ((ManaGroup)(ref val2)).White = 1; ((ManaGroup)(ref val2)).Any = 4; ManaGroup val3 = val2; val2 = default(ManaGroup); ((ManaGroup)(ref val2)).White = 1; ((ManaGroup)(ref val2)).Any = 2; return new CardConfig(13580, "", 10, true, array, "Simple1", "Simple1", 0, false, true, true, false, true, (Rarity)2, (CardType)4, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)1, (int?)1, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "CautionStatus", "Burst", "TimeIsLimited" }, (IReadOnlyList<string>)new List<string> { "CautionStatus", "Burst", "TimeIsLimited" }, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Utsuho", "", "", false, "Flippin'Loser", (IReadOnlyList<string>)new List<string>()); } } public sealed class DisintegrateDefinition : CardTemplate { [EntityLogic(typeof(DisintegrateDefinition))] public sealed class Disintegrate : Card { protected override void OnEnterBattle(BattleController battle) { ((Card)this).ReactBattleEvent<DieEventArgs>(((Card)this).Battle.EnemyDied, (EventSequencedReactor<DieEventArgs>)OnEnemyDied); } private IEnumerable<BattleAction> OnEnemyDied(DieEventArgs args) { if (args.DieSource != this || args.Unit.HasStatusEffect<Servant>()) { yield break; } List<Card> list = ((GameEntity)this).GameRun.BaseDeckWithOutUnremovable.ToList(); if (list.Count > 0) { SelectCardInteraction interaction = new SelectCardInteraction(1, 1, (IEnumerable<Card>)list, (SelectedCardHandling)0) { CanCancel = false, Description = "Select a card to remove." }; yield return (BattleAction)new InteractionAction((Interaction)(object)interaction, false); if (!((Interaction)interaction).IsCanceled) { ((GameEntity)this).GameRun.RemoveDeckCards((IEnumerable<Card>)(object)new Card[1] { interaction.SelectedCards[0] }, 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("Disintegrate"); } public override CardImages LoadCardImages() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown CardImages val = new CardImages(BepinexPlugin.embeddedSource); val.AutoLoad((CardTemplate)(object)this, ".png", "", false); return val; } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override CardConfig MakeConfig() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Expected O, but got Unknown string[][] array = new string[0][]; TargetType? val = (TargetType)1; List<ManaColor> obj = new List<ManaColor> { (ManaColor)1 }; ManaGroup val2 = default(ManaGroup); ((ManaGroup)(ref val2)).White = 1; ((ManaGroup)(ref val2)).Any = 2; return new CardConfig(13570, "", 10, true, array, "Simple1", "Simple1", 0, false, true, true, false, true, (Rarity)1, (CardType)1, val, (IReadOnlyList<ManaColor>)obj, false, val2, (ManaGroup?)null, (int?)null, (int?)18, (int?)24, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)65536, (Keyword)65792, false, (Keyword)274877906944L, (Keyword)274877906944L, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Utsuho", "", "", false, "", (IReadOnlyList<string>)new List<string>()); } } public sealed class ExpandingBrillianceDefinition : CardTemplate { [EntityLogic(typeof(ExpandingBrillianceDefinition))] public sealed class ExpandingBrilliance : Card { private Card oneTargetHand; public override Interaction Precondition() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown List<Card> list = ((Card)this).Battle.HandZone.Where((Card hand) => hand != this && hand.CanUpgradeAndPositive).ToList(); if (list.Count == 1) { oneTargetHand = list[0]; } if (list.Count <= 1) { return null; } return (Interaction)new SelectHandInteraction(1, 1, (IEnumerable<Card>)list); } protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) yield return (BattleAction)new DrawCardAction(); foreach (BattleAction item in ((Card)this).DebuffAction<TempFirepowerNegative>((IEnumerable<Unit>)selector.GetUnits(((Card)this).Battle), ((Card)this).Value1, 0, 0, 0, true, 0.2f)) { yield return item; } if (precondition != null) { Card card = ((SelectHandInteraction)precondition).SelectedCards[0]; if (card != null) { yield return (BattleAction)new UpgradeCardAction(card); } } else if (oneTargetHand != null) { yield return (BattleAction)new UpgradeCardAction(oneTargetHand); oneTargetHand = 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("ExpandingBrilliance"); } public override CardImages LoadCardImages() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown CardImages val = new CardImages(BepinexPlugin.embeddedSource); val.AutoLoad((CardTemplate)(object)this, ".png", "", false); return val; } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override CardConfig MakeConfig() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown string[][] array = new string[0][]; TargetType? val = (TargetType)2; List<ManaColor> obj = new List<ManaColor> { (ManaColor)1 }; ManaGroup val2 = default(ManaGroup); ((ManaGroup)(ref val2)).White = 1; ManaGroup val3 = val2; val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 1; return new CardConfig(13560, "", 10, true, array, "Simple1", "Simple1", 0, false, true, true, false, true, (Rarity)1, (CardType)3, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)3, (int?)5, (int?)1, (int?)1, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Utsuho", "", "", false, "", (IReadOnlyList<string>)new List<string>()); } } } namespace Utsuho_character_mod.CardsU { public sealed class BlueshiftDef : CardTemplate { [EntityLogic(typeof(BlueshiftDef))] public sealed class Blueshift : Card { private ManaGroup temp; private int KickCount = 0; protected override void OnEnterBattle(BattleController battle) { ((Card)this).ReactBattleEvent<ManaEventArgs>(((Card)this).Battle.ManaConsuming, (EventSequencedReactor<ManaEventArgs>)OnManaConsuming); ((Card)this).ReactBattleEvent<ManaEventArgs>(((Card)this).Battle.ManaConsumed, (EventSequencedReactor<ManaEventArgs>)OnManaConsumed); } private IEnumerable<BattleAction> OnManaConsuming(ManaEventArgs args) { //IL_0008: 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) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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_0029: Invalid comparison between Unknown and I4 //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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_004e: 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) BattleManaPanel panel = UiManager.GetPanel<BattleManaPanel>(); ManaGroup val = panel.PooledMana + args.Value; if (((GameEventArgs)args).ActionSource == this && (int)((GameEventArgs)args).Cause == 2 && ((ManaGroup)(ref val)).CanAfford(((Card)this).Mana)) { temp = val; ManaGroup pooledMana = panel.PooledMana; KickCount = ((ManaGroup)(ref pooledMana)).Amount / 2; } return null; } private IEnumerable<BattleAction> OnManaConsumed(ManaEventArgs args) { if (KickCount > 0) { if (!((Card)this).IsUpgraded) { yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<Blueshift>(KickCount, false), (AddCardsType)0); } else { yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<Blueshift>(KickCount, true), (AddCardsType)0); } KickCount = 0; BattleManaPanel panel = UiManager.GetPanel<BattleManaPanel>(); ManaGroup pool = panel.PooledMana; yield return (BattleAction)new ConsumeManaAction(pool); } } protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) yield return ((Card)this).DefenseAction(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 o