Jelajahi Sumber

Bug fixes for BT22

mbunch_kascope 1 tahun lalu
induk
melakukan
ef99458ed1

+ 145 - 72
Assets/CardEffect/BT22/Black/BT22_056.cs

@@ -43,76 +43,7 @@ namespace DCGO.CardEffects.BT22
                 return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
             }
 
-            IEnumerator SharedActivateCoroutine(Hashtable hashtable, ActivateClass activateClass)
-            {
-                if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsYourOpponentDigimon))
-                {
-                    Permanent selectedPermament = null;
-                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, IsYourOpponentDigimon));
-                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                    selectPermanentEffect.SetUp(
-                        selectPlayer: card.Owner,
-                        canTargetCondition: IsYourOpponentDigimon,
-                        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)
-                    {
-                        selectedPermament = permanent;
-                        yield return null;
-                    }
-
-                    selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to give -3k DP.", "The opponent is selecting 1 Digimon to give -3k DP.");
-                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                    if (selectedPermament != null) 
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(selectedPermament, -3000, EffectDuration.UntilEachTurnEnd, activateClass));
-                }
-
-                int levelMatchCount = card.PermanentOfThisCard().DigivolutionCards.Sum(entity =>
-                    new[] { entity.IsLevel2, entity.IsLevel3, entity.IsLevel4, entity.IsLevel5, entity.IsLevel6, }
-                        .Count(level => level)
-                );
-
-                if (levelMatchCount >= 2 && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsYourOpponentDigimon))
-                {
-                    Permanent selectedPermament = null;
-                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOpponentsPermanentCount(card, IsYourOpponentDigimon));
-                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                    selectPermanentEffect.SetUp(
-                        selectPlayer: card.Owner,
-                        canTargetCondition: IsYourOpponentDigimon,
-                        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)
-                    {
-                        selectedPermament = permanent;
-                        yield return null;
-                    }
-
-                    selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to de-digivolve.", "The opponent is selecting 1 Digimon to de-digivolve.");
-                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                    if (selectedPermament != null) yield return ContinuousController.instance.StartCoroutine(new IDegeneration(selectedPermament, 1, activateClass).Degeneration());
-                }
-            }
+            
 
             #endregion
 
@@ -122,7 +53,7 @@ namespace DCGO.CardEffects.BT22
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Give 1 digimon -3k DP. if 2 or more same level in sources, De-Digivolve 1", CanUseCondition, card);
-                activateClass.SetUpActivateClass(SharedCanActivateCondition, hashtable => SharedActivateCoroutine(hashtable, activateClass), -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(SharedCanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -134,6 +65,77 @@ namespace DCGO.CardEffects.BT22
                 {
                     return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
                 }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsYourOpponentDigimon))
+                    {
+                        Permanent selectedPermament = null;
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, IsYourOpponentDigimon));
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsYourOpponentDigimon,
+                            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)
+                        {
+                            selectedPermament = permanent;
+                            yield return null;
+                        }
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to give -3k DP.", "The opponent is selecting 1 Digimon to give -3k DP.");
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        if (selectedPermament != null)
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(selectedPermament, -3000, EffectDuration.UntilEachTurnEnd, activateClass));
+                    }
+
+                    int levelMatchCount = card.PermanentOfThisCard().DigivolutionCards.Sum(entity =>
+                        new[] { entity.IsLevel2, entity.IsLevel3, entity.IsLevel4, entity.IsLevel5, entity.IsLevel6, }
+                            .Count(level => level)
+                    );
+
+                    if (levelMatchCount >= 2 && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsYourOpponentDigimon))
+                    {
+                        Permanent selectedPermament = null;
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOpponentsPermanentCount(card, IsYourOpponentDigimon));
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsYourOpponentDigimon,
+                            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)
+                        {
+                            selectedPermament = permanent;
+                            yield return null;
+                        }
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to de-digivolve.", "The opponent is selecting 1 Digimon to de-digivolve.");
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        if (selectedPermament != null) yield return ContinuousController.instance.StartCoroutine(new IDegeneration(selectedPermament, 1, activateClass).Degeneration());
+                    }
+                }
             }
 
             #endregion
@@ -144,7 +146,7 @@ namespace DCGO.CardEffects.BT22
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Give 1 digimon -3k DP. if 2 or more same level in sources, De-Digivolve 1", CanUseCondition, card);
-                activateClass.SetUpActivateClass(SharedCanActivateCondition, hashtable => SharedActivateCoroutine(hashtable, activateClass), -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(SharedCanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -156,6 +158,77 @@ namespace DCGO.CardEffects.BT22
                 {
                     return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                 }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsYourOpponentDigimon))
+                    {
+                        Permanent selectedPermament = null;
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, IsYourOpponentDigimon));
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsYourOpponentDigimon,
+                            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)
+                        {
+                            selectedPermament = permanent;
+                            yield return null;
+                        }
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to give -3k DP.", "The opponent is selecting 1 Digimon to give -3k DP.");
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        if (selectedPermament != null)
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(selectedPermament, -3000, EffectDuration.UntilEachTurnEnd, activateClass));
+                    }
+
+                    int levelMatchCount = card.PermanentOfThisCard().DigivolutionCards.Sum(entity =>
+                        new[] { entity.IsLevel2, entity.IsLevel3, entity.IsLevel4, entity.IsLevel5, entity.IsLevel6, }
+                            .Count(level => level)
+                    );
+
+                    if (levelMatchCount >= 2 && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsYourOpponentDigimon))
+                    {
+                        Permanent selectedPermament = null;
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOpponentsPermanentCount(card, IsYourOpponentDigimon));
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsYourOpponentDigimon,
+                            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)
+                        {
+                            selectedPermament = permanent;
+                            yield return null;
+                        }
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to de-digivolve.", "The opponent is selecting 1 Digimon to de-digivolve.");
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        if (selectedPermament != null) yield return ContinuousController.instance.StartCoroutine(new IDegeneration(selectedPermament, 1, activateClass).Degeneration());
+                    }
+                }
             }
 
             #endregion

+ 18 - 6
Assets/CardEffect/BT22/Black/BT22_061.cs

@@ -258,18 +258,24 @@ namespace DCGO.CardEffects.BT22
                             maxCount: maxCount,
                             canNoSelect: false,
                             canEndNotMax: false,
-                            selectPermanentCoroutine: null,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
                             afterSelectPermanentCoroutine: null,
-                            mode: SelectPermanentEffect.Mode.Destroy,
+                            mode: SelectPermanentEffect.Mode.Custom,
                             cardEffect: activateClass);
 
                         selectPermanentEffect.SetUpCustomMessage("Select 1 opponent's Digimon to De-digivolve.", "The opponent is selecting 1 Digimon to De-digivolve.");
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            targetDegenPermanent = permanent;
+                            yield return null;
+                        }
+
                         #endregion
 
-                        if (targetDegenPermanent != null) yield return ContinuousController.instance.StartCoroutine(
-                            new IDegeneration(targetDegenPermanent, 1, activateClass).Degeneration());
+                        if (targetDegenPermanent != null) 
+                            yield return ContinuousController.instance.StartCoroutine(new IDegeneration(targetDegenPermanent, 1, activateClass).Degeneration());
                     }
 
                     if (card.PermanentOfThisCard().HasFaceDownDigivolutionCards)
@@ -398,14 +404,20 @@ namespace DCGO.CardEffects.BT22
                             maxCount: maxCount,
                             canNoSelect: false,
                             canEndNotMax: false,
-                            selectPermanentCoroutine: null,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
                             afterSelectPermanentCoroutine: null,
-                            mode: SelectPermanentEffect.Mode.Destroy,
+                            mode: SelectPermanentEffect.Mode.Custom,
                             cardEffect: activateClass);
 
                         selectPermanentEffect.SetUpCustomMessage("Select 1 opponent's Digimon to De-digivolve.", "The opponent is selecting 1 Digimon to De-digivolve.");
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            targetDegenPermanent = permanent;
+                            yield return null;
+                        }
+
                         #endregion
 
                         if (targetDegenPermanent != null) yield return ContinuousController.instance.StartCoroutine(

+ 4 - 4
Assets/CardEffect/BT22/Black/BT22_063.cs

@@ -132,7 +132,7 @@ namespace DCGO.CardEffects.BT22
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("-5K DP to 1 digimon", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -165,7 +165,7 @@ namespace DCGO.CardEffects.BT22
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("-5K DP to 1 digimon", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -194,11 +194,11 @@ namespace DCGO.CardEffects.BT22
 
             #region When Attacking
 
-            if (timing == EffectTiming.OnEnterFieldAnyone)
+            if (timing == EffectTiming.OnAllyAttack)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("-5K DP to 1 digimon", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()

+ 12 - 13
Assets/CardEffect/BT22/Black/BT22_067.cs

@@ -249,7 +249,7 @@ namespace DCGO.CardEffects.BT22
             if (timing == EffectTiming.OnAllyAttack)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Reveal top 3, Play 1 4 cost or lower Black or Red tamer", CanUseCondition, card);
+                activateClass.SetUpICardEffect("Reveal top 3, Play 1 4 cost or lower Black or Red card", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
                 activateClass.SetHashString("BT22_067_PlayTamer");
                 cardEffects.Add(activateClass);
@@ -276,22 +276,21 @@ namespace DCGO.CardEffects.BT22
                         && GManager.instance.attackProcess.DefendingPermanent == null;
                 }
 
-                bool IsTamer(CardSource cardSource)
+                bool IsProperCard(CardSource cardSource)
                 {
-                    return cardSource.IsTamer
-                        && card.HasPlayCost && cardSource.BasePlayCostFromEntity <= 4
-                        && (cardSource.CardColors.Contains(CardColor.Black) || cardSource.CardColors.Contains(CardColor.Red));
+                    return card.HasPlayCost && cardSource.BasePlayCostFromEntity <= 4 &&
+                           (cardSource.CardColors.Contains(CardColor.Black) || cardSource.CardColors.Contains(CardColor.Red));
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    CardSource selectedTamer = null;
+                    CardSource selectedCard = null;
 
-                    #region Select Tamer
+                    #region Select Card
 
                     IEnumerator SelectCardCoroutine(CardSource cardSource)
                     {
-                        selectedTamer = cardSource;
+                        selectedCard = cardSource;
                         yield return null;
                     }
 
@@ -301,8 +300,8 @@ namespace DCGO.CardEffects.BT22
                         new SimplifiedSelectCardConditionClass[]
                         {
                         new SimplifiedSelectCardConditionClass(
-                            canTargetCondition:IsTamer,
-                            message: "Select 1 4 or lower play cost Black/Red tamer",
+                            canTargetCondition:IsProperCard,
+                            message: "Select 1 4 or lower play cost Black/Red card",
                             mode: SelectCardEffect.Mode.Custom,
                             maxCount: 1,
                             selectCardCoroutine: SelectCardCoroutine),
@@ -313,9 +312,9 @@ namespace DCGO.CardEffects.BT22
 
                     #endregion
 
-                    yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddExecutingCard(selectedTamer));
-                    if (selectedTamer != null) yield return ContinuousController.instance.StartCoroutine(
-                        CardEffectCommons.PlayPermanentCards(new List<CardSource>() { selectedTamer }, activateClass, false, false, SelectCardEffect.Root.Execution, true));
+                    yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddExecutingCard(selectedCard));
+                    if (selectedCard != null) yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.PlayPermanentCards(new List<CardSource>() { selectedCard }, activateClass, false, false, SelectCardEffect.Root.Execution, true));
                 }
             }
 

+ 2 - 2
Assets/CardEffect/BT22/Black/BT22_090.cs

@@ -111,9 +111,9 @@ namespace DCGO.CardEffects.BT22
                                         targetPermanent: card.PermanentOfThisCard(),
                                         cardCondition: IsLordKnightmon,
                                         payCost: true,
-                                        reduceCostTuple: null,
+                                        reduceCostTuple: (reduceCost: 3, reduceCostCardCondition: null),
                                         fixedCostTuple: null,
-                                        ignoreDigivolutionRequirementFixedCost: 3,
+                                        ignoreDigivolutionRequirementFixedCost: -1,
                                         isHand: true,
                                         activateClass: activateClass,
                                         successProcess: null));

+ 1 - 1
Assets/CardEffect/BT22/Black/BT22_091.cs

@@ -135,7 +135,7 @@ namespace DCGO.CardEffects.BT22
                 bool IsCSOrUniDigimon(Permanent permanent)
                 {
                     return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
-                        && permanent.TopCard.HasCSTraits || permanent.TopCard.HasUnidentifiedTraits;
+                        && (permanent.TopCard.HasCSTraits || permanent.TopCard.HasUnidentifiedTraits);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)

+ 2 - 2
Assets/CardEffect/BT22/Black/BT22_101.cs

@@ -123,8 +123,8 @@ namespace DCGO.CardEffects.BT22
 
                 bool IsKyokoKuremi(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
-                        && permanent.TopCard.EqualsCardName("Kyoko Kuremi");
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card)
+                        && permanent == card.PermanentOfThisCard();
                 }
 
                 bool IsAlphaMon(CardSource cardSource)

+ 7 - 2
Assets/CardEffect/BT22/Blue/BT22_023.cs

@@ -151,7 +151,7 @@ namespace DCGO.CardEffects.BT22
             if (timing == EffectTiming.OnEndTurn)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Unsuspend 1 blue tamer or digimon", null, card);
+                activateClass.SetUpICardEffect("Unsuspend 1 blue tamer or digimon", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
                 activateClass.SetHashString("BT22_023_OnEndTurn");
                 cardEffects.Add(activateClass);
@@ -161,10 +161,15 @@ namespace DCGO.CardEffects.BT22
                     return "[End of Your Turn] [Once Per Turn] 1 of your blue Digimon or Tamers may unsuspend.";
                 }
 
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
+                        && CardEffectCommons.IsOwnerTurn(card);
+                }
+
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
-                        && CardEffectCommons.IsOwnerTurn(card)
                         && CardEffectCommons.HasMatchConditionOwnersPermanent(card, CanSelectPermanentCondition);
                 }
 

+ 9 - 1
Assets/CardEffect/BT22/Blue/BT22_024.cs

@@ -159,10 +159,18 @@ namespace DCGO.CardEffects.BT22
                                         ignoreDigivolutionRequirementFixedCost: 3,
                                         isHand: true,
                                         activateClass: activateClass,
-                                        successProcess: null));
+                                        successProcess: null,
+                                        ignoreSelection:true,
+                                        failedProcess:FailureProcess()));
 
                                     #endregion
                                 }
+
+                                IEnumerator FailureProcess()
+                                {
+                                    List<IDiscardHand> discardHands = new List<IDiscardHand>() { new IDiscardHand(card, null) };
+                                    yield return ContinuousController.instance.StartCoroutine(new IDiscardHands(discardHands, null).DiscardHands());
+                                }
                             }
                         }
                     }

+ 6 - 18
Assets/CardEffect/BT22/Blue/BT22_025.cs

@@ -91,18 +91,12 @@ namespace DCGO.CardEffects.BT22
                         string selectPlayerMessage = "Which effect will you activate?";
                         string notSelectPlayerMessage = "The opponent is choosing which effect to activate.";
 
-                        if (CanBottomDeck && CanPlayBlueTamer)
-                        {
-                            GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements,
+                        GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements,
                                 selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage,
                                 notSelectPlayerMessage: notSelectPlayerMessage);
 
-                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
-                        }
-                        else
-                        {
-                            GManager.instance.userSelectionManager.SetInt(CanBottomDeck ? 0 : 1);
-                        }
+                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+
                         int actionID = GManager.instance.userSelectionManager.SelectedIntValue;
 
                         #region Bottom Deck
@@ -240,18 +234,12 @@ namespace DCGO.CardEffects.BT22
                         string selectPlayerMessage = "Which effect will you activate?";
                         string notSelectPlayerMessage = "The opponent is choosing which effect to activate.";
 
-                        if (CanBottomDeck && CanPlayBlueTamer)
-                        {
-                            GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements,
+                        GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements,
                                 selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage,
                                 notSelectPlayerMessage: notSelectPlayerMessage);
 
-                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
-                        }
-                        else
-                        {
-                            GManager.instance.userSelectionManager.SetInt(CanBottomDeck ? 0 : 1);
-                        }
+                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+
                         int actionID = GManager.instance.userSelectionManager.SelectedIntValue;
 
                         #region Bottom Deck

+ 4 - 4
Assets/CardEffect/BT22/Blue/BT22_027.cs

@@ -44,14 +44,15 @@ namespace DCGO.CardEffects.BT22
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
+                    UnityEngine.Debug.Log($"CAN USE CONDITION: {CardEffectCommons.CanTriggerOnPlay(hashtable, card)}");
                     return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
+                    UnityEngine.Debug.Log($"CAN ACTIVATE CONDITION: {CardEffectCommons.IsExistOnBattleAreaDigimon(card)}, {CardEffectCommons.HasMatchConditionOwnersHand(card, HandCondition)}");
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
-                        && CardEffectCommons.HasMatchConditionOwnersHand(card, HandCondition)
-                        && CardEffectCommons.HasMatchConditionOpponentsPermanent(card, PermanentCondition);
+                        && CardEffectCommons.HasMatchConditionOwnersHand(card, HandCondition);
                 }
 
                 bool HandCondition(CardSource source)
@@ -187,8 +188,7 @@ namespace DCGO.CardEffects.BT22
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
-                        && CardEffectCommons.HasMatchConditionOwnersHand(card, HandCondition)
-                        && CardEffectCommons.HasMatchConditionOpponentsPermanent(card, PermanentCondition);
+                        && CardEffectCommons.HasMatchConditionOwnersHand(card, HandCondition);
                 }
 
                 bool HandCondition(CardSource source)

+ 1 - 1
Assets/CardEffect/BT22/Blue/BT22_028.cs

@@ -65,7 +65,7 @@ namespace DCGO.CardEffects.BT22
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Place 1 digimon as bottom source, bottom deck 1 digimon & unsuspend", CanUseCondition, card);
+                activateClass.SetUpICardEffect("Play 1 of each level (3, 4, and 5)", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
 

+ 48 - 45
Assets/CardEffect/BT22/Blue/BT22_096.cs

@@ -145,7 +145,7 @@ namespace DCGO.CardEffects.BT22
 
             #region Delay
 
-            if (timing == EffectTiming.OnUnTappedAnyone)
+            if (timing == EffectTiming.OnTappedAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Digiolve 1 [Aqua]/[Sea Animal] digimon into a [Aquatic]/[Liberator] digimon in your hand for 3 reduced cost", CanUseCondition, card);
@@ -189,61 +189,64 @@ namespace DCGO.CardEffects.BT22
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsAquaOrSeaAnimal))
-                    {
-                        Permanent selectedPermanent = null;
-
-                        #region Select [Aqua]/[Sea Animal] Permanent
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(targetPermanents: new List<Permanent>() { card.PermanentOfThisCard() }, activateClass: activateClass, successProcess: permanents => SuccessProcess(), failureProcess: null));
 
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, IsAquaOrSeaAnimal));
+                    IEnumerator SuccessProcess()
+                    {
+                        if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsAquaOrSeaAnimal))
+                        {
+                            Permanent selectedPermanent = null;
 
-                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+                            #region Select [Aqua]/[Sea Animal] Permanent
 
-                        selectPermanentEffect.SetUp(
-                            selectPlayer: card.Owner,
-                            canTargetCondition: IsAquaOrSeaAnimal,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canEndSelectCondition: null,
-                            maxCount: maxCount,
-                            canNoSelect: false,
-                            canEndNotMax: false,
-                            selectPermanentCoroutine: SelectPermanentCoroutine,
-                            afterSelectPermanentCoroutine: null,
-                            mode: SelectPermanentEffect.Mode.Custom,
-                            cardEffect: activateClass);
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, IsAquaOrSeaAnimal));
 
-                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
-                        {
-                            selectedPermanent = permanent;
-                            yield return null;
-                        }
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
-                        selectPermanentEffect.SetUpCustomMessage("Select 1 [Aqua]/[Sea Animal] to digivolve.", "The opponent is selecting 1 [Aqua]/[Sea Animal] to digivolve.");
-                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: IsAquaOrSeaAnimal,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
 
-                        #endregion
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                selectedPermanent = permanent;
+                                yield return null;
+                            }
 
-                        if (selectedPermanent != null)
-                        {
-                            #region Digivolve into [Aquatic/LIBERATOR] Digimon
-
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DigivolveIntoHandOrTrashCard(
-                                selectedPermanent,
-                                digivolvingCard => IsAquaticOrLiberator(digivolvingCard, selectedPermanent),
-                                payCost: true,
-                                reduceCostTuple: (reduceCost: 3, reduceCostCardCondition: null),
-                                fixedCostTuple: null,
-                                ignoreDigivolutionRequirementFixedCost: -1,
-                                isHand: true,
-                                activateClass: activateClass,
-                                successProcess: null
-                            ));
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 [Aqua]/[Sea Animal] to digivolve.", "The opponent is selecting 1 [Aqua]/[Sea Animal] to digivolve.");
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
                             #endregion
+
+                            if (selectedPermanent != null)
+                            {
+                                #region Digivolve into [Aquatic/LIBERATOR] Digimon
+
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                                    selectedPermanent,
+                                    digivolvingCard => IsAquaticOrLiberator(digivolvingCard, selectedPermanent),
+                                    payCost: true,
+                                    reduceCostTuple: (reduceCost: 3, reduceCostCardCondition: null),
+                                    fixedCostTuple: null,
+                                    ignoreDigivolutionRequirementFixedCost: -1,
+                                    isHand: true,
+                                    activateClass: activateClass,
+                                    successProcess: null
+                                ));
+
+                                #endregion
+                            }
                         }
                     }
-
-                    yield return null;
                 }
             }
 

+ 2 - 2
Assets/CardEffect/BT22/Green/BT22_051.cs

@@ -83,7 +83,7 @@ namespace DCGO.CardEffects.BT22
 
                 string EffectDiscription()
                 {
-                    return "[On Play] Suspend 1 of your opponent's Digimon. Then, if this Digimon's stack has 2 or more same-level cards, 1 of your opponent's Digimon can't unsuspend until their turn ends.";
+                    return "[On Play] Suspend 1 of your opponent's Digimon. Then, if this Digimon's stack has 2 or more same-level cards, return 1 of your opponent's suspended Digimon with the lowest DP to the hand.";
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
@@ -152,7 +152,7 @@ namespace DCGO.CardEffects.BT22
 
                 string EffectDiscription()
                 {
-                    return "[When Digivolving] Suspend 1 of your opponent's Digimon. Then, if this Digimon's stack has 2 or more same-level cards, 1 of your opponent's Digimon can't unsuspend until their turn ends.";
+                    return "[When Digivolving] Suspend 1 of your opponent's Digimon. Then, if this Digimon's stack has 2 or more same-level cards, return 1 of your opponent's suspended Digimon with the lowest DP to the hand.";
                 }
 
                 bool CanUseCondition(Hashtable hashtable)

+ 2 - 2
Assets/CardEffect/BT22/Green/BT22_052.cs

@@ -231,7 +231,7 @@ namespace DCGO.CardEffects.BT22
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Memory +2", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
                 activateClass.SetHashString("AllTurn_BT22-052");
                 cardEffects.Add(activateClass);
 
@@ -242,7 +242,7 @@ namespace DCGO.CardEffects.BT22
 
                 bool PermanentCondition(Permanent permanent)
                 {
-                    return permanent.TopCard.Owner == card.Owner &&
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&                           
                            permanent != card.PermanentOfThisCard();
                 }
 

+ 23 - 1
Assets/CardEffect/BT22/Red/BT22_014.cs

@@ -32,6 +32,28 @@ namespace DCGO.CardEffects.BT22
             #endregion
 
             #region Static Effects
+            #region Card Name
+
+            if (timing == EffectTiming.None)
+            {
+                ChangeCardNamesClass changeCardNamesClass = new ChangeCardNamesClass();
+                changeCardNamesClass.SetUpICardEffect("Also treated as having [Greymon]", hashtable => true, card);
+                changeCardNamesClass.SetUpChangeCardNamesClass(changeCardNames: changeCardNames);
+                cardEffects.Add(changeCardNamesClass);
+
+                List<string> changeCardNames(CardSource cardSource, List<string> CardNames)
+                {
+                    if (cardSource == card)
+                    {
+                        CardNames.Add("Greymon_BT22_014");
+                    }
+
+                    return CardNames;
+                }
+            }
+
+            #endregion
+
             //Raid
             if (timing == EffectTiming.OnAllyAttack)
             {
@@ -81,7 +103,7 @@ namespace DCGO.CardEffects.BT22
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
                         selectPermanentEffect.SetUp(
-                            selectPlayer: card.Owner.Enemy,
+                            selectPlayer: card.Owner,
                             canTargetCondition: IsOpponentsDigimon,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,

+ 5 - 5
Assets/CardEffect/BT22/Red/BT22_015.cs

@@ -116,8 +116,8 @@ namespace DCGO.CardEffects.BT22
             {
                 bool SourceCondition(CardSource source)
                 {
-                    return source.CardColors.Contains(CardColor.Red) && 
-                           source.CardColors.Contains(CardColor.Black) &&
+                    return (source.CardColors.Contains(CardColor.Red) || 
+                           source.CardColors.Contains(CardColor.Black)) &&
                            source.HasLevel && source.IsLevel3;
                 }
 
@@ -130,8 +130,8 @@ namespace DCGO.CardEffects.BT22
             {
                 bool SourceCondition(CardSource source)
                 {
-                    return source.CardColors.Contains(CardColor.Blue) &&
-                           source.CardColors.Contains(CardColor.Yellow) &&
+                    return (source.CardColors.Contains(CardColor.Blue) ||
+                           source.CardColors.Contains(CardColor.Yellow)) &&
                            source.HasLevel && source.IsLevel3;
                 }
 
@@ -273,7 +273,7 @@ namespace DCGO.CardEffects.BT22
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnBreedingAreaDigimon(card);
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)

+ 3 - 2
Assets/CardEffect/BT22/Red/BT22_083.cs

@@ -87,7 +87,8 @@ namespace DCGO.CardEffects.BT22
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnAttackTargetSwitch(hashtable, card);
+                    return CardEffectCommons.IsExistOnField(card) &&
+                           CardEffectCommons.CanTriggerOnPermanentAttackTargetSwitch(hashtable, permanent => true);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
@@ -195,7 +196,7 @@ namespace DCGO.CardEffects.BT22
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("give 1 digimon 3K DP", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
                 activateClass.SetIsInheritedEffect(true);
                 activateClass.SetHashString("BT22_083_Give3KDP");
                 cardEffects.Add(activateClass);

+ 47 - 27
Assets/CardEffect/BT22/White/BT22_007.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
+using System.Linq;
 
 // Mother Eater
 namespace DCGO.CardEffects.BT22
@@ -25,6 +26,12 @@ namespace DCGO.CardEffects.BT22
                     return "[Breeding] [Start of Your Main Phase] Look at your Digi-Egg deck's top card. Among them, you may place [Mother Eater]s as this Digimon's top digivolution cards. Then, if this Digimon has 10 or more digivolution cards, you may play 3 [Mother Eater]s from its digivolution cards without paying the costs.";
                 }
 
+                bool CanSelectMother(CardSource source)
+                {
+                    return source.EqualsCardName("Mother Eater") &&
+                           CardEffectCommons.CanPlayAsNewPermanent(source, false, activateClass, SelectCardEffect.Root.DigivolutionCards);
+                }
+
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsOwnerTurn(card);
@@ -69,35 +76,48 @@ namespace DCGO.CardEffects.BT22
 
                     if (card.PermanentOfThisCard().DigivolutionCards.Count >= 10)
                     {
-                        List<CardSource> motherEaterCards = card.PermanentOfThisCard().DigivolutionCards.Filter(cardSource => cardSource.EqualsCardName("Mother Eater"));
-                        if (motherEaterCards.Count >= 3 && motherEaterCards.TrueForAll(cardSource => CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass)))
+                        Permanent thisPermanent = card.PermanentOfThisCard();
+                        if (thisPermanent.DigivolutionCards.Count(CanSelectMother) >= 3)
                         {
-                            bool playDigimon = false;
-
-                            List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
-                            {
-                                new SelectionElement<bool>(message: $"Yes", value : true, spriteIndex: 0),
-                                new SelectionElement<bool>(message: $"No", value : false, spriteIndex: 1),
-                            };
-
-                            string selectPlayerMessage = "Place as top digivolution card?";
-                            string notSelectPlayerMessage = "The opponent is choosing to place as top digivolution card";
-
-                            GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
-                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
-
-                            playDigimon = GManager.instance.userSelectionManager.SelectedBoolValue;
-
-                            if (playDigimon)
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectMother,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => true,
+                                selectCardCoroutine: null,
+                                afterSelectCardCoroutine: SelectCardCoroutine,
+                                message: "Select 3 [Mother Eater] to play.",
+                                maxCount: 3,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.Custom,
+                                root: SelectCardEffect.Root.DigivolutionCards,
+                                customRootCardList: thisPermanent.DigivolutionCards,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: activateClass);
+
+                            selectCardEffect.SetUpCustomMessage(
+                                "Select 3 [Mother Eater] to play.",
+                                "The opponent is selecting 3 [Mother Eater] to play.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+
+                            IEnumerator SelectCardCoroutine(List<CardSource> cardSources)
                             {
-                                yield return ContinuousController.instance.StartCoroutine(
-                                    CardEffectCommons.PlayPermanentCards(
-                                    cardSources: motherEaterCards,
-                                    activateClass: activateClass,
-                                    payCost: false,
-                                    isTapped: false,
-                                    root: SelectCardEffect.Root.DigivolutionCards,
-                                    activateETB: true));
+                                if (cardSources.Count == 3)
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(
+                                        CardEffectCommons.PlayPermanentCards(
+                                        cardSources: cardSources,
+                                        activateClass: activateClass,
+                                        payCost: false,
+                                        isTapped: false,
+                                        root: SelectCardEffect.Root.DigivolutionCards,
+                                        activateETB: true));
+                                }
                             }
                         }
                     }

+ 1 - 1
Assets/CardEffect/BT22/White/BT22_094.cs

@@ -126,7 +126,7 @@ namespace DCGO.CardEffects.BT22
                                     {
                                         if (PermanentsCondition(targetPermanents))
                                         {
-                                            Cost -= 1;
+                                            Cost -= 2;
                                         }
                                     }
                                 }