Ver Fonte

Now using trash, and not field on digivovle

Lewisaaronwelch há 1 ano atrás
pai
commit
ae7498fd01
1 ficheiros alterados com 29 adições e 37 exclusões
  1. 29 37
      Assets/CardEffect/EX8/Blue/Whamon_EX8_025.cs

+ 29 - 37
Assets/CardEffect/EX8/Blue/Whamon_EX8_025.cs

@@ -160,17 +160,13 @@ namespace DCGO.CardEffects.EX8
                     return "[When Digivolving] You may place 1 Digimon card with the [DS] trait from your trash as this Digimon's bottom digivolution card.";
                 }
 
-                bool CanSelectPermanentCondition(Permanent permanent)
+                bool CanSelectCardCondition(CardSource source)
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    if (source.IsDigimon)
                     {
-                        if (permanent != card.PermanentOfThisCard())
+                        if (source.EqualsTraits("DS"))
                         {
-                            if (permanent.TopCard.EqualsTraits("DS"))
-                            {
-                                if (!permanent.TopCard.Equals(card))
-                                    return true;
-                            }
+                            return true;
                         }
                     }
 
@@ -189,7 +185,7 @@ namespace DCGO.CardEffects.EX8
                     {
                         if (!card.PermanentOfThisCard().IsToken)
                         {
-                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                            if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
                             {
                                 return true;
                             }
@@ -203,36 +199,32 @@ namespace DCGO.CardEffects.EX8
                 {
                     List<CardSource> selectedCards = new List<CardSource>();
 
-                    SelectPermanentEffect selectPermanentEffect =
-                        GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                    selectPermanentEffect.SetUp(
-                        selectPlayer: card.Owner,
-                        canTargetCondition: CanSelectPermanentCondition,
-                        canTargetCondition_ByPreSelecetedList: null,
-                        canEndSelectCondition: null,
-                        maxCount: 1,
-                        canNoSelect: true,
-                        canEndNotMax: false,
-                        selectPermanentCoroutine: SelectPermanentCoroutine,
-                        afterSelectPermanentCoroutine: null,
-                        mode: SelectPermanentEffect.Mode.Custom,
-                        cardEffect: activateClass);
-
-                    selectPermanentEffect.SetUpCustomMessage(
-                        "Select 1 card to place on bottom of digivolution cards.",
-                        "The opponent is selecting 1 card to place on bottom of digivolution cards.");
-
-                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                    selectCardEffect.SetUp(
+                    canTargetCondition: CanSelectCardCondition,
+                    canTargetCondition_ByPreSelecetedList: null,
+                    canEndSelectCondition: null,
+                    canNoSelect: () => true,
+                    selectCardCoroutine: AfterSelectCardCoroutine,
+                    afterSelectCardCoroutine: null,
+                    message: "Select 1 card to place at bottom of digivolution cards.",
+                    maxCount: 1,
+                    canEndNotMax: false,
+                    isShowOpponent: false,
+                    mode: SelectCardEffect.Mode.Custom,
+                    root: SelectCardEffect.Root.Trash,
+                    customRootCardList: null,
+                    canLookReverseCard: true,
+                    selectPlayer: card.Owner,
+                    cardEffect: activateClass);
+                    yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+
+                    IEnumerator AfterSelectCardCoroutine(CardSource source)
                     {
-                        selectedCards.Add(permanent.TopCard);
+                        selectedCards.Add(source);
 
-                        yield return ContinuousController.instance.StartCoroutine(new IPlacePermanentToDigivolutionCards(
-                            new List<Permanent[]>() { new Permanent[] { permanent, card.PermanentOfThisCard() } },
-                            false,
-                            activateClass).PlacePermanentToDigivolutionCards());
+                        yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(selectedCards, activateClass));
                     }
                 }
             }