mbunch_kascope před 10 měsíci
rodič
revize
aa0ae01696
42 změnil soubory, kde provedl 528 přidání a 534 odebrání
  1. 0 2
      Assets/CardEffect/BT1/Yellow/BT1_087.cs
  2. 2 5
      Assets/CardEffect/BT10/White/BT10_086.cs
  3. 0 2
      Assets/CardEffect/BT11/Yellow/BT11_042.cs
  4. 0 2
      Assets/CardEffect/BT13/Red/BT13_012.cs
  5. 0 2
      Assets/CardEffect/BT14/Yellow/BT14_033.cs
  6. 0 2
      Assets/CardEffect/BT14/Yellow/BT14_093.cs
  7. 1 1
      Assets/CardEffect/BT15/Purple/BT15_072.cs
  8. 0 2
      Assets/CardEffect/BT15/Yellow/BT15_092.cs
  9. 0 4
      Assets/CardEffect/BT16/Blue/BT16_024.cs
  10. 0 2
      Assets/CardEffect/BT18/Yellow/BT18_037.cs
  11. 1 3
      Assets/CardEffect/BT3/Yellow/BT3_034.cs
  12. 0 2
      Assets/CardEffect/BT5/Yellow/BT5_037.cs
  13. 0 2
      Assets/CardEffect/BT7/Yellow/BT7_088.cs
  14. 82 62
      Assets/CardEffect/EX10/Black/EX10_035.cs
  15. 6 6
      Assets/CardEffect/EX10/Black/EX10_036.cs
  16. 1 5
      Assets/CardEffect/EX10/Black/EX10_070.cs
  17. 56 60
      Assets/CardEffect/EX10/Blue/EX10_012.cs
  18. 56 60
      Assets/CardEffect/EX10/Green/EX10_020.cs
  19. 2 2
      Assets/CardEffect/EX10/Purple/EX10_056.cs
  20. 55 60
      Assets/CardEffect/EX10/Purple/EX10_057.cs
  21. 64 67
      Assets/CardEffect/EX10/Purple/EX10_058.cs
  22. 6 4
      Assets/CardEffect/EX10/Purple/EX10_059.cs
  23. 51 16
      Assets/CardEffect/EX10/Red/EX10_010.cs
  24. 7 1
      Assets/CardEffect/EX10/White/EX10_061.cs
  25. 17 47
      Assets/CardEffect/EX10/White/EX10_072.cs
  26. 0 2
      Assets/CardEffect/EX3/Yellow/EX3_029.cs
  27. 0 2
      Assets/CardEffect/EX5/Yellow/EX5_027.cs
  28. 0 2
      Assets/CardEffect/EX6/Yellow/EX6_030.cs
  29. 0 2
      Assets/CardEffect/EX6/Yellow/EX6_068.cs
  30. 1 3
      Assets/CardEffect/LM/Yellow/LM_020.cs
  31. 39 47
      Assets/CardEffect/P/Blue/P_117.cs
  32. 3 1
      Assets/CardEffect/P/Red/P_152.cs
  33. 1 0
      Assets/CardEffect/P/Red/P_189.cs
  34. 0 2
      Assets/CardEffect/P/Yellow/P_122.cs
  35. 0 2
      Assets/CardEffect/ST10/Yellow/ST10_06.cs
  36. 3 0
      Assets/Scripts/CardController.cs
  37. 19 0
      Assets/Scripts/CardEffectCommons/GetFromHashtable.cs
  38. 1 1
      Assets/Scripts/CardEffectCommons/KeyWordEffects/Collision.cs
  39. 2 2
      Assets/Scripts/CardEffectCommons/TrashDigivolutionCards.cs
  40. 11 8
      Assets/Scripts/CheckCardPanel.cs
  41. 40 38
      Assets/Scripts/SelectCardEffect.cs
  42. 1 1
      ProjectSettings/ProjectSettings.asset

+ 0 - 2
Assets/CardEffect/BT1/Yellow/BT1_087.cs

@@ -81,8 +81,6 @@ public class BT1_087 : CEntity_Effect
 
                     yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                    selectCardEffect.SetUseFaceDown();
-
                     IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
                     {
                         foreach (CardSource cardSource in cardSources)

+ 2 - 5
Assets/CardEffect/BT10/White/BT10_086.cs

@@ -334,14 +334,13 @@ namespace DCGO.CardEffects.BT10
                                 canEndNotMax: false,
                                 isShowOpponent: true,
                                 mode: SelectCardEffect.Mode.Custom,
-                                root: SelectCardEffect.Root.Custom,
+                                root: SelectCardEffect.Root.Security,
                                 customRootCardList: card.Owner.Enemy.SecurityCards,
                                 canLookReverseCard: true,
                                 selectPlayer: card.Owner,
                                 cardEffect: activateClass);
 
                             selectCardEffect.SetIsSecurity();
-                            selectCardEffect.SetUseFaceDown();
                             selectCardEffect.SetUpCustomMessage_ShowCard("Trash card");
 
                             yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
@@ -518,14 +517,12 @@ namespace DCGO.CardEffects.BT10
                                 canEndNotMax: false,
                                 isShowOpponent: true,
                                 mode: SelectCardEffect.Mode.Custom,
-                                root: SelectCardEffect.Root.Custom,
+                                root: SelectCardEffect.Root.Security,
                                 customRootCardList: card.Owner.Enemy.SecurityCards,
                                 canLookReverseCard: true,
                                 selectPlayer: card.Owner,
                                 cardEffect: activateClass);
 
-                            selectCardEffect.SetIsSecurity();
-                            selectCardEffect.SetUseFaceDown();
                             selectCardEffect.SetUpCustomMessage_ShowCard("Trash card");
 
                             yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());

+ 0 - 2
Assets/CardEffect/BT11/Yellow/BT11_042.cs

@@ -95,8 +95,6 @@ namespace DCGO.CardEffects.BT11
 
                         yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                        selectCardEffect.SetUseFaceDown();
-
                         IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
                         {
                             foreach (CardSource cardSource in cardSources)

+ 0 - 2
Assets/CardEffect/BT13/Red/BT13_012.cs

@@ -99,8 +99,6 @@ namespace DCGO.CardEffects.BT13
 
                         yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                        selectCardEffect.SetUseFaceDown();
-
                         IEnumerator SelectCardCoroutine(CardSource cardSource)
                         {
                             selectedCards.Add(cardSource);

+ 0 - 2
Assets/CardEffect/BT14/Yellow/BT14_033.cs

@@ -114,8 +114,6 @@ namespace DCGO.CardEffects.BT14
 
                         yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                        selectCardEffect.SetUseFaceDown();
-
                         IEnumerator SelectCardCoroutine(CardSource cardSource)
                         {
                             selectedCard = cardSource;

+ 0 - 2
Assets/CardEffect/BT14/Yellow/BT14_093.cs

@@ -115,8 +115,6 @@ namespace DCGO.CardEffects.BT14
                         selectCardEffect.SetIsSecurity();
                         yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                        selectCardEffect.SetUseFaceDown();
-
                         IEnumerator SelectCardCoroutine(CardSource cardSource)
                         {
                             selectedCard = cardSource;

+ 1 - 1
Assets/CardEffect/BT15/Purple/BT15_072.cs

@@ -95,7 +95,7 @@ namespace DCGO.CardEffects.BT15
                                 mode: SelectPermanentEffect.Mode.Custom,
                                 cardEffect: activateClass);
 
-                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to delete.", "The opponent is selecting 1 Digimon to delete.");
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to protect.", "The opponent is selecting 1 Digimon to protect.");
 
                             yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 

+ 0 - 2
Assets/CardEffect/BT15/Yellow/BT15_092.cs

@@ -139,8 +139,6 @@ namespace DCGO.CardEffects.BT15
 
                         yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                        selectCardEffect.SetUseFaceDown();
-
                         IEnumerator SelectCardCoroutine(CardSource cardSource)
                         {
                             selectedCards.Add(cardSource);

+ 0 - 4
Assets/CardEffect/BT16/Blue/BT16_024.cs

@@ -129,8 +129,6 @@ namespace DCGO.CardEffects.BT16
 
                         yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                        selectCardEffect.SetUseFaceDown();
-
                         IEnumerator SelectCardCoroutine(CardSource cardSource)
                         {
                             selectedCard = cardSource;
@@ -330,8 +328,6 @@ namespace DCGO.CardEffects.BT16
 
                         yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                        selectCardEffect.SetUseFaceDown();
-
                         IEnumerator SelectCardCoroutine(CardSource cardSource)
                         {
                             selectedCard = cardSource;

+ 0 - 2
Assets/CardEffect/BT18/Yellow/BT18_037.cs

@@ -115,8 +115,6 @@ namespace DCGO.CardEffects.BT18
 
                     yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                    selectCardEffect.SetUseFaceDown();
-
                     IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
                     {
                         foreach (CardSource cardSource in cardSources)

+ 1 - 3
Assets/CardEffect/BT3/Yellow/BT3_034.cs

@@ -63,14 +63,12 @@ public class BT3_034 : CEntity_Effect
                         canEndNotMax: false,
                         isShowOpponent: false,
                         mode: SelectCardEffect.Mode.AddHand,
-                        root: SelectCardEffect.Root.Custom,
+                        root: SelectCardEffect.Root.Security,
                         customRootCardList: new List<CardSource>() { topCard },
                         canLookReverseCard: true,
                         selectPlayer: card.Owner,
                         cardEffect: activateClass);
 
-                    selectCardEffect.SetUseFaceDown();
-
                     yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
                     IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)

+ 0 - 2
Assets/CardEffect/BT5/Yellow/BT5_037.cs

@@ -95,8 +95,6 @@ public class BT5_037 : CEntity_Effect
 
                     yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                    selectCardEffect.SetUseFaceDown();
-
                     IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
                     {
                         foreach (CardSource cardSource in cardSources)

+ 0 - 2
Assets/CardEffect/BT7/Yellow/BT7_088.cs

@@ -95,8 +95,6 @@ public class BT7_088 : CEntity_Effect
 
                 yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                selectCardEffect.SetUseFaceDown();
-
                 IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
                 {
                     foreach (CardSource cardSource in cardSources)

+ 82 - 62
Assets/CardEffect/EX10/Black/EX10_035.cs

@@ -4,6 +4,7 @@ using System.Linq;
 using System;
 using UnityEngine;
 
+//Machinedramon
 namespace DCGO.CardEffects.EX10
 {
     public class EX10_035 : CEntity_Effect
@@ -108,7 +109,9 @@ namespace DCGO.CardEffects.EX10
 
                     #endregion
 
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                    if (CardEffectCommons.CanPlayAsNewPermanent(card, true, activateClass))
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
                                             cardSources: new List<CardSource> { card },
                                             activateClass: activateClass,
                                             payCost: true,
@@ -116,75 +119,76 @@ namespace DCGO.CardEffects.EX10
                                             root: SelectCardEffect.Root.Hand,
                                             activateETB: true));
 
-                    yield return new WaitForSeconds(0.2f);
+                        yield return new WaitForSeconds(0.2f);
 
-                    #region Delete Digimon Played
+                        #region Delete Digimon Played
 
-                    Permanent playedPermanent = card.PermanentOfThisCard();
+                        Permanent playedPermanent = card.PermanentOfThisCard();
 
-                    ActivateClass activateClass1 = new ActivateClass();
-                    activateClass1.SetUpICardEffect("Delete the Digimon", CanUseCondition2, playedPermanent.TopCard);
-                    activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
-                    activateClass1.SetEffectSourcePermanent(playedPermanent);
-                    playedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
+                        ActivateClass activateClass1 = new ActivateClass();
+                        activateClass1.SetUpICardEffect("Delete the Digimon", CanUseCondition2, playedPermanent.TopCard);
+                        activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
+                        activateClass1.SetEffectSourcePermanent(playedPermanent);
+                        playedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
 
-                    if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(playedPermanent));
-                    }
+                        if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(playedPermanent));
+                        }
 
-                    string EffectDiscription1()
-                    {
-                        return "[End of Your Turn] Delete this Digimon.";
-                    }
+                        string EffectDiscription1()
+                        {
+                            return "[End of Your Turn] Delete this Digimon.";
+                        }
 
-                    bool CanUseCondition2(Hashtable hashtable1)
-                    {
-                        if (CardEffectCommons.IsOwnerTurn(card))
+                        bool CanUseCondition2(Hashtable hashtable1)
                         {
-                            if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(playedPermanent, playedPermanent.TopCard))
+                            if (CardEffectCommons.IsOwnerTurn(card))
                             {
-                                return true;
+                                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(playedPermanent, playedPermanent.TopCard))
+                                {
+                                    return true;
+                                }
                             }
-                        }
 
-                        return false;
-                    }
+                            return false;
+                        }
 
-                    bool CanActivateCondition1(Hashtable hashtable1)
-                    {
-                        if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
+                        bool CanActivateCondition1(Hashtable hashtable1)
                         {
-                            if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
+                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
                             {
-                                return true;
+                                if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                {
+                                    return true;
+                                }
                             }
-                        }
 
-                        return false;
-                    }
+                            return false;
+                        }
 
-                    IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
-                    {
-                        if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
+                        IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
                         {
-                            yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
-                            new List<Permanent>() { playedPermanent },
-                            CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
+                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
+                                new List<Permanent>() { playedPermanent },
+                                CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
+                            }
                         }
-                    }
 
-                    ICardEffect GetCardEffect(EffectTiming _timing)
-                    {
-                        if (_timing == EffectTiming.OnEndTurn)
+                        ICardEffect GetCardEffect(EffectTiming _timing)
                         {
-                            return activateClass1;
+                            if (_timing == EffectTiming.OnEndTurn)
+                            {
+                                return activateClass1;
+                            }
+
+                            return null;
                         }
 
-                        return null;
+                        #endregion
                     }
-
-                    #endregion
                 }
             }
 
@@ -206,6 +210,30 @@ namespace DCGO.CardEffects.EX10
             {
                 if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                 {
+                    int degenrationMaxCount = 2;
+                    int degenrationCount = 0;
+
+                    SelectCountEffect selectCountEffect = GManager.instance.GetComponent<SelectCountEffect>();
+                    if (selectCountEffect != null)
+                    {
+                        selectCountEffect.SetUp(
+                            SelectPlayer: card.Owner,
+                            targetPermanent: null,
+                            MaxCount: degenrationMaxCount,
+                            CanNoSelect: false,
+                            Message: "How much will you De-Digivolve?",
+                            Message_Enemy: "The opponent is choosing how much to De-Digivolve.",
+                            SelectCountCoroutine: SelectCountCoroutine);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectCountEffect.Activate());
+
+                        IEnumerator SelectCountCoroutine(int count)
+                        {
+                            degenrationCount = count;
+                            yield return null;
+                        }
+                    }
+
                     List<Permanent> selectedPermaments = new List<Permanent>();
                     int maxCount = Math.Min(2, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
 
@@ -239,7 +267,7 @@ namespace DCGO.CardEffects.EX10
                         {
                             if (selectedPermanent != null)
                             {
-                                yield return ContinuousController.instance.StartCoroutine(new IDegeneration(selectedPermanent, 2, activateClass, true).Degeneration());
+                                yield return ContinuousController.instance.StartCoroutine(new IDegeneration(selectedPermanent, degenrationCount, activateClass, true).Degeneration());
                             }
                         }
                     }
@@ -300,20 +328,12 @@ namespace DCGO.CardEffects.EX10
             {
                 bool Condition()
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        if (CardEffectCommons.IsOwnerTurn(card))
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsExistOnBattleArea(card);
                 }
 
                 bool CardCondition(CardSource cardSource)
                 {
-                    return cardSource.EqualsCardName("Apocalymon");
+                    return !cardSource.EqualsCardName("Apocalymon");
                 }
 
                 cardEffects.Add(CardEffectFactory.CanNotDigivolveStaticSelfEffect(
@@ -354,13 +374,13 @@ namespace DCGO.CardEffects.EX10
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanActivateOnDeletion(card) &&
-                           !CardEffectCommons.HasMatchConditionOwnersSecurity(card, FaceUpBlack);
+                    return CardEffectCommons.CanActivateOnDeletion(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(card, false, true));
+                    if(!CardEffectCommons.HasMatchConditionOwnersSecurity(card, FaceUpBlack, false))
+                        yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(card, false, true));
                 }
             }
 
@@ -385,7 +405,7 @@ namespace DCGO.CardEffects.EX10
                 {
                     return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card)
                         && (CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition) || CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
-                        && !card.IsFlipped;
+                        && CardEffectCommons.GetFaceUpFromHashtable(hashtable);
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)

+ 6 - 6
Assets/CardEffect/EX10/Black/EX10_036.cs

@@ -57,7 +57,7 @@ namespace DCGO.CardEffects.EX10
 
                 string EffectDiscription()
                 {
-                    return "[When Digivolving] [Once Per Turn] You may place up to 3 [Mineral] or [Rock] cards from your trash as this Digimon's bottom digivolution cards.";
+                    return "[When Digivolving] [Once Per Turn] By placing 3 [Mineral] or [Rock] trait cards from your trash as this Digimon's bottom digivolution cards, it unsuspends.";
                 }
 
                 bool HasProperTrait(CardSource source)
@@ -75,7 +75,7 @@ namespace DCGO.CardEffects.EX10
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
-                           CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, HasProperTrait);
+                           CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, HasProperTrait) >= 3;
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -144,7 +144,7 @@ namespace DCGO.CardEffects.EX10
 
                 string EffectDiscription()
                 {
-                    return "[When Attacking] [Once Per Turn] You may place up to 3 [Mineral] or [Rock] cards from your trash as this Digimon's bottom digivolution cards.";
+                    return "[When Attacking] [Once Per Turn] By placing 3 [Mineral] or [Rock] trait cards from your trash as this Digimon's bottom digivolution cards, it unsuspends.";
                 }
 
                 bool HasProperTrait(CardSource source)
@@ -162,7 +162,7 @@ namespace DCGO.CardEffects.EX10
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
-                           CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, HasProperTrait);
+                           CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, HasProperTrait) >= 3;
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -294,7 +294,7 @@ namespace DCGO.CardEffects.EX10
 
                     IEnumerator AfterTrashedCards(Permanent permanent, List<CardSource> cards)
                     {
-                        trashedCount += cards.Count;
+                        trashedCount = cards.Count;
 
                         yield return null;
                     }
@@ -404,7 +404,7 @@ namespace DCGO.CardEffects.EX10
 
                     IEnumerator AfterTrashedCards(Permanent permanent, List<CardSource> cards)
                     {
-                        trashedCount += cards.Count;
+                        trashedCount = cards.Count;
 
                         yield return null;
                     }

+ 1 - 5
Assets/CardEffect/EX10/Black/EX10_070.cs

@@ -81,10 +81,9 @@ namespace DCGO.CardEffects.EX10
             if (timing == EffectTiming.OnLinkCardDiscarded)
             {
                 Permanent trashedFrom = null;
-                string trashedName = "null";
 
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect($"Link 1 card from trash with {trashedName}", CanUseCondition, card);
+                activateClass.SetUpICardEffect($"Link 1 card from trash", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
                 cardEffects.Add(activateClass);                
 
@@ -99,9 +98,6 @@ namespace DCGO.CardEffects.EX10
                     {
                         if (CardEffectCommons.CanTriggerOnTrashLinkedCard(hashtable, perm => CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(perm, card), cardEffect => cardEffect != null, source => source != null))
                         {
-                            trashedFrom = CardEffectCommons.GetPermanentFromHashtable(hashtable);
-                            trashedName = trashedFrom != null ? trashedFrom.TopCard.BaseENGCardNameFromEntity : "null";
-
                             return true;
                         }
                     }

+ 56 - 60
Assets/CardEffect/EX10/Blue/EX10_012.cs

@@ -4,6 +4,7 @@ using System.Linq;
 using System;
 using UnityEngine;
 
+//Metalseadramon
 namespace DCGO.CardEffects.EX10
 {
     public class EX10_012 : CEntity_Effect
@@ -108,7 +109,9 @@ namespace DCGO.CardEffects.EX10
 
                     #endregion
 
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                    if(CardEffectCommons.CanPlayAsNewPermanent(card, true, activateClass))
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
                                             cardSources: new List<CardSource> { card },
                                             activateClass: activateClass,
                                             payCost: true,
@@ -116,75 +119,76 @@ namespace DCGO.CardEffects.EX10
                                             root: SelectCardEffect.Root.Hand,
                                             activateETB: true));
 
-                    yield return new WaitForSeconds(0.2f);
+                        yield return new WaitForSeconds(0.2f);
 
-                    #region Delete Digimon Played
+                        #region Delete Digimon Played
 
-                    Permanent playedPermanent = card.PermanentOfThisCard();
+                        Permanent playedPermanent = card.PermanentOfThisCard();
 
-                    ActivateClass activateClass1 = new ActivateClass();
-                    activateClass1.SetUpICardEffect("Delete the Digimon", CanUseCondition2, playedPermanent.TopCard);
-                    activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
-                    activateClass1.SetEffectSourcePermanent(playedPermanent);
-                    playedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
+                        ActivateClass activateClass1 = new ActivateClass();
+                        activateClass1.SetUpICardEffect("Delete the Digimon", CanUseCondition2, playedPermanent.TopCard);
+                        activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
+                        activateClass1.SetEffectSourcePermanent(playedPermanent);
+                        playedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
 
-                    if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(playedPermanent));
-                    }
+                        if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(playedPermanent));
+                        }
 
-                    string EffectDiscription1()
-                    {
-                        return "[End of Your Turn] Delete this Digimon.";
-                    }
+                        string EffectDiscription1()
+                        {
+                            return "[End of Your Turn] Delete this Digimon.";
+                        }
 
-                    bool CanUseCondition2(Hashtable hashtable1)
-                    {
-                        if (CardEffectCommons.IsOwnerTurn(card))
+                        bool CanUseCondition2(Hashtable hashtable1)
                         {
-                            if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(playedPermanent, playedPermanent.TopCard))
+                            if (CardEffectCommons.IsOwnerTurn(card))
                             {
-                                return true;
+                                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(playedPermanent, playedPermanent.TopCard))
+                                {
+                                    return true;
+                                }
                             }
-                        }
 
-                        return false;
-                    }
+                            return false;
+                        }
 
-                    bool CanActivateCondition1(Hashtable hashtable1)
-                    {
-                        if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
+                        bool CanActivateCondition1(Hashtable hashtable1)
                         {
-                            if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
+                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
                             {
-                                return true;
+                                if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                {
+                                    return true;
+                                }
                             }
-                        }
 
-                        return false;
-                    }
+                            return false;
+                        }
 
-                    IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
-                    {
-                        if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
+                        IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
                         {
-                            yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
-                            new List<Permanent>() { playedPermanent },
-                            CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
+                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
+                                new List<Permanent>() { playedPermanent },
+                                CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
+                            }
                         }
-                    }
 
-                    ICardEffect GetCardEffect(EffectTiming _timing)
-                    {
-                        if (_timing == EffectTiming.OnEndTurn)
+                        ICardEffect GetCardEffect(EffectTiming _timing)
                         {
-                            return activateClass1;
+                            if (_timing == EffectTiming.OnEndTurn)
+                            {
+                                return activateClass1;
+                            }
+
+                            return null;
                         }
 
-                        return null;
+                        #endregion
                     }
-
-                    #endregion
                 }
             }
 
@@ -439,15 +443,7 @@ namespace DCGO.CardEffects.EX10
             {
                 bool Condition()
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        if (CardEffectCommons.IsOwnerTurn(card))
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsExistOnBattleArea(card);
                 }
 
                 bool CardCondition(CardSource cardSource)
@@ -493,13 +489,13 @@ namespace DCGO.CardEffects.EX10
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanActivateOnDeletion(card) &&
-                           !CardEffectCommons.HasMatchConditionOwnersSecurity(card, FaceUpBlue);
+                    return CardEffectCommons.CanActivateOnDeletion(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(card, false, true));
+                    if(!CardEffectCommons.HasMatchConditionOwnersSecurity(card, FaceUpBlue, false))
+                        yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(card, false, true));
                 }
             }
 
@@ -524,7 +520,7 @@ namespace DCGO.CardEffects.EX10
                 {
                     return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card)
                         && (CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition) || CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
-                        && !card.IsFlipped;
+                        && CardEffectCommons.GetFaceUpFromHashtable(hashtable);
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)

+ 56 - 60
Assets/CardEffect/EX10/Green/EX10_020.cs

@@ -4,6 +4,7 @@ using System;
 using System.Linq;
 using UnityEngine;
 
+//Puppetmon
 namespace DCGO.CardEffects.EX10
 {
     public class EX10_020 : CEntity_Effect
@@ -108,7 +109,9 @@ namespace DCGO.CardEffects.EX10
 
                     #endregion
 
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                    if (CardEffectCommons.CanPlayAsNewPermanent(card, true, activateClass))
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
                                             cardSources: new List<CardSource> { card },
                                             activateClass: activateClass,
                                             payCost: true,
@@ -116,75 +119,76 @@ namespace DCGO.CardEffects.EX10
                                             root: SelectCardEffect.Root.Hand,
                                             activateETB: true));
 
-                    yield return new WaitForSeconds(0.2f);
+                        yield return new WaitForSeconds(0.2f);
 
-                    #region Delete Digimon Played
+                        #region Delete Digimon Played
 
-                    Permanent playedPermanent = card.PermanentOfThisCard();
+                        Permanent playedPermanent = card.PermanentOfThisCard();
 
-                    ActivateClass activateClass1 = new ActivateClass();
-                    activateClass1.SetUpICardEffect("Delete the Digimon", CanUseCondition2, playedPermanent.TopCard);
-                    activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
-                    activateClass1.SetEffectSourcePermanent(playedPermanent);
-                    playedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
+                        ActivateClass activateClass1 = new ActivateClass();
+                        activateClass1.SetUpICardEffect("Delete the Digimon", CanUseCondition2, playedPermanent.TopCard);
+                        activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
+                        activateClass1.SetEffectSourcePermanent(playedPermanent);
+                        playedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
 
-                    if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(playedPermanent));
-                    }
+                        if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(playedPermanent));
+                        }
 
-                    string EffectDiscription1()
-                    {
-                        return "[End of Your Turn] Delete this Digimon.";
-                    }
+                        string EffectDiscription1()
+                        {
+                            return "[End of Your Turn] Delete this Digimon.";
+                        }
 
-                    bool CanUseCondition2(Hashtable hashtable1)
-                    {
-                        if (CardEffectCommons.IsOwnerTurn(card))
+                        bool CanUseCondition2(Hashtable hashtable1)
                         {
-                            if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(playedPermanent, playedPermanent.TopCard))
+                            if (CardEffectCommons.IsOwnerTurn(card))
                             {
-                                return true;
+                                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(playedPermanent, playedPermanent.TopCard))
+                                {
+                                    return true;
+                                }
                             }
-                        }
 
-                        return false;
-                    }
+                            return false;
+                        }
 
-                    bool CanActivateCondition1(Hashtable hashtable1)
-                    {
-                        if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
+                        bool CanActivateCondition1(Hashtable hashtable1)
                         {
-                            if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
+                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
                             {
-                                return true;
+                                if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                {
+                                    return true;
+                                }
                             }
-                        }
 
-                        return false;
-                    }
+                            return false;
+                        }
 
-                    IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
-                    {
-                        if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
+                        IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
                         {
-                            yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
-                            new List<Permanent>() { playedPermanent },
-                            CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
+                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
+                                new List<Permanent>() { playedPermanent },
+                                CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
+                            }
                         }
-                    }
 
-                    ICardEffect GetCardEffect(EffectTiming _timing)
-                    {
-                        if (_timing == EffectTiming.OnEndTurn)
+                        ICardEffect GetCardEffect(EffectTiming _timing)
                         {
-                            return activateClass1;
+                            if (_timing == EffectTiming.OnEndTurn)
+                            {
+                                return activateClass1;
+                            }
+
+                            return null;
                         }
 
-                        return null;
+                        #endregion
                     }
-
-                    #endregion
                 }
             }
 
@@ -311,15 +315,7 @@ namespace DCGO.CardEffects.EX10
             {
                 bool Condition()
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        if (CardEffectCommons.IsOwnerTurn(card))
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsExistOnBattleArea(card);
                 }
 
                 bool CardCondition(CardSource cardSource)
@@ -365,13 +361,13 @@ namespace DCGO.CardEffects.EX10
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanActivateOnDeletion(card) &&
-                           !CardEffectCommons.HasMatchConditionOwnersSecurity(card, FaceUpGreen);
+                    return CardEffectCommons.CanActivateOnDeletion(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(card, false, true));
+                    if(!CardEffectCommons.HasMatchConditionOwnersSecurity(card, FaceUpGreen, false))
+                        yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(card, false, true));
                 }
             }
 
@@ -396,7 +392,7 @@ namespace DCGO.CardEffects.EX10
                 {
                     return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card)
                         && (CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition) || CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
-                        && !card.IsFlipped;
+                        && CardEffectCommons.GetFaceUpFromHashtable(hashtable);
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)

+ 2 - 2
Assets/CardEffect/EX10/Purple/EX10_056.cs

@@ -102,7 +102,7 @@ namespace DCGO.CardEffects.EX10
                 bool HasValidEnemyPermanents()
                 {
                     int digimon = card.Owner.Enemy.GetBattleAreaDigimons().Count;
-                    int notOptions = card.Owner.Enemy.GetBattleAreaDigimons().Filter(x => !x.IsOption).Count;
+                    int notOptions = card.Owner.Enemy.GetBattleAreaPermanents().Filter(x => !x.IsOption).Count;
 
                     return digimon >= 1 &&
                            notOptions >= 2;
@@ -233,7 +233,7 @@ namespace DCGO.CardEffects.EX10
                 bool HasValidEnemyPermanents()
                 {
                     int digimon = card.Owner.Enemy.GetBattleAreaDigimons().Count;
-                    int notOptions = card.Owner.Enemy.GetBattleAreaDigimons().Filter(x => !x.IsOption).Count;
+                    int notOptions = card.Owner.Enemy.GetBattleAreaPermanents().Filter(x => !x.IsOption).Count;
 
                     return digimon >= 1 &&
                            notOptions >= 2;

+ 55 - 60
Assets/CardEffect/EX10/Purple/EX10_057.cs

@@ -108,7 +108,9 @@ namespace DCGO.CardEffects.EX10
 
                     #endregion
 
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                    if (CardEffectCommons.CanPlayAsNewPermanent(card, true, activateClass))
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
                                             cardSources: new List<CardSource> { card },
                                             activateClass: activateClass,
                                             payCost: true,
@@ -116,75 +118,76 @@ namespace DCGO.CardEffects.EX10
                                             root: SelectCardEffect.Root.Hand,
                                             activateETB: true));
 
-                    yield return new WaitForSeconds(0.2f);
+                        yield return new WaitForSeconds(0.2f);
 
-                    #region Delete Digimon Played
+                        #region Delete Digimon Played
 
-                    Permanent playedPermanent = card.PermanentOfThisCard();
+                        Permanent playedPermanent = card.PermanentOfThisCard();
 
-                    ActivateClass activateClass1 = new ActivateClass();
-                    activateClass1.SetUpICardEffect("Delete the Digimon", CanUseCondition2, playedPermanent.TopCard);
-                    activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
-                    activateClass1.SetEffectSourcePermanent(playedPermanent);
-                    playedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
+                        ActivateClass activateClass1 = new ActivateClass();
+                        activateClass1.SetUpICardEffect("Delete the Digimon", CanUseCondition2, playedPermanent.TopCard);
+                        activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
+                        activateClass1.SetEffectSourcePermanent(playedPermanent);
+                        playedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
 
-                    if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(playedPermanent));
-                    }
+                        if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(playedPermanent));
+                        }
 
-                    string EffectDiscription1()
-                    {
-                        return "[End of Your Turn] Delete this Digimon.";
-                    }
+                        string EffectDiscription1()
+                        {
+                            return "[End of Your Turn] Delete this Digimon.";
+                        }
 
-                    bool CanUseCondition2(Hashtable hashtable1)
-                    {
-                        if (CardEffectCommons.IsOwnerTurn(card))
+                        bool CanUseCondition2(Hashtable hashtable1)
                         {
-                            if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(playedPermanent, playedPermanent.TopCard))
+                            if (CardEffectCommons.IsOwnerTurn(card))
                             {
-                                return true;
+                                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(playedPermanent, playedPermanent.TopCard))
+                                {
+                                    return true;
+                                }
                             }
-                        }
 
-                        return false;
-                    }
+                            return false;
+                        }
 
-                    bool CanActivateCondition1(Hashtable hashtable1)
-                    {
-                        if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
+                        bool CanActivateCondition1(Hashtable hashtable1)
                         {
-                            if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
+                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
                             {
-                                return true;
+                                if (!playedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                {
+                                    return true;
+                                }
                             }
-                        }
 
-                        return false;
-                    }
+                            return false;
+                        }
 
-                    IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
-                    {
-                        if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
+                        IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
                         {
-                            yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
-                            new List<Permanent>() { playedPermanent },
-                            CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
+                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(playedPermanent))
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
+                                new List<Permanent>() { playedPermanent },
+                                CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
+                            }
                         }
-                    }
 
-                    ICardEffect GetCardEffect(EffectTiming _timing)
-                    {
-                        if (_timing == EffectTiming.OnEndTurn)
+                        ICardEffect GetCardEffect(EffectTiming _timing)
                         {
-                            return activateClass1;
+                            if (_timing == EffectTiming.OnEndTurn)
+                            {
+                                return activateClass1;
+                            }
+
+                            return null;
                         }
 
-                        return null;
+                        #endregion
                     }
-
-                    #endregion
                 }
             }
 
@@ -306,15 +309,7 @@ namespace DCGO.CardEffects.EX10
             {
                 bool Condition()
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        if (CardEffectCommons.IsOwnerTurn(card))
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsExistOnBattleArea(card);
                 }
 
                 bool CardCondition(CardSource cardSource)
@@ -360,13 +355,13 @@ namespace DCGO.CardEffects.EX10
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanActivateOnDeletion(card) &&
-                           !CardEffectCommons.HasMatchConditionOwnersSecurity(card, FaceUpPurple, false);
+                    return CardEffectCommons.CanActivateOnDeletion(card);                           
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(card, false, true));
+                    if(!CardEffectCommons.HasMatchConditionOwnersSecurity(card, FaceUpPurple, false))
+                        yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(card, false, true));
                 }
             }
 
@@ -391,7 +386,7 @@ namespace DCGO.CardEffects.EX10
                 {
                     return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card)
                         && (CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition) || CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
-                        && !card.IsFlipped;
+                        && CardEffectCommons.GetFaceUpFromHashtable(hashtable);
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)

+ 64 - 67
Assets/CardEffect/EX10/Purple/EX10_058.cs

@@ -118,98 +118,95 @@ namespace DCGO.CardEffects.EX10
 
                     #endregion
 
-                    AddSkillClass addSkillClass = new AddSkillClass();
-                    addSkillClass.SetUpICardEffect("Delete 1 of your Digimon", CanUseCondition1, card);
-                    addSkillClass.SetUpAddSkillClass(cardSourceCondition: CardSourceCondition, getEffects: GetEffects);
-                    selectedPermanent.UntilOwnerTurnEndEffects.Add((_timing) => addSkillClass);
-
-                    bool CanUseCondition1(Hashtable hashtable)
+                    #region Gain Effect
+                    if (selectedPermanent != null)
                     {
-                        return true;
-                    }
+                        ActivateClass activateClass1 = new ActivateClass();
+                        activateClass1.SetUpICardEffect("Delete this Digimon", CanUseCondition1, selectedPermanent.TopCard);
+                        activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
+                        activateClass1.SetEffectSourcePermanent(selectedPermanent);
+                        selectedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
 
-                    bool CardSourceCondition(CardSource cardSource)
-                    {
-                        if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(cardSource.PermanentOfThisCard(),cardSource))
+                        if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
                         {
-                            if (cardSource == cardSource.PermanentOfThisCard().TopCard)
-                            {
-                                return true;
-                            }
+                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(selectedPermanent));
                         }
 
-                        return false;
-                    }
-
-                    List<ICardEffect> GetEffects(CardSource cardSource, List<ICardEffect> cardEffects, EffectTiming _timing)
-                    {
-                        if (_timing == EffectTiming.OnEndTurn)
+                        string EffectDiscription1()
                         {
-                            ActivateClass activateClass1 = new ActivateClass();
-                            activateClass1.SetUpICardEffect("Delete 1 of your Digimon", CanUseCondition2, cardSource);
-                            activateClass1.SetUpActivateClass(CanActivateCondition2, ActivateCoroutine1, -1, false, EffectDiscription1());
-                            activateClass1.SetEffectSourceCard(cardSource);
-                            cardEffects.Add(activateClass1);
+                            return "[End of Your Turn] Delete this Digimon.";
+                        }
 
-                            if (cardSource.PermanentOfThisCard() != null)
+                        bool CanUseCondition1(Hashtable hashtable1)
+                        {
+                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
                             {
-                                activateClass1.SetEffectSourcePermanent(cardSource.PermanentOfThisCard());
+                                if (selectedPermanent.TopCard.Owner.GetBattleAreaDigimons().Contains(selectedPermanent))
+                                {
+                                    if (GManager.instance.turnStateMachine.gameContext.TurnPlayer == selectedPermanent.TopCard.Owner)
+                                    {
+                                        return true;
+                                    }
+                                }
                             }
 
-                            string EffectDiscription1()
+                            return false;
+                        }
+
+                        bool CanActivateCondition1(Hashtable hashtable1)
+                        {
+                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
                             {
-                                return "[End of Your Turn] Delete 1 of your Digimon.";
+                                if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                {
+                                    return true;
+                                }
                             }
 
+                            return false;
+                        }
+
+                        IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
+                        {
                             bool CanSelectPermanentCondition(Permanent permanent)
                             {
-                                return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, cardSource);
+                                return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, selectedPermanent.TopCard);
                             }
 
-                            bool CanUseCondition2(Hashtable hashtable)
+                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                             {
-                                if (CardEffectCommons.IsOwnerTurn(cardSource))
-                                {
-                                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(cardSource))
-                                        return CardSourceCondition(cardSource);
-                                }
-
-                                return false;
+                                int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                                SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                selectPermanentEffect.SetUp(
+                                    selectPlayer: selectedPermanent.TopCard.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());
                             }
+                        }
 
-                            bool CanActivateCondition2(Hashtable hashtable)
+                        ICardEffect GetCardEffect(EffectTiming _timing)
+                        {
+                            if (_timing == EffectTiming.OnEndTurn)
                             {
-                                return CardEffectCommons.IsExistOnBattleAreaDigimon(cardSource);
+                                return activateClass1;
                             }
 
-                            IEnumerator ActivateCoroutine1(Hashtable _hashtable)
-                            {
-                                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                                {
-                                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
-
-                                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                                    selectPermanentEffect.SetUp(
-                                        selectPlayer: cardSource.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());
-                                }
-                            }
+                            return null;
                         }
-
-                        return cardEffects;
                     }
+                    #endregion
                 }
             }
 

+ 6 - 4
Assets/CardEffect/EX10/Purple/EX10_059.cs

@@ -111,7 +111,8 @@ namespace DCGO.CardEffects.EX10
 
                 bool IsOpponentPermament(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card);
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card) &&
+                           !permanent.TopCard.IsOption;
                 }
 
                 bool IsOpponentPermamentWithSources(Permanent permanent)
@@ -323,12 +324,13 @@ namespace DCGO.CardEffects.EX10
 
                 bool IsOpponentPermament(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card);
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card) &&
+                           !permanent.TopCard.IsOption;
                 }
 
                 bool IsOpponentPermamentWithSources(Permanent permanent)
                 {
-                    return IsOpponentPermament(permanent) && permanent.StackCards.Count >= 1;
+                    return IsOpponentPermament(permanent) && permanent.StackCards.Count >= 2;
                 }
 
                 bool IsBagraArmyDigimon(CardSource cardSource)
@@ -501,7 +503,7 @@ namespace DCGO.CardEffects.EX10
 
                                 #endregion
                             }
-                        }                        
+                        }
                     }
                 }
             }

+ 51 - 16
Assets/CardEffect/EX10/Red/EX10_010.cs

@@ -174,33 +174,68 @@ namespace DCGO.CardEffects.EX10
 
             #region All Turns - DP
 
-            if (timing == EffectTiming.OnRemovedField || timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.WhenTopCardTrashed)
+            if (timing == EffectTiming.OnRemovedField || timing == EffectTiming.OnMove || timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.WhenTopCardTrashed)
             {
-                if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("", CanUseCondition, card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, "");
+                activateClass.SetIsBackgroundProcess(true);
+                cardEffects.Add(activateClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if(timing == EffectTiming.OnRemovedField)
+                        return CardEffectCommons.CanTriggerWhenRemoveField(hashtable, card);
+
+                    if (timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.OnMove)
+                        return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+
+                    if (timing == EffectTiming.WhenTopCardTrashed)
+                        return CardEffectCommons.CanTriggerWhenTopCardTrashed(hashtable, x => x == card);
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    Permanent thisPermanent = card.PermanentOfThisCard();
+                    Permanent triggeredPermanent = CardEffectCommons.GetPermanentFromHashtable(hashtable);
 
-                    bool OpponentsPermanent(Permanent permanent)
+                    if(timing == EffectTiming.OnMove)
                     {
-                        return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
-                               permanent.DP >= 13000;
+                        triggeredPermanent = null;
+
+                        if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                        {
+                            triggeredPermanent = card.PermanentOfThisCard();
+                        }
                     }
 
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card) && thisPermanent.TopCard == card)
+                    if(triggeredPermanent != null)
                     {
-                        if (CardEffectCommons.HasMatchConditionPermanent(OpponentsPermanent))
-                            thisPermanent.AddBoost(new Permanent.DPBoost("AT_EX10-010", 3000, null));
+                        bool OpponentsPermanent(Permanent permanent)
+                        {
+                            return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
+                                   permanent.DP >= 13000;
+
+                        }
+                        if (CardEffectCommons.IsExistOnBattleAreaDigimon(card) && triggeredPermanent.TopCard == card)
+                        {
+                            if (CardEffectCommons.HasMatchConditionPermanent(OpponentsPermanent))
+                                triggeredPermanent.AddBoost(new Permanent.DPBoost("AT_EX10-010", 3000, null));
+                            else
+                            {
+                                if (triggeredPermanent.Boosts.Exists(x => x.ID == "AT_EX10-010"))
+                                    triggeredPermanent.RemoveBoost("AT_EX10-010");
+                            }
+                        }
                         else
                         {
-                            if (thisPermanent.Boosts.Exists(x => x.ID == "AT_EX10-010"))
-                                thisPermanent.RemoveBoost("AT_EX10-010");
+                            if (triggeredPermanent.Boosts.Exists(x => x.ID == "AT_EX10-010"))
+                                triggeredPermanent.RemoveBoost("AT_EX10-010");
                         }
                     }
-                    else
-                    {
-                        if (thisPermanent.Boosts.Exists(x => x.ID == "AT_EX10-010")) 
-                            thisPermanent.RemoveBoost("AT_EX10-010");
-                    }
+
+                    yield return null;
                 }
             }
 

+ 7 - 1
Assets/CardEffect/EX10/White/EX10_061.cs

@@ -121,7 +121,13 @@ namespace DCGO.CardEffects.EX10
                         bool noSelect = CanNoSelect(CardEffectCommons.GetCardFromHashtable(_hashtable));
                         List<CardSource> selectedCards = new List<CardSource>();
 
-                        int maxCount = Math.Min(4, card.Owner.SecurityCards.Count(CanSelectSecurityCardCondition));
+                        List<string> cardNames = card.Owner.SecurityCards.Filter(CanSelectSecurityCardCondition)
+                                            .Map(cardSource1 => cardSource1.CardNames)
+                                            .Flat()
+                                            .Distinct()
+                                            .ToList();
+
+                        int maxCount = Math.Min(4, cardNames.Count);
 
                         if (maxCount >= 1)
                         {

+ 17 - 47
Assets/CardEffect/EX10/White/EX10_072.cs

@@ -131,8 +131,6 @@ namespace DCGO.CardEffects.EX10
 
                             yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                            selectCardEffect.SetUseFaceDown();
-
                             IEnumerator SelectCardCoroutine(CardSource cardSource)
                             {
                                 selectedCards.Add(cardSource);
@@ -150,33 +148,32 @@ namespace DCGO.CardEffects.EX10
                                     root: SelectCardEffect.Root.Security,
                                     activateETB: true));
 
+                                #region Delete Played Digimon
                                 Permanent selectedPermanent = selectedCards[0].PermanentOfThisCard();
 
                                 ActivateClass activateClass1 = new ActivateClass();
-                                activateClass1.SetUpICardEffect("Delete this Digimon", CanUseCondition1, selectedPermanent.TopCard);
-                                activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
+                                activateClass1.SetUpICardEffect("Delete this Digimon", CanUseCondition2, card);
+                                activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, "");
                                 activateClass1.SetEffectSourcePermanent(selectedPermanent);
-                                selectedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
-
-                                if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
-                                {
-                                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(selectedPermanent));
-                                }
+                                CardEffectCommons.AddEffectToPlayer(effectDuration: EffectDuration.UntilOwnerTurnEnd, card: card, cardEffect: activateClass1, timing: EffectTiming.OnEndTurn);
 
-                                string EffectDiscription1()
+                                bool CanUseCondition2(Hashtable hashtable)
                                 {
-                                    return "[End of Your Turn] Delete this Digimon.";
+                                    return true;
                                 }
 
-                                bool CanUseCondition1(Hashtable hashtable1)
+                                bool CanActivateCondition1(Hashtable hashtable)
                                 {
-                                    if (CardEffectCommons.IsOpponentTurn(card))
+                                    if (selectedPermanent.TopCard != null)
                                     {
-                                        if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(selectedPermanent, selectedPermanent.TopCard))
+                                        if (selectedPermanent.TopCard.IsDigimon)
                                         {
-                                            if (CardEffectCommons.CanTriggerOnEndAttack(hashtable1, selectedPermanent.TopCard))
+                                            if (selectedPermanent.CanBeDestroyedBySkill(activateClass1))
                                             {
-                                                return true;
+                                                if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass1))
+                                                {
+                                                    return true;
+                                                }
                                             }
                                         }
                                     }
@@ -184,38 +181,11 @@ namespace DCGO.CardEffects.EX10
                                     return false;
                                 }
 
-                                bool CanActivateCondition1(Hashtable hashtable1)
-                                {
-                                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
-                                    {
-                                        if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
-                                        {
-                                            return true;
-                                        }
-                                    }
-
-                                    return false;
-                                }
-
                                 IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
                                 {
-                                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
-                                    {
-                                        yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
-                                        new List<Permanent>() { selectedPermanent },
-                                        CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
-                                    }
-                                }
-
-                                ICardEffect GetCardEffect(EffectTiming _timing)
-                                {
-                                    if (_timing == EffectTiming.OnEndTurn)
-                                    {
-                                        return activateClass1;
-                                    }
-
-                                    return null;
+                                    yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(new List<Permanent>() { selectedPermanent }, CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
                                 }
+                                #endregion
                             }
                         }
                     }
@@ -371,7 +341,7 @@ namespace DCGO.CardEffects.EX10
                             activateClass1.SetUpICardEffect("Delete this Digimon", CanUseCondition2, card);
                             activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, "");
                             activateClass1.SetEffectSourcePermanent(selectedPermanent);
-                            CardEffectCommons.AddEffectToPlayer(effectDuration: EffectDuration.UntilOwnerTurnEnd, card: card, cardEffect: activateClass1, timing: EffectTiming.OnEndTurn);
+                            CardEffectCommons.AddEffectToPlayer(effectDuration: EffectDuration.UntilEachTurnEnd, card: card, cardEffect: activateClass1, timing: EffectTiming.OnEndTurn);
 
                             bool CanUseCondition2(Hashtable hashtable)
                             {

+ 0 - 2
Assets/CardEffect/EX3/Yellow/EX3_029.cs

@@ -79,8 +79,6 @@ namespace DCGO.CardEffects.EX3
 
                                 yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                                selectCardEffect.SetUseFaceDown();
-
                                 IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
                                 {
                                     foreach (CardSource cardSource in cardSources)

+ 0 - 2
Assets/CardEffect/EX5/Yellow/EX5_027.cs

@@ -85,8 +85,6 @@ public class EX5_027 : CEntity_Effect
 
                 yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                selectCardEffect.SetUseFaceDown();
-
                 IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
                 {
                     foreach (CardSource cardSource in cardSources)

+ 0 - 2
Assets/CardEffect/EX6/Yellow/EX6_030.cs

@@ -99,8 +99,6 @@ namespace DCGO.CardEffects.EX6
 
                         yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                        selectCardEffect.SetUseFaceDown();
-
                         IEnumerator SelectCardCoroutine(CardSource cardSource)
                         {
                             selectedCards.Add(cardSource);

+ 0 - 2
Assets/CardEffect/EX6/Yellow/EX6_068.cs

@@ -194,8 +194,6 @@ namespace DCGO.CardEffects.EX6
                         
                         yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                        selectCardEffect.SetUseFaceDown();
-
                         IEnumerator SelectCardCoroutine(CardSource cardSource)
                         {
                             selectedCards.Add(cardSource);

+ 1 - 3
Assets/CardEffect/LM/Yellow/LM_020.cs

@@ -127,14 +127,12 @@ namespace DCGO.CardEffects.LM
                                 canEndNotMax: false,
                                 isShowOpponent: true,
                                 mode: SelectCardEffect.Mode.Custom,
-                                root: SelectCardEffect.Root.Custom,
+                                root: SelectCardEffect.Root.Security,
                                 customRootCardList: card.Owner.Enemy.SecurityCards,
                                 canLookReverseCard: true,
                                 selectPlayer: card.Owner,
                                 cardEffect: activateClass);
 
-                            selectCardEffect.SetIsSecurity();
-                            selectCardEffect.SetUseFaceDown();
                             selectCardEffect.SetUpCustomMessage_ShowCard("Return card to top of deck");
 
                             yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());

+ 39 - 47
Assets/CardEffect/P/Blue/P_117.cs

@@ -14,74 +14,73 @@ namespace DCGO.CardEffects.P
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            #region Your Turn
-
-            ActivateClass activateClass2 = new ActivateClass();
-            activateClass2.SetUpICardEffect("Digivolution Cost -1", CanUseCondition2, card);
-            activateClass2.SetUpActivateClass(CanActivateCondition2, ActivateCoroutine2, 1, false, EffectDiscription2());
-            activateClass2.SetNotShowUI(true);
-            activateClass2.SetIsBackgroundProcess(true);
-            activateClass2.SetHashString("DigivolutionCost-1_P_117");
+            #region Activate Cost Reduciton
+            ActivateClass costReduceClass = new ActivateClass();
+            costReduceClass.SetUpICardEffect("Digivolution Cost -1", CanUseReduceCondition, card);
+            costReduceClass.SetUpActivateClass(CanActivateCostReductionCondition, ActivateCostReductionCoroutine, 2, false, EffectDiscription2());
+            //costReduceClass.SetIsInheritedEffect(true);
+            //costReduceClass.SetNotShowUI(true);
+            //costReduceClass.SetIsBackgroundProcess(true);
+            costReduceClass.SetHashString("DigivolutionCost-1_P_117");
 
             string EffectDiscription2()
             {
                 return "[Your Turn] [Once Per Turn] When this Digimon would digivolve into a Digimon card with the [Free] trait, if you have a Tamer, reduce the digivolution cost by 1.";
             }
 
-            bool CanUseCondition2(Hashtable hashtable)
+            bool CardSourceCondition(CardSource cardSource)
+            {
+                return cardSource.CardTraits.Contains("Free");
+            }
+
+            bool CanUseReduceCondition(Hashtable hashtable)
             {
                 if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
-                    if (CardEffectCommons.IsOwnerTurn(card))
+                    if (CardEffectCommons.CanTriggerWhenPermanentWouldDigivolveOfCard(hashtable, CardSourceCondition, card))
                     {
-                        if (CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
-                        {
-                            List<CardSource> evoRootTops = CardEffectCommons.GetEvoRootTopsFromEnterFieldHashtable(
-                                hashtable,
-                                permanent => permanent.cardSources.Contains(card));
-
-                            if (evoRootTops != null)
-                            {
-                                if (!evoRootTops.Contains(card))
-                                {
-                                    if (card.PermanentOfThisCard().TopCard.EqualsTraits("Free"))
-                                    {
-                                        return true;
-                                    }
-                                }
-                            }
-                        }
+                        return true;
                     }
                 }
 
+
                 return false;
             }
 
-            bool CanActivateCondition2(Hashtable hashtable)
+            bool CanActivateCostReductionCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.IsOwnerTurn(card) &&
-                       CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.IsTamer) &&
-                       CardEffectCommons.IsExistOnBattleArea(card);
+                if (CardEffectCommons.IsOwnerTurn(card))
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return true;
+                    }
+                }
+
+
+                return false;
             }
 
-            IEnumerator ActivateCoroutine2(Hashtable _hashtable)
+            IEnumerator ActivateCostReductionCoroutine(Hashtable _hashtable)
             {
                 yield return null;
             }
 
-            if (timing == EffectTiming.OnEnterFieldAnyone)
+
+
+
+            if (timing == EffectTiming.BeforePayCost)
             {
-                cardEffects.Add(activateClass2);
+                cardEffects.Add(costReduceClass);
             }
+            #endregion
 
-            #region Setup Reduce Cost Class
-
+            #region Cost reduction
             if (timing == EffectTiming.None)
             {
                 ChangeCostClass changeCostClass = new ChangeCostClass();
                 changeCostClass.SetUpICardEffect($"Digivolution Cost -1", CanUseCondition, card);
-                changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => true, isChangePayingCost: () => true);
-
+                changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
                 cardEffects.Add(changeCostClass);
 
                 bool CanUseCondition(Hashtable hashtable)
@@ -92,7 +91,7 @@ namespace DCGO.CardEffects.P
                         {
                             if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.IsTamer))
                             {
-                                if (!card.cEntity_EffectController.isOverMaxCountPerTurn(activateClass2, activateClass2.MaxCountPerTurn))
+                                if (!card.cEntity_EffectController.isOverMaxCountPerTurn(costReduceClass, costReduceClass.MaxCountPerTurn))
                                 {
                                     return true;
                                 }
@@ -111,6 +110,7 @@ namespace DCGO.CardEffects.P
                         {
                             if (PermanentsCondition(targetPermanents))
                             {
+
                                 Cost -= 1;
                             }
                         }
@@ -137,11 +137,6 @@ namespace DCGO.CardEffects.P
                     return targetPermanent == card.PermanentOfThisCard();
                 }
 
-                bool CardSourceCondition(CardSource cardSource)
-                {
-                    return cardSource.EqualsTraits("Free");
-                }
-
                 bool RootCondition(SelectCardEffect.Root root)
                 {
                     return true;
@@ -152,9 +147,6 @@ namespace DCGO.CardEffects.P
                     return true;
                 }
             }
-
-            #endregion
-
             #endregion
 
             if (timing == EffectTiming.OnAllyAttack)

+ 3 - 1
Assets/CardEffect/P/Red/P_152.cs

@@ -89,7 +89,9 @@ namespace DCGO.CardEffects.P
 
                 bool DigivolutionCondition(CardSource source)
                 {
-                    return source.EqualsTraits("Xros Heart");
+                    return !source.IsDigiEgg &&
+                           source.HasPlayCost &&
+                           source.EqualsTraits("Xros Heart");
                 }
 
                 bool CanUseCondition(Hashtable hashtable)

+ 1 - 0
Assets/CardEffect/P/Red/P_189.cs

@@ -39,6 +39,7 @@ namespace DCGO.CardEffects.P
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
                     return (cardSource.ContainsTraits("Liberator") || cardSource.ContainsTraits("LIBERATOR")) &&
+                           !cardSource.IsDigiEgg &&
                            cardSource.HasPlayCost && cardSource.GetCostItself <= 4;
                 }
 

+ 0 - 2
Assets/CardEffect/P/Yellow/P_122.cs

@@ -89,8 +89,6 @@ public class P_122 : CEntity_Effect
 
                 yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                selectCardEffect.SetUseFaceDown();
-
                 IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
                 {
                     foreach (CardSource cardSource in cardSources)

+ 0 - 2
Assets/CardEffect/ST10/Yellow/ST10_06.cs

@@ -251,8 +251,6 @@ public class ST10_06 : CEntity_Effect
 
                         yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
 
-                        selectCardEffect.SetUseFaceDown();
-
                         IEnumerator SelectCardCoroutine(CardSource cardSource)
                         {
                             selectedCards.Add(cardSource);

+ 3 - 0
Assets/Scripts/CardController.cs

@@ -3515,7 +3515,9 @@ public class ISecurityCheck
                     {
                         List<SkillInfo> triggeredSkillInfos = new List<SkillInfo>();
 
+                        
                         CardSource brokenSecurityCard = player.SecurityCards[0];
+                        bool isFaceDown = brokenSecurityCard.IsFlipped;
 
                         Hashtable hashtable = new Hashtable()
                             {
@@ -3565,6 +3567,7 @@ public class ISecurityCheck
                             {
                                 Hashtable hashtable1 = new Hashtable();
                                 hashtable1.Add("Card", brokenSecurityCard);
+                                hashtable1.Add("isFaceDown", isFaceDown);
 
                                 if (cardEffect.CanUse(hashtable1))
                                 {

+ 19 - 0
Assets/Scripts/CardEffectCommons/GetFromHashtable.cs

@@ -333,6 +333,25 @@ public partial class CardEffectCommons
 
     #endregion
 
+    #region Get Is Face Up from hashtable
+    public static CardSource GetFaceUpFromHashtable(Hashtable hashtable)
+    {
+        if (hashtable != null)
+        {
+            if (hashtable.ContainsKey("isFaceDown"))
+            {
+                if (hashtable["isFaceDown"] is bool)
+                {
+                    return (CardSource)hashtable["isFaceDown"];
+                }
+            }
+        }
+
+        return null;
+    }
+
+    #endregion
+
     #region Get battle info from hashtable
     public static IBattle GetBattleFromHashtable(Hashtable hashtable)
     {

+ 1 - 1
Assets/Scripts/CardEffectCommons/KeyWordEffects/Collision.cs

@@ -34,7 +34,7 @@ public partial class CardEffectCommons
             return false;
         }
 
-        ActivateClass collision = CardEffectFactory.CollisionSelfStaticEffect(false, card, CanUseCondition);
+        ActivateClass collision = CardEffectFactory.CollisionSelfStaticEffect(false, targetPermanent.TopCard, CanUseCondition);
 
         AddEffectToPermanent(targetPermanent: targetPermanent, effectDuration: effectDuration, card: card, cardEffect: collision, timing: EffectTiming.OnCounterTiming);
 

+ 2 - 2
Assets/Scripts/CardEffectCommons/TrashDigivolutionCards.cs

@@ -57,7 +57,7 @@ public partial class CardEffectCommons
         int digivolutionDiscardedCount = 0;
 
         void EndSelection() => digivolutionDiscardedCount = maxDigivolutionDiscardCount;
-        bool NotSelectYet() => digivolutionDiscardedCount <= maxDigivolutionDiscardCount;
+        bool NotSelectYet() => digivolutionDiscardedCount == 0;
 
         int permanentSelectedCount = 0;
 
@@ -179,7 +179,7 @@ public partial class CardEffectCommons
                 {
                     if (permanents.Count == 0)
                     {
-                        if (canNoTrash && NotSelectYet())
+                        if ((canNoTrash && NotSelectYet()) || canEndNotMax)
                         {
                             EndSelection();
                         }

+ 11 - 8
Assets/Scripts/CheckCardPanel.cs

@@ -282,18 +282,21 @@ public class CheckCardPanel : MonoBehaviour
 
         yield return new WaitForSeconds(Time.deltaTime * 0.2f);
 
-        foreach (HandCard handCard in handCards)
+        if (GManager.instance.turnStateMachine.gameContext.TurnPlayer.isYou)
         {
-            if (handCard.cardSource.Owner != GManager.instance.turnStateMachine.gameContext.TurnPlayer)
-                continue;
-
-            if (handCard.cardSource.CanDeclareSkill)
+            foreach (HandCard handCard in handCards)
             {
-                handCard.SetOrangeOutline();
+                if (handCard.cardSource.Owner != GManager.instance.turnStateMachine.gameContext.TurnPlayer)
+                    continue;
+
+                if (handCard.cardSource.CanDeclareSkill)
+                {
+                    handCard.SetOrangeOutline();
 
-                handCard.AddClickTarget(OnClickHandCard);
+                    handCard.AddClickTarget(OnClickHandCard);
+                }
             }
-        }
+        }        
     }
 
     public void OnClickHandCard(HandCard handCard)

+ 40 - 38
Assets/Scripts/SelectCardEffect.cs

@@ -219,52 +219,45 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
     {
         List<CardSource> RootCardList = new List<CardSource>();
 
-        switch (_root)
+        if (_customRootCardList.Count > 0)
         {
-            case Root.Library:
-                if (_customRootCardList.Count > 0)
-                {
-                    foreach (CardSource cardSource in _customRootCardList)
+            foreach (CardSource cardSource in _customRootCardList)
+            {
+                RootCardList.Add(cardSource);
+            }
+        }
+        else
+        {
+            switch (_root)
+            {
+                case Root.Library:
+                    foreach (CardSource cardSource in _selectPlayer.LibraryCards)
                     {
                         RootCardList.Add(cardSource);
                     }
-                }
-                else
-                {
-                    foreach (CardSource cardSource in _selectPlayer.LibraryCards)
+                    break;
+
+                case Root.Trash:
+                    foreach (CardSource cardSource in _selectPlayer.TrashCards)
                     {
                         RootCardList.Add(cardSource);
                     }
-                }
-                break;
-
-            case Root.Trash:
-                foreach (CardSource cardSource in _selectPlayer.TrashCards)
-                {
-                    RootCardList.Add(cardSource);
-                }
-                break;
-
-            case Root.Security:
-                foreach (CardSource cardSource in _selectPlayer.SecurityCards)
-                {
-                    RootCardList.Add(cardSource);
-                }
-                break;
+                    break;
 
-            case Root.Recollection:
-                foreach (CardSource cardSource in _selectPlayer.LostCards)
-                {
-                    RootCardList.Add(cardSource);
-                }
-                break;
+                case Root.Security:
+                    foreach (CardSource cardSource in _selectPlayer.SecurityCards)
+                    {
+                        RootCardList.Add(cardSource);
+                    }
+                    break;
 
-            case Root.Custom:
-                foreach (CardSource cardSource in _customRootCardList)
-                {
-                    RootCardList.Add(cardSource);
-                }
-                break;
+                case Root.Recollection:
+                    foreach (CardSource cardSource in _selectPlayer.LostCards)
+                    {
+                        RootCardList.Add(cardSource);
+                    }
+                    break;
+            }
         }
 
         return RootCardList;
@@ -312,6 +305,12 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                 if (_root == Root.Library)
                     SetUseFaceDown();
 
+                if(_root == Root.Security)
+                {
+                    if (_canLookReverseCard)
+                        SetUseFaceDown();
+                }
+
                 return true;
             }
         }
@@ -746,7 +745,10 @@ public class SelectCardEffect : MonoBehaviourPunCallbacks
                         }
                         else if (CardEffectCommons.IsExistLinked(cardSource))
                         {
-                            yield return ContinuousController.instance.StartCoroutine(cardSource.PermanentOfThisCard().RemoveLinkedCard(cardSource));
+                            yield return ContinuousController.instance.StartCoroutine(new ITrashLinkCards(
+                                cardSource.PermanentOfThisCard(),
+                                new List<CardSource> { cardSource },
+                                _cardEffect).TrashLinkCards());
                         }
                         else
                             yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddTrashCard(cardSource));

+ 1 - 1
ProjectSettings/ProjectSettings.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:e3141463690c012365481ffd15c624c1f5fecb525e9a2121cd885b0ba496908a
+oid sha256:e55fd404985df15d4e2793640d49776f418e427d71e3cdf68f05209277041262
 size 20167