Просмотр исходного кода

Birddramon(BT15), Zanmetsumon(BT16), VikemonAce(BT16), Minomon(BT15), Amphimon(LM), Amphimon(RB1)

mbunch_kascope 2 лет назад
Родитель
Сommit
3639a75bde

+ 1 - 1
Assets/CardEffect/BT15/Red/Birdramon_BT15_013.cs

@@ -96,7 +96,7 @@ public class Birdramon_BT15_013 : CEntity_Effect
 
             string EffectDiscription()
             {
-                return "[Your Turn][Once Per Turn] When a card is removed from your opponent's security stack, <Draw 1>.";
+                return "[Your Turn] [Once Per Turn] When a card is removed from your opponent's security stack, gain 1 memory.";
             }
 
             bool CanUseCondition(Hashtable hashtable)

+ 15 - 18
Assets/CardEffect/BT16/Black/Zanmetsumon_BT16_062.cs

@@ -109,25 +109,22 @@ namespace DCGO.CardEffects.BT16
                             yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                         }
 
-                        if (card.PermanentOfThisCard().cardSources.Count > 1)
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectDeletePermanentCondition))
                         {
-                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectDeletePermanentCondition))
-                            {
-                                selectPermanentEffect.SetUp(
-                                    selectPlayer: card.Owner,
-                                    canTargetCondition: CanSelectDeletePermanentCondition,
-                                    canTargetCondition_ByPreSelecetedList: null,
-                                    canEndSelectCondition: null,
-                                    maxCount: maxCount,
-                                    canNoSelect: false,
-                                    canEndNotMax: false,
-                                    selectPermanentCoroutine: null,
-                                    afterSelectPermanentCoroutine: null,
-                                    mode: SelectPermanentEffect.Mode.Destroy,
-                                    cardEffect: activateClass);
-
-                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                            }
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectDeletePermanentCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: null,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Destroy,
+                                cardEffect: activateClass);
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                         }
                     }
 

+ 38 - 37
Assets/CardEffect/BT16/Blue/VikemonAce_BT16_026.cs

@@ -92,13 +92,6 @@ namespace DCGO.CardEffects.BT16
                         selectPermanentEffect.SetUpCustomMessage("Select Digimons to De-Digivolve.", "The opponent is selecting Digimons to De-Digivolve.");
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotUnsuspendPlayerEffect(
-                            permanentCondition: CantSuspendCondition,
-                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                            activateClass: activateClass,
-                            isOnlyActivePhase: false,
-                            effectName: "Your Digimon can't unsuspend"));
-
                         IEnumerator SelectPermanentCoroutine(Permanent permanent)
                         {
                             if (permanent != null)
@@ -106,9 +99,15 @@ namespace DCGO.CardEffects.BT16
 
                             yield return null;
                         }
+
                     }
 
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotSuspendPlayerEffect(CantSuspendCondition, EffectDuration.UntilOpponentTurnEnd, activateClass, isOnlyActivePhase: false, "Can't Suspend"));
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotSuspendPlayerEffect(
+                        permanentCondition: CantSuspendCondition,
+                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                        activateClass: activateClass,
+                        isOnlyActivePhase: false,
+                        effectName: "Can't Suspend"));
                 }
             }
             #endregion
@@ -173,13 +172,6 @@ namespace DCGO.CardEffects.BT16
                         selectPermanentEffect.SetUpCustomMessage("Select Digimons to De-Digivolve.", "The opponent is selecting Digimons to De-Digivolve.");
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotUnsuspendPlayerEffect(
-                            permanentCondition: CantSuspendCondition,
-                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                            activateClass: activateClass,
-                            isOnlyActivePhase: false,
-                            effectName: "Your Digimon can't unsuspend"));
-
                         IEnumerator SelectPermanentCoroutine(Permanent permanent)
                         {
                             if (permanent != null)
@@ -187,9 +179,15 @@ namespace DCGO.CardEffects.BT16
 
                             yield return null;
                         }
+
                     }
 
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotSuspendPlayerEffect(CantSuspendCondition, EffectDuration.UntilOpponentTurnEnd, activateClass, isOnlyActivePhase: false, "Can't Suspend"));
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotSuspendPlayerEffect(
+                        permanentCondition: CantSuspendCondition,
+                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                        activateClass: activateClass,
+                        isOnlyActivePhase: false,
+                        effectName: "Can't Suspend"));
                 }
             }
             #endregion
@@ -210,7 +208,7 @@ namespace DCGO.CardEffects.BT16
                 bool CanSelectPermanentCondition(Permanent targetPermanent)
                 {
                     if(CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(targetPermanent, card))
-                        return targetPermanent.DigivolutionCards.Count <= 1;
+                        return (targetPermanent.DigivolutionCards.Count <= 1);
 
                     return false;
                 }
@@ -222,30 +220,33 @@ namespace DCGO.CardEffects.BT16
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                            return true;
+                    }
+
+                    return false;
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    if(CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
-                    {
-                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                        selectPermanentEffect.SetUp(
-                            selectPlayer: card.Owner,
-                            canTargetCondition: CanSelectPermanentCondition,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canEndSelectCondition: null,
-                            maxCount: 1,
-                            canNoSelect: false,
-                            canEndNotMax: false,
-                            selectPermanentCoroutine: null,
-                            afterSelectPermanentCoroutine: null,
-                            mode: SelectPermanentEffect.Mode.Destroy,
-                            cardEffect: activateClass);
-
-                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                    }
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: 1,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Destroy,
+                        cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                 }
             }
             #endregion

+ 1 - 1
Assets/CardEffect/BT16/Green/Minomon_BT16_004.cs

@@ -22,7 +22,7 @@ namespace DCGO.CardEffects.BT16
 
                 string EffectDiscription()
                 {
-                    return "[All Turns][Once Per Turn] When an opponent's Digimon is deleted in battle, if this Digimon has 2 or more colors, gain 1 memory.";
+                    return "[All Turns] [Once Per Turn] When this Digimon deletes an opponent's Digimon in battle, if this Digimon has 2 or more colors, gain 1 memory.";
                 }
 
                 bool PermanentCondition(Permanent permanent)

+ 11 - 6
Assets/CardEffect/LM/Blue/Amphimon_LM_005.cs

@@ -18,11 +18,6 @@ namespace DCGO.CardEffects.LM
             }
 
             #region On Play/When Digivolving Shared
-            string EffectDiscription()
-            {
-                return "[On Play] [When Digivolving] You may trash up to 4 blue cards in your hand. For each one, trash any 1 card under your opponent's Digimon or Tamers. Then, return 1 of their Digimon or Tamers without cards under it to the hand.";
-            }
-
             bool CanSelectCardTrashingCondition(CardSource cardSource)
             {
                 if (cardSource.CardColors.Contains(CardColor.Blue))
@@ -69,6 +64,11 @@ namespace DCGO.CardEffects.LM
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
+                string EffectDiscription()
+                {
+                    return "[On Play] You may trash up to 4 blue cards in your hand. For each one, trash any 1 card under your opponent's Digimon or Tamers. Then, return 1 of their Digimon or Tamers without cards under it to the hand.";
+                }
+
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
                     return !cardSource.CanNotTrashFromDigivolutionCards(activateClass);
@@ -170,6 +170,11 @@ namespace DCGO.CardEffects.LM
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] You may trash up to 4 blue cards in your hand. For each one, trash any 1 card under your opponent's Digimon or Tamers. Then, return 1 of their Digimon or Tamers without cards under it to the hand.";
+                }
+
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
                     return !cardSource.CanNotTrashFromDigivolutionCards(activateClass);
@@ -179,7 +184,7 @@ namespace DCGO.CardEffects.LM
                 {
                     if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
                     {
-                        if (!permanent.TopCard.IsDigiEgg || !permanent.TopCard.IsOption)
+                        if (permanent.IsDigimon || permanent.IsTamer)
                         {
                             if (permanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
                             {

+ 148 - 14
Assets/CardEffect/RB1/Blue/Anfimon_RB1_016.cs

@@ -12,7 +12,8 @@ public class Anfimon_RB1_016 : CEntity_Effect
     {
         List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-        if (timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.OnAllyAttack)
+        #region When Digivolving
+        if (timing == EffectTiming.OnAllyAttack)
         {
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Trash cards from hand to trash digivolution cards, and return  1 Digimon to deck bottom", CanUseCondition, card);
@@ -21,15 +22,7 @@ public class Anfimon_RB1_016 : CEntity_Effect
 
             string EffectDiscription()
             {
-                if (timing == EffectTiming.OnEnterFieldAnyone)
-                {
-                    return "[When Digivolving] You may trash up to 2 blue cards in your hand. For each one, trash any 1 card under your opponent�fs Digimon or Tamers. Then, you may return 1 of your opponent�fDigimon with no digivolution cards to the bottom of the deck.";
-                }
-
-                else
-                {
-                    return "[When Attacking] You may trash up to 2 blue cards in your hand. For each one, trash any 1 card under your opponent�fs Digimon or Tamers. Then, you may return 1 of your opponent�fDigimon with no digivolution cards to the bottom of the deck.";
-                }
+                return "[When Attacking] You may trash up to 2 blue cards in your hand. For each one, trash any 1 card under your opponent�fs Digimon or Tamers. Then, you may return 1 of your opponent�fDigimon with no digivolution cards to the bottom of the deck.";
             }
 
             bool CanSelectCardCondition(CardSource cardSource)
@@ -73,15 +66,154 @@ public class Anfimon_RB1_016 : CEntity_Effect
 
             bool CanUseCondition(Hashtable hashtable)
             {
-                if (timing == EffectTiming.OnEnterFieldAnyone)
+                return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+            }
+
+            bool CanActivateCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
-                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                    if (card.Owner.HandCards.Count >= 1)
+                    {
+                        return true;
+                    }
+
+                    if (card.Owner.Enemy.GetBattleAreaPermanents().Count(CanSelectPermanentCondition1) >= 1)
+                    {
+                        return true;
+                    }
                 }
 
-                else
+                return false;
+            }
+
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
+            {
+                if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
                 {
-                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                    List<CardSource> discardCards = new List<CardSource>();
+
+                    int maxCount = Math.Min(2, card.Owner.HandCards.Count(CanSelectCardCondition));
+
+                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                    selectHandEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectCardCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: true,
+                        canEndNotMax: true,
+                        isShowOpponent: true,
+                        selectCardCoroutine: null,
+                        afterSelectCardCoroutine: AfterSelectCardCoroutine,
+                        mode: SelectHandEffect.Mode.Discard,
+                        cardEffect: activateClass);
+
+                    yield return StartCoroutine(selectHandEffect.Activate());
+
+                    IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
+                    {
+                        if (cardSources.Count >= 1)
+                        {
+                            discardCards = cardSources.Clone();
+
+                            yield return null;
+                        }
+                    }
+
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SelectTrashDigivolutionCards(
+                        permanentCondition: CanSelectPermanentCondition,
+                        cardCondition: CanSelectCardCondition1,
+                        maxCount: discardCards.Count,
+                        canNoTrash: false,
+                        isFromOnly1Permanent: false,
+                        activateClass: activateClass,
+                        selectString: "Digimon or Tamer"
+                    ));
                 }
+
+                if (card.Owner.Enemy.GetBattleAreaPermanents().Count(CanSelectPermanentCondition1) >= 1)
+                {
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition1));
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition1,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: true,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.PutLibraryBottom,
+                        cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                }
+            }
+        }
+        #endregion
+
+        #region When Digivolving
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Trash cards from hand to trash digivolution cards, and return  1 Digimon to deck bottom", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+            cardEffects.Add(activateClass);
+
+            string EffectDiscription()
+            {
+                return "[When Digivolving] You may trash up to 2 blue cards in your hand. For each one, trash any 1 card under your opponent�fs Digimon or Tamers. Then, you may return 1 of your opponent�fDigimon with no digivolution cards to the bottom of the deck.";
+            }
+
+            bool CanSelectCardCondition(CardSource cardSource)
+            {
+                return cardSource.CardColors.Contains(CardColor.Blue);
+            }
+
+            bool CanSelectPermanentCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
+                {
+                    if (permanent.IsDigimon || permanent.IsTamer)
+                    {
+                        if (permanent.DigivolutionCards.Count(CanSelectCardCondition1) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+                }
+
+                return false;
+            }
+
+            bool CanSelectCardCondition1(CardSource cardSource)
+            {
+                return !cardSource.CanNotTrashFromDigivolutionCards(activateClass);
+            }
+
+            bool CanSelectPermanentCondition1(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                {
+                    if (permanent.HasNoDigivolutionCards)
+                    {
+                        return true;
+                    }
+                }
+
+                return false;
+            }
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
             }
 
             bool CanActivateCondition(Hashtable hashtable)
@@ -172,6 +304,8 @@ public class Anfimon_RB1_016 : CEntity_Effect
                 }
             }
         }
+        #endregion
+
 
         if (timing == EffectTiming.WhenPermanentWouldBeDeleted)
         {