Sfoglia il codice sorgente

updates for 1.8.2.5

mbunch_kascope 1 anno fa
parent
commit
e343cb0b85
37 ha cambiato i file con 269 aggiunte e 279 eliminazioni
  1. 2 2
      Assets/CardBaseEntity/BT21/Black/Digimon/BT21_053.asset
  2. 2 2
      Assets/CardBaseEntity/BT21/Black/Digimon/BT21_054.asset
  3. 2 2
      Assets/CardBaseEntity/BT21/Black/Digimon/BT21_059.asset
  4. 2 2
      Assets/CardBaseEntity/BT21/Blue/Digimon/BT21_038.asset
  5. 2 2
      Assets/CardBaseEntity/BT21/Green/Digimon/BT21_047.asset
  6. 2 2
      Assets/CardBaseEntity/BT21/Purple/Digimon/BT21_070.asset
  7. 2 2
      Assets/CardBaseEntity/BT21/Purple/Digimon/BT21_071.asset
  8. 2 2
      Assets/CardBaseEntity/BT21/Purple/Digimon/BT21_073.asset
  9. 2 2
      Assets/CardBaseEntity/BT21/Purple/Digimon/BT21_074.asset
  10. 2 2
      Assets/CardBaseEntity/BT21/Red/Digimon/BT21_009.asset
  11. 2 2
      Assets/CardBaseEntity/BT21/Red/Digimon/BT21_009_P1.asset
  12. 2 2
      Assets/CardBaseEntity/BT21/Red/Digimon/BT21_018.asset
  13. 2 2
      Assets/CardBaseEntity/BT21/Red/Digimon/BT21_023.asset
  14. 2 2
      Assets/CardBaseEntity/BT21/Red/Digimon/BT21_023_P1.asset
  15. 2 2
      Assets/CardBaseEntity/BT21/White/Digimon/BT21_101.asset
  16. 2 2
      Assets/CardBaseEntity/BT21/White/Digimon/BT21_101_P1.asset
  17. 2 2
      Assets/CardBaseEntity/BT21/White/Digimon/BT21_101_P2.asset
  18. 2 2
      Assets/CardBaseEntity/BT21/Yellow/Digimon/BT21_041.asset
  19. 2 2
      Assets/CardBaseEntity/BT21/Yellow/Digimon/BT21_043.asset
  20. 18 21
      Assets/CardEffect/BT21/Black/BT21_058.cs
  21. 3 2
      Assets/CardEffect/BT21/Black/BT21_060.cs
  22. 6 1
      Assets/CardEffect/BT21/Black/BT21_062.cs
  23. 1 1
      Assets/CardEffect/BT21/Black/BT21_098.cs
  24. 1 1
      Assets/CardEffect/BT21/Green/BT21_097.cs
  25. 3 3
      Assets/CardEffect/BT21/Purple/BT21_073.cs
  26. 34 72
      Assets/CardEffect/BT21/Purple/BT21_074.cs
  27. 4 4
      Assets/CardEffect/BT21/Purple/BT21_075.cs
  28. 8 3
      Assets/CardEffect/BT21/Purple/BT21_076.cs
  29. 2 2
      Assets/CardEffect/BT21/Purple/BT21_077.cs
  30. 128 110
      Assets/CardEffect/BT21/White/BT21_101.cs
  31. 1 1
      Assets/CardEffect/BT21/Yellow/BT21_044.cs
  32. BIN
      Assets/Image/UI/Link Mechanic/component_link_background_sources_.png
  33. 1 1
      Assets/Prefab/CardInfo.prefab
  34. 0 1
      Assets/Scripts/CardEffectCommons/CanUseEffects/WhenLinked.cs
  35. 3 4
      Assets/Scripts/CardEffectFactory/KeyWordEffects/Link.cs
  36. 10 11
      Assets/Scripts/CardSource.cs
  37. 8 3
      Assets/Scripts/Permanent.cs

+ 2 - 2
Assets/CardBaseEntity/BT21/Black/Digimon/BT21_053.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:d028809417e285e897ff6f28e8fcddb4f07e33df64de8c80e53ffce17069af3c
-size 1387
+oid sha256:ea078e5aa425ef5e44d45ab65bfa129aecff76721c41f250ef8a81533a0460e1
+size 1362

+ 2 - 2
Assets/CardBaseEntity/BT21/Black/Digimon/BT21_054.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:f7859cfbb0f86df34b659878997ae2d5fdecfce7010384286d7646c89a8de96d
-size 1516
+oid sha256:df79cbc880e76811ceb415beb05c58acbf73d422e0b31c8e5b6f7864e910c192
+size 1491

+ 2 - 2
Assets/CardBaseEntity/BT21/Black/Digimon/BT21_059.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:55a7ebf3ea0c3a21f86a49c2d8ca116376bfe9b2b838b7e8c2dbf67972b8fb3b
-size 1440
+oid sha256:d4b205f5bbac8eabe05e6b22fddaa1a92f58da538b662043c6692bc4a9b38c2a
+size 1415

+ 2 - 2
Assets/CardBaseEntity/BT21/Blue/Digimon/BT21_038.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:055cf70e2edfba03806f9f00a02abb20c27d5f3d393a523f22654984486e5213
-size 1322
+oid sha256:ed928072cb978422193136fb5e4726366224472dfc87f89143e3a20738ea68c3
+size 1308

+ 2 - 2
Assets/CardBaseEntity/BT21/Green/Digimon/BT21_047.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:de575be02d0bbc8f655c19f33ddaa081878d6d9b0379c6f94a4a9b597fc5353b
-size 1426
+oid sha256:e6c49d9c1b20c97f780e7832dc5db4b93560ae8969d59b3c4d3de18ad593509f
+size 1401

+ 2 - 2
Assets/CardBaseEntity/BT21/Purple/Digimon/BT21_070.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:68a2e1c852fe2946019e7b04b9cc017906db6b87c99c882ae5a70c2319e39c77
-size 1462
+oid sha256:78697f8918c449f0d533475d003e90a28ef534ecde2af2b881ee220f396e31a5
+size 1437

+ 2 - 2
Assets/CardBaseEntity/BT21/Purple/Digimon/BT21_071.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:bde56b2e3b9ab024923fb411d0042dbeee8a50c6221b1900e763b18d4452b4da
-size 1477
+oid sha256:58cefc2d5900306445698a7d43b92c8d72554bfbec323dda50fa427136d6f13e
+size 1452

+ 2 - 2
Assets/CardBaseEntity/BT21/Purple/Digimon/BT21_073.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:1d8e5f857f9d642b3bcea5b2353158207be20d0a9121176c393adf1c2ab67594
-size 1795
+oid sha256:3b4764bd4838f2bd1629b60a7272f5879d9300a7a1fc7e7dbe67e4efb1da9652
+size 1770

+ 2 - 2
Assets/CardBaseEntity/BT21/Purple/Digimon/BT21_074.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:165b5224ef08eb80a14cffcb956744b600dac17c0219b6602543391f7a92908c
-size 1882
+oid sha256:e37528b654c7d4ccb84efb4a08588e486bb2893604d79e766b1ed05c6d32f79e
+size 1857

+ 2 - 2
Assets/CardBaseEntity/BT21/Red/Digimon/BT21_009.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:7d4c82098a230aadeb138b20340159fc17ddd99c58b4eb647f7a82de05e11e6f
-size 1409
+oid sha256:d1f08473b87974470baa91a8548c5b5e2ad3ad4c78afa9c545b8524ac52fec29
+size 1384

+ 2 - 2
Assets/CardBaseEntity/BT21/Red/Digimon/BT21_009_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:4042095c69283681712e74d2b9a2b40e0c49dda620ef5d9377b028a4c9dba394
-size 1415
+oid sha256:0c751cb02c67e733be147ceb3a853e71ad1744fb4a3188ad584bce53c0a60161
+size 1390

+ 2 - 2
Assets/CardBaseEntity/BT21/Red/Digimon/BT21_018.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:89a7e1747fa9015ad25d4a195e50983d72ef73a111e6e214319d268ee690dab5
-size 1453
+oid sha256:5d8e65a800a312a98d4b57bec68c9e95ad7dffc39c5a2818122a3a85f5f51d98
+size 1428

+ 2 - 2
Assets/CardBaseEntity/BT21/Red/Digimon/BT21_023.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:2943f7b74874fc187e703aea4726104ba9911b7145e7746810bb33e73fea9a77
-size 1726
+oid sha256:86caafb23ecc5b8be192758e933f6308f89dcd584ac999804c8f322571d5566f
+size 1701

+ 2 - 2
Assets/CardBaseEntity/BT21/Red/Digimon/BT21_023_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:ffc5a429fc12a187f45f9a5cef709bf9c5bc54ed23fe193c7784d3edb3840c02
-size 1732
+oid sha256:cc222c5257d51780365eedbe5edb0428bbb192a33f6ae86a71cd99e09860b031
+size 1707

+ 2 - 2
Assets/CardBaseEntity/BT21/White/Digimon/BT21_101.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:b10da82baa2125b41d4b27ea43179a178eb777a99147580329a0216302f547eb
-size 1565
+oid sha256:0d7a6fdbdce77fb21733cb6c299d5aa53c684712877bd43f2502f8eba4e4d9fd
+size 1540

+ 2 - 2
Assets/CardBaseEntity/BT21/White/Digimon/BT21_101_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:b2e521baa3ee8d1beb5a219ba2bc4ae2f501a1ee8427490983f58b8e9089a459
-size 1571
+oid sha256:fd7238216e0cb6aa16e65fbf13131008d26fa56ed04c3a64e5fa27830defbb9a
+size 1546

+ 2 - 2
Assets/CardBaseEntity/BT21/White/Digimon/BT21_101_P2.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:a3bbcd28c5297081d4f10ea40312b1eec268415cf0fb75107e9d56488cb5c0c8
-size 1571
+oid sha256:67b3e9d843c2dd66926033f49c56c046df223fc26293648a83e89f1eadad06bb
+size 1546

+ 2 - 2
Assets/CardBaseEntity/BT21/Yellow/Digimon/BT21_041.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:18fe203674888f981eb831b6af25dffdba7879b5829528ed064093e0e2eb1d0d
-size 1357
+oid sha256:d539aead9f64b63326e6f5c4eb6e4bed9f481d75bf77dde7327f52548812fcab
+size 1332

+ 2 - 2
Assets/CardBaseEntity/BT21/Yellow/Digimon/BT21_043.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:eb0c325f1299280411836a8781606bb072f0d1a5bb7970dbe51d57f903b14bf3
-size 1428
+oid sha256:f05ec39e254622b44e33c906192c19cf0cf36b7f675e113e3f2a2f4713e90ec0
+size 1403

+ 18 - 21
Assets/CardEffect/BT21/Black/BT21_058.cs

@@ -321,27 +321,24 @@ namespace DCGO.CardEffects.BT21
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                    {
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
-
-                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                        selectPermanentEffect.SetUp(
-                            selectPlayer: card.Owner,
-                            canTargetCondition: CanSelectPermanentCondition,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canEndSelectCondition: null,
-                            maxCount: maxCount,
-                            canNoSelect: false,
-                            canEndNotMax: false,
-                            selectPermanentCoroutine: null,
-                            afterSelectPermanentCoroutine: null,
-                            mode: SelectPermanentEffect.Mode.Destroy,
-                            cardEffect: activateClass);
-
-                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                    }
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Destroy,
+                        cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                 }
             }
             #endregion

+ 3 - 2
Assets/CardEffect/BT21/Black/BT21_060.cs

@@ -95,7 +95,7 @@ namespace DCGO.CardEffects.BT21
                         }
 
                         CanNotTrashFromDigivolutionCardsClass canNotTrashFromDigivolutionCardsClass = new CanNotTrashFromDigivolutionCardsClass();
-                        canNotTrashFromDigivolutionCardsClass.SetUpICardEffect("[This Digimon's sources can't be trashed", CanUseCondition2, card);
+                        canNotTrashFromDigivolutionCardsClass.SetUpICardEffect("This Digimon's sources can't be trashed", CanUseCondition2, card);
                         canNotTrashFromDigivolutionCardsClass.SetUpCanNotTrashFromDigivolutionCardsClass(CardCondition: CardCondition, CardEffectCondition: CardEffectCondition);
                         selectedPermanent.UntilOpponentTurnEndEffects.Add((_timing) => canNotTrashFromDigivolutionCardsClass);
 
@@ -106,7 +106,8 @@ namespace DCGO.CardEffects.BT21
 
                         bool CardCondition(CardSource cardSource)
                         {
-                            return CardEffectCommons.IsExistOnBattleArea(card);
+                            return CardEffectCommons.IsExistOnBattleArea(card) &&
+                                   selectedPermanent.DigivolutionCards.Contains(cardSource);
                         }
 
                         bool CardEffectCondition(ICardEffect cardEffect)

+ 6 - 1
Assets/CardEffect/BT21/Black/BT21_062.cs

@@ -243,7 +243,12 @@ namespace DCGO.CardEffects.BT21
                                     root = SelectCardEffect.Root.Trash;
                                 }
 
-                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: root, activateETB: true));
+                                yield return ContinuousController.instance.StartCoroutine(
+                                    CardEffectCommons.PlayOptionCards(
+                                    cardSources: selectedCards,
+                                    activateClass: activateClass,
+                                    payCost: false,
+                                    root: root));
                             }
                         }
                     }

+ 1 - 1
Assets/CardEffect/BT21/Black/BT21_098.cs

@@ -185,7 +185,7 @@ namespace DCGO.CardEffects.BT21
                             failedToDelete = true;
                         }
 
-                        if (!failedToDelete)
+                        if (failedToDelete)
                         {
                             yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
                                     player: card.Owner.Enemy,

+ 1 - 1
Assets/CardEffect/BT21/Green/BT21_097.cs

@@ -186,7 +186,7 @@ namespace DCGO.CardEffects.BT21
 
                             bool CanSelectPermanentCondition(Permanent permanent)
                             {
-                                return cardForLinking.CanLinkFromTargetPermanent(permanent, false);
+                                return cardForLinking.CanLinkToTargetPermanent(permanent, false);
                             }
 
                             IEnumerator SelectPermanentCoroutine(Permanent permanent)

+ 3 - 3
Assets/CardEffect/BT21/Purple/BT21_073.cs

@@ -101,7 +101,7 @@ namespace DCGO.CardEffects.BT21
             #region On Play/When Digivolving shared
             bool CanLinkCondition(CardSource cardSource)
             {
-                return cardSource.HasLevel && cardSource.Level <= 4 && cardSource.CanLinkFromTargetPermanent(card.PermanentOfThisCard(), false);
+                return cardSource.HasLevel && cardSource.Level <= 4 && cardSource.CanLinkToTargetPermanent(card.PermanentOfThisCard(), false);
             }
 
             bool CanActivateConditionShared(Hashtable hashtable)
@@ -227,7 +227,7 @@ namespace DCGO.CardEffects.BT21
 
                         if (selectedCards.Count >= 1)
                         {
-                            yield return card.PermanentOfThisCard().AddLinkCard(selectedCards[0], activateClass);
+                            yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddLinkCard(selectedCards[0], activateClass));
                         }
                     }
                 
@@ -351,7 +351,7 @@ namespace DCGO.CardEffects.BT21
 
                         if (selectedCards.Count >= 1)
                         {
-                            yield return card.PermanentOfThisCard().AddLinkCard(selectedCards[0], activateClass);
+                            yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddLinkCard(selectedCards[0], activateClass));
                         }
                     }
 

+ 34 - 72
Assets/CardEffect/BT21/Purple/BT21_074.cs

@@ -435,6 +435,14 @@ namespace DCGO.CardEffects.BT21
                        card.PermanentOfThisCard().DigivolutionCards.Some(CanTuckOrTrash);
             }
 
+            bool CanSelectPermanentCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    return permanent.DigivolutionCards.Count(CanTuckOrTrash) >= 1;
+
+                return false;
+            }
+
             bool DedigivolveTarget(Permanent permanent)
             {
                 return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
@@ -464,47 +472,24 @@ namespace DCGO.CardEffects.BT21
                 {
                     bool trashed = false;
 
-                    List<CardSource> selectedCards = new List<CardSource>();
-
-                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                    selectCardEffect.SetUp(
-                                canTargetCondition: CanTuckOrTrash,
-                                canTargetCondition_ByPreSelecetedList: null,
-                                canEndSelectCondition: null,
-                                canNoSelect: () => true,
-                                selectCardCoroutine: SelectCardCoroutine,
-                                afterSelectCardCoroutine: null,
-                                message: "Select 1 [Three Musketeers] or [Appmon] card to trash.",
-                                maxCount: 1,
-                                canEndNotMax: false,
-                                isShowOpponent: true,
-                                mode: SelectCardEffect.Mode.Custom,
-                                root: SelectCardEffect.Root.Custom,
-                                customRootCardList: card.PermanentOfThisCard().DigivolutionCards,
-                                canLookReverseCard: true,
-                                selectPlayer: card.Owner,
-                                cardEffect: null);
-
-                    selectCardEffect.SetUpCustomMessage("Select 1 [Three Musketeers] or [Appmon] card to trash.", "The opponent is selecting 1 [Three Musketeers] or [Appmon] card to trash.");
-
-                    yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
-
-                    IEnumerator SelectCardCoroutine(CardSource cardSource)
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SelectTrashDigivolutionCards(
+                        permanentCondition: CanSelectPermanentCondition,
+                        cardCondition: CanTuckOrTrash,
+                        maxCount: 3,
+                        canNoTrash: false,
+                        isFromOnly1Permanent: false,
+                        activateClass: activateClass,
+                        afterSelectionCoroutine: AfterTrashedCards
+                    ));
+
+                    IEnumerator AfterTrashedCards(Permanent permanent, List<CardSource> cards)
                     {
-                        selectedCards.Add(cardSource);
+                        if(cards.Count > 0)
+                            trashed = true;
 
                         yield return null;
                     }
 
-                    if (selectedCards.Count >= 1)
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(new ITrashDigivolutionCards(card.PermanentOfThisCard(), selectedCards, activateClass).TrashDigivolutionCards());
-
-                        trashed = true;
-                        selectedCards.Clear();
-                    }
-
                     if (trashed)
                     {
                         if (CardEffectCommons.HasMatchConditionPermanent(DedigivolveTarget))
@@ -561,47 +546,24 @@ namespace DCGO.CardEffects.BT21
                 {
                     bool trashed = false;
 
-                    List<CardSource> selectedCards = new List<CardSource>();
-
-                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                    selectCardEffect.SetUp(
-                                canTargetCondition: CanTuckOrTrash,
-                                canTargetCondition_ByPreSelecetedList: null,
-                                canEndSelectCondition: null,
-                                canNoSelect: () => true,
-                                selectCardCoroutine: SelectCardCoroutine,
-                                afterSelectCardCoroutine: null,
-                                message: "Select 1 [Three Musketeers] or [Appmon] card to trash.",
-                                maxCount: 1,
-                                canEndNotMax: false,
-                                isShowOpponent: true,
-                                mode: SelectCardEffect.Mode.Custom,
-                                root: SelectCardEffect.Root.Custom,
-                                customRootCardList: card.PermanentOfThisCard().DigivolutionCards,
-                                canLookReverseCard: true,
-                                selectPlayer: card.Owner,
-                                cardEffect: null);
-
-                    selectCardEffect.SetUpCustomMessage("Select 1 [Three Musketeers] or [Appmon] card to trash.", "The opponent is selecting 1 [Three Musketeers] or [Appmon] card to trash.");
-
-                    yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
-
-                    IEnumerator SelectCardCoroutine(CardSource cardSource)
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SelectTrashDigivolutionCards(
+                        permanentCondition: CanSelectPermanentCondition,
+                        cardCondition: CanTuckOrTrash,
+                        maxCount: 3,
+                        canNoTrash: false,
+                        isFromOnly1Permanent: false,
+                        activateClass: activateClass,
+                        afterSelectionCoroutine: AfterTrashedCards
+                    ));
+
+                    IEnumerator AfterTrashedCards(Permanent permanent, List<CardSource> cards)
                     {
-                        selectedCards.Add(cardSource);
+                        if (cards.Count > 0)
+                            trashed = true;
 
                         yield return null;
                     }
 
-                    if (selectedCards.Count >= 1)
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(new ITrashDigivolutionCards(card.PermanentOfThisCard(), selectedCards, activateClass).TrashDigivolutionCards());
-
-                        trashed = true;
-                        selectedCards.Clear();
-                    }
-
                     if (trashed)
                     {
                         if (CardEffectCommons.HasMatchConditionPermanent(DedigivolveTarget))

+ 4 - 4
Assets/CardEffect/BT21/Purple/BT21_075.cs

@@ -37,7 +37,7 @@ namespace DCGO.CardEffects.BT21
             if(timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Give raid and retal", CanUseCondition, card);
+                activateClass.SetUpICardEffect("Give Raid and Retaliation", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateConditionShared, ActivateCoroutine, -1, false, EffectDescription());
                 cardEffects.Add(activateClass);
 
@@ -105,7 +105,7 @@ namespace DCGO.CardEffects.BT21
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Give raid and retal", CanUseCondition, card);
+                activateClass.SetUpICardEffect("Give Raid and Retaliation", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateConditionShared, ActivateCoroutine, -1, false, EffectDescription());
                 cardEffects.Add(activateClass);
 
@@ -156,12 +156,12 @@ namespace DCGO.CardEffects.BT21
 
                             yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainRaid(
                                 targetPermanent: selectedPermanent,
-                                effectDuration: EffectDuration.UntilEachTurnEnd,
+                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
                                 activateClass: activateClass));
 
                             yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainRetaliation(
                                 targetPermanent: selectedPermanent,
-                                effectDuration: EffectDuration.UntilEachTurnEnd,
+                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
                                 activateClass: activateClass));
                         }
                     }

+ 8 - 3
Assets/CardEffect/BT21/Purple/BT21_076.cs

@@ -10,11 +10,16 @@ namespace DCGO.CardEffects.BT21
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            #region alternative digivolution method
-            if(timing == EffectTiming.None)
+            #region Alternate Digivolution Requirement
+            if (timing == EffectTiming.None)
             {
+                static bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.ContainsCardName("Growlmon") && 
+                           targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.Level == 5;
+                }
 
-                CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanent => permanent.Level == 4 && permanent.TopCard.ContainsCardName("Growlmon"), 3, false, card, null);
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 3, ignoreDigivolutionRequirement: false, card: card, condition: null));
             }
             #endregion
 

+ 2 - 2
Assets/CardEffect/BT21/Purple/BT21_077.cs

@@ -128,7 +128,7 @@ namespace DCGO.CardEffects.BT21
 
                                 if (selectedPermanent != null)
                                 {
-                                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBarrier(targetPermanent: selectedPermanent, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCollision(targetPermanent: selectedPermanent, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
 
                                     ActivateClass activateClassDebuff = new ActivateClass();
                                     activateClassDebuff.SetUpICardEffect("Attack with this Digimon", CanUseConditionDebuff,
@@ -284,7 +284,7 @@ namespace DCGO.CardEffects.BT21
                                 if (selectedPermanent != null)
                                 {
 
-                                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBarrier(targetPermanent: selectedPermanent, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCollision(targetPermanent: selectedPermanent, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
 
                                     ActivateClass activateClassDebuff = new ActivateClass();
                                     activateClassDebuff.SetUpICardEffect("Attack with this Digimon", CanUseConditionDebuff,

+ 128 - 110
Assets/CardEffect/BT21/White/BT21_101.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
+using System.Linq;
 
 // Gaiamon
 namespace DCGO.CardEffects.BT21
@@ -11,6 +12,18 @@ namespace DCGO.CardEffects.BT21
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
+            #region Alternative Digivolution Condition - Ult.
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.EqualsTraits("Ult.");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 5, ignoreDigivolutionRequirement: false, card: card, condition: null));
+            }
+            #endregion
+
             #region Static Effects
 
             #region App Fusion (Globemon & Charismon)
@@ -171,133 +184,138 @@ namespace DCGO.CardEffects.BT21
             bool CanSelectLinkCard(CardSource cardSource)
             {
                 if (cardSource.HasAppmonTraits)
-                {
-                    return true;
-                }
-                return false;
-            }
+                    return cardSource.CanLink(false);
 
-            bool CanSelectDigimon(Permanent permanent)
-            {
-                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
-                {
-                    return true;
-                }
                 return false;
             }
+
             IEnumerator SharedActivateCoroutine(Hashtable hashtable, ActivateClass activateClass)
             {
-                if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, CanSelectDigimon))
-                {
-                    Permanent selectedPermanent = null;
-                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectDigimon));
-                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                    selectPermanentEffect.SetUp(
-                        selectPlayer: card.Owner,
-                        canTargetCondition: CanSelectDigimon,
-                        canTargetCondition_ByPreSelecetedList: null,
-                        canEndSelectCondition: null,
-                        maxCount: maxCount,
-                        canNoSelect: true,
-                        canEndNotMax: false,
-                        selectPermanentCoroutine: SelectPermanentCoroutine,
-                        afterSelectPermanentCoroutine: null,
-                        mode: SelectPermanentEffect.Mode.Custom,
-                        cardEffect: activateClass);
-
-                    selectPermanentEffect.SetUpCustomMessage("Select 1 digimon to add link", "The opponent is selecting 1 digimon to add link");
-                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
-                    {
-                        selectedPermanent = permanent;
-                        yield return null;
-                    }
+                bool hasInHand = CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectLinkCard);
+                bool hasInSources = card.PermanentOfThisCard().DigivolutionCards.Count(CanSelectLinkCard) > 0;
+                bool selectedRoot = false;
+                CardSource selectedCard = null;
 
-                    if (selectedPermanent != null)
-                    {
-                        List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
+                if (hasInHand && hasInSources)
+                {
+                    List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
                         {
                             new SelectionElement<bool>(message: $"From This Digimon", value: true, spriteIndex: 0),
                             new SelectionElement<bool>(message: $"From Hand", value: false, spriteIndex: 1),
                         };
 
-                        string selectPlayerMessage = "Choose where to get the digimon from";
-                        string notSelectPlayerMessage = "The opponent is choosing effects.";
+                    string selectPlayerMessage = "Choose where to get the digimon from";
+                    string notSelectPlayerMessage = "The opponent is choosing effects.";
 
-                        GManager.instance.userSelectionManager.SetBoolSelection(
-                            selectionElements: selectionElements, selectPlayer: card.Owner,
-                            selectPlayerMessage: selectPlayerMessage,
-                            notSelectPlayerMessage: notSelectPlayerMessage);
+                    GManager.instance.userSelectionManager.SetBoolSelection(
+                        selectionElements: selectionElements, selectPlayer: card.Owner,
+                        selectPlayerMessage: selectPlayerMessage,
+                        notSelectPlayerMessage: notSelectPlayerMessage);
 
-                        yield return ContinuousController.instance.StartCoroutine(GManager.instance
-                            .userSelectionManager.WaitForEndSelect());
+                    yield return ContinuousController.instance.StartCoroutine(GManager.instance
+                        .userSelectionManager.WaitForEndSelect());
 
-                        CardSource selectedCard = null;
-                        if (GManager.instance.userSelectionManager.SelectedBoolValue)
-                        {
-                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-                            selectCardEffect.SetUp(
-                                        canTargetCondition: CanSelectLinkCard,
-                                        canTargetCondition_ByPreSelecetedList: null,
-                                        canEndSelectCondition: null,
-                                        canNoSelect: () => true,
-                                        selectCardCoroutine: SelectCardCoroutine,
-                                        afterSelectCardCoroutine: null,
-                                        message: "Select 1 linked card.",
-                                        maxCount: 1,
-                                        canEndNotMax: false,
-                                        isShowOpponent: true,
-                                        mode: SelectCardEffect.Mode.Custom,
-                                        root: SelectCardEffect.Root.Custom,
-                                        customRootCardList: card.PermanentOfThisCard().LinkedCards,
-                                        canLookReverseCard: true,
-                                        selectPlayer: card.Owner,
-                                        cardEffect: activateClass);
-
-                            selectCardEffect.SetUpCustomMessage("Select 1 linked card to remove", "The opponent is selecting 1 linked card to remove");
-
-                            yield return StartCoroutine(selectCardEffect.Activate());
-
-                            IEnumerator SelectCardCoroutine(CardSource cardSource)
-                            {
-                                selectedCard = cardSource;
-                                card.PermanentOfThisCard().LinkedCards.Remove(cardSource);
-                                yield return null;
-                            }
-                        }
-                        else
+                    selectedRoot = GManager.instance.userSelectionManager.SelectedBoolValue;
+                }
+                else if (hasInSources)
+                {
+                    selectedRoot = true;
+                }
+
+                if (selectedRoot)
+                {
+                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+                    selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectLinkCard,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 card to link.",
+                                maxCount: 1,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.Custom,
+                                root: SelectCardEffect.Root.Custom,
+                                customRootCardList: card.PermanentOfThisCard().LinkedCards,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: activateClass);
+
+                    selectCardEffect.SetUpCustomMessage("Select 1 card to link", "The opponent is selecting 1 card to link");
+
+                    yield return StartCoroutine(selectCardEffect.Activate());
+                }
+                else
+                {
+                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+                    selectHandEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectLinkCard,
+                                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 card to link", "The opponent is selecting 1 card to link");
+                    
+                    yield return StartCoroutine(selectHandEffect.Activate());
+                }
+
+                IEnumerator SelectCardCoroutine(CardSource cardSource)
+                {
+                    selectedCard = cardSource;
+                    yield return null;
+                }
+
+                if(selectedCard != null)
+                {
+                    bool CanSelectDigimon(Permanent permanent)
+                    {
+                        UnityEngine.Debug.Log($"CAN SELECT DIGIMON: {CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)}, {selectedCard.CanLinkToTargetPermanent(permanent, false)}");
+                        if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                            return selectedCard.CanLinkToTargetPermanent(permanent, false);
+
+                        return false;
+                    }
+
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, CanSelectDigimon))
+                    {
+                        Permanent selectedPermanent = null;
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectDigimon));
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectDigimon,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: true,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 digimon to add link", "The opponent is selecting 1 digimon to add link");
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
                         {
-                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
-                            selectHandEffect.SetUp(
-                                        selectPlayer: card.Owner,
-                                        canTargetCondition: CanSelectLinkCard,
-                                        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 linked card to remove", "The opponent is selecting 1 linked card to remove");
-                            yield return StartCoroutine(selectHandEffect.Activate());
-                            IEnumerator SelectCardCoroutine(CardSource cardSource)
-                            {
-                                selectedCard = cardSource;
-                                yield return null;
-                            }
+                            selectedPermanent = permanent;
+                            yield return null;
                         }
-                        if (selectedCard != null)
+
+                        if (selectedPermanent != null)
                         {
-                            // Might need to talk to mike about this, things possibly to add
-                            // if link condiiton for selectedCard is sucessful, ex: if it needs exact name or traits, does it meet them.
-                            // Perphaps may lead to link requirements being added to the card itself, instead of an effect.
-                            // if this method below (AddLinkCard), automatically handles if the link max is hit, and allows for owner to choose which link to discarded for new one.
-                            selectedPermanent.AddLinkCard(selectedCard, activateClass);
+                            yield return ContinuousController.instance.StartCoroutine(selectedPermanent.AddLinkCard(selectedCard, activateClass));
                         }
                     }
                 }

+ 1 - 1
Assets/CardEffect/BT21/Yellow/BT21_044.cs

@@ -405,7 +405,7 @@ namespace DCGO.CardEffects.BT21
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Place 1 [Marcus Damon] on the top of security from trash", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
                 activateClass.SetIsInheritedEffect(true);
                 activateClass.SetHashString("AddSecurity_BT21_044");
                 cardEffects.Add(activateClass);

BIN
Assets/Image/UI/Link Mechanic/component_link_background_sources_.png


+ 1 - 1
Assets/Prefab/CardInfo.prefab

@@ -1271,7 +1271,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_Color: {r: 1, g: 1, b: 1, a: 0.4}
   m_RaycastTarget: 0
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1

+ 0 - 1
Assets/Scripts/CardEffectCommons/CanUseEffects/WhenLinked.cs

@@ -12,7 +12,6 @@ public partial class CardEffectCommons
         if (hashtable != null)
         {
             Permanent Permanent = GetPermanentFromHashtable(hashtable);
-
             if (Permanent != null)
             {
                 if (Permanent.TopCard != null)

+ 3 - 4
Assets/Scripts/CardEffectFactory/KeyWordEffects/Link.cs

@@ -48,7 +48,7 @@ public partial class CardEffectFactory
 
         bool CanUseCondition(Hashtable hashtable)
         {
-            if (CardEffectCommons.IsExistOnHand(card) || CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+            if (CardEffectCommons.IsExistOnHand(card) || (CardEffectCommons.IsExistOnBattleAreaDigimon(card) && !card.IsLinked))
             {
                 if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                 {
@@ -64,9 +64,6 @@ public partial class CardEffectFactory
 
         IEnumerator ActivateCoroutine(Hashtable _hashtable)
         {
-
-            yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(-card.linkCondition.cost, activateClass));
-
             Permanent selectedPermanent = null;
 
             int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
@@ -99,6 +96,8 @@ public partial class CardEffectFactory
 
             if (selectedPermanent != null)
             {
+                yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(-card.linkCondition.cost, activateClass));
+
                 yield return ContinuousController.instance.StartCoroutine(selectedPermanent.AddLinkCard(card, activateClass));
             }
         }

+ 10 - 11
Assets/Scripts/CardSource.cs

@@ -2608,7 +2608,7 @@ public class CardSource : MonoBehaviour
     #endregion
 
     #region whether target permanent can Link into this card
-    public bool CanLinkFromTargetPermanent(Permanent targetPermanent, bool PayCost)
+    public bool CanLinkToTargetPermanent(Permanent targetPermanent, bool PayCost)
     {
         if (targetPermanent != null)
         {
@@ -2620,22 +2620,21 @@ public class CardSource : MonoBehaviour
                     {
                         if (linkCondition != null)
                         {
-                            if (!this.CanNotEvolve(targetPermanent))
+                            if (linkCondition.digimonCondition(targetPermanent))
                             {
-                                if (linkCondition.digimonCondition(targetPermanent))
+                                if (PayCost)
                                 {
-                                    if (PayCost)
-                                    {
-                                        int cost = linkCondition.cost;
+                                    int cost = linkCondition.cost;
 
-                                        cost = GetChangedCostItselef(cost, SelectCardEffect.Root.Hand, new List<Permanent>() { targetPermanent }, checkAvailability: true);
+                                    cost = GetChangedCostItselef(cost, SelectCardEffect.Root.Hand, new List<Permanent>() { targetPermanent }, checkAvailability: true);
 
-                                        if (Owner.MaxMemoryCost < cost)
-                                        {
-                                            return false;
-                                        }
+                                    if (Owner.MaxMemoryCost < cost)
+                                    {
+                                        return false;
                                     }
                                 }
+
+                                return true;
                             }
                         }
                     }

+ 8 - 3
Assets/Scripts/Permanent.cs

@@ -1186,10 +1186,15 @@ public class Permanent
                         {
                             if (cardEffect != null)
                             {
-                                if (isTopCard == cardEffect.IsInheritedEffect)
-                                {
+                                if (cardEffect.IsInheritedEffect && isTopCard)
                                     continue;
-                                }
+
+                                if (cardEffect.IsLinkedEffect && !cardSource.IsLinked)
+                                    continue;
+
+                                //if (isTopCard == cardEffect.IsInheritedEffect)
+                                //    continue;
+
 
                                 _EffectList.Add(cardEffect);
                             }