瀏覽代碼

Various bug fixes

Albert Vasconcellos 2 年之前
父節點
當前提交
113fae709f

+ 2 - 2
Assets/CardBaseEntity/EX4/Blue/Digimon/メイルバードラモン-EX4-018.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:5f48c558568a74a9d674e933823a0bf2bcf3592d210e6a1fa9293a910728b136
-size 2629
+oid sha256:70d8eb863cb0f2f8feb221b6cfbfd09fcfb20b1afe63a66dca677bb2a1033bf5
+size 2417

+ 2 - 2
Assets/CardBaseEntity/EX6/Yellow/Digimon/Gokuumon-EX6-023.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:3e85cf2c7a89e731d247d6ec7a0aca05811a82d2be393e5bfa84770e38e1fe7c
-size 1622
+oid sha256:f9afe00d7a2558bbe1c2d7f48c3ffbd56f880270ae2df4e16e9fe8503ca90b80
+size 1670

+ 2 - 2
Assets/CardBaseEntity/EX6/Yellow/Digimon/Sagomon-EX6-024.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:c4efa6ca8f109efd782eaded6e2c5f6c5d1d85960a3d89344826b02c4146b170
-size 1642
+oid sha256:9c69fb5eb2cad0a596de4e196d8660aaefe8956f58c3d32a54b4371c3f9982cb
+size 1690

+ 1 - 1
Assets/CardEffect/BT12/Purple/Astamon_BT12_081.cs

@@ -505,7 +505,7 @@ public class Astamon_BT12_081 : CEntity_Effect
                                         yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
                                             cardSources: selectedCards,
                                             activateClass: activateClass,
-                                            payCost: true,
+                                            payCost: false,
                                             isTapped: false,
                                             root: SelectCardEffect.Root.DigivolutionCards,
                                             activateETB: true));

+ 17 - 2
Assets/CardEffect/BT12/Yellow/Lampmon_BT12_044.cs

@@ -115,7 +115,7 @@ public class Lampmon_BT12_044 : CEntity_Effect
         #endregion
 
         #region Your Turn
-        if (timing == EffectTiming.AfterEffectsActivate || timing == EffectTiming.OnStartTurn || timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.OnUseOption || timing == EffectTiming.OptionSkill || timing == EffectTiming.SecuritySkill)
+        if (timing == EffectTiming.AfterEffectsActivate || timing == EffectTiming.OnStartTurn || timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.OnUseOption || timing == EffectTiming.OptionSkill || timing == EffectTiming.SecuritySkill || timing == EffectTiming.OnDestroyedAnyone)
         {
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Gain Security Attack", CanUseCondition, card);
@@ -138,13 +138,28 @@ public class Lampmon_BT12_044 : CEntity_Effect
                 return true;
             }
 
+            bool OpponentHasDigimonWithSecChanges(Permanent permanent)
+            {
+                if(CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent,card))
+                {
+                    if(permanent.IsDigimon)
+                    {
+                        if (permanent.HasSecurityAttackChanges)
+                        {
+                            return true;
+                        }
+                    }
+                }
+                return false;
+            }
+
             bool CanActivateCondition(Hashtable hashtable)
             {
                 if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
                     if (CardEffectCommons.IsOwnerTurn(card))
                     {
-                        if (count() >= 1)
+                        if (CardEffectCommons.HasMatchConditionPermanent(OpponentHasDigimonWithSecChanges))
                         {
                             return true;
                         }

+ 5 - 1
Assets/CardEffect/BT15/Yellow/Magnadramon_BT15_042.cs

@@ -94,7 +94,7 @@ public class Magnadramon_BT15_042 : CEntity_Effect
                             selectHandEffect.SetUpCustomMessage(
                                 "Select 1 card to place at the top or bottom of security.",
                                 "The opponent is selecting 1 card to place at the bottom of security.");
-                            selectHandEffect.SetUpCustomMessage_ShowCard("Security Bottom Card");
+                            
 
                             yield return StartCoroutine(selectHandEffect.Activate());
 
@@ -122,6 +122,8 @@ public class Magnadramon_BT15_042 : CEntity_Effect
                                         GManager.instance.commandText.OpenCommandText("\"Place to the top of security\" was selected.");
 
                                         GManager.instance.playLog.AddLogString($"\n{card.BaseENGCardNameFromEntity}({card.CardID}):Place the Digimon to the top of security\n");
+
+                                        selectHandEffect.SetUpCustomMessage_ShowCard("Security Top Card");
                                     }
 
                                     else
@@ -129,6 +131,8 @@ public class Magnadramon_BT15_042 : CEntity_Effect
                                         GManager.instance.commandText.OpenCommandText("\"Place to the bottom of security\" was selected.");
 
                                         GManager.instance.playLog.AddLogString($"\n{card.BaseENGCardNameFromEntity}({card.CardID}):Place the Digimon to the bottom of security\n");
+
+                                        selectHandEffect.SetUpCustomMessage_ShowCard("Security Bottom Card");
                                     }
 
                                     yield return new WaitForSeconds(0.4f);

+ 38 - 17
Assets/CardEffect/BT16/Black/Publimon_BT16_056.cs

@@ -15,13 +15,13 @@ namespace DCGO.CardEffects.BT16
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Trash top or bottom of opponents security", CanUseCondition, card);
+                activateClass.SetUpICardEffect("Place top card of one of your opponent's Digimon to the top/bottom of their security stack.", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
                 {
-                    return "[On Play] [When Digivolving] You may place the top card of 1 of your opponent's Digimon with the [Vaccine] trait at the top of your opponent's security stack.";
+                    return "[On Play] You may place the top card of 1 of your opponent's Digimon with the [Vaccine] trait at the top of your opponent's security stack.";
                 }
 
                 bool CanSelectPermanentCondition(Permanent permanent)
@@ -78,31 +78,52 @@ namespace DCGO.CardEffects.BT16
 
                         IEnumerator SelectPermanentCoroutine(Permanent permanent)
                         {
-                            if (permanent != null)
+                            Permanent selectedPermanent = permanent;
+
+                            if (selectedPermanent != null)
                             {
-                                yield return ContinuousController.instance.StartCoroutine(CardObjectController.RemoveFromAllArea(permanent.TopCard));
+                                if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                {
+                                    List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
+                                {
+                                    new SelectionElement<bool>(message: $"Security Top", value : true, spriteIndex: 0),
+                                    new SelectionElement<bool>(message: $"Security Bottom", value : false, spriteIndex: 1),
+                                };
 
-                                permanent.ShowingPermanentCard.ShowPermanentData(true);
+                                    string selectPlayerMessage = "Will you place the card on the top or bottom of the security?";
+                                    string notSelectPlayerMessage = "The opponent is selecting whether to place the card on the top or bottom of security.";
 
-                                yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().RemoveDigivolveRootEffect(permanent.TopCard, permanent));
+                                    GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
 
-                                if (!permanent.TopCard.IsToken)
-                                {
-                                    yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(permanent.TopCard));
+                                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
 
-                                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateRecoveryEffect(permanent.TopCard.Owner));
+                                    bool toTop = GManager.instance.userSelectionManager.SelectedBoolValue;
 
-                                    yield return ContinuousController.instance.StartCoroutine(new IAddSecurity(permanent.TopCard.Owner).AddSecurity());
+                                    if (toTop)
+                                    {
+                                        GManager.instance.commandText.OpenCommandText("\"Place to the top of security\" was selected.");
 
-                                    permanent.willBeRemoveField = false;
+                                        GManager.instance.playLog.AddLogString($"\n{card.BaseENGCardNameFromEntity}({card.CardID}):Place the Digimon to the top of security\n");
+                                    }
 
-                                    if (permanent.ShowingPermanentCard != null)
+                                    else
                                     {
-                                        if (permanent.ShowingPermanentCard.WillBeDeletedObject != null)
-                                        {
-                                            permanent.ShowingPermanentCard.WillBeDeletedObject.SetActive(false);
-                                        }
+                                        GManager.instance.commandText.OpenCommandText("\"Place to the bottom of security\" was selected.");
+
+                                        GManager.instance.playLog.AddLogString($"\n{card.BaseENGCardNameFromEntity}({card.CardID}):Place the Digimon to the bottom of security\n");
                                     }
+
+                                    yield return new WaitForSeconds(0.4f);
+                                    GManager.instance.commandText.CloseCommandText();
+                                    yield return new WaitWhile(() => GManager.instance.commandText.gameObject.activeSelf);
+
+                                    Permanent securityPermanent = selectedPermanent;
+                                    CardSource securityCard = securityPermanent.TopCard;
+
+                                    yield return ContinuousController.instance.StartCoroutine(new IPutSecurityPermanent(
+                                        securityPermanent,
+                                        CardEffectCommons.CardEffectHashtable(activateClass),
+                                        toTop).PutSecurity());
                                 }
                             }
                         }

+ 2 - 2
Assets/CardEffect/BT16/Blue/ExVeemon_BT16_018.cs

@@ -54,12 +54,12 @@ namespace DCGO.CardEffects.BT16
                 case EffectTiming.OnEnterFieldAnyone:
                     var activatePlayClass = new ActivateClass();
                     activatePlayClass.SetUpICardEffect("Select 1 of your Digimon to gain battle protection", CanUsePlayCondition, card);
-                    activatePlayClass.SetUpActivateClass(CanActivateCondition, ActivatePlayCoroutine, -1, true, EffectDiscription());
+                    activatePlayClass.SetUpActivateClass(CanActivateCondition, ActivatePlayCoroutine, -1, false, EffectDiscription());
                     cardEffects.Add(activatePlayClass);
 
                     var activateDigivolveClass = new ActivateClass();
                     activateDigivolveClass.SetUpICardEffect("Select 1 of your Digimon to gain battle protection", CanUseDigivolveCondition, card);
-                    activateDigivolveClass.SetUpActivateClass(CanActivateCondition, ActivateDigivolveCoroutine, -1, true, EffectDiscription());
+                    activateDigivolveClass.SetUpActivateClass(CanActivateCondition, ActivateDigivolveCoroutine, -1, false, EffectDiscription());
                     cardEffects.Add(activateDigivolveClass);
 
                     string EffectDiscription()

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

@@ -34,7 +34,7 @@ namespace DCGO.CardEffects.BT16
 
                 string EffectDiscription()
                 {
-                    return "[When Digivolving][Once Per Turn] You may play 1 green or [Royal Knight] trait Digimon card from your hand for the cost. When it would be played by this effect, reduce the play cost by 4.";
+                    return "[When Digivolving][Once Per Turn] You may play 1 Digimon card with the [Insectiod] or [Larva] trait from your hand with the play cost reduced by 8.";
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)

+ 229 - 155
Assets/CardEffect/EX6/Blue/Xiangpengmon_EX6_015.cs

@@ -41,12 +41,6 @@ namespace DCGO.CardEffects.EX6
             
             #region On Play/When Digivolving Shared
             
-            string EffectSharedDescription()
-            {
-                return
-                    "[On Play] [When Digivolving] You may place up to 3 of your other blue Digimon as this Digimon's bottom digivolution cards. Then, return all other level 4 or lower Digimon to the hand. For each card placed in this Digimon's digivolution cards, add 1 to the level this effect may return.";
-            }
-            
             bool CanSelectSharedOwnPermanentCondition(Permanent permanent)
             {
                 if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
@@ -63,207 +57,287 @@ namespace DCGO.CardEffects.EX6
                 
                 return false;
             }
-            
-            bool CanActivateSharedCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
-                {
-                    if (!card.PermanentOfThisCard().IsToken)
-                    {
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSharedOwnPermanentCondition))
-                        {
-                            return true;
-                        }
-                    }
-                }
-                
-                return false;
-            }
-            
+  
             #endregion
             
-            #region On Play/ When Digivolving
-            
-            // On Play
+            #region On Play
+
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect(
-                    "You may place up to 3 of your other blue Digimon as this Digimon's bottom digivolution cards. Then, return all other level 4 or lower Digimon to the hand. For each card placed in this Digimon's digivolution cards, add 1 to the level this effect may return.",
+                    "Place digvolution cards and activate effects",
                     CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, true,
-                    EffectSharedDescription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
                 cardEffects.Add(activateClass);
-                
+
+                string EffectDescription()
+                {
+                    return
+                        "[On Play] You may place up to 3 of your other blue Digimon as this Digimon's bottom digivolution cards. Then, return all other level 4 or lower Digimon to the hand. For each card placed in this Digimon's digivolution cards, add 1 to the level this effect may return.";
+                }
+
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
                 }
-                
-                IEnumerator ActivateCoroutine(Hashtable hashtable)
+
+                bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CanActivateSharedCondition(hashtable))
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        List<CardSource> selectedCards = new List<CardSource>();
-                        
-                        // If there is other blue Digimon in owner Battle Area  
-                        int maxCount = Math.Min(3,
-                            CardEffectCommons.MatchConditionPermanentCount(CanSelectSharedOwnPermanentCondition));
-                        
-                        SelectPermanentEffect selectPermanentEffect =
-                            GManager.instance.GetComponent<SelectPermanentEffect>();
-                        
-                        selectPermanentEffect.SetUp(
-                            selectPlayer: card.Owner,
-                            canTargetCondition: CanSelectSharedOwnPermanentCondition,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canEndSelectCondition: CanEndSelectCondition,
-                            maxCount: maxCount,
-                            canNoSelect: true,
-                            canEndNotMax: true,
-                            selectPermanentCoroutine: SelectPermanentCoroutine,
-                            afterSelectPermanentCoroutine: null,
-                            mode: SelectPermanentEffect.Mode.Custom,
-                            cardEffect: activateClass);
-                        
-                        selectPermanentEffect.SetUpCustomMessage(
-                            "Select up to 3 Digimon to place on bottom of digivolution cards.",
-                            "The opponent is selecting up to 3 Digimon to place on bottom of digivolution cards.");
-                        
-                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                        
-                        bool CanEndSelectCondition(List<Permanent> permanents)
+                        if (!card.PermanentOfThisCard().IsToken)
                         {
-                            if (CardEffectCommons.HasNoElement(permanents))
+                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSharedOwnPermanentCondition))
                             {
-                                return false;
+                                return true;
                             }
-                            
-                            return true;
                         }
-                        
-                        IEnumerator SelectPermanentCoroutine(Permanent selectedPermanent)
+                    }
+
+                    return false;
+                }
+
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    int cardsAdded = 0;
+
+                    List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
                         {
-                            selectedCards.Add(selectedPermanent.TopCard);
-                            
-                            yield return null;
-                        }
-                        
-                        if (selectedCards.Count >= 1)
+                            new SelectionElement<bool>(message: $"Yes", value : true, spriteIndex: 0),
+                            new SelectionElement<bool>(message: $"No", value : false, spriteIndex: 1),
+                        };
+
+                    string selectPlayerMessage = "Will you add digivolution cards?";
+                    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());
+
+                    bool addDigivolutionCards = GManager.instance.userSelectionManager.SelectedBoolValue;
+
+                    if (addDigivolutionCards)
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSharedOwnPermanentCondition))
                         {
-                            yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard()
-                                .AddDigivolutionCardsBottom(
-                                    selectedCards,
-                                    activateClass));
-                            
-                            bool PermanentConditionEnemy(Permanent enemyPermanent)
+                            List<CardSource> selectedCards = new List<CardSource>();
+
+                            // If there is other blue Digimon in owner Battle Area  
+                            int maxCount = Math.Min(3,
+                                CardEffectCommons.MatchConditionPermanentCount(CanSelectSharedOwnPermanentCondition));
+
+                            SelectPermanentEffect selectPermanentEffect =
+                                GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectSharedOwnPermanentCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: CanEndSelectCondition,
+                                maxCount: maxCount,
+                                canNoSelect: true,
+                                canEndNotMax: true,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectPermanentEffect.SetUpCustomMessage(
+                                "Select up to 3 Digimon to place on bottom of digivolution cards.",
+                                "The opponent is selecting up to 3 Digimon to place on bottom of digivolution cards.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            bool CanEndSelectCondition(List<Permanent> permanents)
                             {
-                                return enemyPermanent.Level <= 4 + selectedCards.Count;
+                                if (CardEffectCommons.HasNoElement(permanents))
+                                {
+                                    return false;
+                                }
+
+                                return true;
+                            }
+
+                            IEnumerator SelectPermanentCoroutine(Permanent selectedPermanent)
+                            {
+                                selectedCards.Add(selectedPermanent.TopCard);
+
+                                yield return null;
+                            }
+
+                            if (selectedCards.Count >= 1)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard()
+                                    .AddDigivolutionCardsBottom(
+                                        selectedCards,
+                                        activateClass));
+
+                                cardsAdded = selectedCards.Count;
+
                             }
-                            
-                            // Return all opponent's Digimon with a level lower or equal to 4 plus the number of chosen Digimon
-                            List<Permanent> bounceTargetPermanents = card.Owner.Enemy.GetBattleAreaDigimons()
-                                .Filter(PermanentConditionEnemy);
-                            yield return ContinuousController.instance.StartCoroutine(
-                                new HandBounceClaass(bounceTargetPermanents,
-                                    CardEffectCommons.CardEffectHashtable(activateClass)).Bounce());
                         }
                     }
+                    bool PermanentConditionEnemy(Permanent enemyPermanent)
+                    {
+                        return enemyPermanent.Level <= 4 + cardsAdded;
+                    }
+
+
+                    // Return all opponent's Digimon with a level lower or equal to 4 plus the number of chosen Digimon
+                    List<Permanent> bounceTargetPermanents = card.Owner.Enemy.GetBattleAreaDigimons().Filter(PermanentConditionEnemy);
+
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new HandBounceClaass(bounceTargetPermanents,
+                            CardEffectCommons.CardEffectHashtable(activateClass)).Bounce());
                 }
             }
-            
-            // When Digivolving
+
+            #endregion
+
+            #region When Digivolving
+
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect(
-                    "You may place up to 3 of your other blue Digimon as this Digimon's bottom digivolution cards. Then, return all other level 4 or lower Digimon to the hand. For each card placed in this Digimon's digivolution cards, add 1 to the level this effect may return.",
+                    "Place digvolution cards and activate effects",
                     CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, true,
-                    EffectSharedDescription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
                 cardEffects.Add(activateClass);
-                
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Digivolving] You may place up to 3 of your other blue Digimon as this Digimon's bottom digivolution cards. Then, return all other level 4 or lower Digimon to the hand. For each card placed in this Digimon's digivolution cards, add 1 to the level this effect may return.";
+                }
+
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                 }
-                
-                IEnumerator ActivateCoroutine(Hashtable hashtable)
+
+                bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CanActivateSharedCondition(hashtable))
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        List<CardSource> selectedCards = new List<CardSource>();
-                        
-                        // If there is other blue Digimon in owner Battle Area  
-                        int maxCount = Math.Min(3,
-                            CardEffectCommons.MatchConditionPermanentCount(CanSelectSharedOwnPermanentCondition));
-                        
-                        SelectPermanentEffect selectPermanentEffect =
-                            GManager.instance.GetComponent<SelectPermanentEffect>();
-                        
-                        selectPermanentEffect.SetUp(
-                            selectPlayer: card.Owner,
-                            canTargetCondition: CanSelectSharedOwnPermanentCondition,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canEndSelectCondition: CanEndSelectCondition,
-                            maxCount: maxCount,
-                            canNoSelect: true,
-                            canEndNotMax: true,
-                            selectPermanentCoroutine: SelectPermanentCoroutine,
-                            afterSelectPermanentCoroutine: null,
-                            mode: SelectPermanentEffect.Mode.Custom,
-                            cardEffect: activateClass);
-                        
-                        selectPermanentEffect.SetUpCustomMessage(
-                            "Select up to 3 Digimon to place on bottom of digivolution cards.",
-                            "The opponent is selecting up to 3 Digimon to place on bottom of digivolution cards.");
-                        
-                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                        
-                        bool CanEndSelectCondition(List<Permanent> permanents)
+                        if (!card.PermanentOfThisCard().IsToken)
                         {
-                            if (CardEffectCommons.HasNoElement(permanents))
+                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSharedOwnPermanentCondition))
                             {
-                                return false;
+                                return true;
                             }
-                            
-                            return true;
                         }
-                        
-                        IEnumerator SelectPermanentCoroutine(Permanent selectedPermanent)
+                    }
+
+                    return false;
+                }
+
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    int cardsAdded = 0;
+
+                    List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
                         {
-                            selectedCards.Add(selectedPermanent.TopCard);
-                            
-                            yield return null;
-                        }
-                        
-                        if (selectedCards.Count >= 1)
+                            new SelectionElement<bool>(message: $"Yes", value : true, spriteIndex: 0),
+                            new SelectionElement<bool>(message: $"No", value : false, spriteIndex: 1),
+                        };
+
+                    string selectPlayerMessage = "Will you add digivolution cards?";
+                    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());
+
+                    bool addDigivolutionCards = GManager.instance.userSelectionManager.SelectedBoolValue;
+
+                    if (addDigivolutionCards)
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSharedOwnPermanentCondition))
                         {
-                            yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard()
-                                .AddDigivolutionCardsBottom(
-                                    selectedCards,
-                                    activateClass));
-                            
-                            bool PermanentConditionEnemy(Permanent enemyPermanent)
+                            List<CardSource> selectedCards = new List<CardSource>();
+
+                            // If there is other blue Digimon in owner Battle Area  
+                            int maxCount = Math.Min(3,
+                                CardEffectCommons.MatchConditionPermanentCount(CanSelectSharedOwnPermanentCondition));
+
+                            SelectPermanentEffect selectPermanentEffect =
+                                GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectSharedOwnPermanentCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: CanEndSelectCondition,
+                                maxCount: maxCount,
+                                canNoSelect: true,
+                                canEndNotMax: true,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectPermanentEffect.SetUpCustomMessage(
+                                "Select up to 3 Digimon to place on bottom of digivolution cards.",
+                                "The opponent is selecting up to 3 Digimon to place on bottom of digivolution cards.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            bool CanEndSelectCondition(List<Permanent> permanents)
+                            {
+                                if (CardEffectCommons.HasNoElement(permanents))
+                                {
+                                    return false;
+                                }
+
+                                return true;
+                            }
+
+                            IEnumerator SelectPermanentCoroutine(Permanent selectedPermanent)
                             {
-                                return enemyPermanent.Level <= 4 + selectedCards.Count;
+                                selectedCards.Add(selectedPermanent.TopCard);
+
+                                yield return null;
+                            }
+
+                            if (selectedCards.Count >= 1)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard()
+                                    .AddDigivolutionCardsBottom(
+                                        selectedCards,
+                                        activateClass));
+
+                                cardsAdded = selectedCards.Count;
+
                             }
-                            
-                            // Return all opponent's Digimon with a level lower or equal to 4 plus the number of chosen Digimon
-                            List<Permanent> bounceTargetPermanents = card.Owner.Enemy.GetBattleAreaDigimons()
-                                .Filter(PermanentConditionEnemy);
-                            yield return ContinuousController.instance.StartCoroutine(
-                                new HandBounceClaass(bounceTargetPermanents,
-                                    CardEffectCommons.CardEffectHashtable(activateClass)).Bounce());
                         }
                     }
+                    bool PermanentConditionEnemy(Permanent enemyPermanent)
+                    {
+                        return enemyPermanent.Level <= 4 + cardsAdded;
+                    }
+
+
+                    // Return all opponent's Digimon with a level lower or equal to 4 plus the number of chosen Digimon
+                    List<Permanent> bounceTargetPermanents = card.Owner.Enemy.GetBattleAreaDigimons().Filter(PermanentConditionEnemy);
+
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new HandBounceClaass(bounceTargetPermanents,
+                            CardEffectCommons.CardEffectHashtable(activateClass)).Bounce());
                 }
             }
-            
+
             #endregion
-            
+
             #region All Turns
-            
+
             if (timing == EffectTiming.OnAddDigivolutionCards)
             {
                 ActivateClass activateClass = new ActivateClass();

+ 5 - 0
Assets/Scripts/CardSource.cs

@@ -1306,6 +1306,11 @@ public class CardSource : MonoBehaviour
                 return true;
             }
 
+            if(ContainsTraits("SeaAnimal"))
+            {
+                return true;
+            }
+
             return false;
         }
     }