Decompiled source of UtsuhoCharacter v1.6.2
Utsuho character mod.dll
Decompiled a week ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.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.Configuration; 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.EnemyUnits.Character; 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 LBoL.Presentation.Units; using LBoLEntitySideloader; using LBoLEntitySideloader.Attributes; using LBoLEntitySideloader.CustomKeywords; using LBoLEntitySideloader.Entities; using LBoLEntitySideloader.Resource; using LBoLEntitySideloader.Utils; using UnityEngine; using UnityEngine.Experimental.Rendering; using UnityEngine.UI; using Utsuho_character_mod; using Utsuho_character_mod.CardsB; using Utsuho_character_mod.CardsOther; 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; } } [HarmonyPatch(typeof(UnitView))] internal class UnitView_SetTrigger_Patch { [HarmonyPatch("SetTrigger", new Type[] { typeof(string) })] private static bool Prefix(UnitView __instance, string triggerName) { if (__instance._modelName == "Utsuho") { if (triggerName == "hit" && (Object)(object)__instance.spriteRenderer.sprite != (Object)(object)UtsuhoModelDef.hurtSprite) { ((MonoBehaviour)__instance).StartCoroutine(AnimateHurt(__instance)); } if (triggerName == "spell" && (Object)(object)__instance.spriteRenderer.sprite != (Object)(object)UtsuhoModelDef.castSprite) { ((MonoBehaviour)__instance).StartCoroutine(AnimateCast(__instance)); } if (triggerName == "shoot1" && (Object)(object)__instance.spriteRenderer.sprite != (Object)(object)UtsuhoModelDef.castSprite) { ((MonoBehaviour)__instance).StartCoroutine(AnimateCast(__instance)); } if (triggerName == "shoot2" && (Object)(object)__instance.spriteRenderer.sprite != (Object)(object)UtsuhoModelDef.castSprite) { ((MonoBehaviour)__instance).StartCoroutine(AnimateCast(__instance)); } if (triggerName == "shoot3" && (Object)(object)__instance.spriteRenderer.sprite != (Object)(object)UtsuhoModelDef.castSprite) { ((MonoBehaviour)__instance).StartCoroutine(AnimateCast(__instance)); } if (triggerName == "shoot4" && (Object)(object)__instance.spriteRenderer.sprite != (Object)(object)UtsuhoModelDef.castSprite) { ((MonoBehaviour)__instance).StartCoroutine(AnimateCast(__instance)); } } return true; } private static IEnumerator AnimateHurt(UnitView __instance) { yield return __instance.spriteRenderer.sprite = UtsuhoModelDef.hurtSprite; yield return (object)new WaitForSeconds(1f); yield return __instance.spriteRenderer.sprite = UtsuhoModelDef.defaultSprite; } private static IEnumerator AnimateCast(UnitView __instance) { yield return __instance.spriteRenderer.sprite = UtsuhoModelDef.castSprite; yield return (object)new WaitForSeconds(1f); yield return __instance.spriteRenderer.sprite = UtsuhoModelDef.defaultSprite; } } [HarmonyPatch(typeof(Aya))] internal class OnEnterBattle_Patch { [HarmonyPatch("OnEnterBattle", new Type[] { typeof(BattleController) })] private static void Postfix(Aya __instance) { string id = ((GameEntity)((GameEntity)__instance).GameRun.Player).Id; if (id == "Utsuho") { __instance.SpecialReport = typeof(UtsuhoNewsDef.UtsuhoNews); } } } } 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; public static ConfigEntry<bool> act1BossConfig; private void Awake() { log = ((BaseUnityPlugin)this).Logger; act1BossConfig = ((BaseUnityPlugin)this).Config.Bind<bool>("Act1Boss", "Act1Boss", true, "Enables the Act 1 Utsuho boss for non-Utsuho characters."); 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 = "光辉宝枪"; } 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("UtsuhoUltB.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 = "黑天马的罪孽"; } 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 AddCardsToHandAction((Card[])(object)new Card[1] { Library.CreateCard("DarkMatter") }); yield return (BattleAction)new AddCardsToDrawZoneAction((IEnumerable<Card>)cards, (DrawZoneTarget)2, (AddCardsType)0); 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)); } public override void OnSpawn(EnemyUnit spawner) { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)(object)new ApplyStatusEffectAction<MirrorImage>((Unit)(object)this, (int?)null, (int?)null, (int?)null, (int?)null, 0f, true))); } 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 EnemyUnitConfig val = 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> { "陨星锤" }); if (!BepinexPlugin.act1BossConfig.Value) { val.IsPreludeOpponent = false; } return val; } } 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 static Sprite hurtSprite = ResourceLoader.LoadSprite("UtsuhoHurt_Sprite.png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 565, (Vector2?)null); public static Sprite castSprite = ResourceLoader.LoadSprite("UtsuhoCast_Sprite.png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 565, (Vector2?)null); public static Sprite defaultSprite = ResourceLoader.LoadSprite("Utsuho_Sprite.png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 565, (Vector2?)null); 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_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown return new ModelOption(ResourceLoader.LoadSpriteAsync("Utsuho_Sprite.png", BepinexPlugin.directorySource, 565, (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_0038: 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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) UnitModelConfig val = ObjectExtensions.Copy<UnitModelConfig>(UnitModelConfig.FromName("Reimu")); val.Name = "Utsuho"; 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 sealed class KickerEffect : 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("KickerStatus"); } [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 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(KickerEffect))] public sealed class KickerStatus : StatusEffect { } public sealed class MassEffect : 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("MassStatus"); } [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 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(MassEffect))] public sealed class MassStatus : StatusEffect { } public sealed class MultiKickerEffect : 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("MultiKickerStatus"); } [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 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(MultiKickerEffect))] public sealed class MultiKickerStatus : StatusEffect { } 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 virtual bool isKicker { get; set; } public virtual bool isMultiKicker { get; set; } public override void Initialize() { ((Card)this).Initialize(); if (isMass) { KeywordManager.AddCustomKeyword((Card)(object)this, UtsuhoKeyword.Mass); } else { isMass = false; } } public virtual IEnumerable<BattleAction> OnPull() { yield break; } } public static class UtsuhoKeyword { public static CardKeyword Mass = new CardKeyword("MassStatus", false) { descPos = (KwDescPos)1 }; } } 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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 CollapsingStarEffect : 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("CollapsingStarStatus"); } [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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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(CollapsingStarEffect))] public sealed class CollapsingStarStatus : StatusEffect { public ManaGroup Mana { get; set; } = ManaGroup.Philosophies(1); protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToDiscard, (EventSequencedReactor<CardsEventArgs>)OnAddCard); ((StatusEffect)this).ReactOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToHand, (EventSequencedReactor<CardsEventArgs>)OnAddCard); ((StatusEffect)this).ReactOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToExile, (EventSequencedReactor<CardsEventArgs>)OnAddCard); ((StatusEffect)this).ReactOwnerEvent<CardsAddingToDrawZoneEventArgs>(((StatusEffect)this).Battle.CardsAddedToDrawZone, (EventSequencedReactor<CardsAddingToDrawZoneEventArgs>)OnAddCardToDraw); ((StatusEffect)this).ReactOwnerEvent<StatusEffectApplyEventArgs>(((Unit)((StatusEffect)this).Battle.Player).StatusEffectAdding, (EventSequencedReactor<StatusEffectApplyEventArgs>)OnStatusApplied); } private IEnumerable<BattleAction> OnStatusApplied(StatusEffectApplyEventArgs args) { StatusEffect se = args.Effect; if (se is HeatStatus && args.Level.Value > 0) { int addCount2 = args.Level.Value / 10; addCount2 *= ((StatusEffect)this).Level; ManaGroup val = default(ManaGroup); ((ManaGroup)(ref val)).Philosophy = addCount2; ManaGroup mana = val; yield return (BattleAction)new GainManaAction(mana); } } private IEnumerable<BattleAction> OnAddCard(CardsEventArgs args) { Card[] cards = args.Cards; foreach (Card card in cards) { if (card is DarkMatterDef.DarkMatter) { yield return (BattleAction)new DrawManyCardAction(((StatusEffect)this).Level); } } } private IEnumerable<BattleAction> OnAddCardToDraw(CardsAddingToDrawZoneEventArgs args) { Card[] cards = args.Cards; foreach (Card card in cards) { if (card is DarkMatterDef.DarkMatter) { yield return (BattleAction)new DrawManyCardAction(((StatusEffect)this).Level); } } } } public sealed class DojoEffect : 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("DojoStatus"); } [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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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, false, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)48, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)8192, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } [EntityLogic(typeof(DojoEffect))] public sealed class DojoStatus : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).HandleOwnerEvent<CardEventArgs>(((StatusEffect)this).Battle.CardDrawn, (GameEventHandler<CardEventArgs>)OnCardDrawn); } private void OnCardDrawn(CardEventArgs args) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown if (!((StatusEffect)this).Battle.BattleShouldEnd && (int)((GameEventArgs)args).Cause != 12 && args.Card.CanUpgrade) { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new UpgradeCardAction(args.Card))); } } } 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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_0078: Unknown result type (might be due to invalid IL or missing references) DamageInfo damageInfo = args.DamageInfo; if (ActiveTimes < ((StatusEffect)this).Level && !((DamageInfo)(ref damageInfo)).IsGrazed && ((DamageInfo)(ref damageInfo)).Amount >= 10f) { ((StatusEffect)this).NotifyActivating(); int activeTimes = ActiveTimes + 1; ActiveTimes = activeTimes; ((DamageInfo)(ref damageInfo)).Damage = 0f; ((DamageInfo)(ref damageInfo)).DamageBlocked = 0f; ((DamageInfo)(ref damageInfo)).DamageShielded = 0f; args.DamageInfo = damageInfo; ((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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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, true, (StackType?)(StackType)0, (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(); yield return (BattleAction)(object)new ApplyStatusEffectAction<RadiationStatus>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)((StatusEffect)this).Count, (int?)null, (int?)null, (int?)null, 0f, true); ((StatusEffect)this).Count = ((StatusEffect)this).Count + ((StatusEffect)this).Level; } } } 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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> { "MassStatus" }, "Default", "Default", "Default"); } } [EntityLogic(typeof(MassDriverEffect))] public sealed class MassDriverStatus : StatusEffect { } public sealed class PlasmaBurnEffect : 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("PlasmaBurnStatus"); } [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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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(PlasmaBurnEffect))] public sealed class PlasmaBurnStatus : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted); } private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args) { if (!((StatusEffect)this).Battle.BattleShouldEnd) { ((StatusEffect)this).NotifyActivating(); yield return (BattleAction)(object)DamageAction.LoseLife(((StatusEffect)this).Owner, ((StatusEffect)this).Level, "Instant"); yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)((StatusEffect)this).Owner.GetStatusEffect<PlasmaBurnStatus>(), true, 0.1f); } } } 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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).Name != "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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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 Mana { get; set; } = ManaGroup.Philosophies(1); 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() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".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 => "Junko3C"; 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 Globa