Explorar el Código

updated green cards from PR

mbunch_kascope hace 1 año
padre
commit
4e26676a6a

+ 19 - 6
Assets/CardEffect/BT21/Green/BT21_047.cs

@@ -9,11 +9,17 @@ namespace DCGO.CardEffects.BT21
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            #region Link
-            if (timing == EffectTiming.OnDeclaration)
+            #region Link Condition
+            if (timing == EffectTiming.None)
             {
-                cardEffects.Add(CardEffectFactory.LinkEffect(card, 1, 2000));
+                static bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.HasAppmonTraits;
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfLinkConditionStaticEffect(permanentCondition: PermanentCondition, linkCost: 1, card: card));
             }
+
             #endregion
 
             #region Alternate Digivolution Condition
@@ -21,13 +27,20 @@ namespace DCGO.CardEffects.BT21
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    return targetPermanent.TopCard.ContainsTraits("Appmon") && targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.Level == 2;
+                    return targetPermanent.TopCard.HasAppmonTraits && targetPermanent.TopCard.Level == 2;
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 0, ignoreDigivolutionRequirement: false, card: card, condition: null));
             }
             #endregion
 
+            #region Basic link effect keyword
+            if (timing == EffectTiming.OnDeclaration)
+            {
+                cardEffects.Add(CardEffectFactory.LinkEffect(card));
+            }
+            #endregion
+
             #region On Play
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
@@ -43,12 +56,12 @@ namespace DCGO.CardEffects.BT21
 
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
-                    return cardSource.ContainsTraits("Appmon");
+                    return cardSource.HasAppmonTraits;
                 }
 
                 bool CanSelectCardCondition1(CardSource cardSource)
                 {
-                    return cardSource.ContainsTraits("App Driver");
+                    return cardSource.EqualsTraits("App Driver");
                 }
 
                 bool CanUseCondition(Hashtable hashtable)

+ 1 - 1
Assets/CardEffect/BT21/Green/BT21_048.cs

@@ -15,7 +15,7 @@ namespace DCGO.CardEffects.BT21
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    return targetPermanent.TopCard.ContainsTraits("WG") && targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.Level == 2;
+                    return targetPermanent.TopCard.EqualsTraits("WG") && targetPermanent.TopCard.IsLevel2;
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 0, ignoreDigivolutionRequirement: false, card: card, condition: null));

+ 5 - 5
Assets/CardEffect/BT21/Green/BT21_049.cs

@@ -16,7 +16,7 @@ namespace DCGO.CardEffects.BT21
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    return (targetPermanent.TopCard.ContainsTraits("WG") && targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.Level == 3);
+                    return (targetPermanent.TopCard.EqualsTraits("WG") && targetPermanent.TopCard.IsLevel3);
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 2, ignoreDigivolutionRequirement: false, card: card, condition: null));
@@ -28,7 +28,7 @@ namespace DCGO.CardEffects.BT21
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Suspend 1 Digimon", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -65,7 +65,7 @@ namespace DCGO.CardEffects.BT21
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             maxCount: maxCount,
-                            canNoSelect: false,
+                            canNoSelect: true,
                             canEndNotMax: false,
                             selectPermanentCoroutine: null,
                             afterSelectPermanentCoroutine: null,
@@ -85,7 +85,7 @@ namespace DCGO.CardEffects.BT21
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Suspend 1 Digimon", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -123,7 +123,7 @@ namespace DCGO.CardEffects.BT21
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             maxCount: maxCount,
-                            canNoSelect: false,
+                            canNoSelect: true,
                             canEndNotMax: false,
                             selectPermanentCoroutine: null,
                             afterSelectPermanentCoroutine: null,

+ 1 - 1
Assets/CardEffect/BT21/Green/BT21_050.cs

@@ -15,7 +15,7 @@ namespace DCGO.CardEffects.BT21
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    return (targetPermanent.TopCard.ContainsTraits("WG") && targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.Level == 4);
+                    return (targetPermanent.TopCard.EqualsTraits("WG") && targetPermanent.TopCard.IsLevel4);
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 2, ignoreDigivolutionRequirement: false, card: card, condition: null));

+ 1 - 1
Assets/CardEffect/BT21/Green/BT21_052.cs

@@ -135,7 +135,7 @@ namespace DCGO.CardEffects.BT21
 
                 string EffectDescription()
                 {
-                    return "[All Turns][Once Per Turn] Suspend all of your opponent's Digimon and Tamers. Then, delete 1 of their suspended Digimon or Tamers.";
+                    return "[All Turns] [Once Per Turn] When this Digimon suspends, it unsuspends. Then, if [Examon] or [X Antibody] is in this Digimon's digivolution cards, trash your opponent's top security card.";
                 }
 
                 bool CanUseCondition(Hashtable hashtable)

+ 23 - 17
Assets/CardEffect/BT21/Green/BT21_097.cs

@@ -112,9 +112,9 @@ namespace DCGO.CardEffects.BT21
                     return false;
                 }
 
-                bool CanSelectPermanentCondition(Permanent permanent)
+                bool CanSelectLinkTarget(CardSource cardSoure)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+                    return cardSoure.CanLink(false);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -127,13 +127,11 @@ namespace DCGO.CardEffects.BT21
 
                     IEnumerator SuccessProcess()
                     {
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition) && card.Owner.HandCards.Count >= 1)
-                        {
-                            Permanent selectedPermanent = null;
-                            CardSource cardForLinking = null;
-
-                            int maxCount = 1;
+                        Permanent selectedPermanent = null;
+                        CardSource cardForLinking = null;
 
+                        if (CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectLinkTarget))
+                        {
                             SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
 
                             selectHandEffect.SetUp(
@@ -141,7 +139,7 @@ namespace DCGO.CardEffects.BT21
                                 canTargetCondition: (cardSource) => true,
                                 canTargetCondition_ByPreSelecetedList: null,
                                 canEndSelectCondition: null,
-                                maxCount: maxCount,
+                                maxCount: 1,
                                 canNoSelect: false,
                                 canEndNotMax: false,
                                 isShowOpponent: true,
@@ -150,17 +148,20 @@ namespace DCGO.CardEffects.BT21
                                 mode: SelectHandEffect.Mode.Custom,
                                 cardEffect: activateClass);
 
-                            selectHandEffect.SetUpCustomMessage("Select 1 card to use for linking.", "The opponent is selecting 1 card to use for linking.");
+                            selectHandEffect.SetUpCustomMessage("Select 1 card to link.", "The opponent is selecting 1 card to link.");
 
                             yield return StartCoroutine(selectHandEffect.Activate());
+                        }
 
-                            IEnumerator SelectCardCoroutine(CardSource cardSource)
-                            {
-                                cardForLinking = cardSource;
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            cardForLinking = cardSource;
 
-                                yield return null;
-                            }
+                            yield return null;
+                        }
 
+                        if(cardForLinking != null)
+                        {
                             SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
                             selectPermanentEffect.SetUp(
@@ -168,7 +169,7 @@ namespace DCGO.CardEffects.BT21
                                 canTargetCondition: CanSelectPermanentCondition,
                                 canTargetCondition_ByPreSelecetedList: null,
                                 canEndSelectCondition: null,
-                                maxCount: maxCount,
+                                maxCount: 1,
                                 canNoSelect: false,
                                 canEndNotMax: false,
                                 selectPermanentCoroutine: SelectPermanentCoroutine,
@@ -180,6 +181,11 @@ namespace DCGO.CardEffects.BT21
 
                             yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
+                            bool CanSelectPermanentCondition(Permanent permanent)
+                            {
+                                return cardForLinking.CanLinkFromTargetPermanent(permanent, false);
+                            }
+
                             IEnumerator SelectPermanentCoroutine(Permanent permanent)
                             {
                                 selectedPermanent = permanent;
@@ -189,7 +195,7 @@ namespace DCGO.CardEffects.BT21
 
                             if (selectedPermanent != null)
                             {
-                                yield return ContinuousController.instance.StartCoroutine(selectedPermanent.AddLinkCard(cardForLinking, 2000, activateClass));
+                                yield return ContinuousController.instance.StartCoroutine(selectedPermanent.AddLinkCard(cardForLinking, activateClass));
                             }
                         }
                     }

+ 1 - 1
Assets/CardEffect/BT21/Green/BT21_51.cs

@@ -15,7 +15,7 @@ namespace DCGO.CardEffects.BT21
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    return (targetPermanent.TopCard.ContainsTraits("WG") && targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.Level == 5);
+                    return (targetPermanent.TopCard.EqualsTraits("WG") && targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.Level == 5);
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 3, ignoreDigivolutionRequirement: false, card: card, condition: null));