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

Merge pull request #217 from DCGO2/bugfix/lewis

1.11.4 Bug Fixes - Lewis
Michael8818 9 месяцев назад
Родитель
Сommit
a13f1c4fca
32 измененных файлов с 630 добавлено и 523 удалено
  1. 4 2
      Assets/CardEffect/BT23/Black/BT23_054.cs
  2. 6 4
      Assets/CardEffect/BT23/Black/BT23_055.cs
  3. 81 86
      Assets/CardEffect/BT23/Black/BT23_057.cs
  4. 8 26
      Assets/CardEffect/BT23/Black/BT23_058.cs
  5. 17 13
      Assets/CardEffect/BT23/Black/BT23_060.cs
  6. 3 5
      Assets/CardEffect/BT23/Blue/BT23_016.cs
  7. 9 33
      Assets/CardEffect/BT23/Blue/BT23_017.cs
  8. 64 5
      Assets/CardEffect/BT23/Blue/BT23_021.cs
  9. 1 2
      Assets/CardEffect/BT23/Blue/BT23_024.cs
  10. 28 1
      Assets/CardEffect/BT23/Blue/BT23_025.cs
  11. 2 1
      Assets/CardEffect/BT23/Green/BT23_002.cs
  12. 9 33
      Assets/CardEffect/BT23/Green/BT23_037.cs
  13. 23 11
      Assets/CardEffect/BT23/Green/BT23_038.cs
  14. 1 2
      Assets/CardEffect/BT23/Green/BT23_040.cs
  15. 23 11
      Assets/CardEffect/BT23/Green/BT23_042.cs
  16. 21 9
      Assets/CardEffect/BT23/Green/BT23_043.cs
  17. 3 3
      Assets/CardEffect/BT23/Green/BT23_045.cs
  18. 5 4
      Assets/CardEffect/BT23/Green/BT23_046.cs
  19. 3 2
      Assets/CardEffect/BT23/Purple/BT23_070.cs
  20. 2 2
      Assets/CardEffect/BT23/Red/BT23_006.cs
  21. 1 1
      Assets/CardEffect/BT23/Red/BT23_009.cs
  22. 9 0
      Assets/CardEffect/BT23/Red/BT23_010.cs
  23. 104 111
      Assets/CardEffect/BT23/Red/BT23_013.cs
  24. 4 1
      Assets/CardEffect/BT23/Red/BT23_014.cs
  25. 10 34
      Assets/CardEffect/BT23/Red/BT23_048.cs
  26. 87 80
      Assets/CardEffect/BT23/White/BT23_072.cs
  27. 58 17
      Assets/CardEffect/BT23/White/BT23_073.cs
  28. 4 4
      Assets/CardEffect/BT23/Yellow/BT23_028.cs
  29. 1 1
      Assets/CardEffect/BT23/Yellow/BT23_029.cs
  30. 4 2
      Assets/CardEffect/BT23/Yellow/BT23_032.cs
  31. 18 14
      Assets/CardEffect/BT23/Yellow/BT23_035.cs
  32. 17 3
      Assets/Scripts/CardEffectCommons/GameContextDeterminarion.cs

+ 4 - 2
Assets/CardEffect/BT23/Black/BT23_054.cs

@@ -43,7 +43,7 @@ namespace DCGO.CardEffects.BT23
 
             #region OP/WD Shared
 
-            bool SharedOpponentDigimon(Permanent permanent)
+            bool SharedOwnerDigimon(Permanent permanent)
             {
                 return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
                        (permanent.TopCard.HasRoyalKnightTraits || permanent.TopCard.HasCSTraits);
@@ -51,6 +51,8 @@ namespace DCGO.CardEffects.BT23
 
             IEnumerator SharedActivateCoroutine(Hashtable hashtable, ActivateClass activateClass)
             {
+                yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
+
                 Permanent selectedPermanent = null;
 
                 #region Select Permanent
@@ -58,7 +60,7 @@ namespace DCGO.CardEffects.BT23
                 SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
                 selectPermanentEffect.SetUp(
                     selectPlayer: card.Owner,
-                    canTargetCondition: SharedOpponentDigimon,
+                    canTargetCondition: SharedOwnerDigimon,
                     canTargetCondition_ByPreSelecetedList: null,
                     canEndSelectCondition: null,
                     maxCount: 1,

+ 6 - 4
Assets/CardEffect/BT23/Black/BT23_055.cs

@@ -67,7 +67,7 @@ namespace DCGO.CardEffects.BT23
                     selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to delete.", "The opponent is selecting 1 Digimon to delete.");
 
                     yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                }               
+                }
             }
             #endregion
 
@@ -97,13 +97,14 @@ namespace DCGO.CardEffects.BT23
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card) && 
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
                            CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                 }
             }
             #endregion
 
             #region All Turns - OPT
+
             if (timing == EffectTiming.WhenRemoveField)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -119,7 +120,7 @@ namespace DCGO.CardEffects.BT23
 
                 bool IsOptionCard(Permanent permanent)
                 {
-                    return CardEffectCommons.IsOwnerPermanent(permanent, card) &&
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card) &&
                            permanent.IsOption;
                 }
 
@@ -184,6 +185,7 @@ namespace DCGO.CardEffects.BT23
             #endregion
 
             #region All Turns - OPT - ESS
+
             if (timing == EffectTiming.WhenRemoveField)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -200,7 +202,7 @@ namespace DCGO.CardEffects.BT23
 
                 bool IsOptionCard(Permanent permanent)
                 {
-                    return CardEffectCommons.IsOwnerPermanent(permanent, card) &&
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card) &&
                            permanent.IsOption;
                 }
 

+ 81 - 86
Assets/CardEffect/BT23/Black/BT23_057.cs

@@ -50,29 +50,10 @@ namespace DCGO.CardEffects.BT23
 
                 bool CardCondition(CardSource cardSource)
                 {
-                    if (cardSource == card)
-                    {
-                        if (CardEffectCommons.IsExistOnHand(cardSource))
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return cardSource == card;
                 }
 
-                bool CanNoSelect(CardSource cardSource)
-                {
-                    if (cardSource != null)
-                    {
-                        if (cardSource.PayingCost(SelectCardEffect.Root.Hand, null, checkAvailability: false) > cardSource.Owner.MaxMemoryCost)
-                        {
-                            return false;
-                        }
-                    }
-
-                    return true;
-                }
+                bool CanNoSelect(CardSource cardSource) => CardEffectCommons.UniversalRootCanNoSelectCondition(cardSource);
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
@@ -81,22 +62,14 @@ namespace DCGO.CardEffects.BT23
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnHand(card))
-                    {
-                        if (CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, CanSelectReductionCardCondition) >= 3)
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, CanSelectReductionCardCondition) >= 3;
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
                     List<CardSource> selectedCards = new List<CardSource>();
 
-                    if (CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, CanSelectReductionCardCondition) >= 6)
+                    if (CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, CanSelectReductionCardCondition) >= 3)
                     {
                         bool noSelect = CanNoSelect(CardEffectCommons.GetCardFromHashtable(_hashtable));
 
@@ -111,7 +84,7 @@ namespace DCGO.CardEffects.BT23
                             canNoSelect: () => noSelect,
                             selectCardCoroutine: SelectCardCoroutine,
                             afterSelectCardCoroutine: null,
-                            message: "Select cards to add to the top your deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
+                            message: "Select cards to add to your deck\n(cards will be placed back to your deck so that cards with lower numbers are on top).",
                             maxCount: maxCount,
                             canEndNotMax: false,
                             isShowOpponent: true,
@@ -133,79 +106,98 @@ namespace DCGO.CardEffects.BT23
                         if (selectedCards.Count == 3)
                         {
                             selectedCards.Reverse();
-                            yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryTopCards(selectedCards));
-                        }
-                    }
 
-                    if (card.Owner.CanReduceCost(null, card))
-                    {
-                        ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().BuffSE);
-                    }
 
-                    ChangeCostClass changeCostClass = new ChangeCostClass();
-                    changeCostClass.SetUpICardEffect("Play Cost -1", CanUseCondition1, card);
-                    changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
-                    card.Owner.UntilCalculateFixedCostEffect.Add((_timing) => changeCostClass);
+                            List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
+                            {
+                                new SelectionElement<bool>(message: $"Top of deck", value : true, spriteIndex: 0),
+                                new SelectionElement<bool>(message: $"Bottom of deck", value : false, spriteIndex: 1),
+                            };
 
-                    bool CanUseCondition1(Hashtable hashtable)
-                    {
-                        return true;
-                    }
+                            string selectPlayerMessage = "Return cards to top or bottom of deck?";
+                            string notSelectPlayerMessage = "The opponent is choosing to return cards to top or bottom of deck.";
 
-                    int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
-                    {
-                        if (CardSourceCondition(cardSource))
-                        {
-                            if (RootCondition(root))
+                            GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+
+                            bool topOfDeck = GManager.instance.userSelectionManager.SelectedBoolValue;
+                            if (topOfDeck)
+                                yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryTopCards(selectedCards));
+                            else
+                                yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryBottomCards(selectedCards));
+
+                            if (card.Owner.CanReduceCost(null, card))
+                            {
+                                ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().BuffSE);
+                            }
+
+                            ChangeCostClass changeCostClass = new ChangeCostClass();
+                            changeCostClass.SetUpICardEffect("Play Cost -1", CanUseCondition1, card);
+                            changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
+                            card.Owner.UntilCalculateFixedCostEffect.Add((_timing) => changeCostClass);
+
+                            bool CanUseCondition1(Hashtable hashtable)
                             {
-                                if (PermanentsCondition(targetPermanents))
+                                return true;
+                            }
+
+                            int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
+                            {
+                                if (CardSourceCondition(cardSource))
                                 {
-                                    int targetCost = 0;
+                                    if (RootCondition(root))
+                                    {
+                                        if (PermanentsCondition(targetPermanents))
+                                        {
+                                            int targetCost = 0;
+
+                                            if (selectedCards.Count >= 3)
+                                                targetCost += 5;
+
+                                            Cost -= targetCost;
+                                        }
+                                    }
+                                }
 
-                                    if (selectedCards.Count >= 3)
-                                        targetCost += 5;
+                                return Cost;
+                            }
 
-                                    Cost -= targetCost;
+                            bool PermanentsCondition(List<Permanent> targetPermanents)
+                            {
+                                if (targetPermanents == null)
+                                {
+                                    return true;
+                                }
+                                else
+                                {
+                                    if (targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0)
+                                    {
+                                        return true;
+                                    }
                                 }
+
+                                return false;
                             }
-                        }
 
-                        return Cost;
-                    }
+                            bool CardSourceCondition(CardSource cardSource)
+                            {
+                                return cardSource == card;
+                            }
 
-                    bool PermanentsCondition(List<Permanent> targetPermanents)
-                    {
-                        if (targetPermanents == null)
-                        {
-                            return true;
-                        }
-                        else
-                        {
-                            if (targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0)
+                            bool RootCondition(SelectCardEffect.Root root)
                             {
                                 return true;
                             }
-                        }
-
-                        return false;
-                    }
-
-                    bool CardSourceCondition(CardSource cardSource)
-                    {
-                        return cardSource == card;
-                    }
 
-                    bool RootCondition(SelectCardEffect.Root root)
-                    {
-                        return true;
-                    }
+                            bool isUpDown()
+                            {
+                                return true;
+                            }
 
-                    bool isUpDown()
-                    {
-                        return true;
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(_hashtable));
+                        }
                     }
 
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(_hashtable));
                 }
             }
 
@@ -305,6 +297,7 @@ namespace DCGO.CardEffects.BT23
             #endregion
 
             #region OP/WD Shared
+
             string SharedEffectDiscription(string tag)
             {
                 return $"[{tag}] You may play 1 [Hinukamuy] Token. (Digimon/White/6000 DP/<Alliance> <Reboot> <Blocker>) Then, delete 1 of your opponent's Digimon with a play cost of 6 or less. For each of your other Digimon, add 3 to this effect's play cost maximum.";
@@ -370,6 +363,7 @@ namespace DCGO.CardEffects.BT23
             #endregion
 
             #region On Play
+
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -386,6 +380,7 @@ namespace DCGO.CardEffects.BT23
             #endregion
 
             #region When Digivolving
+
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();

+ 8 - 26
Assets/CardEffect/BT23/Black/BT23_058.cs

@@ -1,6 +1,5 @@
 using System.Collections;
 using System.Collections.Generic;
-using System.Linq;
 
 //Craniamon
 namespace DCGO.CardEffects.BT23
@@ -60,8 +59,10 @@ namespace DCGO.CardEffects.BT23
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnBattleArea(card) &&
-                           CardEffectCommons.CanTriggerWhenPermanentRemoveField(hashtable, RemovedPermanent);
+                    return CardEffectCommons.IsExistOnBattleArea(card)
+                        && CardEffectCommons.CanTriggerWhenPermanentRemoveField(hashtable, RemovedPermanent)
+                        && CardEffectCommons.IsByEffect(hashtable, cardEffect => CardEffectCommons.IsOpponentEffect(cardEffect, card));
+
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
@@ -151,33 +152,14 @@ namespace DCGO.CardEffects.BT23
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    Permanent selectedPermanent = card.PermanentOfThisCard();
-
-                    int maxCost = selectedPermanent.TopCard.GetCostItself;
-
                     bool PermanentCondition(Permanent permanent)
                     {
-                        if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, selectedPermanent.TopCard))
-                        {
-                            if (permanent.TopCard.GetCostItself <= maxCost)
-                            {
-                                if (permanent.TopCard.HasPlayCost)
-                                {
-                                    if (permanent.CanBeDestroyedBySkill(activateClass))
-                                    {
-                                        if (!permanent.TopCard.CanNotBeAffected(activateClass))
-                                        {
-                                            return true;
-                                        }
-                                    }
-                                }
-                            }
-                        }
-
-                        return false;
+                        return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card)
+                            && permanent.TopCard.HasPlayCost
+                            && CardEffectCommons.IsMinCost(permanent, card.Owner.Enemy, true);
                     }
 
-                    List<Permanent> destroyTargetPermanents = selectedPermanent.TopCard.Owner.Enemy.GetBattleAreaDigimons().Filter(PermanentCondition);
+                    List<Permanent> destroyTargetPermanents = card.Owner.Enemy.GetBattleAreaDigimons().Filter(PermanentCondition);
                     yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(destroyTargetPermanents, CardEffectCommons.CardEffectHashtable(activateClass)).Destroy());
                 }
             }

+ 17 - 13
Assets/CardEffect/BT23/Black/BT23_060.cs

@@ -1,6 +1,5 @@
 using System.Collections;
 using System.Collections.Generic;
-using static UnityEngine.Rendering.DebugUI;
 
 //Machinedramon
 namespace DCGO.CardEffects.BT23
@@ -247,6 +246,7 @@ namespace DCGO.CardEffects.BT23
             #endregion
 
             #region When Attacking
+
             if (timing == EffectTiming.OnAllyAttack)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -262,20 +262,22 @@ namespace DCGO.CardEffects.BT23
 
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
-                    if (cardSource.EqualsTraits("Zaxon"))
+
+                    bool OnPlayEffectSecurityCondition(CardSource cardSource)
                     {
-                        if (!cardSource.IsFlipped)
-                        {
-                            List<ICardEffect> effects = cardSource.EffectList_ForCard(EffectTiming.OnEnterFieldAnyone, cardSource)
+                        List<ICardEffect> effects = cardSource.EffectList_ForCard(EffectTiming.OnEnterFieldAnyone, cardSource)
                                 .Clone()
                                 .Filter(cardEffect => cardEffect != null && cardEffect is ActivateICardEffect && !cardEffect.IsSecurityEffect && cardEffect.IsOnPlay);
 
-                            if (effects.Count > 0)
-                                return true;
-                        }
+                        if (effects.Count > 0)
+                            return true;
+
+                        return false;
                     }
 
-                    return false;
+                    return cardSource.EqualsTraits("Zaxon")
+                    && !cardSource.IsFlipped
+                    && OnPlayEffectSecurityCondition(cardSource);
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
@@ -300,10 +302,10 @@ namespace DCGO.CardEffects.BT23
                         canTargetCondition: CanSelectCardCondition,
                         canTargetCondition_ByPreSelecetedList: null,
                         canEndSelectCondition: null,
-                        canNoSelect: () => true,
+                        canNoSelect: () => false,
                         selectCardCoroutine: SelectCardCoroutine,
                         afterSelectCardCoroutine: null,
-                        message: "Select 1 card to replicate effect.",
+                        message: "Select 1 card to use their [On Play] effect.",
                         maxCount: 1,
                         canEndNotMax: false,
                         isShowOpponent: true,
@@ -315,8 +317,8 @@ namespace DCGO.CardEffects.BT23
                         cardEffect: activateClass);
 
                     selectCardEffect.SetUpCustomMessage(
-                        "Select 1 card to replicate effect.",
-                        "The opponent is selecting 1 card to replicate effect.");
+                        "Select 1 card to use their [On Play] effect.",
+                        "The opponent is selecting 1 card to use their [On Play] effect.");
 
                     yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
@@ -329,6 +331,7 @@ namespace DCGO.CardEffects.BT23
                     #endregion
 
                     #region Select Effect
+
                     if (selectedCard != null)
                     {
                         List<ICardEffect> candidateEffects = selectedCard.EffectList_ForCard(EffectTiming.OnEnterFieldAnyone, card)
@@ -404,6 +407,7 @@ namespace DCGO.CardEffects.BT23
 
                 }
             }
+
             #endregion
 
             return cardEffects;

+ 3 - 5
Assets/CardEffect/BT23/Blue/BT23_016.cs

@@ -77,15 +77,13 @@ namespace DCGO.CardEffects.BT23
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
-                        && CardEffectCommons.CanTriggerWhenLinked(hashtable, perm => perm == card.PermanentOfThisCard(), _ => true);
+                        && CardEffectCommons.CanTriggerWhenLinked(hashtable, perm => perm == card.PermanentOfThisCard(), null);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
-                        && CardEffectCommons.IsOwnerTurn(card)
-                        && CardEffectCommons.OwnerHas1OrLessTamers(card)
-                        && CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition);
+                        && CardEffectCommons.IsOwnerTurn(card);
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)
@@ -97,7 +95,7 @@ namespace DCGO.CardEffects.BT23
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition))
+                    if (CardEffectCommons.OwnerHas1OrLessTamers(card) && CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition))
                     {
                         CardSource selectedCard = null;
                         int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersCardCountInHand(card, CanSelectCardCondition));

+ 9 - 33
Assets/CardEffect/BT23/Blue/BT23_017.cs

@@ -230,39 +230,24 @@ namespace DCGO.CardEffects.BT23
                                 }
                                 #endregion
 
-                                #region Delete EoOT
+                                #region Delete EOOT
+
                                 ActivateClass activateClass1 = new ActivateClass();
                                 activateClass1.SetUpICardEffect("Delete the Digimon", CanUseEndofOpponentTurnCondition, card);
-                                activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, "");
-                                card.Owner.UntilOpponentTurnEndEffects.Add(GetCardEffect);
+                                activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, "at the end of your opponent's turn, Delete this digimon");
+                                playedDigimon.EffectList(EffectTiming.OnEndTurn).Add(activateClass1);
 
                                 bool CanUseEndofOpponentTurnCondition(Hashtable hashtable)
                                 {
-                                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon))
-                                    {
-                                        if (CardEffectCommons.IsOpponentTurn(card))
-                                        {
-                                            return true;
-                                        }
-                                    }
-
-                                    return false;
+                                    return CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon)
+                                        && CardEffectCommons.IsOpponentTurn(card);
                                 }
 
                                 bool CanActivateCondition1(Hashtable hashtable)
                                 {
-                                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon))
-                                    {
-                                        if (playedDigimon.CanBeDestroyedBySkill(activateClass1))
-                                        {
-                                            if (!playedDigimon.TopCard.CanNotBeAffected(activateClass1))
-                                            {
-                                                return true;
-                                            }
-                                        }
-                                    }
-
-                                    return false;
+                                    return CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon)
+                                        && playedDigimon.CanBeDestroyedBySkill(activateClass1)
+                                        && !playedDigimon.TopCard.CanNotBeAffected(activateClass1);
                                 }
 
                                 IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
@@ -270,15 +255,6 @@ namespace DCGO.CardEffects.BT23
                                     yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(new List<Permanent>() { playedDigimon }, CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
                                 }
 
-                                ICardEffect GetCardEffect(EffectTiming _timing)
-                                {
-                                    if (_timing == EffectTiming.OnEndTurn)
-                                    {
-                                        return activateClass1;
-                                    }
-
-                                    return null;
-                                }
                                 #endregion
                             }
                             #endregion

+ 64 - 5
Assets/CardEffect/BT23/Blue/BT23_021.cs

@@ -307,13 +307,43 @@ namespace DCGO.CardEffects.BT23
 
             #endregion
 
-            #region Link ESS - OPT
+            #region AT/ESS Shared
+
+            IEnumerator SharedActivateCoroutine1(Hashtable hashtable, ActivateClass activateClass)
+            {
+                bool CanNotBeDestroyedByBattleCondition(Permanent permanent, Permanent AttackingPermanent, Permanent DefendingPermanent, CardSource DefendingCard)
+                {
+                    if (permanent == AttackingPermanent)
+                    {
+                        return true;
+                    }
+
+                    if (permanent == DefendingPermanent)
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
+                Permanent thisPermanent = card.PermanentOfThisCard().TopCard.PermanentOfThisCard();
+                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotBeDeletedByBattle(
+                    targetPermanent: thisPermanent,
+                    canNotBeDestroyedByBattleCondition: CanNotBeDestroyedByBattleCondition,
+                    effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                    activateClass: activateClass,
+                    effectName: "Can't be desstroyed by battle"));
+            }
+
+            #endregion
+
+            #region All Turns - OPT
 
             if (timing == EffectTiming.WhenLinked)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Gain immunity from battle", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, hash => SharedActivateCoroutine1(hash, activateClass), 1, false, EffectDiscription());
                 activateClass.SetHashString("BT23_021_WL");
                 cardEffects.Add(activateClass);
 
@@ -324,13 +354,42 @@ namespace DCGO.CardEffects.BT23
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnField(card)
-                        && CardEffectCommons.CanTriggerWhenLinking(hashtable, perm => perm.TopCard.Owner == card.Owner, card);
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
+                        && CardEffectCommons.CanTriggerWhenLinked(hashtable, perm => perm == card.PermanentOfThisCard(), null);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                }
+            }
+
+            #endregion
+
+            #region Link ESS - OPT
+
+            if (timing == EffectTiming.WhenLinked)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Gain immunity from battle", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+                activateClass.SetIsLinkedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Linking] This Digimon can't be deleted in battle until your opponent's turn ends.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleArea(card)
+                        && CardEffectCommons.CanTriggerWhenLinking(hashtable, null, card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnField(card);
+                    return CardEffectCommons.IsExistOnBattleArea(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)

+ 1 - 2
Assets/CardEffect/BT23/Blue/BT23_024.cs

@@ -315,8 +315,7 @@ namespace DCGO.CardEffects.BT23
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
-                           CardEffectCommons.IsOwnerTurn(card) &&
-                           card.PermanentOfThisCard().CanUnsuspend && 
+                           card.PermanentOfThisCard().CanUnsuspend &&
                            card.PermanentOfThisCard().IsSuspended;
                 }
 

+ 28 - 1
Assets/CardEffect/BT23/Blue/BT23_025.cs

@@ -73,7 +73,7 @@ namespace DCGO.CardEffects.BT23
                     return CardEffectCommons.IsExistOnHand(card)
                         && CardEffectCommons.IsOwnerTurn(card)
                         && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsCSDigimonOrTamer);
-                }   
+                }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
@@ -262,6 +262,33 @@ namespace DCGO.CardEffects.BT23
             if (timing == EffectTiming.SecuritySkill)
             {
                 cardEffects.Add(CardEffectFactory.PlaySelfDigimonAfterBattleSecurityEffect(card: card));
+
+                #region Delete EOOT
+
+                ActivateClass activateClass1 = new ActivateClass();
+                activateClass1.SetUpICardEffect("Delete the Digimon", CanUseEndofOpponentTurnCondition, card);
+                activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, "at the end of your opponent's turn, Delete this digimon");
+                card.EffectList(EffectTiming.OnEndTurn).Add(activateClass1);
+
+                bool CanUseEndofOpponentTurnCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnBattleArea(card.PermanentOfThisCard())
+                        && CardEffectCommons.IsOpponentTurn(card);
+                }
+
+                bool CanActivateCondition1(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnBattleArea(card.PermanentOfThisCard())
+                        && card.PermanentOfThisCard().CanBeDestroyedBySkill(activateClass1)
+                        && !card.PermanentOfThisCard().TopCard.CanNotBeAffected(activateClass1);
+                }
+
+                IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(new List<Permanent>() { card.PermanentOfThisCard() }, CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
+                }
+
+                #endregion
             }
             #endregion
 

+ 2 - 1
Assets/CardEffect/BT23/Green/BT23_002.cs

@@ -32,7 +32,8 @@ namespace DCGO.CardEffects.BT23
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnField(card);
+                    return CardEffectCommons.IsExistOnField(card)
+                        && card.PermanentOfThisCard().TopCard.HasCSTraits;
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)

+ 9 - 33
Assets/CardEffect/BT23/Green/BT23_037.cs

@@ -170,39 +170,24 @@ namespace DCGO.CardEffects.BT23
                                 }
                                 #endregion
 
-                                #region Delete EoOT
+                                #region Delete EOOT
+
                                 ActivateClass activateClass1 = new ActivateClass();
                                 activateClass1.SetUpICardEffect("Delete the Digimon", CanUseEndofOpponentTurnCondition, card);
-                                activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, "");
-                                card.Owner.UntilOpponentTurnEndEffects.Add(GetCardEffect);
+                                activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, "at the end of your opponent's turn, Delete this digimon");
+                                playedDigimon.EffectList(EffectTiming.OnEndTurn).Add(activateClass1);
 
                                 bool CanUseEndofOpponentTurnCondition(Hashtable hashtable)
                                 {
-                                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon))
-                                    {
-                                        if (CardEffectCommons.IsOpponentTurn(card))
-                                        {
-                                            return true;
-                                        }
-                                    }
-
-                                    return false;
+                                    return CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon)
+                                        && CardEffectCommons.IsOpponentTurn(card);
                                 }
 
                                 bool CanActivateCondition1(Hashtable hashtable)
                                 {
-                                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon))
-                                    {
-                                        if (playedDigimon.CanBeDestroyedBySkill(activateClass1))
-                                        {
-                                            if (!playedDigimon.TopCard.CanNotBeAffected(activateClass1))
-                                            {
-                                                return true;
-                                            }
-                                        }
-                                    }
-
-                                    return false;
+                                    return CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon)
+                                        && playedDigimon.CanBeDestroyedBySkill(activateClass1)
+                                        && !playedDigimon.TopCard.CanNotBeAffected(activateClass1);
                                 }
 
                                 IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
@@ -210,15 +195,6 @@ namespace DCGO.CardEffects.BT23
                                     yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(new List<Permanent>() { playedDigimon }, CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
                                 }
 
-                                ICardEffect GetCardEffect(EffectTiming _timing)
-                                {
-                                    if (_timing == EffectTiming.OnEndTurn)
-                                    {
-                                        return activateClass1;
-                                    }
-
-                                    return null;
-                                }
                                 #endregion
                             }
                             #endregion

+ 23 - 11
Assets/CardEffect/BT23/Green/BT23_038.cs

@@ -31,28 +31,40 @@ namespace DCGO.CardEffects.BT23
 
             #endregion Alternative Digivolution Condition
 
-            #region Security
+            #region All Turns - Security
 
             if (timing == EffectTiming.None)
             {
+                string EffectDiscription()
+                {
+                    return "(Security) [All Turns] All of your [Royal Base] trait Digimon get +1000 DP.";
+                }
+
                 bool Condition()
                 {
-                    return CardEffectCommons.IsExistInSecurity(card, true);
+                    return CardEffectCommons.IsExistInSecurity(card, false);
                 }
 
-                bool PermamentCondition(Permanent permanent)
+                bool PermanentCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
-                        && permanent.TopCard.HasRoyalBaseTraits;
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                    {
+                        if (permanent.TopCard.EqualsTraits("Royal Base"))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
                 }
 
                 cardEffects.Add(CardEffectFactory.ChangeDPStaticEffect(
-                    permanentCondition: PermamentCondition,
-                    changeValue: 1000,
-                    isInheritedEffect: false,
-                    card: card,
-                    condition: Condition,
-                    effectName: () => "+1K DP"));
+                permanentCondition: PermanentCondition,
+                changeValue: 1000,
+                isInheritedEffect: false,
+                card: card,
+                condition: Condition,
+                effectName: EffectDiscription));
             }
 
             #endregion

+ 1 - 2
Assets/CardEffect/BT23/Green/BT23_040.cs

@@ -1,7 +1,6 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
-using System.Linq;
 
 // Wormmon
 namespace DCGO.CardEffects.BT23
@@ -38,7 +37,7 @@ namespace DCGO.CardEffects.BT23
             if (timing == EffectTiming.OnStartMainPhase)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("By placing 1 [Erika Mishima] as bottom digivolution card, this digimon may digivolve", CanUseCondition, card);
+                activateClass.SetUpICardEffect("By placing 1 [Erika Mishima] as bottom digivolution card, this digimon may digivolve into a [Hudie] digimon in hand/trash for 2 reduced cost", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
 

+ 23 - 11
Assets/CardEffect/BT23/Green/BT23_042.cs

@@ -32,28 +32,40 @@ namespace DCGO.CardEffects.BT23
 
             #endregion Alternative Digivolution Condition
 
-            #region Security
+            #region All Turns - Security
 
             if (timing == EffectTiming.None)
             {
+                string EffectDiscription()
+                {
+                    return "(Security) [All Turns] All of your [Royal Base] trait Digimon get +1000 DP.";
+                }
+
                 bool Condition()
                 {
-                    return CardEffectCommons.IsExistInSecurity(card, true);
+                    return CardEffectCommons.IsExistInSecurity(card, false);
                 }
 
-                bool PermamentCondition(Permanent permanent)
+                bool PermanentCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
-                        && permanent.TopCard.HasRoyalBaseTraits;
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                    {
+                        if (permanent.TopCard.EqualsTraits("Royal Base"))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
                 }
 
                 cardEffects.Add(CardEffectFactory.ChangeDPStaticEffect(
-                    permanentCondition: PermamentCondition,
-                    changeValue: 1000,
-                    isInheritedEffect: false,
-                    card: card,
-                    condition: Condition,
-                    effectName: () => "+1K DP"));
+                permanentCondition: PermanentCondition,
+                changeValue: 1000,
+                isInheritedEffect: false,
+                card: card,
+                condition: Condition,
+                effectName: EffectDiscription));
             }
 
             #endregion

+ 21 - 9
Assets/CardEffect/BT23/Green/BT23_043.cs

@@ -32,23 +32,30 @@ namespace DCGO.CardEffects.BT23
 
             #endregion Alternative Digivolution Condition
 
-            #region Security
+            #region All Turns - Security
 
             if (timing == EffectTiming.None)
             {
                 bool Condition()
                 {
-                    return CardEffectCommons.IsExistInSecurity(card, true);
+                    return CardEffectCommons.IsExistInSecurity(card, false);
                 }
 
-                bool PermamentCondition(Permanent permanent)
+                bool PermanentCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
-                        && permanent.TopCard.HasRoyalBaseTraits;
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                    {
+                        if (permanent.TopCard.EqualsTraits("Royal Base"))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
                 }
 
                 cardEffects.Add(CardEffectFactory.BlockerStaticEffect(
-                    permanentCondition: PermamentCondition,
+                    permanentCondition: PermanentCondition,
                     isInheritedEffect: false,
                     card: card,
                     condition: Condition));
@@ -150,7 +157,7 @@ namespace DCGO.CardEffects.BT23
                     removedPermanents = CardEffectCommons.GetPermanentsFromHashtable(hashtable).Filter(CanSelectPermanentCondition);
 
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
-                        && CardEffectCommons.HasMatchConditionOwnersSecurity(card, _ => true, false);
+                        && CardEffectCommons.HasMatchConditionOwnersSecurity(card, null, false);
                 }
 
                 bool CanSelectPermanentCondition(Permanent permanent)
@@ -159,6 +166,11 @@ namespace DCGO.CardEffects.BT23
                         && permanent.TopCard.HasRoyalBaseTraits;
                 }
 
+                bool CanSelectPermament(Permanent permanent)
+                {
+                    return removedPermanents.Contains(permanent);
+                }
+
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
                     var flippedSecurity = false;
@@ -176,11 +188,11 @@ namespace DCGO.CardEffects.BT23
                     {
                         Permanent selectedPermanent = null;
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermament));
 
                         selectPermanentEffect.SetUp(
                             selectPlayer: card.Owner,
-                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition: CanSelectPermament,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             maxCount: maxCount,

+ 3 - 3
Assets/CardEffect/BT23/Green/BT23_045.cs

@@ -46,7 +46,7 @@ namespace DCGO.CardEffects.BT23
             bool CanSelectCardCondition(CardSource cardSource)
             {
                 return cardSource.IsDigimon
-                    && cardSource.HasRoyalBaseTraits || cardSource.EqualsTraits("Zaxon");
+                    && (cardSource.HasRoyalBaseTraits || cardSource.EqualsTraits("Zaxon"));
             }
 
             IEnumerator SharedActivateCoroutine(Hashtable hashtable, ActivateClass activateClass)
@@ -140,7 +140,7 @@ namespace DCGO.CardEffects.BT23
                         bool CanSelectPermanentCondition(Permanent permanent)
                         {
                             return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card)
-                                && permanent.DP <= card.PermanentOfThisCard().DP;
+                                && permanent.HasDP && permanent.DP <= card.PermanentOfThisCard().DP;
                         }
 
                         if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
@@ -249,7 +249,7 @@ namespace DCGO.CardEffects.BT23
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("By flipping your top face up security card face down, unsuspend 1 digimon", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()

+ 5 - 4
Assets/CardEffect/BT23/Green/BT23_046.cs

@@ -1,6 +1,6 @@
+using System;
 using System.Collections;
 using System.Collections.Generic;
-using System;
 
 //Rosemon
 namespace DCGO.CardEffects.BT23
@@ -43,8 +43,9 @@ namespace DCGO.CardEffects.BT23
 
             bool SharedCanSelectDigimonOrTamer(Permanent permanent)
             {
-                return !permanent.IsSuspended &&
-                       (permanent.IsDigimon || permanent.IsTamer);
+                return !permanent.IsSuspended
+                     && (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card) || CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                     && (permanent.IsDigimon || permanent.IsTamer);
             }
 
             bool SharedCanSelectOpponentsDigimonOrTamer(Permanent permanent)
@@ -114,7 +115,7 @@ namespace DCGO.CardEffects.BT23
                                     targetPermanent: permanent,
                                     activateClass: activateClass
                                 ));
-                    }                    
+                    }
                 }
             }
             #endregion

+ 3 - 2
Assets/CardEffect/BT23/Purple/BT23_070.cs

@@ -1,5 +1,6 @@
 using System.Collections;
 using System.Collections.Generic;
+using System.Linq;
 
 // Belphemon (X Antibody)
 namespace DCGO.CardEffects.BT23
@@ -93,7 +94,8 @@ namespace DCGO.CardEffects.BT23
                         failureProcess: null));
 
                     var thisPermament = card.PermanentOfThisCard();
-                    if (thisPermament.DigivolutionCards.Exists(HasBelphemonInName) && thisPermament.CanAttack(activateClass, withoutTap: true))
+
+                    if (thisPermament.DigivolutionCards.Any(HasBelphemonInName) && thisPermament.CanAttack(activateClass, withoutTap: true))
                     {
                         SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
 
@@ -104,7 +106,6 @@ namespace DCGO.CardEffects.BT23
                             cardEffect: activateClass);
 
                         selectAttackEffect.SetWithoutTap();
-                        selectAttackEffect.SetCanNotSelectNotAttack();
 
                         yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
                     }

+ 2 - 2
Assets/CardEffect/BT23/Red/BT23_006.cs

@@ -114,13 +114,13 @@ namespace DCGO.CardEffects.BT23
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnField(card)
+                    return CardEffectCommons.IsExistOnBattleArea(card)
                         && CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, IsYourWhiteDigimon, null);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnField(card)
+                    return CardEffectCommons.IsExistOnBattleArea(card)
                         && CardEffectCommons.IsOwnerTurn(card);
 
                 }

+ 1 - 1
Assets/CardEffect/BT23/Red/BT23_009.cs

@@ -47,7 +47,7 @@ namespace DCGO.CardEffects.BT23
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("1 digimon gains 4K DP", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
                 activateClass.SetHashString("BT23-009_WL");
                 cardEffects.Add(activateClass);
 

+ 9 - 0
Assets/CardEffect/BT23/Red/BT23_010.cs

@@ -53,6 +53,15 @@ namespace DCGO.CardEffects.BT23
 
             #region Blocker
 
+            if (timing == EffectTiming.None)
+            {
+                cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
+            }
+
+            #endregion
+
+            #region Blocker ESS
+
             if (timing == EffectTiming.None)
             {
                 cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: true, card: card, condition: null));

+ 104 - 111
Assets/CardEffect/BT23/Red/BT23_013.cs

@@ -117,132 +117,125 @@ namespace DCGO.CardEffects.BT23
 
                 #region User Selection - Play Token or Select Card Location
 
-                if (canPlayToken || canSelectHand || canSelectTrash)
+                var playOptions = new List<SelectionElement<bool>>();
+                if (canPlayToken) playOptions.Add(new SelectionElement<bool>(message: $"Play [Atho, René & Por] Token", value: true, spriteIndex: 0));
+                if (canSelectHand || canSelectTrash) playOptions.Add(new SelectionElement<bool>(message: $"Player [Sistermon] in name digimon from hand or trash", value: false, spriteIndex: 1));
+
+                if (playOptions.Count == 1)
+                {
+                    if (playOptions[0].Message.Contains("Token")) playToken = true;
+                    else if (canSelectHand) playFromHand = true;
+                    else playFromTrash = true;
+                }
+
+                if (playOptions.Count == 2)
                 {
-                    if(canPlayToken && (canSelectHand || canSelectTrash))
+                    string selectPlayerMessage = "Which effect will you use";
+                    string notSelectPlayerMessage = "The opponent is which effect to use.";
+
+                    GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: playOptions, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+                    var selectedOption = GManager.instance.userSelectionManager.SelectedBoolValue;
+
+                    if (selectedOption) playToken = true;
+                    else if (!selectedOption && canSelectHand && !canSelectTrash) playFromHand = true;
+                    else if (!selectedOption && canSelectTrash && !canSelectHand) playFromTrash = true;
+                    else
                     {
-                        List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
+                        List<SelectionElement<bool>> selectionElements1 = new List<SelectionElement<bool>>()
                         {
-                            new SelectionElement<bool>(message: $"Play [Atho, René & Por] Token", value : true, spriteIndex: 0),
-                            new SelectionElement<bool>(message: $"Player [Sistermon] in name digimon from hand or trash", value : false, spriteIndex: 1),
+                            new SelectionElement<bool>(message: $"From hand", value : true, spriteIndex: 0),
+                            new SelectionElement<bool>(message: $"From trash", value : false, spriteIndex: 1),
                         };
 
-                        string selectPlayerMessage = "Which effect will you use";
-                        string notSelectPlayerMessage = "The opponent is which effect to use.";
+                        string selectPlayerMessage1 = "From which area do you select a card?";
+                        string notSelectPlayerMessage1 = "The opponent is choosing from which area to select a card.";
 
-                        GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+                        GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements1, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage1, notSelectPlayerMessage: notSelectPlayerMessage1);
                         yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
 
-                        playToken = GManager.instance.userSelectionManager.SelectedBoolValue;
+                        var handOrTrashSelection = GManager.instance.userSelectionManager.SelectedBoolValue;
+                        if (handOrTrashSelection) playFromHand = true;
+                        else playFromTrash = true;
                     }
-                    else if(!canPlayToken && (canSelectHand || canSelectTrash))
-                    {
-                        
-                    }
-
-                    if (playToken)
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayAthoRenePorToken(activateClass));
-                    }
-                    else
-                    {
-                        if(canSelectHand && canSelectTrash)
-                        {
-                            List<SelectionElement<bool>> selectionElements1 = new List<SelectionElement<bool>>()
-                            {
-                                new SelectionElement<bool>(message: $"From hand", value : true, spriteIndex: 0),
-                                new SelectionElement<bool>(message: $"From trash", value : false, spriteIndex: 1),
-                            };
-
-                            string selectPlayerMessage1 = "From which area do you select a card?";
-                            string notSelectPlayerMessage1 = "The opponent is choosing from which area to select a card.";
+                }
 
-                            GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements1, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage1, notSelectPlayerMessage: notSelectPlayerMessage1);
-                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+                #endregion
 
-                            playFromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
-                        }
-                        else
-                        {
-                            playFromHand = canSelectHand;
-                        }
+                CardSource selectedCard = null;
+                IEnumerator SelectCardCoroutine(CardSource cardSource)
+                {
+                    selectedCard = cardSource;
+                    yield return null;
+                }
 
-                        CardSource selectedCard = null;
-                        IEnumerator SelectCardCoroutine(CardSource cardSource)
-                        {
-                            selectedCard = cardSource;
-                            yield return null;
-                        }
+                if (playToken) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayAthoRenePorToken(activateClass: activateClass));
 
-                        if (playFromHand)
-                        {
-                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
-
-                            selectHandEffect.SetUp(
-                                selectPlayer: card.Owner,
-                                canTargetCondition: IsValidSistermon,
-                                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");
-
-                            yield return ContinuousController.instance.StartCoroutine(selectHandEffect.Activate());
-
-                            if (selectedCard != null) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
-                                new List<CardSource>() { selectedCard },
-                                activateClass: activateClass,
-                                payCost: false,
-                                isTapped: false,
-                                root: SelectCardEffect.Root.Hand,
-                                activateETB: true));
-                        }
-                        if (playFromTrash)
-                        {
-                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                            selectCardEffect.SetUp(
-                                canTargetCondition: IsValidSistermon,
-                                canTargetCondition_ByPreSelecetedList: null,
-                                canEndSelectCondition: null,
-                                canNoSelect: () => true,
-                                selectCardCoroutine: SelectCardCoroutine,
-                                afterSelectCardCoroutine: null,
-                                message: "Select 1 digimon to play",
-                                maxCount: 1,
-                                canEndNotMax: false,
-                                isShowOpponent: true,
-                                mode: SelectCardEffect.Mode.Custom,
-                                root: SelectCardEffect.Root.Trash,
-                                customRootCardList: null,
-                                canLookReverseCard: true,
-                                selectPlayer: card.Owner,
-                                cardEffect: activateClass);
-
-                            selectCardEffect.SetUpCustomMessage("Select 1 digimon to play", "The opponent is selecting 1 digimon to play");
-                            selectCardEffect.SetUpCustomMessage_ShowCard("Selected Digimon");
-
-                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
-
-                            if (selectedCard != null) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
-                                new List<CardSource>() { selectedCard },
-                                activateClass: activateClass,
-                                payCost: false,
-                                isTapped: false,
-                                root: SelectCardEffect.Root.Trash,
-                                activateETB: true));
-                        }
-                    }
+                if (playFromHand)
+                {
+                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                    selectHandEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: IsValidSistermon,
+                        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");
+
+                    yield return ContinuousController.instance.StartCoroutine(selectHandEffect.Activate());
+
+                    if (selectedCard != null) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                        new List<CardSource>() { selectedCard },
+                        activateClass: activateClass,
+                        payCost: false,
+                        isTapped: false,
+                        root: SelectCardEffect.Root.Hand,
+                        activateETB: true));
                 }
 
-                #endregion
+                if (playFromTrash)
+                {
+                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                    selectCardEffect.SetUp(
+                        canTargetCondition: IsValidSistermon,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        canNoSelect: () => true,
+                        selectCardCoroutine: SelectCardCoroutine,
+                        afterSelectCardCoroutine: null,
+                        message: "Select 1 digimon to play",
+                        maxCount: 1,
+                        canEndNotMax: false,
+                        isShowOpponent: true,
+                        mode: SelectCardEffect.Mode.Custom,
+                        root: SelectCardEffect.Root.Trash,
+                        customRootCardList: null,
+                        canLookReverseCard: true,
+                        selectPlayer: card.Owner,
+                        cardEffect: activateClass);
+
+                    selectCardEffect.SetUpCustomMessage("Select 1 digimon to play", "The opponent is selecting 1 digimon to play");
+                    selectCardEffect.SetUpCustomMessage_ShowCard("Selected Digimon");
+
+                    yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                    if (selectedCard != null) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                        new List<CardSource>() { selectedCard },
+                        activateClass: activateClass,
+                        payCost: false,
+                        isTapped: false,
+                        root: SelectCardEffect.Root.Trash,
+                        activateETB: true));
+                }
             }
 
             #endregion

+ 4 - 1
Assets/CardEffect/BT23/Red/BT23_014.cs

@@ -2,7 +2,6 @@ using System;
 using System.Collections;
 using System.Collections.Generic;
 
-
 // Gallantmon 
 namespace DCGO.CardEffects.BT23
 {
@@ -64,6 +63,7 @@ namespace DCGO.CardEffects.BT23
                 ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().DebuffSE);
                 yield return null;
             }
+
             #endregion
 
             #region On Play - Floodgate
@@ -159,6 +159,9 @@ namespace DCGO.CardEffects.BT23
 
                     yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                 }
+
+                // This is here to see if it helps with timing issues when this is used first & floodgate second
+                yield return null;
             }
 
             #endregion

+ 10 - 34
Assets/CardEffect/BT23/Red/BT23_048.cs

@@ -53,7 +53,7 @@ namespace DCGO.CardEffects.BT23
                 bool CanSelectCardCondition1(CardSource cardSource)
                 {
                     return cardSource.HasCSTraits
-                        && (cardSource.IsTamer || cardSource.IsOption);
+                        && cardSource.IsTamer || cardSource.IsOption;
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
@@ -199,39 +199,24 @@ namespace DCGO.CardEffects.BT23
                                 }
                                 #endregion
 
-                                #region Delete EoOT
+                                #region Delete EOOT
+
                                 ActivateClass activateClass1 = new ActivateClass();
                                 activateClass1.SetUpICardEffect("Delete the Digimon", CanUseEndofOpponentTurnCondition, card);
-                                activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, "");
-                                card.Owner.UntilOpponentTurnEndEffects.Add(GetCardEffect);
+                                activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, "at the end of your opponent's turn, Delete this digimon");
+                                playedDigimon.EffectList(EffectTiming.OnEndTurn).Add(activateClass1);
 
                                 bool CanUseEndofOpponentTurnCondition(Hashtable hashtable)
                                 {
-                                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon))
-                                    {
-                                        if (CardEffectCommons.IsOpponentTurn(card))
-                                        {
-                                            return true;
-                                        }
-                                    }
-
-                                    return false;
+                                    return CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon)
+                                        && CardEffectCommons.IsOpponentTurn(card);
                                 }
 
                                 bool CanActivateCondition1(Hashtable hashtable)
                                 {
-                                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon))
-                                    {
-                                        if (playedDigimon.CanBeDestroyedBySkill(activateClass1))
-                                        {
-                                            if (!playedDigimon.TopCard.CanNotBeAffected(activateClass1))
-                                            {
-                                                return true;
-                                            }
-                                        }
-                                    }
-
-                                    return false;
+                                    return CardEffectCommons.IsPermanentExistsOnBattleArea(playedDigimon)
+                                        && playedDigimon.CanBeDestroyedBySkill(activateClass1)
+                                        && !playedDigimon.TopCard.CanNotBeAffected(activateClass1);
                                 }
 
                                 IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
@@ -239,15 +224,6 @@ namespace DCGO.CardEffects.BT23
                                     yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(new List<Permanent>() { playedDigimon }, CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
                                 }
 
-                                ICardEffect GetCardEffect(EffectTiming _timing)
-                                {
-                                    if (_timing == EffectTiming.OnEndTurn)
-                                    {
-                                        return activateClass1;
-                                    }
-
-                                    return null;
-                                }
                                 #endregion
                             }
                             #endregion

+ 87 - 80
Assets/CardEffect/BT23/White/BT23_072.cs

@@ -1,7 +1,5 @@
 using System.Collections;
 using System.Collections.Generic;
-using System.Linq;
-using System;
 
 //King Drasil_7D6
 namespace DCGO.CardEffects.BT23
@@ -57,16 +55,17 @@ namespace DCGO.CardEffects.BT23
             #endregion
 
             #region All Turns
+
             if (timing == EffectTiming.OnEnterFieldAnyone)
-            { 
+            {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Gain <Rush>, <Raid>, <Reboot> and <Blocker>", CanUseCondition, card);
+                activateClass.SetUpICardEffect("By suspending this digimon, 1 played digimon gains <Rush>, <Raid>, <Reboot> and <Blocker>", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
                 cardEffects.Add(activateClass);
 
                 string EffectDescription()
                 {
-                    return "[All Turns] When any of your Digimon with the [Royal Knight] or [CS] trait are played, by suspending this Digimon, 1 of the played Digimon gains <Rush>, <Raid>, <Reboot> and <Blocker> until your opponent's turn ends.";
+                    return "[All Turns] When any of your Digimon with the [Royal Knight] or [CS] trait are played, by suspending this Digimon, 1 of the played Digimon gains <Rush>, <Raid>, <Reboot> and <Blocker> until your opponent's turn ends.";
                 }
 
                 bool PlayedPermanentCondition(Permanent permanent)
@@ -89,85 +88,92 @@ namespace DCGO.CardEffects.BT23
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(
+                    if (!card.PermanentOfThisCard().IsSuspended)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(
                         permanents: new List<Permanent>() { card.PermanentOfThisCard() },
-                        hashtable: _hashtable).Tap()
-                    );
+                        hashtable: _hashtable).Tap());
 
-                    List<Permanent> playedPermanents = new List<Permanent>();
-                    List<Hashtable> hashtables = CardEffectCommons.GetHashtablesFromHashtable(_hashtable);
-
-                    if (hashtables != null)
-                    {
-                        foreach (Hashtable hashtable1 in hashtables)
+                        if (card.PermanentOfThisCard().IsSuspended)
                         {
-                            Permanent permanent = CardEffectCommons.GetPermanentFromHashtable(hashtable1);
 
-                            if (permanent != null)
-                                playedPermanents.Add(permanent);
+                            List<Permanent> playedPermanents = new List<Permanent>();
+                            List<Hashtable> hashtables = CardEffectCommons.GetHashtablesFromHashtable(_hashtable);
+
+                            if (hashtables != null)
+                            {
+                                foreach (Hashtable hashtable1 in hashtables)
+                                {
+                                    Permanent permanent = CardEffectCommons.GetPermanentFromHashtable(hashtable1);
+
+                                    if (permanent != null)
+                                        playedPermanents.Add(permanent);
+                                }
+
+                                playedPermanents = playedPermanents.Filter(PermanentCondition);
+                            }
+
+                            Permanent selectedPermanent = null;
+
+                            bool PermanentCondition(Permanent permanent)
+                            {
+                                return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
+                                    && (permanent.TopCard.HasRoyalKnightTraits || permanent.TopCard.HasCSTraits)
+                                    && playedPermanents.Contains(permanent);
+                            }
+
+                            if (playedPermanents.Count == 1) selectedPermanent = playedPermanents[0];
+                            else
+                            {
+                                SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                selectPermanentEffect.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition: PermanentCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    maxCount: 1,
+                                    canNoSelect: false,
+                                    canEndNotMax: false,
+                                    selectPermanentCoroutine: SelectPermanentCoroutine,
+                                    afterSelectPermanentCoroutine: null,
+                                    mode: SelectPermanentEffect.Mode.Custom,
+                                    cardEffect: activateClass);
+
+                                selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to gain effects.", "The opponent is selecting 1 Digimon to gain effects.");
+
+                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                                IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                                {
+                                    selectedPermanent = permanent;
+                                    yield return null;
+                                }
+                            }
+
+                            if (selectedPermanent != null)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainRush(
+                                        targetPermanent: selectedPermanent,
+                                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                                        activateClass: activateClass));
+
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainRaid(
+                                        targetPermanent: selectedPermanent,
+                                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                                        activateClass: activateClass));
+
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainReboot(
+                                        targetPermanent: selectedPermanent,
+                                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                                        activateClass: activateClass));
+
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBlocker(
+                                        targetPermanent: selectedPermanent,
+                                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                                        activateClass: activateClass));
+                            }
                         }
-
-                        playedPermanents = playedPermanents.Filter(PermanentCondition);
-                    }
-
-                    Permanent selectedPermanent = null;
-
-                    bool PermanentCondition(Permanent permanent)
-                    {
-                        return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
-                               (permanent.TopCard.HasRoyalKnightTraits || permanent.TopCard.HasCSTraits);                    }
-
-                    if (playedPermanents.Count == 1) 
-                        selectedPermanent = playedPermanents[0];
-                    else
-                    {
-                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                        selectPermanentEffect.SetUp(
-                            selectPlayer: card.Owner,
-                            canTargetCondition: PermanentCondition,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canEndSelectCondition: null,
-                            maxCount: 1,
-                            canNoSelect: false,
-                            canEndNotMax: false,
-                            selectPermanentCoroutine: SelectPermanentCoroutine,
-                            afterSelectPermanentCoroutine: null,
-                            mode: SelectPermanentEffect.Mode.Custom,
-                            cardEffect: activateClass);
-
-                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to gain effects.", "The opponent is selecting 1 Digimon to gain effects.");
-
-                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
-                        {
-                            selectedPermanent = permanent;
-                            yield return null;
-                        }
-                    }
-                    
-                    if(selectedPermanent != null)
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainRush(
-                                targetPermanent: selectedPermanent,
-                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                                activateClass: activateClass));
-
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainRaid(
-                                targetPermanent: selectedPermanent,
-                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                                activateClass: activateClass));
-
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainReboot(
-                                targetPermanent: selectedPermanent,
-                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                                activateClass: activateClass));
-
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBlocker(
-                                targetPermanent: selectedPermanent,
-                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                                activateClass: activateClass));
                     }
                 }
             }
@@ -191,7 +197,8 @@ namespace DCGO.CardEffects.BT23
                 {
                     return source.ContainsCardName("King Drasil") &&
                            source.IsDigimon &&
-                           CardEffectCommons.CanPlayAsNewPermanent(cardSource: source, payCost: false, cardEffect: activateClass);                }
+                           CardEffectCommons.CanPlayAsNewPermanent(cardSource: source, payCost: false, cardEffect: activateClass);
+                }
 
                 bool CanUseCondition(Hashtable hashtable)
                 {

+ 58 - 17
Assets/CardEffect/BT23/White/BT23_073.cs

@@ -1,8 +1,8 @@
+using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
 using UnityEngine;
-using System;
 
 //Eater Bit
 namespace DCGO.CardEffects.BT23
@@ -88,8 +88,11 @@ namespace DCGO.CardEffects.BT23
             #endregion
 
             #region All Turns
+
             if (timing == EffectTiming.WhenRemoveField)
             {
+                List<Permanent> wouldBeRemovedPermaments = new List<Permanent>();
+
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Prevent a Digimon from leaving battle area", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
@@ -103,9 +106,16 @@ namespace DCGO.CardEffects.BT23
 
                 bool RemovedFromPlayPermanent(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
-                           (permanent.TopCard.HasEaterTraits || permanent.TopCard.HasHudieTraits) &&
-                           permanent != card.PermanentOfThisCard();
+                    wouldBeRemovedPermaments.Add(permanent);
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
+                        && (permanent.TopCard.HasEaterTraits || permanent.TopCard.HasHudieTraits)
+                        && permanent != card.PermanentOfThisCard())
+                    {
+                        wouldBeRemovedPermaments.Add(permanent);
+                        return true;
+                    }
+                    return false;
+
                 }
 
                 bool HasMother(Permanent permanent)
@@ -127,13 +137,12 @@ namespace DCGO.CardEffects.BT23
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    Permanent selectedPermanent = CardEffectCommons.GetPermanentFromHashtable(_hashtable);
-                    bool canAddSource = CardEffectCommons.HasMatchConditionPermanent(HasMother, true);
+                    bool canAddSource = CardEffectCommons.HasMatchConditionOwnersBreedingPermanent(card, HasMother);
                     bool canDestroy = card.PermanentOfThisCard().CanBeDestroyed();
 
                     if (canAddSource || canDestroy)
                     {
-                        bool willDestroy = canDestroy;
+                        bool willDestroy = false;
 
                         if (canAddSource && canDestroy)
                         {
@@ -149,9 +158,12 @@ namespace DCGO.CardEffects.BT23
                             GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
 
                             yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
-
                             willDestroy = GManager.instance.userSelectionManager.SelectedBoolValue;
                         }
+                        else
+                        {
+                            willDestroy = canDestroy;
+                        }
 
                         if (willDestroy)
                         {
@@ -165,24 +177,53 @@ namespace DCGO.CardEffects.BT23
                         else
                         {
                             yield return ContinuousController.instance.StartCoroutine(new IPlacePermanentToDigivolutionCards(new List<Permanent[]>() { new Permanent[] { card.PermanentOfThisCard(), card.Owner.GetBreedingAreaPermanents()[0] } }, false, activateClass).PlacePermanentToDigivolutionCards());
-
-                            yield return ContinuousController.instance.StartCoroutine("SuccessProcess");
-                        }                        
+                            yield return ContinuousController.instance.StartCoroutine(SuccessProcess());
+                        }
 
                         IEnumerator SuccessProcess()
                         {
-                            selectedPermanent.willBeRemoveField = false;
+                            Permanent selectedPermanent = null;
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(perm => wouldBeRemovedPermaments.Contains(perm)));
+
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: perm => wouldBeRemovedPermaments.Contains(perm),
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                selectedPermanent = permanent;
+                                yield return null;
+                            }
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will not be removed from battle area.", "The opponent is selecting 1 Digimon that will not be removed from battle area.");
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
-                            selectedPermanent.HideDeleteEffect();
-                            selectedPermanent.HideHandBounceEffect();
-                            selectedPermanent.HideDeckBounceEffect();
-                            selectedPermanent.HideWillRemoveFieldEffect();
+                            if (selectedPermanent == null)
+                            {
+                                selectedPermanent.willBeRemoveField = false;
 
-                            yield return null;
+                                selectedPermanent.HideDeleteEffect();
+                                selectedPermanent.HideHandBounceEffect();
+                                selectedPermanent.HideDeckBounceEffect();
+                                selectedPermanent.HideWillRemoveFieldEffect();
+                                yield return null;
+                            }
                         }
                     }
                 }
             }
+
             #endregion
 
             #region ESS

+ 4 - 4
Assets/CardEffect/BT23/Yellow/BT23_028.cs

@@ -181,18 +181,18 @@ namespace DCGO.CardEffects.BT23
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerWhenLinking(hashtable, PermanentCondition, null);
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.CanTriggerWhenLinking(hashtable, PermanentCondition, null);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                    return CardEffectCommons.IsExistOnField(card);
                 }
 
                 bool PermanentCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
-                        && permanent.LinkedCards.Contains(card);
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)

+ 1 - 1
Assets/CardEffect/BT23/Yellow/BT23_029.cs

@@ -230,7 +230,7 @@ namespace DCGO.CardEffects.BT23
 
                         if (selectedPermament != null) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
                             targetPermanent: selectedPermament,
-                            changeValue: 4000,
+                            changeValue: -4000,
                             effectDuration: EffectDuration.UntilEachTurnEnd,
                             activateClass: activateClass));
                     }

+ 4 - 2
Assets/CardEffect/BT23/Yellow/BT23_032.cs

@@ -342,7 +342,8 @@ namespace DCGO.CardEffects.BT23
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
-                        && CardEffectCommons.CanTriggerWhenRemoveField(hashtable, card);
+                        && CardEffectCommons.CanTriggerWhenRemoveField(hashtable, card)
+                        && !CardEffectCommons.IsByEffect(hashtable, effect => effect.EffectSourceCard.Owner == card.Owner);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
@@ -377,7 +378,8 @@ namespace DCGO.CardEffects.BT23
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnField(card)
-                        && CardEffectCommons.CanTriggerWhenPermanentRemoveField(hashtable, PermamentCondition);
+                        && CardEffectCommons.CanTriggerWhenPermanentRemoveField(hashtable, PermamentCondition)
+                        && !CardEffectCommons.IsByEffect(hashtable, effect => effect.EffectSourceCard.Owner == card.Owner);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)

+ 18 - 14
Assets/CardEffect/BT23/Yellow/BT23_035.cs

@@ -44,22 +44,26 @@ namespace DCGO.CardEffects.BT23
 
             IEnumerator SharedActivateCoroutine(Hashtable hashtable, ActivateClass activateClass)
             {
-                yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
-                        player: card.Owner,
-                        destroySecurityCount: 1,
-                        cardEffect: activateClass,
-                        fromTop: true).DestroySecurity());
-
-                var opponentDigimon = card.Owner.Enemy.GetBattleAreaDigimons();
-
-                foreach (var permament in opponentDigimon)
+                if (card.Owner.SecurityCards.Count >= 1)
                 {
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
-                        targetPermanent: permament,
-                        changeValue: -6000,
-                        effectDuration: EffectDuration.UntilEachTurnEnd,
-                        activateClass: activateClass));
+                    yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
+                    player: card.Owner,
+                    destroySecurityCount: 1,
+                    cardEffect: activateClass,
+                    fromTop: true).DestroySecurity());
+
+                    var opponentDigimon = card.Owner.Enemy.GetBattleAreaDigimons();
+
+                    foreach (var permament in opponentDigimon)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
+                            targetPermanent: permament,
+                            changeValue: -6000,
+                            effectDuration: EffectDuration.UntilEachTurnEnd,
+                            activateClass: activateClass));
+                    }
                 }
+
             }
 
             #endregion

+ 17 - 3
Assets/Scripts/CardEffectCommons/GameContextDeterminarion.cs

@@ -1,8 +1,6 @@
-using System.Collections;
-using System.Collections.Generic;
 using System;
+using System.Collections.Generic;
 using System.Linq;
-using UnityEngine;
 
 public partial class CardEffectCommons
 {
@@ -744,4 +742,20 @@ public partial class CardEffectCommons
     }
 
     #endregion
+
+    #region Universial Root Can No Select Condition
+
+    public static bool UniversalRootCanNoSelectCondition(CardSource cardSource)
+    {
+        if (cardSource.PayingCost(SelectCardEffect.Root.Hand, null, checkAvailability: false) > cardSource.Owner.MaxMemoryCost) return false;
+        if (cardSource.PayingCost(SelectCardEffect.Root.Trash, null, checkAvailability: false) > cardSource.Owner.MaxMemoryCost) return false;
+        if (cardSource.PayingCost(SelectCardEffect.Root.DigivolutionCards, null, checkAvailability: false) > cardSource.Owner.MaxMemoryCost) return false;
+        if (cardSource.PayingCost(SelectCardEffect.Root.Library, null, checkAvailability: false) > cardSource.Owner.MaxMemoryCost) return false;
+        if (cardSource.PayingCost(SelectCardEffect.Root.DigivolutionCards, null, checkAvailability: false) > cardSource.Owner.MaxMemoryCost) return false;
+        if (cardSource.PayingCost(SelectCardEffect.Root.LinkedCards, null, checkAvailability: false) > cardSource.Owner.MaxMemoryCost) return false;
+        if (cardSource.PayingCost(SelectCardEffect.Root.Security, null, checkAvailability: false) > cardSource.Owner.MaxMemoryCost) return false;
+        return true;
+    }
+
+    #endregion
 }