Decompiled source of Dayuu Mod v1.1.6
DayuuMod.dll
Decompiled 3 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AddWatermark; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Logging; using Cysharp.Threading.Tasks; using DayuuMod.Cards; using DayuuMod.Stages; 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.Stations; using LBoL.Core.StatusEffects; using LBoL.Core.Units; using LBoL.EntityLib.Adventures.Stage2; using LBoL.EntityLib.Stages.NormalStages; using LBoL.EntityLib.StatusEffects.Basic; using LBoL.EntityLib.StatusEffects.Enemy; using LBoL.EntityLib.StatusEffects.ExtraTurn.Partners; using LBoL.EntityLib.StatusEffects.Neutral.Black; using LBoL.EntityLib.StatusEffects.Neutral.Blue; using LBoL.EntityLib.StatusEffects.Neutral.Green; using LBoL.EntityLib.StatusEffects.Neutral.MultiColor; using LBoL.EntityLib.StatusEffects.Neutral.Red; using LBoL.EntityLib.StatusEffects.Neutral.TwoColor; using LBoL.EntityLib.StatusEffects.Neutral.White; using LBoL.EntityLib.StatusEffects.Others; using LBoL.EntityLib.StatusEffects.Reimu; using LBoL.Presentation; using LBoL.Presentation.UI.Widgets; using LBoL.Presentation.Units; using LBoLEntitySideloader; using LBoLEntitySideloader.Attributes; using LBoLEntitySideloader.Entities; using LBoLEntitySideloader.ReflectionHelpers; using LBoLEntitySideloader.Resource; using UnityEngine; using UnityEngine.Experimental.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("LBoL.Base")] [assembly: IgnoresAccessChecksTo("LBoL.ConfigData")] [assembly: IgnoresAccessChecksTo("LBoL.Core")] [assembly: IgnoresAccessChecksTo("LBoL.EntityLib")] [assembly: IgnoresAccessChecksTo("LBoL.Presentation")] [assembly: IgnoresAccessChecksTo("Untitled.ConfigDataBuilder.Base")] [assembly: AssemblyCompany("DayuuMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("DayuuMod")] [assembly: AssemblyTitle("DayuuMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace DayuuMod { [BepInPlugin("intoxicatedkid.dayuumod", "Dayuu Mod", "1.1.6")] [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("intoxicatedkid.dayuumod", ""); internal static BatchLocalization cardLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(CardTemplate), false); internal static BatchLocalization enemyUnitLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(EnemyUnitTemplate), false); internal static BatchLocalization exhibitLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(ExhibitTemplate), false); internal static BatchLocalization statusEffectLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(StatusEffectTemplate), false); internal static BatchLocalization ultimateSkillLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(UltimateSkillTemplate), false); internal static BatchLocalization unitModelLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(UnitModelTemplate), false); private void Awake() { log = ((BaseUnityPlugin)this).Logger; Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; EntityManager.RegisterSelf(); harmony.PatchAll(); if (Chainloader.PluginInfos.ContainsKey("neo.lbol.tools.watermark")) { WatermarkWrapper.ActivateWatermark(); } NewBackgrounds.AddNewBackgrounds(); cardLoc.DiscoverAndLoadLocFiles("Card"); enemyUnitLoc.DiscoverAndLoadLocFiles("EnemyUnit"); exhibitLoc.DiscoverAndLoadLocFiles("Exhibit"); statusEffectLoc.DiscoverAndLoadLocFiles("StatusEffect"); ultimateSkillLoc.DiscoverAndLoadLocFiles("UltimateSkill"); unitModelLoc.DiscoverAndLoadLocFiles("UnitModel"); } private void OnDestroy() { if (harmony != null) { harmony.UnpatchSelf(); } } } public static class PInfo { public const string GUID = "intoxicatedkid.dayuumod"; public const string Name = "Dayuu Mod"; public const string version = "1.1.6"; public static readonly Harmony harmony = new Harmony("intoxicatedkid.dayuumod"); } internal class WatermarkWrapper { [MethodImpl(MethodImplOptions.NoInlining)] internal static void ActivateWatermark() { API.ActivateWatermark(); } } } namespace DayuuMod.Stages { public static class NewBackgrounds { public const string DayuuHexagonBackground = "DayuuHexagonBackground"; public static void AddNewBackgrounds() { StageTemplate.AddEvironmentGameobject(StageTemplate.CreateSimpleEnvObject("DayuuHexagonBackground", ResourceLoader.LoadSprite("DayuuHexagonBackground.png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 100, (Vector2?)null)), false, (Func<GameObject, GameObject>)delegate(GameObject self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) Transform transform = self.transform; transform.position += new Vector3(0f, 0f, -0.1f); return self; }, (string)null, (Assembly)null); } } } namespace DayuuMod.JadeBoxes { public sealed class InterdimensionalObjectJadeBoxDef : JadeBoxTemplate { 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("InterdimensionalObjectJadeBox"); } public override LocalizationOption LoadLocalization() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown return (LocalizationOption)new DirectLocalization(new Dictionary<string, object> { { "Name", "Interdimensional Object" }, { "Description", "Hexagon will always appear." } }, (Locale)0, (Locale)0, false); } public override JadeBoxConfig MakeConfig() { return ((JadeBoxTemplate)this).DefaultConfig(); } } [EntityLogic(typeof(InterdimensionalObjectJadeBoxDef))] public sealed class InterdimensionalObjectJadeBox : JadeBox { protected override void OnAdded() { if (CollectionsExtensions.TryGetValue<Stage>((IReadOnlyList<Stage>)((GameEntity)this).GameRun._stages, 1) != null) { CollectionsExtensions.TryGetValue<Stage>((IReadOnlyList<Stage>)((GameEntity)this).GameRun._stages, 1).AdventurePool.Remove(typeof(BuduSuanming), true); } if (CollectionsExtensions.TryGetValue<Stage>((IReadOnlyList<Stage>)((GameEntity)this).GameRun._stages, 3) != null) { CollectionsExtensions.TryGetValue<Stage>((IReadOnlyList<Stage>)((GameEntity)this).GameRun._stages, 3).Boss = Library.GetEnemyGroupEntry("DayuuHexagonEnemyGroup"); } } } } namespace DayuuMod.Exhibits { public sealed class DayuuBlankCardDef : ExhibitTemplate { [EntityLogic(typeof(DayuuBlankCardDef))] [UsedImplicitly] public sealed class DayuuBlankCard : Exhibit { protected override void OnEnterBattle() { ((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted); } private IEnumerable<BattleAction> OnPlayerTurnStarted(GameEventArgs args) { if (((Unit)((Exhibit)this).Battle.Player).TurnCounter != 1) { yield break; } ((Exhibit)this).NotifyActivating(); List<Card> hand = ((Exhibit)this).Battle.HandZone.ToList(); if (hand.Count <= 0) { yield break; } List<Card> attackc = hand.Where((Card card) => (int)card.CardType == 1 && (int)card.Config.Rarity == 0).ToList(); List<Card> attacku = hand.Where((Card card) => (int)card.CardType == 1 && (int)card.Config.Rarity == 1).ToList(); List<Card> attackr = hand.Where((Card card) => (int)card.CardType == 1 && (int)card.Config.Rarity == 2).ToList(); List<Card> defensec = hand.Where((Card card) => (int)card.CardType == 2 && (int)card.Config.Rarity == 0).ToList(); List<Card> defenseu = hand.Where((Card card) => (int)card.CardType == 2 && (int)card.Config.Rarity == 1).ToList(); List<Card> defenser = hand.Where((Card card) => (int)card.CardType == 2 && (int)card.Config.Rarity == 2).ToList(); List<Card> skillc = hand.Where((Card card) => (int)card.CardType == 3 && (int)card.Config.Rarity == 0).ToList(); List<Card> skillu = hand.Where((Card card) => (int)card.CardType == 3 && (int)card.Config.Rarity == 1).ToList(); List<Card> skillr = hand.Where((Card card) => (int)card.CardType == 3 && (int)card.Config.Rarity == 2).ToList(); List<Card> abilityc = hand.Where((Card card) => (int)card.CardType == 4 && (int)card.Config.Rarity == 0).ToList(); List<Card> abilityu = hand.Where((Card card) => (int)card.CardType == 4 && (int)card.Config.Rarity == 1).ToList(); List<Card> abilityr = hand.Where((Card card) => (int)card.CardType == 4 && (int)card.Config.Rarity == 2).ToList(); List<Card> friendc = hand.Where((Card card) => (int)card.CardType == 5 && (int)card.Config.Rarity == 0).ToList(); List<Card> friendu = hand.Where((Card card) => (int)card.CardType == 5 && (int)card.Config.Rarity == 1).ToList(); List<Card> friendr = hand.Where((Card card) => (int)card.CardType == 5 && (int)card.Config.Rarity == 2).ToList(); List<Card> list = new List<Card>(); yield return (BattleAction)new ExileManyCardAction((IEnumerable<Card>)hand); foreach (Card card2 in attackc) { Card[] attackC = ((Exhibit)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.OnlyCommon, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot, false), 1, (Predicate<CardConfig>)((CardConfig config) => (int)config.Type == 1)); if (card2.IsUpgraded) { yield return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)attackC); } list.AddRange(attackC); } foreach (Card card3 in attacku) { Card[] attackU = ((Exhibit)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.OnlyUncommon, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot, false), 1, (Predicate<CardConfig>)((CardConfig config) => (int)config.Type == 1)); if (card3.IsUpgraded) { yield return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)attackU); } list.AddRange(attackU); } foreach (Card card4 in attackr) { Card[] attackR = ((Exhibit)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.OnlyRare, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot, false), 1, (Predicate<CardConfig>)((CardConfig config) => (int)config.Type == 1)); if (card4.IsUpgraded) { yield return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)attackR); } list.AddRange(attackR); } foreach (Card card5 in defensec) { Card[] defenseC = ((Exhibit)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.OnlyCommon, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot, false), 1, (Predicate<CardConfig>)((CardConfig config) => (int)config.Type == 2)); if (card5.IsUpgraded) { yield return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)defenseC); } list.AddRange(defenseC); } foreach (Card card6 in defenseu) { Card[] defenseU = ((Exhibit)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.OnlyUncommon, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot, false), 1, (Predicate<CardConfig>)((CardConfig config) => (int)config.Type == 2)); if (card6.IsUpgraded) { yield return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)defenseU); } list.AddRange(defenseU); } foreach (Card card7 in defenser) { Card[] defenseR = ((Exhibit)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.OnlyRare, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot, false), 1, (Predicate<CardConfig>)((CardConfig config) => (int)config.Type == 2)); if (card7.IsUpgraded) { yield return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)defenseR); } list.AddRange(defenseR); } foreach (Card card8 in skillc) { Card[] skillC = ((Exhibit)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.OnlyCommon, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot, false), 1, (Predicate<CardConfig>)((CardConfig config) => (int)config.Type == 3)); if (card8.IsUpgraded) { yield return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)skillC); } list.AddRange(skillC); } foreach (Card card9 in skillu) { Card[] skillU = ((Exhibit)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.OnlyUncommon, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot, false), 1, (Predicate<CardConfig>)((CardConfig config) => (int)config.Type == 3)); if (card9.IsUpgraded) { yield return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)skillU); } list.AddRange(skillU); } foreach (Card card10 in skillr) { Card[] skillR = ((Exhibit)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.OnlyRare, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot, false), 1, (Predicate<CardConfig>)((CardConfig config) => (int)config.Type == 3)); if (card10.IsUpgraded) { yield return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)skillR); } list.AddRange(skillR); } foreach (Card card11 in abilityc) { Card[] abilityC = ((Exhibit)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.OnlyCommon, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot, false), 1, (Predicate<CardConfig>)((CardConfig config) => (int)config.Type == 4)); if (card11.IsUpgraded) { yield return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)abilityC); } list.AddRange(abilityC); } foreach (Card card12 in abilityu) { Card[] abilityU = ((Exhibit)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.OnlyUncommon, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot, false), 1, (Predicate<CardConfig>)((CardConfig config) => (int)config.Type == 4)); if (card12.IsUpgraded) { yield return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)abilityU); } list.AddRange(abilityU); } foreach (Card card13 in abilityr) { Card[] abilityR = ((Exhibit)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.OnlyRare, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot, false), 1, (Predicate<CardConfig>)((CardConfig config) => (int)config.Type == 4)); if (card13.IsUpgraded) { yield return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)abilityR); } list.AddRange(abilityR); } foreach (Card card14 in friendc) { Card[] friendC = ((Exhibit)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.OnlyCommon, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot, false), 1, (Predicate<CardConfig>)((CardConfig config) => (int)config.Type == 5)); if (card14.IsUpgraded) { yield return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)friendC); } list.AddRange(friendC); } foreach (Card card15 in friendu) { Card[] friendU = ((Exhibit)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.OnlyUncommon, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot, false), 1, (Predicate<CardConfig>)((CardConfig config) => (int)config.Type == 5)); if (card15.IsUpgraded) { yield return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)friendU); } list.AddRange(friendU); } foreach (Card card16 in friendr) { Card[] friendR = ((Exhibit)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.OnlyRare, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot, false), 1, (Predicate<CardConfig>)((CardConfig config) => (int)config.Type == 5)); if (card16.IsUpgraded) { yield return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)friendR); } list.AddRange(friendR); } yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)list, (AddCardsType)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("DayuuBlankCard"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 9, false, false, false, false, (AppearanceType)1, "", (ExhibitLosableType)0, (Rarity)0, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)null, 0, false, (int?)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } public sealed class DayuuMediGunDef : ExhibitTemplate { [EntityLogic(typeof(DayuuMediGunDef))] [UsedImplicitly] public sealed class DayuuMediGun : Exhibit { [HarmonyPatch(typeof(Unit), "Heal")] private class Unit_Heal_Patch { private static void Postfix(Unit __instance, ref int healValue, int __result) { if (Singleton<GameMaster>.Instance.CurrentGameRun == null || !(__instance is PlayerUnit) || !Singleton<GameMaster>.Instance.CurrentGameRun.Player.HasExhibit<DayuuMediGun>()) { return; } int num = healValue - __result; if (num <= 0) { return; } int num2 = Math.Min(num * Singleton<GameMaster>.Instance.CurrentGameRun.Player.Exhibits.Count((Exhibit e) => e is DayuuMediGun), ((Exhibit)Singleton<GameMaster>.Instance.CurrentGameRun.Player.GetExhibit<DayuuMediGun>()).Value1 * Singleton<GameMaster>.Instance.CurrentGameRun.Player.Exhibits.Count((Exhibit e) => e is DayuuMediGun) - Singleton<GameMaster>.Instance.CurrentGameRun.Player.Exhibits.Where((Exhibit e) => e is DayuuMediGun).Sum((Exhibit e) => e.Counter)); if (num2 <= 0) { return; } Singleton<GameMaster>.Instance.CurrentGameRun.GainMaxHp(num2, true, false); foreach (Exhibit item in Singleton<GameMaster>.Instance.CurrentGameRun.Player.Exhibits.Where((Exhibit e) => e is DayuuMediGun)) { item.NotifyActivating(); item.Counter += Math.Min(num, item.Value1 - item.Counter); } } } protected override void OnGain(PlayerUnit player) { ((GameEntity)this).GameRun.Heal(((Exhibit)this).Value3, true, (string)null); } protected override void OnAdded(PlayerUnit player) { ((Exhibit)this).HandleGameRunEvent<StationEventArgs>(((GameEntity)this).GameRun.StationEntered, (GameEventHandler<StationEventArgs>)delegate { if (((Exhibit)this).Counter > 0) { ((Exhibit)this).NotifyActivating(); int num = Math.Min(((Exhibit)this).Value2, ((Exhibit)this).Counter); ((GameEntity)this).GameRun.LoseMaxHp(num, true); ((Exhibit)this).Counter = ((Exhibit)this).Counter - num; } }); } } 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("DayuuMediGun"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown int num = BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)); int? num2 = 50; int? num3 = 5; int? num4 = 15; ManaGroup value = default(ManaGroup); ((ManaGroup)(ref value)).Colorless = 2; return new ExhibitConfig(num, "", 10, false, true, false, false, (AppearanceType)0, "", (ExhibitLosableType)2, (Rarity)1, num2, num3, num4, (ManaGroup?)value, (ManaColor?)null, (ManaColor?)null, 0, true, (int?)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } public sealed class DayuuSmallSparrowDef : ExhibitTemplate { [EntityLogic(typeof(DayuuSmallSparrowDef))] [UsedImplicitly] public sealed class DayuuSmallSparrow : Exhibit { protected override IEnumerator SpecialGain(PlayerUnit player) { ((Exhibit)this).OnGain(player); List<Card> array = new List<Card> { (Card)(object)Library.CreateCard<DayuuAttack>(), (Card)(object)Library.CreateCard<DayuuDefense>(), (Card)(object)Library.CreateCard<DayuuSkill>(), (Card)(object)Library.CreateCard<DayuuAbility>(), (Card)(object)Library.CreateCard<DayuuFriend>() }; if (array.Count != 0) { ((GameEntity)this).GameRun.UpgradeNewDeckCardOnFlags((IEnumerable<Card>)array); MiniSelectCardInteraction interaction = new MiniSelectCardInteraction((IEnumerable<Card>)array, true, true, true) { Source = (GameEntity)(object)this }; yield return ((GameEntity)this).GameRun.InteractionViewer.View((Interaction)(object)interaction); Card selectedCard = interaction.SelectedCard; if (selectedCard != null) { ((GameEntity)this).GameRun.AddDeckCard(selectedCard, true, new VisualSourceData { SourceType = (VisualSourceType)8 }); } } } protected override void OnEnterBattle() { ((Exhibit)this).ReactBattleEvent<CardEventArgs>(((Exhibit)this).Battle.CardDrawn, (EventSequencedReactor<CardEventArgs>)OnCardDrawn); } private IEnumerable<BattleAction> OnCardDrawn(CardEventArgs args) { Card card = args.Card; if (card is DayuuAttack || card is DayuuDefense || card is DayuuSkill || card is DayuuAbility || card is DayuuFriend) { ((Exhibit)this).NotifyActivating(); yield return (BattleAction)new GainManaAction(card.CostToMana(true) - ((Exhibit)this).Mana); } } } 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("DayuuSmallSparrow"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this); } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown int num = BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)); int? num2 = 5; ManaGroup value = default(ManaGroup); ((ManaGroup)(ref value)).Colorless = 2; return new ExhibitConfig(num, "", 10, false, true, false, false, (AppearanceType)0, "", (ExhibitLosableType)0, (Rarity)0, num2, (int?)null, (int?)null, (ManaGroup?)value, (ManaColor?)null, (ManaColor?)null, 0, false, (int?)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } } namespace DayuuMod.EnemyUnits { public sealed class DayuuHexagonDef : EnemyUnitTemplate { public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("DayuuHexagon"); } public override LocalizationOption LoadLocalization() { EnemyUnitTemplate.AddBossNodeIcon("DayuuHexagonEnemyGroup", (Func<Sprite>)(() => ResourceLoader.LoadSprite("DayuuHexagon.png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 1, (Vector2?)null)), (Assembly)null); return (LocalizationOption)(object)BepinexPlugin.enemyUnitLoc.AddEntity((EntityDefinition)(object)this); } public override EnemyUnitConfig MakeConfig() { //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Expected O, but got Unknown return new EnemyUnitConfig("DayuuHexagon", true, false, (IReadOnlyList<ManaColor>)(object)new ManaColor[1] { (ManaColor)6 }, 10, (string)null, "#ffffff", (EnemyType)3, false, (float?)null, (int?)null, 9999, (int?)2147483547, (int?)2147483547, (int?)2147483547, (int?)2147483547, (int?)5, (int?)9999, (int?)30, (int?)5, (int?)9999, (int?)2147483547, (int?)2147483547, (int?)2147483547, (int?)2147483547, (int?)10, (int?)9999, (int?)25, (int?)10, (int?)9999, (int?)2147483547, (int?)2147483547, (int?)2147483547, (int?)2147483547, (int?)15, (int?)9999, (int?)20, (int?)15, new MinMax(100, 100), new MinMax(100, 100), (IReadOnlyList<string>)new string[1] { "森罗" }, (IReadOnlyList<string>)new string[1] { "森罗" }, (IReadOnlyList<string>)new string[1] { "森罗" }, (IReadOnlyList<string>)new string[1] { "森罗" }); } } [EntityLogic(typeof(DayuuHexagonDef))] public sealed class DayuuHexagon : EnemyUnit { [HarmonyPatch(typeof(GameMaster), "RequestReenterStation")] private class GameMaster_RequestReenterStation_Patch { private static void Postfix(GameMaster __instance) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) BgmConfig.FromID(IdContainer.op_Implicit(((EntityDefinition)new DayuuHexagonBgm()).UniqueId)).LoopStart = 118.25f; BgmConfig.FromID(IdContainer.op_Implicit(((EntityDefinition)new DayuuHexagonBgm()).UniqueId)).LoopEnd = 236.4f; background.SetActive(false); } } [HarmonyPatch(typeof(GameMaster), "LeaveGameRun")] private class GameMaster_LeaveGameRun_Patch { private static void Postfix(GameMaster __instance) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) BgmConfig.FromID(IdContainer.op_Implicit(((EntityDefinition)new DayuuHexagonBgm()).UniqueId)).LoopStart = 118.25f; BgmConfig.FromID(IdContainer.op_Implicit(((EntityDefinition)new DayuuHexagonBgm()).UniqueId)).LoopEnd = 236.4f; background.SetActive(false); } } private enum MoveType { GameOver, Wonderful } private static GameObject background = StageTemplate.TryGetEnvObject("DayuuHexagonBackground", (Assembly)null); [UsedImplicitly] public override string Name => "Hexagon"; private MoveType Next { get; set; } private string SpellGameOver => "Game Over"; private string SpellWonderful => "Wonderful"; protected override void OnEnterBattle(BattleController battle) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) BgmConfig.FromID(IdContainer.op_Implicit(((EntityDefinition)new DayuuHexagonBgm()).UniqueId)).LoopStart = 0f; BgmConfig.FromID(IdContainer.op_Implicit(((EntityDefinition)new DayuuHexagonBgm()).UniqueId)).LoopEnd = 338f; AudioManager.PlayInLayer1("DayuuHexagon"); background.SetActive(true); Next = MoveType.GameOver; ((Unit)this).ReactBattleEvent<GameEventArgs>(((Unit)this).Battle.BattleStarted, (Func<GameEventArgs, IEnumerable<BattleAction>>)OnBattleStarted); ((Unit)this).ReactBattleEvent<UnitEventArgs>(((Unit)this).TurnStarted, (Func<UnitEventArgs, IEnumerable<BattleAction>>)new Func<GameEventArgs, IEnumerable<BattleAction>>(OnTurnStarted)); ((Unit)this).ReactBattleEvent<DieEventArgs>(((Unit)this).Dying, (Func<DieEventArgs, IEnumerable<BattleAction>>)OnDying); ((Unit)this).HandleBattleEvent<UnitEventArgs>(((Unit)((Unit)this).Battle.Player).TurnEnded, (GameEventHandler<UnitEventArgs>)delegate { if (((Unit)this).Hp <= 1) { Next = MoveType.Wonderful; ((EnemyUnit)this).UpdateTurnMoves(); } }); } private IEnumerable<BattleAction> OnBattleStarted(GameEventArgs arg) { yield return (BattleAction)(object)new ApplyStatusEffectAction<ExtraTurn>((Unit)(object)((Unit)this).Battle.Player, (int?)((EnemyUnit)this).Count1, (int?)null, (int?)null, (int?)null, 0f, true); yield return (BattleAction)(object)new ApplyStatusEffectAction<DayuuHexagonSeDef.DayuuHexagonSe>((Unit)(object)this, (int?)0, (int?)null, (int?)10, (int?)null, 0f, true); } private IEnumerable<BattleAction> OnTurnStarted(GameEventArgs arg) { if (((Unit)this).Hp <= 1) { Next = MoveType.Wonderful; ((EnemyUnit)this).UpdateTurnMoves(); } else { Next = MoveType.GameOver; ((EnemyUnit)this).UpdateTurnMoves(); } yield break; } private IEnumerable<BattleAction> OnDying(DieEventArgs arg) { if ((int)arg.DieCause == 3 && arg.Source != this) { ((GameEventArgs)arg).ForceCancelBecause((CancelCause)4096); ((Unit)this).Hp = 9999; ((Unit)this).Status = (UnitStatus)0; } yield break; } protected override void OnLeaveBattle() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) BgmConfig.FromID(IdContainer.op_Implicit(((EntityDefinition)new DayuuHexagonBgm()).UniqueId)).LoopStart = 118.25f; BgmConfig.FromID(IdContainer.op_Implicit(((EntityDefinition)new DayuuHexagonBgm()).UniqueId)).LoopEnd = 236.4f; background.SetActive(false); } private IEnumerable<BattleAction> GameOver() { ((Unit)((Unit)this).Battle.Player).ClearStatusEffects(); yield return (BattleAction)(object)PerformAction.Chat((Unit)(object)this, "Game Over", 3f, 0f, 0f, true); foreach (BattleAction item in ((EnemyUnit)this).AttackActions((string)null, ((EnemyUnit)this).Gun1, ((EnemyUnit)this).Damage1, 1, true, (string)null)) { yield return item; } if (((Unit)((Unit)this).Battle.Player).IsAlive) { yield return (BattleAction)new ForceKillAction((Unit)(object)this, (Unit)(object)((Unit)this).Battle.Player); if ((int)((GameEntity)this).GameRun.Status == 0) { GameMaster.RequestAbandonGameRun(true); } } } private IEnumerable<BattleAction> Wonderful() { ((Unit)this).ClearStatusEffects(); yield return (BattleAction)(object)PerformAction.Chat((Unit)(object)this, "Wonderful", 1f, 0f, 0f, true); yield return (BattleAction)new ForceKillAction((Unit)(object)this, (Unit)(object)this); } protected override IEnumerable<IEnemyMove> GetTurnMoves() { switch (Next) { case MoveType.GameOver: yield return (IEnemyMove)new SimpleEnemyMove(Intention.SpellCard(SpellGameOver, (int?)((EnemyUnit)this).Damage1, true), GameOver()); break; case MoveType.Wonderful: yield return (IEnemyMove)new SimpleEnemyMove(Intention.SpellCard(SpellWonderful, (int?)null, (int?)null, false), Wonderful()); break; default: throw new ArgumentOutOfRangeException(); } } protected override void UpdateMoveCounters() { Next = MoveType.GameOver; } } public sealed class DayuuHexagonUnitModelDef : UnitModelTemplate { public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("DayuuHexagon"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.unitModelLoc.AddEntity((EntityDefinition)(object)this); } 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("DayuuHexagon.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("DayuuHexagon.png", BepinexPlugin.directorySource, 565, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://"); } public override UnitModelConfig MakeConfig() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown return new UnitModelConfig("DayuuHexagon", 0, (string)null, new Vector2(0f, 0f), true, 2, new Vector2(0.8f, 1.8f), 1.2f, 1.3f, new Vector2(0f, -1.3f), 640f, new Vector2(0f, 1.2f), new Vector2(1.6f, 2f), (IReadOnlyList<float>)new float[1] { 0.1f }, (IReadOnlyList<Vector2>)(object)new Vector2[1] { new Vector2(0.6f, 0.3f) }, (IReadOnlyList<Vector2>)(object)new Vector2[1] { new Vector2(0.6f, 0.3f) }, new Vector2(0.3f, 0.3f), 0.1f, 0.1f, new Vector2(0.4f, 0.8f), new Vector2(-0.8f, -0.58f), new Vector2(0.6f, 0.5f), true, new Vector2(400f, 0f), 0.9f, (IReadOnlyList<Color32>)(object)new Color32[1] { new Color32((byte)25, (byte)25, (byte)25, byte.MaxValue) }); } } public sealed class DayuuHexagonSeDef : StatusEffectTemplate { [EntityLogic(typeof(DayuuHexagonSeDef))] public sealed class DayuuHexagonSe : StatusEffect { private int DifficultyDamage = 0; [UsedImplicitly] public int AccumulateDamage { get { Unit owner = ((StatusEffect)this).Owner; return ((EnemyUnit)((owner is EnemyUnit) ? owner : null)).Count2 + DifficultyDamage; } } protected override void OnAdded(Unit unit) { ((StatusEffect)this).HandleOwnerEvent<BlockShieldEventArgs>(((Unit)((StatusEffect)this).Battle.Player).BlockShieldGaining, (GameEventHandler<BlockShieldEventArgs>)delegate(BlockShieldEventArgs args) { if (args.Block != 0f) { args.Block = Math.Max(Math.Min(Math.Min(250f, args.Block), 250 - ((Unit)((StatusEffect)this).Battle.Player).Block), 0f); } if (args.Shield != 0f) { args.Shield = Math.Max(Math.Min(Math.Min(250f, args.Shield), 250 - ((Unit)((StatusEffect)this).Battle.Player).Shield), 0f); } ((GameEventArgs)args).AddModifier((GameEntity)(object)this); }); ((StatusEffect)this).HandleOwnerEvent<BlockShieldEventArgs>(((Unit)((StatusEffect)this).Battle.Player).BlockShieldGained, (GameEventHandler<BlockShieldEventArgs>)delegate { if (((Unit)((StatusEffect)this).Battle.Player).Block > 250) { ((Unit)((StatusEffect)this).Battle.Player).Block = 250; } if (((Unit)((StatusEffect)this).Battle.Player).Shield > 250) { ((Unit)((StatusEffect)this).Battle.Player).Shield = 250; } }); ((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(unit.DamageTaking, (GameEventHandler<DamageEventArgs>)OnDamageTaking); ((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed); ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(Difficulty()); ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(IncomingWall()); ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(LastWord()); ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(DeathSentence()); DifficultyDamage = 0; } private void OnDamageTaking(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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) DamageInfo damageInfo = args.DamageInfo; int num = MathExtensions.RoundToInt(((DamageInfo)(ref damageInfo)).Damage); if (num > 0) { ((StatusEffect)this).NotifyActivating(); damageInfo = args.DamageInfo; args.DamageInfo = ((DamageInfo)(ref damageInfo)).ReduceActualDamageBy(num); ((GameEventArgs)args).AddModifier((GameEntity)(object)this); } } private IEnumerator IncomingWall() { while (((StatusEffect)this).Owner.Hp > 1) { if (((StatusEffect)this).Count > 0) { int count = ((StatusEffect)this).Count; ((StatusEffect)this).Count = count - 1; } if (((StatusEffect)this).Count <= 0) { Unit owner = ((StatusEffect)this).Owner; EnemyUnit enemyUnit = (EnemyUnit)(object)((owner is EnemyUnit) ? owner : null); ((StatusEffect)this).Level = ((StatusEffect)this).Level + (enemyUnit.Count2 + DifficultyDamage); ((StatusEffect)this).Count = 10; } yield return (object)new WaitForSecondsRealtime(1f); } } private IEnumerator DeathSentence() { while (((StatusEffect)this).Owner.Hp > 1) { if (((StatusEffect)this).Level >= 100) { if (((Unit)((StatusEffect)this).Battle.Player).Hp < 1) { break; } if (((Unit)((StatusEffect)this).Battle.Player).Hp == 1) { ((Unit)Singleton<GameMaster>.Instance.CurrentGameRun.Battle.Player).ClearStatusEffects(); ((StatusEffect)this).Battle.PlayerTurnShouldEnd = true; ((StatusEffect)this).Battle._isWaitingPlayerInput = false; break; } if (((Unit)((StatusEffect)this).Battle.Player).Hp > 1) { Singleton<GameMaster>.Instance.CurrentGameRun.SetHpAndMaxHp(((Unit)((StatusEffect)this).Battle.Player).Hp - 1, ((Unit)((StatusEffect)this).Battle.Player).MaxHp, false); } } yield return (object)new WaitForSecondsRealtime(Math.Max(1f - (float)((StatusEffect)this).Level * 0.001f, 0.1f)); } } private IEnumerator LastWord() { while (((StatusEffect)this).Owner.Hp > 1) { ? val = Singleton<GameMaster>.Instance.CurrentGameRun; int num = Math.Max(((StatusEffect)this).Owner.Hp - 3, 1); int maxHp = ((StatusEffect)this).Owner.MaxHp; Unit owner = ((StatusEffect)this).Owner; ((GameRunController)val).SetEnemyHpAndMaxHp(num, maxHp, (EnemyUnit)(object)((owner is EnemyUnit) ? owner : null), false); yield return (object)new WaitForSecondsRealtime(0.1f); } if (((Unit)((StatusEffect)this).Battle.Player).HasStatusEffect<ExtraTurn>()) { ((Unit)((StatusEffect)this).Battle.Player).TryRemoveStatusEffect((StatusEffect)(object)((Unit)((StatusEffect)this).Battle.Player).GetStatusEffect<ExtraTurn>()); } ((StatusEffect)this).Battle.PlayerTurnShouldEnd = true; ((StatusEffect)this).Battle._isWaitingPlayerInput = false; } private IEnumerator Difficulty() { UnitView owner = GameDirector.GetUnit(((StatusEffect)this).Owner); yield return (object)new WaitForSecondsRealtime(30f); owner.Chat("Point", 3f, (CloudType)3, 0f); DifficultyDamage += 5; yield return (object)new WaitForSecondsRealtime(30f); owner.Chat("Line", 3f, (CloudType)3, 0f); DifficultyDamage += 5; yield return (object)new WaitForSecondsRealtime(30f); owner.Chat("Triangle", 3f, (CloudType)3, 0f); DifficultyDamage += 5; yield return (object)new WaitForSecondsRealtime(30f); owner.Chat("Square", 3f, (CloudType)3, 0f); DifficultyDamage += 5; yield return (object)new WaitForSecondsRealtime(30f); owner.Chat("Pentagon", 3f, (CloudType)3, 0f); DifficultyDamage += 5; yield return (object)new WaitForSecondsRealtime(30f); owner.Chat("Hexagon", 3f, (CloudType)3, 0f); DifficultyDamage += 5; } private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args) { if (((Unit)((StatusEffect)this).Battle.Player).IsInTurn && ((StatusEffect)this).Level > 0 && ((StatusEffect)this).Owner.Hp > 1) { ((StatusEffect)this).NotifyActivating(); yield return (BattleAction)new DamageAction(((StatusEffect)this).Owner, (Unit)(object)((StatusEffect)this).Battle.Player, DamageInfo.Reaction((float)((StatusEffect)this).Level, false), "扩散结界", (GunType)0); ((StatusEffect)this).Level = 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("DayuuHexagonSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.DayuuHexagonSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 99, (StatusEffectType)2, false, false, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, true, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } public sealed class DayuuHexagonBgm : BgmTemplate { 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("DayuuHexagon"); } public override UniTask<AudioClip> LoadAudioClipAsync() { //IL_0012: 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) //IL_001a: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadAudioClip("Courtesy.ogg", (AudioType)14, BepinexPlugin.directorySource, "file://"); } public override BgmConfig MakeConfig() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown return new BgmConfig("", BepinexPlugin.sequenceTable.Next(typeof(BgmConfig)), true, "", "", "", 1f, (float?)118.25f, (float?)236.4f, "Courtesy", "SiIvaGunner", "Courtesy", ""); } } public sealed class DayuuShinmyoumaruDef : EnemyUnitTemplate { public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("DayuuShinmyoumaru"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.enemyUnitLoc.AddEntity((EntityDefinition)(object)this); } public override EnemyUnitConfig MakeConfig() { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown return new EnemyUnitConfig("DayuuShinmyoumaru", true, false, (IReadOnlyList<ManaColor>)null, 10, (string)null, "#9370db", (EnemyType)2, false, (float?)null, (int?)null, 320, (int?)1, (int?)20, (int?)null, (int?)null, (int?)1, (int?)25, (int?)null, (int?)null, (int?)360, (int?)1, (int?)25, (int?)null, (int?)null, (int?)1, (int?)30, (int?)null, (int?)null, (int?)400, (int?)1, (int?)30, (int?)null, (int?)null, (int?)1, (int?)35, (int?)null, (int?)null, new MinMax(50, 50), new MinMax(50, 50), (IReadOnlyList<string>)new string[1] { "Guiren2" }, (IReadOnlyList<string>)new string[1] { "锤子" }, (IReadOnlyList<string>)new string[1] { "Simple1" }, (IReadOnlyList<string>)new string[1] { "Simple1" }); } } [EntityLogic(typeof(DayuuShinmyoumaruDef))] public sealed class DayuuShinmyoumaru : EnemyUnit { private enum MoveType { Rebellion, Needle, Swing, Mallet } private bool Mallet; [UsedImplicitly] public override string Name => "Shinmyoumaru Sukuna"; private string SpellRebellion => ((EnemyUnit)this).GetSpellCardName((int?)null, 0); private string SpellMallet => ((EnemyUnit)this).GetSpellCardName((int?)3, 4); private MoveType Next { get; set; } protected override void OnEnterBattle(BattleController battle) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Invalid comparison between Unknown and I4 Next = (((int)((EnemyUnit)this).Difficulty == 3) ? MoveType.Needle : MoveType.Rebellion); ((Unit)this).ReactBattleEvent<GameEventArgs>(((Unit)this).Battle.BattleStarted, (Func<GameEventArgs, IEnumerable<BattleAction>>)OnBattleStarted); } private IEnumerable<BattleAction> OnBattleStarted(GameEventArgs arg) { if ((int)((EnemyUnit)this).Difficulty != 3) { yield break; } foreach (BattleAction item in RebellionActions()) { yield return item; } } private IEnumerable<BattleAction> RebellionActions() { yield return (BattleAction)(object)PerformAction.Spell((Unit)(object)this, "DayuuShinmyoumaruRebellion"); yield return (BattleAction)new ApplyStatusEffectAction(typeof(DayuuShinmyoumaruRebellionSeDef.DayuuShinmyoumaruRebellionSe), (Unit)(object)this, (int?)null, (int?)null, (int?)null, (int?)null, 0.2f, true); } private IEnumerable<BattleAction> MalletActions() { if (!Mallet) { yield return (BattleAction)(object)PerformAction.Spell((Unit)(object)this, "DayuuShinmyoumaruMallet"); Mallet = true; } yield return (BattleAction)new ApplyStatusEffectAction(typeof(DayuuShinmyoumaruMalletSeDef.DayuuShinmyoumaruMalletSe), (Unit)(object)this, (int?)null, (int?)null, (int?)null, (int?)null, 0.2f, true); } protected override IEnumerable<IEnemyMove> GetTurnMoves() { switch (Next) { case MoveType.Rebellion: yield return (IEnemyMove)new SimpleEnemyMove(Intention.SpellCard(SpellRebellion, (int?)null, (int?)null, false), RebellionActions()); break; case MoveType.Needle: yield return ((EnemyUnit)this).AttackMove(((EnemyUnit)this).GetMove(1), ((EnemyUnit)this).Gun1, ((EnemyUnit)this).Damage1, ((int)((GameEntity)this).GameRun.Difficulty == 3) ? 10 : (((int)((GameEntity)this).GameRun.Difficulty == 2) ? 9 : 8), false, "Instant", true); yield return ((EnemyUnit)this).PositiveMove((string)null, typeof(Firepower), (int?)((EnemyUnit)this).Power, (int?)null, false, (PerformAction)null); break; case MoveType.Swing: yield return ((EnemyUnit)this).AttackMove(((EnemyUnit)this).GetMove(2), ((EnemyUnit)this).Gun2, ((EnemyUnit)this).Damage2, 1, true, "Instant", true); yield return ((EnemyUnit)this).DefendMove((Unit)(object)this, (string)null, ((EnemyUnit)this).Defend, 0, 0, false, (PerformAction)null); break; case MoveType.Mallet: yield return (IEnemyMove)new SimpleEnemyMove(Intention.SpellCard(SpellMallet, (int?)null, (int?)null, false), MalletActions()); break; default: throw new ArgumentOutOfRangeException(); } } protected override void UpdateMoveCounters() { Next = Next switch { MoveType.Rebellion => (((EnemyUnit)this).EnemyMoveRng.NextInt(0, 1) == 0) ? MoveType.Needle : MoveType.Swing, MoveType.Needle => (((EnemyUnit)this).EnemyMoveRng.NextInt(0, 4) < 3) ? MoveType.Swing : MoveType.Mallet, MoveType.Swing => (((EnemyUnit)this).EnemyMoveRng.NextInt(0, 4) < 3) ? MoveType.Needle : MoveType.Mallet, MoveType.Mallet => (((EnemyUnit)this).EnemyMoveRng.NextInt(0, 1) == 0) ? MoveType.Needle : MoveType.Swing, _ => throw new ArgumentOutOfRangeException(), }; } } public sealed class DayuuShinmyoumaruRebellionDef : UltimateSkillTemplate { public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("DayuuShinmyoumaruRebellion"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.ultimateSkillLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return null; } public override UltimateSkillConfig MakeConfig() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown return new UltimateSkillConfig("", 10, 100, 100, 2, (UsRepeatableType)1, 0, 0, 0, (Keyword)256, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } [EntityLogic(typeof(DayuuShinmyoumaruRebellionDef))] public sealed class DayuuShinmyoumaruRebellion : UltimateSkill { public DayuuShinmyoumaruRebellion() { ((UltimateSkill)this).TargetType = (TargetType)1; ((UltimateSkill)this).GunName = "Simple1"; } protected override IEnumerable<BattleAction> Actions(UnitSelector selector) { yield break; } } public sealed class DayuuShinmyoumaruMalletDef : UltimateSkillTemplate { public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("DayuuShinmyoumaruMallet"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.ultimateSkillLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return null; } public override UltimateSkillConfig MakeConfig() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown return new UltimateSkillConfig("", 10, 100, 100, 2, (UsRepeatableType)1, 0, 0, 0, (Keyword)256, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } [EntityLogic(typeof(DayuuShinmyoumaruMalletDef))] public sealed class DayuuShinmyoumaruMallet : UltimateSkill { public DayuuShinmyoumaruMallet() { ((UltimateSkill)this).TargetType = (TargetType)1; ((UltimateSkill)this).GunName = "Simple1"; } protected override IEnumerable<BattleAction> Actions(UnitSelector selector) { yield break; } } public sealed class DayuuShinmyoumaruUnitModelDef : UnitModelTemplate { public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("DayuuShinmyoumaru"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.unitModelLoc.AddEntity((EntityDefinition)(object)this); } public override ModelOption LoadModelOptions() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return new ModelOption(ResourceLoader.LoadSpriteAsync("DayuuShinmyoumaru.png", BepinexPlugin.directorySource, 100, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://")); } public override UniTask<Sprite> LoadSpellSprite() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSpriteAsync("DayuuShinmyoumaruSpell.png", BepinexPlugin.directorySource, 100, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://"); } public override UnitModelConfig MakeConfig() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Expected O, but got Unknown return new UnitModelConfig("DayuuShinmyoumaru", 0, (string)null, new Vector2(0f, 0f), false, 2, new Vector2(0.8f, 1.8f), 1.2f, 1.3f, new Vector2(0f, -1.3f), 640f, new Vector2(0f, 1.2f), new Vector2(1.6f, 2f), (IReadOnlyList<float>)new float[1] { 0.1f }, (IReadOnlyList<Vector2>)(object)new Vector2[1] { new Vector2(0.6f, 0.3f) }, (IReadOnlyList<Vector2>)(object)new Vector2[1] { new Vector2(0.6f, 0.3f) }, new Vector2(0.3f, 0.3f), 0.1f, 0.1f, new Vector2(0.4f, 0.8f), new Vector2(-0.8f, -0.58f), new Vector2(0.6f, 0.5f), true, new Vector2(400f, 0f), 0.65f, (IReadOnlyList<Color32>)(object)new Color32[4] { new Color32((byte)128, (byte)0, (byte)128, byte.MaxValue), new Color32((byte)147, (byte)112, (byte)219, byte.MaxValue), new Color32((byte)75, (byte)0, (byte)130, (byte)130), new Color32((byte)147, (byte)112, (byte)219, byte.MaxValue) }); } } public sealed class DayuuShinmyoumaruRebellionSeDef : StatusEffectTemplate { [EntityLogic(typeof(DayuuShinmyoumaruRebellionSeDef))] public sealed class DayuuShinmyoumaruRebellionSe : StatusEffect { [UsedImplicitly] public ManaGroup Mana => ManaGroup.Anys(2); [UsedImplicitly] public int Value => 1; protected override void OnAdded(Unit unit) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: 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) foreach (Card item in from card in ((StatusEffect)this).Battle.EnumerateAllCards() where (int)card.Config.Rarity == 2 select card) { item.AuraCost += Mana; item.IsEthereal = true; } ((StatusEffect)this).ReactOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToDiscard, (EventSequencedReactor<CardsEventArgs>)OnCardsAdded); ((StatusEffect)this).ReactOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToHand, (EventSequencedReactor<CardsEventArgs>)OnCardsAdded); ((StatusEffect)this).ReactOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToExile, (EventSequencedReactor<CardsEventArgs>)OnCardsAdded); ((StatusEffect)this).ReactOwnerEvent<CardsAddingToDrawZoneEventArgs>(((StatusEffect)this).Battle.CardsAddedToDrawZone, (EventSequencedReactor<CardsAddingToDrawZoneEventArgs>)OnCardsAddedToDrawZone); ((StatusEffect)this).ReactOwnerEvent<CardEventArgs>(((StatusEffect)this).Battle.CardExiled, (EventSequencedReactor<CardEventArgs>)OnCardExiled); } private IEnumerable<BattleAction> OnCardsAdded(CardsEventArgs args) { yield return Rebellion(args.Cards); } private IEnumerable<BattleAction> OnCardsAddedToDrawZone(CardsAddingToDrawZoneEventArgs args) { yield return Rebellion(args.Cards); } private IEnumerable<BattleAction> OnCardExiled(CardEventArgs args) { if ((int)((GameEventArgs)args).Cause == 13) { yield return (BattleAction)(object)new ApplyStatusEffectAction<LockedOn>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)Value, (int?)null, (int?)null, (int?)null, 0.1f, true); } } private BattleAction Rebellion(IEnumerable<Card> cards) { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) List<Card> list = cards.Where((Card card) => (int)card.Config.Rarity == 2).ToList(); if (list.Count == 0) { return null; } ((StatusEffect)this).NotifyActivating(); foreach (Card item in list) { item.AuraCost += Mana; item.IsEthereal = true; } return null; } } public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("DayuuShinmyoumaruRebellionSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.DayuuShinmyoumaruRebellionSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 90, (StatusEffectType)0, false, false, (int?)null, false, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } public sealed class DayuuShinmyoumaruMalletSeDef : StatusEffectTemplate { [EntityLogic(typeof(DayuuShinmyoumaruMalletSeDef))] public sealed class DayuuShinmyoumaruMalletSe : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted); ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnEnded, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnEnded); } private IEnumerable<BattleAction> OnPlayerTurnStarted(GameEventArgs args) { if (((StatusEffect)this).Battle.BattleShouldEnd) { yield break; } ((StatusEffect)this).NotifyActivating(); foreach (Card card in ((StatusEffect)this).Battle.HandZone) { ((GameEntity)card).NotifyChanged(); card.IsEthereal = true; } } private IEnumerable<BattleAction> OnPlayerTurnEnded(GameEventArgs args) { if (!((StatusEffect)this).Battle.BattleShouldEnd) { yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f); } } } public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("DayuuShinmyoumaruMalletSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.DayuuShinmyoumaruMalletSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 10, (StatusEffectType)0, false, true, (int?)null, false, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } public sealed class DayuuShinmyoumaruBgm : BgmTemplate { [HarmonyPatch(typeof(AudioManager), "PlayEliteBgm")] private class AudioManager_PlayEliteBgm_Patch { private static void Postfix(AudioManager __instance) { GameMaster instance = Singleton<GameMaster>.Instance; object obj; if (instance == null) { obj = null; } else { GameRunController currentGameRun = instance.CurrentGameRun; obj = ((currentGameRun != null) ? currentGameRun.CurrentStation : null); } BattleStation val = (BattleStation)((obj is BattleStation) ? obj : null); if (val != null && val.EnemyGroup.Id == "DayuuShinmyoumaruEnemyGroup") { AudioManager.PlayInLayer1("DayuuShinmyoumaru"); } } } 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("DayuuShinmyoumaru"); } public override UniTask<AudioClip> LoadAudioClipAsync() { //IL_0012: 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) //IL_001a: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadAudioClip("Inchling_of_the_Shining_Needle.ogg", (AudioType)14, BepinexPlugin.directorySource, "file://"); } public override BgmConfig MakeConfig() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown return new BgmConfig("", BepinexPlugin.sequenceTable.Next(typeof(BgmConfig)), true, "", "", "", 1f, (float?)41f, (float?)228.315f, "Inchling of the Shining Needle ~ Descendant of the Hero", "dBu", "Kobito of the Shining Needle ~ Little Princess", ""); } } } namespace DayuuMod.EnemyGroups { public sealed class DayuuHexagonEnemyGroupDef : EnemyGroupTemplate { [HarmonyPatch(typeof(FinalStage), "InitBoss")] private class FinalStage_InitBoss_Patch { private static void Prefix(FinalStage __instance) { } } public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("DayuuHexagonEnemyGroup"); } public override EnemyGroupConfig MakeConfig() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown return new EnemyGroupConfig("", "DayuuHexagonEnemyGroup", "Single", (IReadOnlyList<string>)new List<string> { "DayuuHexagon" }, (EnemyType)3, 1f, false, new Vector2(-4f, 0.5f), "", ""); } } public sealed class DayuuShinmyoumaruEnemyGroupDef : EnemyGroupTemplate { [HarmonyPatch(typeof(FinalStage), "CreateMap")] private class FinalStage_CreateMap_Patch { private static FieldRef<GameMap, MapNode[,]> nodesRef = AccessTools.FieldRefAccess<GameMap, MapNode[,]>(ConfigReflection.BackingWrap("Nodes")); private static void Postfix(FinalStage __instance, GameMap __result) { //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Invalid comparison between Unknown and I4 ((Stage)__instance).EliteEnemyPool.Add("DayuuShinmyoumaruEnemyGroup", 1f); MapNode[,] nodes = __result.Nodes; MapNode[,] array = new MapNode[nodes.GetLength(0) + 1, nodes.GetLength(1)]; bool flag = false; for (int i = 0; i < nodes.GetLength(0); i++) { for (int j = 0; j < nodes.GetLength(1); j++) { if ((int)nodes[i, j].StationType == 2) { flag = true; } array[i, j] = nodes[i, j]; } } if (!flag) { array[array.GetLength(0) - 2, 0] = new MapNode(__result, array.GetLength(0) - 2, 0, 1) { StationType = (StationType)2, FollowerList = { 0 } }; array[array.GetLength(0) - 1, 0] = new MapNode(__result, array.GetLength(0) - 1, 0, 1) { StationType = (StationType)10 }; nodesRef.Invoke(__result) = array; } } } public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("DayuuShinmyoumaruEnemyGroup"); } public override EnemyGroupConfig MakeConfig() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown return new EnemyGroupConfig("", "DayuuShinmyoumaruEnemyGroup", "Single", (IReadOnlyList<string>)new List<string> { "DayuuShinmyoumaru" }, (EnemyType)2, 1f, false, new Vector2(-4f, 0.5f), "", ""); } } } namespace DayuuMod.Cards { public sealed class DayuuAbilityDef : CardTemplate { 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("DayuuAbility"); } 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", "Resources.", false); return val; } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.cardLoc.AddEntity((EntityDefinition)(object)this); } public override CardConfig MakeConfig() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Expected O, but got Unknown int num = BepinexPlugin.sequenceTable.Next(typeof(CardConfig)); string[][] array = new string[0][]; TargetType? val = (TargetType)4; List<ManaColor> obj = new List<ManaColor> { (ManaColor)5 }; ManaGroup val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 2; ((ManaGroup)(ref val2)).Green = 1; return new CardConfig(num, "", 10, true, array, "Simple1", "Simple1", 0, false, true, true, false, true, (Rarity)1, (CardType)4, val, (IReadOnlyList<ManaColor>)obj, false, val2, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)1, (int?)null, (int?)1, (int?)2, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "DayuuFriendSe" }, (IReadOnlyList<string>)new List<string> { "DayuuFriendSe" }, (IReadOnlyList<string>)new List<string> { "DayuuExodia" }, (IReadOnlyList<string>)new List<string> { "DayuuExodia" }, (string)null, "", "", false, "Roke", (IReadOnlyList<string>)new List<string> { "MIO" }); } } [EntityLogic(typeof(DayuuAbilityDef))] public sealed class DayuuAbility : 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<DayuuAbilitySeDef.DayuuAbilitySe>(((Card)this).Value2, 0, 0, ((Card)this).Value1, 0.2f); } } public sealed class DayuuAbilitySeDef : StatusEffectTemplate { [EntityLogic(typeof(DayuuAbilitySeDef))] public sealed class DayuuAbilitySe : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnTurnStarted); } private IEnumerable<BattleAction> OnTurnStarted(UnitEventArgs args) { if (((StatusEffect)this).Battle.BattleShouldEnd) { yield break; } ((StatusEffect)this).NotifyActivating(); List<Card> list = ((StatusEffect)this).Battle.HandZone.Where((Card card) => card is DayuuAttack || card is DayuuDefense || card is DayuuSkill || card is DayuuAbility || card is DayuuFriend || card is DayuuFriend2 || (int)card.CardType == 5).ToList(); ManaGroup manaGroup = ManaGroup.Empty; for (int j = 0; j < ((StatusEffect)this).Count; j++) { manaGroup += ManaGroup.Single(CollectionsExtensions.Sample<ManaColor>((IEnumerable<ManaColor>)ManaColors.Colors, ((GameEntity)this).GameRun.BattleRng)); } if (list.Count > 0) { for (int i = 0; i < ((StatusEffect)this).Level * list.Count; i++) { manaGroup += ManaGroup.Single(CollectionsExtensions.Sample<ManaColor>((IEnumerable<ManaColor>)ManaColors.Colors, ((GameEntity)this).GameRun.BattleRng)); } } yield return (BattleAction)new GainManaAction(manaGroup); } } 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("DayuuAbilitySe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.DayuuAbilitySe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 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>(), "Default", "Default", "Default"); } } public sealed class DayuuAttackDef : CardTemplate { 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("DayuuAttack"); } 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", "Resources.", false); return val; } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.cardLoc.AddEntity((EntityDefinition)(object)this); } public override CardConfig MakeConfig() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown int num = BepinexPlugin.sequenceTable.Next(typeof(CardConfig)); string[][] array = new string[0][]; TargetType? val = (TargetType)3; List<ManaColor> obj = new List<ManaColor> { (ManaColor)1 }; ManaGroup val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 2; ((ManaGroup)(ref val2)).White = 1; return new CardConfig(num, "", 10, true, array, "YoumuKan", "YoumuKan", 0, false, true, true, false, true, (Rarity)2, (CardType)1, val, (IReadOnlyList<ManaColor>)obj, false, val2, (ManaGroup?)null, (int?)null, (int?)13, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)8388608, false, (Keyword)0, (Keyword)8388608, (IReadOnlyList<string>)new List<string> { "DayuuFriendSe" }, (IReadOnlyList<string>)new List<string> { "DayuuFriendSe" }, (IReadOnlyList<string>)new List<string> { "DayuuExodia" }, (IReadOnlyList<string>)new List<string> { "DayuuExodia" }, (string)null, "", "", false, "Ogami Kazuki", (IReadOnlyList<string>)new List<string> { "MIO" }); } } [EntityLogic(typeof(DayuuAttackDef))] public sealed class DayuuAttack : Card { public override bool OnDrawVisual => false; public override bool OnDiscardVisual => false; public override bool OnExileVisual => false; public override bool OnMoveVisual => false; public override IEnumerable<BattleAction> OnDraw() { return HandReactor(); } public override IEnumerable<BattleAction> OnDiscard(CardZone srcZone) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 if (((Card)this).Battle.BattleShouldEnd || (int)srcZone != 2) { return null; } return DiscardHandReactor(); } public override IEnumerable<BattleAction> OnExile(CardZone srcZone) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 if (((Card)this).Battle.BattleShouldEnd || (int)srcZone != 2) { return null; } return HandReactor(); } public override IEnumerable<BattleAction> OnMove(CardZone srcZone, CardZone dstZone) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Invalid comparison between Unknown and I4 //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Invalid comparison between Unknown and I4 //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Invalid comparison between Unknown and I4 //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Invalid comparison between Unknown and I4 //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Invalid comparison between Unknown and I4 //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Invalid comparison between Unknown and I4 //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Invalid comparison between Unknown and I4 if (((Card)this).Battle.BattleShouldEnd || ((int)srcZone == 1 && (int)dstZone == 4) || ((int)srcZone == 4 && (int)dstZone == 1) || ((int)srcZone == 5 && (int)dstZone == 1) || ((int)srcZone == 5 && (int)dstZone == 4)) { return null; } return HandReactor(); } protected override void OnEnterBattle(BattleController battle) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown if ((int)((Card)this).Zone == 2) { ((GameEntity)this).React(new LazySequencedReactor(AddToHandReactor)); } } private IEnumerable<BattleAction> AddToHandReactor() { ((Card)this).NotifyActivating(); List<DamageAction> list = new List<DamageAction>(); foreach (BattleAction action in HandReactor()) { yield return action; DamageAction damageAction = (DamageAction)(object)((action is DamageAction) ? action : null); if (damageAction != null) { list.Add(damageAction); } } if (CollectionsExtensions.NotEmpty<DamageAction>((IReadOnlyCollection<DamageAction>)list)) { yield return (BattleAction)new StatisticalTotalDamageAction((IEnumerable<DamageAction>)list); } } private IEnumerable<BattleAction> HandReactor() { if (((Card)this).Battle.BattleShouldEnd) { yield break; } EnemyUnit[] array = CollectionsExtensions.SampleManyOrAll<EnemyUnit>(((Card)this).Battle.EnemyGroup.Alives, 1, ((GameEntity)this).GameRun.BattleRng); EnemyUnit[] array2 = array; foreach (EnemyUnit target in array2) { if (target != null && ((Unit)target).IsAlive) { yield return ((Card)this).AttackAction((Unit)(object)target); } } if (((Unit)((Card)this).Battle.Player).HasStatusEffect<EvilTuiZhiSe>()) { EvilTuiZhiSe statusEffect = ((Unit)((Card)this).Battle.Player).GetStatusEffect<EvilTuiZhiSe>(); yield return statusEffect.TakeEffect(); } } private IEnumerable<BattleAction> DiscardHandReactor() { if (((Card)this).Battle.BattleShouldEnd) { yield break; } EnemyUnit[] array = CollectionsExtensions.SampleManyOrAll<EnemyUnit>(((Card)this).Battle.EnemyGroup.Alives, 1, ((GameEntity)this).GameRun.BattleRng); EnemyUnit[] array2 = array; foreach (EnemyUnit target in array2) { if (target != null && ((Unit)target).IsAlive) { yield return ((Card)this).AttackAction((Unit)(object)target); } } if (((Unit)((Card)this).Battle.Player).HasStatusEffect<EvilTuiZhiSe>()) { EvilTuiZhiSe statusEffect = ((Unit)((Card)this).Battle.Player).GetStatusEffect<EvilTuiZhiSe>(); yield return statusEffect.TakeEffect(); } yield return (BattleAction)new MoveCardToDrawZoneAction((Card)(object)this, (DrawZoneTarget)0); } 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).AttackAction((Unit)(object)((Card)this).Battle.RandomAliveEnemy); } } public sealed class DayuuDefenseDef : CardTemplate { 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("DayuuDefense"); } 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", "Resources.", false); return val; } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.cardLoc.AddEntity((EntityDefinition)(object)this); } public override CardConfig MakeConfig() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Expected O, but got Unknown int num = BepinexPlugin.sequenceTable.Next(typeof(CardConfig)); string[][] array = new string[0][]; TargetType? val = (TargetType)4; List<ManaColor> obj = new List<ManaColor> { (ManaColor)2 }; ManaGroup val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 2; ((ManaGroup)(ref val2)).Blue = 1; return new CardConfig(num, "", 10, true, array, "Simple1", "Simple1", 0, false, true, true, false, true, (Rarity)1, (CardType)2, val, (IReadOnlyList<ManaColor>)obj, false, val2, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)20, (int?)26, (int?)null, (int?)null, (int?)2, (int?)1, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)512, (Keyword)512, (IReadOnlyList<string>)new List<string> { "DayuuFriendSe" }, (IReadOnlyList<string>)new List<string> { "DayuuFriendSe" }, (IReadOnlyList<string>)new List<string> { "DayuuExodia" }, (IReadOnlyList<string>)new List<string> { "DayuuExodia" }, (string)null, "", "", false, "Fun Bo", (IReadOnlyList<string>)new List<string> { "MIO" }); } } [EntityLogic(typeof(DayuuDefenseDef))] public sealed class DayuuDefense : Card { public override bool DiscardCard => true; 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).SacrificeAction(((Card)this).Value1); yield return ((Card)this).DefenseAction(true); if (((Card)this).Battle.DrawZone.Count > 0) { Card drawzone = ((Card)this).Battle.DrawZone.First(); yield return (BattleAction)new MoveCardAction(drawzone, (CardZone)2); if ((int)drawzone.CardType == 1 && (int)drawzone.Zone == 2) { yield return (BattleAction)new DiscardAction(drawzone); } } if (((Card)this).Battle.DiscardZone.Count > 0) { Card discardzone = ((Card)this).Battle.DiscardZone.Last(); yield return (BattleAction)new MoveCardAction(discardzone, (CardZone)2); if ((int)discardzone.CardType == 1 && (int)discardzone.Zone == 2) { yield return (BattleAction)new DiscardAction(discardzone); } } } } public sealed class DayuuExodiaDef : CardTemplate { 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("DayuuExodia"); } 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", "Resources.", false); return val; } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.cardLoc.AddEntity((EntityDefinition)(object)this); } public override CardConfig MakeConfig() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown int num = BepinexPlugin.sequenceTable.Next(typeof(CardConfig)); string[][] array = new string[0][]; TargetType? val = (TargetType)0; List<ManaColor> obj = new List<ManaColor> { (ManaColor)6 }; ManaGroup val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 0; return new CardConfig(num, "", 99, true, array, "Simple1", "Simple1", 0, false, false, false, true, false, (Rarity)2, (CardType)5, val, (IReadOnlyList<ManaColor>)obj, false, val2, (ManaGroup?)null, (int?)null, (int?)99999, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)9, (int?)null, (int?)0, (int?)null, (int?)0, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (string)null, "", "", false, "Yoshioka Yoshiko", (IReadOnlyList<string>)new List<string> { "MIO" }); } } [EntityLogic(typeof(DayuuExodiaDef))] public sealed class DayuuExodia : Card { [UsedImplicitly] public float Amount { get { //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) DamageInfo damage = ((Card)this).Damage; return ((DamageInfo)(ref damage)).Amount; } } public override IEnumerable<BattleAction> OnDiscard(CardZone srcZone) { if (((Card)this).Battle.BattleShouldEnd) { return null; } return ((Card)this).GetPassiveActions(); } public override IEnumerable<BattleAction> OnExile(CardZone srcZone) { if (((Card)this).Battle.BattleShouldEnd) { return null; } return ((Card)this).GetPassiveActions(); } public override IEnumerable<BattleAction> OnMove(CardZone srcZone, CardZone dstZone) { if (((Card)this).Battle.BattleShouldEnd) { return null; } return ((Card)this).GetPassiveActions(); } protected override void OnEnterBattle(BattleController battle) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown if ((int)((Card)this).Zone == 2) { ((GameEntity)this).React(new LazySequencedReactor(AddToHandReactor)); } } private IEnumerable<BattleAction> AddToHandReactor() { yield return (BattleAction)(object)PerformAction.Effect((Unit)(object)((Card)this).Battle.Player, "Wave1s", 0f, "BirdSing", 0f, (EffectBehavior)0, 0f); yield return (BattleAction)(object)PerformAction.Effect((Unit)(object)((Card)this).Battle.Player, "Wave1s", 0.5f, "", 0f, (EffectBehavior)0, 0f); yield return (BattleAction)(object)PerformAction.Effect((Unit)(object)((Card)this).Battle.Player, "Wave1s", 1f, "", 0f, (EffectBehavior)0, 0f); yield return (BattleAction)(object)PerformAction.Effect((Unit)(object)((Card)this).Battle.Player, "JunkoNightmare", 0f, "JunkoNightmare", 0f, (EffectBehavior)0, 0f); yield return (BattleAction)(object)PerformAction.Effect((Unit)(object)((Card)this).Battle.Player, "JunkoNightmare", 0.5f, "", 0f, (EffectBehavior)0, 0f); yield return (BattleAction)(object)PerformAction.Effect((Unit)(object)((Card)this).Battle.Player, "JunkoNightmare", 1f, "", 0f, (EffectBehavior)0, 0f); yield return ((Card)this).BuffAction<DayuuExodiaSeDef.DayuuExodiaSe>(0, 0, 0, 0, 0f); } public override IEnumerable<BattleAction> OnTurnEndingInHand() { return ((Card)this).GetPassiveActions(); } public override IEnumerable<BattleAction> GetPassiveActions() { if (!((Card)this).Summoned || ((Card)this).Battle.BattleShouldEnd) { yield break; } ((Card)this).NotifyActivating(); ((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost; for (int i = 0; i < ((Card)this).Battle.FriendPassiveTimes; i++) { if (((Card)this).Battle.BattleShouldEnd) { break; } GunConfig.FromName("究极火花B").Spell = null; yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((Card)this).Battle.Player, (Unit)(object)((Card)this).Battle.AllAliveEnemies.FirstOrDefault(), "究极火花B", 0.01f); yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((Card)this).Battle.Player, (Unit)(object)((Card)this).Battle.AllAliveEnemies.FirstOrDefault(), "究极火花B", 0.01f); yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((Card)this).Battle.Player, (Unit)(object)((Card)this).Battle.AllAliveEnemies.FirstOrDefault(), "究极火花B", 0.01f); yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((Card)this).Battle.Player, (Unit)(object)((Card)this).Battle.AllAliveEnemies.FirstOrDefault(), "究极火花B", 0.01f); yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((Card)this).Battle.Player, (Unit)(object)((Card)this).Battle.AllAliveEnemies.FirstOrDefault(), "究极火花B", 0.01f); yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((Card)this).Battle.Player, (Unit)(object)((Card)this).Battle.AllAliveEnemies.FirstOrDefault(), "究极火花B", 0.01f); yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((Card)this).Battle.Player, (Unit)(object)((Card)this).Battle.AllAliveEnemies.FirstOrDefault(), "究极火花B", 0.01f); yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((Card)this).Battle.Player, (Unit)(object)((Card)this).Battle.AllAliveEnemies.FirstOrDefault(), "究极火花B", 2.6f); GunConfig.FromName("究极火花B").Spell = "究极火花"; PlayerUnit player = ((Card)this).Battle.Player; IEnumerable<EnemyUnit> allAliveEnemies = ((Card)this).Battle.AllAliveEnemies; DamageInfo damage = ((Card)this).Damage; yield return (BattleAction)new DamageAction((Unit)(object)player, (IEnumerable<Unit>)allAliveEnemies, DamageInfo.Reaction(((DamageInfo)(ref damage)).Amount, false), "Instant", (GunType)0); } } 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) if (precondition == null || (int)((MiniSelectCardInteraction)precondition).SelectedCard.FriendToken == 1) { ((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).ActiveCost; GunConfig.FromName("究极火花B").Spell = null; yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((Card)this).Battle.Player, (Unit)(object)((Card)this).Battle.AllAliveEnemies.FirstOrDefault(), "究极火花B", 0.01f); yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((Card)this).Battle.Player, (Unit)(object)((Card)this).Battle.AllAliveEnemies.FirstOrDefault(), "究极火花B", 0.01f); yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((Card)this).Battle.Player, (Unit)(object)((Card)this).Battle.AllAliveEnemies.FirstOrDefault(), "究极火花B", 0.01f); yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((Card)this).Battle.Player, (Unit)(object)((Card)this).Battle.AllAliveEnemies.FirstOrDefault(), "究极火花B", 0.01f); yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((Card)this).Battle.Player, (Unit)(object)((Card)this).Battle.AllAliveEnemies.FirstOrDefault(), "究极火花B", 0.01f); yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((Card)this).Battle.Player, (Unit)(object)((Card)this).Battle.AllAliveEnemies.FirstOrDefault(), "究极火花B", 0.01f); yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((Card)this).Battle.Player, (Unit)(object)((Card)this).Battle.AllAliveEnemies.FirstOrDefault(), "究极火花B", 0.01f); yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((Card)this).Battle.Player, (Unit)(object)((Card)this).Battle.AllAliveEnemies.FirstOrDefault(), "究极火花B", 2.6f); GunConfig.FromName("究极火花B").Spell = "究极火花"; PlayerUnit player = ((Card)this).Battle.Player; IEnumerable<EnemyUnit> allAliveEnemies = ((Card)this).Battle.AllAliveEnemies; DamageInfo damage = ((Card)this).Damage; yield return (BattleAction)new DamageAction((Unit)(object)player, (IEnumerable<Unit>)allAliveEnemies, DamageInfo.Reaction(((DamageInfo)(ref damage)).Amount, false), "Instant", (GunType)0); } } public override IEnumerable<BattleAction> AfterUseAction() { if (((Card)this).Summoned && !((Card)this).Battle.BattleShouldEnd) { if (((Card)this).Loyalty <= 0 || ((Card)this).UltimateUsed) { yield return (BattleAction)new RemoveCardAction((Card)(object)this); } else { yield return (BattleAction)new MoveCardAction((Card)(object)this, (CardZone)2); } } } protected override void OnLeaveBattle() { } } public sealed class DayuuExodiaSeDef : StatusEffectTemplate { [EntityLogic(typeof(DayuuExodiaSeDef))] public sealed class DayuuExodiaSe : StatusEffect { public override string UnitEffectName => "InvincibleLoop"; protected override void OnAdded(Unit unit) { ((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(unit.DamageTaking, (GameEventHandler<DamageEventArgs>)OnDamageTaking); } private void OnDamageTaking(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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) DamageInfo damageInfo = args.DamageInfo; int num = MathExtensions.RoundToInt(((DamageInfo)(ref damageInfo)).Damage); if (num > 0) { ((StatusEffect)this).NotifyActivating(); damageInfo = args.DamageInfo; args.DamageInfo = ((DamageInfo)(ref damageInfo)).ReduceActualDamageBy(num); ((GameEventArgs)args).AddModifier((GameEntity)(object)this); } } } public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("DayuuExodiaSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(