Kaynağa Gözat

Merge pull request #100 from DCGO2/BT21-White

BT21 - White Cards
Michael8818 1 yıl önce
ebeveyn
işleme
cdb3d8cb3f

+ 382 - 0
Assets/CardEffect/BT21/White/BT21_101.cs

@@ -0,0 +1,382 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+// Gaiamon
+namespace DCGO.CardEffects.BT21
+{
+    public class BT21_101 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Static Effects
+
+            #region App Fusion (Globemon & Charismon)
+
+            if (timing == EffectTiming.None)
+            {
+                AddAppFusionConditionClass addAppFusionConditionClass = new AddAppFusionConditionClass();
+                addAppFusionConditionClass.SetUpICardEffect($"App Fusion", (hashtable) => true, card);
+                addAppFusionConditionClass.SetUpAddAppFusionConditionClass(getAppFusionCondition: GetAppFusion);
+                addAppFusionConditionClass.SetNotShowUI(true);
+                cardEffects.Add(addAppFusionConditionClass);
+
+                AppFusionCondition GetAppFusion(CardSource cardSource)
+                {
+                    string selectLinkMessage = "";
+                    string selectDigimonMessage = "";
+                    bool linkCondition(CardSource source)
+                    {
+                        if (source != null)
+                        {
+                            if (source.PermanentOfThisCard().TopCard.EqualsCardName("Globemon"))
+                            {
+                                if (source.PermanentOfThisCard().LinkedCards.Find(x => x.EqualsCardName("Charismon")))
+                                {
+                                    selectLinkMessage = "1 [Charismon]";
+                                    return true;
+                                }
+                            }
+                            if (source.PermanentOfThisCard().TopCard.EqualsCardName("Charismon"))
+                            {
+                                if (source.PermanentOfThisCard().LinkedCards.Find(x => x.EqualsCardName("Globemon")))
+                                {
+                                    selectLinkMessage = "1 [Globemon]";
+                                    return true;
+                                }
+                            }
+                            return false;
+                        }
+
+                        return false;
+                    }
+                    bool digimonCondition(Permanent permanent)
+                    {
+                        if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                        {
+                            if (permanent.TopCard.EqualsCardName("Globemon"))
+                            {
+                                if (permanent.LinkedCards.Find(x => x.EqualsCardName("Charismon")))
+                                {
+                                    selectDigimonMessage = "1 [Charismon]";
+                                    return true;
+                                }
+                            }
+                            if (permanent.TopCard.EqualsCardName("Charismon"))
+                            {
+                                if (permanent.LinkedCards.Find(x => x.EqualsCardName("Globemon")))
+                                {
+                                    selectDigimonMessage = "1 [Globemon]";
+                                    return true;
+                                }
+                            }
+                            return false;
+                        }
+
+                        return false;
+                    }
+
+                    if (cardSource == card)
+                    {
+                        AppFusionCondition AppFusionCondition = new AppFusionCondition(
+                            linkedCondition: linkCondition,
+                            selectLinkMessage: selectLinkMessage,
+                            digimonCondition: digimonCondition,
+                            selectDigimonMessage: selectDigimonMessage,
+                            cost: 0);
+
+                        return AppFusionCondition;
+                    }
+
+                    return null;
+                }
+            }
+
+            #endregion
+
+            #region Blocker
+
+            if (timing == EffectTiming.None) cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
+
+            #endregion
+
+            #region Link +1
+
+            if (timing == EffectTiming.None) cardEffects.Add(CardEffectFactory.ChangeSelfLinkMaxStaticEffect(card.PermanentOfThisCard().LinkedMax + 1, false, card, null));
+
+            #endregion
+
+            #endregion
+
+            #region YourTurn
+
+            if (timing == EffectTiming.WhenLinked)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Unsuspend, trash top sec", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetHashString("BT21_101_WhenLinked");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                    => "[Your Turn] [Once Per Turn] When your Digimon get linked, by unsuspending this Digimon, trash your opponent's top security card.";
+
+                bool CanUseCondition(Hashtable hashtable)
+                    => CardEffectCommons.IsExistOnBattleAreaDigimon(card)
+                    && CardEffectCommons.IsOwnerTurn(card)
+                    && CardEffectCommons.CanTriggerWhenLinked(hashtable, PermanentCondition, cardSource => true)
+                    && card.PermanentOfThisCard().IsSuspended
+                    && CardEffectCommons.CanUnsuspend(card.PermanentOfThisCard());
+
+                bool PermanentCondition(Permanent permanent)
+                    => CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+
+                bool CanActivateCondition(Hashtable hashtable)
+                    => CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    bool unsuspended = false;
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+                    selectPermanentEffect.SetUp
+                        (
+                        card.Owner,
+                        permanent => CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(permanent) && permanent == card.PermanentOfThisCard(),
+                        null,
+                        null,
+                        1,
+                        true,
+                        false,
+                        SelectPermanentCoroutine,
+                        null,
+                        SelectPermanentEffect.Mode.UnTap,
+                        activateClass
+                        );
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    {
+                        if (permanent.IsSuspended) unsuspended = true;
+                        yield return null;
+                    }
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                    if (unsuspended)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
+                        player: card.Owner.Enemy,
+                        destroySecurityCount: 1,
+                        cardEffect: activateClass,
+                        fromTop: true).DestroySecurity());
+                    }
+                }
+            }
+
+            #endregion
+
+            #region WD/WA Shared
+
+            bool SharedCanActivateCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                {
+                    return true;
+                }
+                return false;
+            }
+
+            bool CanSelectLinkCard(CardSource cardSource)
+            {
+                if (cardSource.HasAppmonTraits)
+                {
+                    return true;
+                }
+                return false;
+            }
+
+            bool CanSelectDigimon(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                {
+                    return true;
+                }
+                return false;
+            }
+            IEnumerator SharedActivateCoroutine(Hashtable hashtable, ActivateClass activateClass)
+            {
+                if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, CanSelectDigimon))
+                {
+                    Permanent selectedPermanent = null;
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectDigimon));
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectDigimon,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: true,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: SelectPermanentCoroutine,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Custom,
+                        cardEffect: activateClass);
+
+                    selectPermanentEffect.SetUpCustomMessage("Select 1 digimon to add link", "The opponent is selecting 1 digimon to add link");
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    {
+                        selectedPermanent = permanent;
+                        yield return null;
+                    }
+
+                    if (selectedPermanent != null)
+                    {
+                        List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
+                        {
+                            new SelectionElement<bool>(message: $"From This Digimon", value: true, spriteIndex: 0),
+                            new SelectionElement<bool>(message: $"From Hand", value: false, spriteIndex: 1),
+                        };
+
+                        string selectPlayerMessage = "Choose where to get the digimon from";
+                        string notSelectPlayerMessage = "The opponent is choosing effects.";
+
+                        GManager.instance.userSelectionManager.SetBoolSelection(
+                            selectionElements: selectionElements, selectPlayer: card.Owner,
+                            selectPlayerMessage: selectPlayerMessage,
+                            notSelectPlayerMessage: notSelectPlayerMessage);
+
+                        yield return ContinuousController.instance.StartCoroutine(GManager.instance
+                            .userSelectionManager.WaitForEndSelect());
+
+                        CardSource selectedCard = null;
+                        if (GManager.instance.userSelectionManager.SelectedBoolValue)
+                        {
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+                            selectCardEffect.SetUp(
+                                        canTargetCondition: CanSelectLinkCard,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canEndSelectCondition: null,
+                                        canNoSelect: () => true,
+                                        selectCardCoroutine: SelectCardCoroutine,
+                                        afterSelectCardCoroutine: null,
+                                        message: "Select 1 linked card.",
+                                        maxCount: 1,
+                                        canEndNotMax: false,
+                                        isShowOpponent: true,
+                                        mode: SelectCardEffect.Mode.Custom,
+                                        root: SelectCardEffect.Root.Custom,
+                                        customRootCardList: card.PermanentOfThisCard().LinkedCards,
+                                        canLookReverseCard: true,
+                                        selectPlayer: card.Owner,
+                                        cardEffect: activateClass);
+
+                            selectCardEffect.SetUpCustomMessage("Select 1 linked card to remove", "The opponent is selecting 1 linked card to remove");
+
+                            yield return StartCoroutine(selectCardEffect.Activate());
+
+                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            {
+                                selectedCard = cardSource;
+                                card.PermanentOfThisCard().LinkedCards.Remove(cardSource);
+                                yield return null;
+                            }
+                        }
+                        else
+                        {
+                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+                            selectHandEffect.SetUp(
+                                        selectPlayer: card.Owner,
+                                        canTargetCondition: CanSelectLinkCard,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canEndSelectCondition: null,
+                                        maxCount: 1,
+                                        canNoSelect: true,
+                                        canEndNotMax: false,
+                                        isShowOpponent: true,
+                                        selectCardCoroutine: SelectCardCoroutine,
+                                        afterSelectCardCoroutine: null,
+                                        mode: SelectHandEffect.Mode.Custom,
+                                        cardEffect: activateClass);
+                            selectHandEffect.SetUpCustomMessage("Select 1 linked card to remove", "The opponent is selecting 1 linked card to remove");
+                            yield return StartCoroutine(selectHandEffect.Activate());
+                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            {
+                                selectedCard = cardSource;
+                                yield return null;
+                            }
+                        }
+                        if (selectedCard != null)
+                        {
+                            // Might need to talk to mike about this, things possibly to add
+                            // if link condiiton for selectedCard is sucessful, ex: if it needs exact name or traits, does it meet them.
+                            // Perphaps may lead to link requirements being added to the card itself, instead of an effect.
+                            // if this method below (AddLinkCard), automatically handles if the link max is hit, and allows for owner to choose which link to discarded for new one.
+                            selectedPermanent.AddLinkCard(selectedCard, activateClass);
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Add new link to a digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(SharedCanActivateCondition, (hashtable) => SharedActivateCoroutine(hashtable, activateClass), -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                    => "[When Digivolving] You may link 1 Digimon card with the [Appmon] trait from your hand or this Digimon's digivolution cards to 1 of your Digimon without paying the cost.";
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+            }
+
+            #endregion
+
+            #region When Attacking
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Add new link to a digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(SharedCanActivateCondition, (hashtable) => SharedActivateCoroutine(hashtable, activateClass), -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                    => "[When Attacking] You may link 1 Digimon card with the [Appmon] trait from your hand or this Digimon's digivolution cards to 1 of your Digimon without paying the cost.";
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.CanTriggerOnAttack(hashtable, card))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT21/White/BT21_101.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 463c2bbb3b750a647b1aa867d2b1198c
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 142 - 0
Assets/CardEffect/BT21/White/BT21_102.cs

@@ -0,0 +1,142 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+// Tai Kamiya
+namespace DCGO.CardEffects.BT21
+{
+    public class BT21_102 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Start of Your Turn
+
+            if (timing == EffectTiming.OnStartTurn) cardEffects.Add(CardEffectFactory.SetMemoryTo3TamerEffect(card));
+
+            #endregion
+
+            #region Your Turn
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Suspend to draw 1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                    => "When one of your Digimon attacks, by suspending this Tamer, <Draw 1>";
+
+                bool CanUseCondition(Hashtable hashtable)
+                    => CardEffectCommons.IsExistOnBattleArea(card)
+                    && CardEffectCommons.IsOwnerTurn(card)
+                    && CardEffectCommons.CanActivateSuspendCostEffect(card)
+                    && CardEffectCommons.CanTriggerOnPermanentAttack(hashtable, PermanentCondition);
+
+                bool PermanentCondition(Permanent permanent)
+                    => CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+
+                bool CanActivateCondition(Hashtable hashtable)
+                    => CardEffectCommons.IsExistOnBattleArea(card);
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(new List<Permanent>() { card.PermanentOfThisCard() }, CardEffectCommons.CardEffectHashtable(activateClass)).Tap());
+
+                    if (card.Owner.LibraryCards.Count >= 1)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Main
+
+            if (timing == EffectTiming.OnDeclaration)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Play Adventure/Hero Digimon for reduced cost", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetHashString("Play_BT21_102");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                    => "[Main] [Once Per Turn] You may play 1 [ADVENTURE]/[Hero] trait card with a play cost of 2 or less from your hand without paying the cost. For each of your Tamers' colors, add 1 to this effect's play cost maximum. Then, return this Tamer to the bottom of the deck.";
+
+                bool CanUseCondition(Hashtable hashtable)
+                    => CardEffectCommons.IsExistOnBattleArea(card)
+                    && CardEffectCommons.IsOwnerTurn(card)
+                    && CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectDigimon);
+
+                bool CanActivateCondition(Hashtable hashtable)
+                    => CardEffectCommons.IsExistOnBattleArea(card);
+
+                bool CanSelectDigimon(CardSource source)
+                    => source.IsDigimon
+                    && source.BasePlayCostFromEntity <= AdjustedPlayCostMax(source)
+                    && (source.HasAdventureTraits || source.HasHeroTraits);
+
+                int AdjustedPlayCostMax(CardSource cardSource)
+                {
+                    var tamers = cardSource.Owner.GetBattleAreaPermanents().Filter(x => x.IsTamer).Select(x => x.TopCard).ToList();
+                    return 2 + Combinations.GetDifferenetColorCardCount(tamers);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+                    selectHandEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectDigimon,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: 1,
+                        canNoSelect: true,
+                        canEndNotMax: false,
+                        isShowOpponent: true,
+                        selectCardCoroutine: SelectCardCoroutine,
+                        afterSelectCardCoroutine: null,
+                        mode: SelectHandEffect.Mode.Custom,
+                        cardEffect: activateClass);
+
+                    selectHandEffect.SetUpCustomMessage("Select 1 digimon to play.",
+                        "The opponent is selecting 1 digimon to play.");
+                    selectHandEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                    yield return StartCoroutine(selectHandEffect.Activate());
+
+                    IEnumerator SelectCardCoroutine(CardSource cardSource)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                            cardSources: new List<CardSource>() { cardSource },
+                            activateClass: activateClass,
+                            payCost: false,
+                            isTapped: false,
+                            root: SelectCardEffect.Root.Hand,
+                            activateETB: true,
+                            isBreedingArea: false
+                        ));
+                    }
+
+                    var cardSources = new List<CardSource>() { card };
+                    yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryBottomCards(cardSources));
+                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect2(cardSources, "Deck Bottom Cards", true, true));
+                }
+            }
+
+            #endregion
+
+            #region Security
+
+            if (timing == EffectTiming.SecuritySkill) cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT21/White/BT21_102.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1689fc9e5aa4efd4c84fb4bd9c958e8a
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 0 - 7
Assets/Scripts/CardEffectCommons/GameContextDeterminarion.cs

@@ -526,11 +526,4 @@ public partial class CardEffectCommons
     }
 
     #endregion
-
-    #region Get multi colour count from permanents in owners battle area
-
-    public static int GetColourCountOnOwnerBattleArea(CardSource card, Func<Permanent, bool> canGetCardColour) =>
-        card.Owner.GetBattleAreaPermanents().Filter(x => canGetCardColour(x)).ToList().Count;
-
-    #endregion
 }

+ 78 - 44
Assets/Scripts/CardSource.cs

@@ -253,7 +253,7 @@ public class CardSource : MonoBehaviour
     #region Permanent in the field containing this card
     public Permanent PermanentOfThisCard()
     {
-        return Owner.GetFieldPermanents().Find(permanent => 
+        return Owner.GetFieldPermanents().Find(permanent =>
             (permanent.cardSources.Contains(this)) && !IsFlipped);
     }
     #endregion
@@ -406,7 +406,7 @@ public class CardSource : MonoBehaviour
                     .Map<EvoCost, Func<Permanent, int>>(evoCost =>
                     (targetPermanent) =>
                     {
-                        if(ignore.Equals(CardEffectCommons.IgnoreRequirement.All) && Owner.CanIgnoreDigivolutionRequirement(targetPermanent, this))
+                        if (ignore.Equals(CardEffectCommons.IgnoreRequirement.All) && Owner.CanIgnoreDigivolutionRequirement(targetPermanent, this))
                             return evoCost.MemoryCost;
 
                         if ((ignore.Equals(CardEffectCommons.IgnoreRequirement.Color) && Owner.CanIgnoreDigivolutionRequirement(targetPermanent, this))
@@ -432,7 +432,7 @@ public class CardSource : MonoBehaviour
     {
         CardEffectCommons.IgnoreRequirement ignore = CardEffectCommons.IgnoreRequirement.None;
 
-        if(ignoreLevel)
+        if (ignoreLevel)
             ignore = CardEffectCommons.IgnoreRequirement.Level;
 
         return EvoCosts(ignore, checkAvailability)
@@ -528,7 +528,7 @@ public class CardSource : MonoBehaviour
     #endregion
 
     #region get card cost of itself (refered by card effects)
-    public int GetCostItself => Math.Max(0, GetChangedCostItselef(BasePlayCostFromEntity, SelectCardEffect.Root.None, new List<Permanent>() { PermanentOfThisCard()}));
+    public int GetCostItself => Math.Max(0, GetChangedCostItselef(BasePlayCostFromEntity, SelectCardEffect.Root.None, new List<Permanent>() { PermanentOfThisCard() }));
     #endregion
 
     #region get card cost of itself taking into account card effects
@@ -611,7 +611,7 @@ public class CardSource : MonoBehaviour
     }
     #endregion
 
-        #region get card cost to pay of itself taking into account card effects
+    #region get card cost to pay of itself taking into account card effects
     public int GetChangedPayingCost(int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents, bool checkAvailability = false)
     {
         #region card effects that changes card cost to pay
@@ -1408,7 +1408,7 @@ public class CardSource : MonoBehaviour
                 return true;
             }
 
-            if(ContainsTraits("SeaAnimal"))
+            if (ContainsTraits("SeaAnimal"))
             {
                 return true;
             }
@@ -1417,7 +1417,7 @@ public class CardSource : MonoBehaviour
         }
     }
     #endregion
-    
+
     #region whether this card has at least 1 trait that contains "Angel"
     public bool HasAngelTraits
     {
@@ -1427,37 +1427,37 @@ public class CardSource : MonoBehaviour
             {
                 return true;
             }
-            
+
             if (ContainsTraits("Cherub"))
             {
                 return true;
             }
-            
+
             if (ContainsTraits("Throne"))
             {
                 return true;
             }
-            
+
             if (ContainsTraits("Authority"))
             {
                 return true;
             }
-            
+
             if (ContainsTraits("Seraph"))
             {
                 return true;
             }
-            
+
             if (ContainsTraits("Virtue"))
             {
                 return true;
             }
-            
+
             return false;
         }
     }
     #endregion
-    
+
     #region whether this card has 1 of the "Angel", "Archangel" or "Three Great Angels" trait
     public bool HasAngelTraitRestrictive
     {
@@ -1467,13 +1467,13 @@ public class CardSource : MonoBehaviour
             {
                 return true;
             }
-            
+
             if (ContainsTraits("Archangel"))
             {
                 return true;
             }
-            
-            if (CardTraits.Count(trait => 
+
+            if (CardTraits.Count(trait =>
                     (trait.Contains("Angel") || trait.Contains("angel"))
                     && trait != "Archangel"
                     && trait != "Fallen Angel" && trait != "FallenAngel"
@@ -1481,7 +1481,7 @@ public class CardSource : MonoBehaviour
             {
                 return true;
             }
-            
+
             return false;
         }
     }
@@ -1588,7 +1588,7 @@ public class CardSource : MonoBehaviour
                 return true;
             }
 
-            if(ContainsTraits("Beast Dragon"))
+            if (ContainsTraits("Beast Dragon"))
             {
                 return true;
             }
@@ -1597,7 +1597,7 @@ public class CardSource : MonoBehaviour
         }
     }
     #endregion
-    
+
     #region whether this card has at least 1 trait that contains "DigiPolice"
     public bool HasDigiPoliceTraits
     {
@@ -1607,15 +1607,15 @@ public class CardSource : MonoBehaviour
             {
                 return true;
             }
-            
+
             return false;
         }
     }
     #endregion
-    
+
     #region whether this card has at least 1 trait that contains "Light Fang" or "Night Claw"
     public bool HasLightFangNightClawTraits => ContainsTraits("Light Fang") || ContainsTraits("Night Claw");
-    
+
     #endregion
 
     #region whether this card has at least 1 trait that contains "Light Fang/Night Claw"
@@ -1661,11 +1661,12 @@ public class CardSource : MonoBehaviour
         foreach (string attribute in _cEntity_Base.Type_ENG)
             checkStrings.Add(DataBase.ReplaceToASCII(attribute));
 
-        if(jogressCondition != null){
+        if (jogressCondition != null)
+        {
             foreach (JogressConditionElement element in jogressCondition.elements)
                 checkStrings.Add(element.SelectMessage);
         }
-        
+
 
         foreach (string checkString in checkStrings)
         {
@@ -1691,11 +1692,11 @@ public class CardSource : MonoBehaviour
         return false;
     }
     #endregion
-    
+
     #region whether this card has <Save> in text
     public bool HasSaveText => HasText("<Save>");
     #endregion
-    
+
     #region whether this card has "Pulsemon" in text
     public bool HasPulsemonText => HasText("Pulsemon");
     #endregion
@@ -1980,7 +1981,7 @@ public class CardSource : MonoBehaviour
     #region whether this card has [Blocker]
     public bool HasBlocker =>
         EffectList(EffectTiming.None)
-            .Some(cardEffect => cardEffect is BlockerClass 
+            .Some(cardEffect => cardEffect is BlockerClass
                 && !cardEffect.IsInheritedEffect && !cardEffect.IsSecurityEffect);
     #endregion
 
@@ -2277,35 +2278,35 @@ public class CardSource : MonoBehaviour
     #region whether this card has level
     public bool HasLevel => _cEntity_Base == null || _cEntity_Base.HasLevel;
     #endregion
-    
+
     #region whether this card is level 2
-    
+
     public bool IsLevel2 => (_cEntity_Base == null || _cEntity_Base.HasLevel) && _cEntity_Base.Level == 2;
-    
+
     #endregion
-    
+
     #region whether this card is level 3
-    
+
     public bool IsLevel3 => (_cEntity_Base == null || _cEntity_Base.HasLevel) && _cEntity_Base.Level == 3;
-    
+
     #endregion
-    
+
     #region whether this card is level 4
-    
+
     public bool IsLevel4 => (_cEntity_Base == null || _cEntity_Base.HasLevel) && _cEntity_Base.Level == 4;
-    
+
     #endregion
-    
+
     #region whether this card is level 5
-    
+
     public bool IsLevel5 => (_cEntity_Base == null || _cEntity_Base.HasLevel) && _cEntity_Base.Level == 5;
-    
+
     #endregion
-    
+
     #region whether this card is level 6
-    
+
     public bool IsLevel6 => (_cEntity_Base == null || _cEntity_Base.HasLevel) && _cEntity_Base.Level == 6;
-    
+
     #endregion
 
     #region DigiXros requirement
@@ -2476,7 +2477,7 @@ public class CardSource : MonoBehaviour
                         {
                             if (appFusionCondition.digimonCondition(digimon))
                             {
-                                foreach(CardSource linkedCard in digimon.LinkedCards)
+                                foreach (CardSource linkedCard in digimon.LinkedCards)
                                 {
                                     if (appFusionCondition.linkedCondition(linkedCard))
                                     {
@@ -2746,6 +2747,22 @@ public class CardSource : MonoBehaviour
 
     #endregion
 
+    #region whether this card has "Hero" trait
+
+    public bool HasHeroTraits
+    {
+        get
+        {
+            if (CardTraits.Contains("Hero"))
+            {
+                return true;
+            }
+            return false;
+        }
+    }
+
+    #endregion
+
     #region whether this card has "Chronicle" trait
 
     public bool HasChronicleTraits
@@ -2813,6 +2830,23 @@ public class CardSource : MonoBehaviour
     }
 
     #endregion
+
+    #region whether this card has "Appmon" trait
+
+    public bool HasAppmonTraits
+    {
+        get
+        {
+            if (CardTraits.Find(x => x.Equals("Appmon")) != null)
+            {
+                return true;
+            }
+
+            return false;
+        }
+    }
+
+    #endregion
 }
 
 public class JogressCondition