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

Merge branch 'Release-Updates' into EX8

mbunch_kascope 1 год назад
Родитель
Сommit
5695ad22ee
98 измененных файлов с 1273 добавлено и 1124 удалено
  1. 1 1
      Assets/CardBaseEntity/BT18/Red/Digimon/EmperorGreymon-BT18-018.asset
  2. 1 1
      Assets/CardBaseEntity/BT18/Red/Digimon/EmperorGreymon-BT18-018_P1.asset
  3. 1 1
      Assets/CardBaseEntity/BT18/Yellow/Digimon/MagnaGarurumon-BT18-042.asset
  4. 1 1
      Assets/CardBaseEntity/BT18/Yellow/Digimon/MagnaGarurumon-BT18-042_P1.asset
  5. 1 1
      Assets/CardEffect/BT10/Black/Blustmon_BT10_070.cs
  6. 1 1
      Assets/CardEffect/BT11/Black/DGDimensions_BT11_108.cs
  7. 1 6
      Assets/CardEffect/BT17/Red/Agunimon_BT17_011.cs
  8. 1 1
      Assets/CardEffect/BT17/Red/AncientGuardianDeity_BT17_094.cs
  9. 3 4
      Assets/CardEffect/BT17/Red/TaiKamiyaAndMattIshida_BT17_081.cs
  10. 68 61
      Assets/CardEffect/BT18/Black/Machinedramon_BT18_073.cs
  11. 4 15
      Assets/CardEffect/BT18/Black/Snatchmon_BT18_065.cs
  12. 6 1
      Assets/CardEffect/BT18/Black/Vemmon_BT18_060.cs
  13. 23 43
      Assets/CardEffect/BT18/Blue/AncientMegatheriummon_BT18_028.cs
  14. 33 31
      Assets/CardEffect/BT18/Blue/TommyHimi_BT18_089.cs
  15. 62 27
      Assets/CardEffect/BT18/Green/AncientKazemon_BT18_054.cs
  16. 25 8
      Assets/CardEffect/BT18/Purple/Duskmon_BT18_078.cs
  17. 2 1
      Assets/CardEffect/BT18/Purple/LucemonChaosMode_BT18_082.cs
  18. 45 7
      Assets/CardEffect/BT18/Purple/LucemonSatanMode_BT18_101.cs
  19. 10 1
      Assets/CardEffect/BT18/Purple/Rhihimon_BT18_081.cs
  20. 1 6
      Assets/CardEffect/BT18/Purple/Velgrmon_BT18_079.cs
  21. 34 17
      Assets/CardEffect/BT18/Purple/Zanbamon_BT18_085.cs
  22. 2 7
      Assets/CardEffect/BT18/Red/EmperorGreymon_BT18_018.cs
  23. 1 1
      Assets/CardEffect/BT18/Red/Kimeramon_BT18_015.cs
  24. 8 17
      Assets/CardEffect/BT18/Red/Millenniummon_BT18_019.cs
  25. 39 66
      Assets/CardEffect/BT18/Red/WindtoFlameIcetoSword_BT18_095.cs
  26. 4 2
      Assets/CardEffect/BT18/White/LucemonLarva_BT18_086.cs
  27. 1 1
      Assets/CardEffect/BT18/White/Susanoomon_BT18_102.cs
  28. 2 2
      Assets/CardEffect/BT18/Yellow/Candlemon_BT18_030.cs
  29. 38 7
      Assets/CardEffect/BT18/Yellow/DarktoLightThundertoGunfire_BT18_097.cs
  30. 2 7
      Assets/CardEffect/BT18/Yellow/MagnaGarurumon_BT18_042.cs
  31. 1 1
      Assets/CardEffect/BT18/Yellow/MetalEtemon_BT18_041.cs
  32. 7 0
      Assets/CardEffect/BT18/Yellow/Mistymon_BT18_039.cs
  33. 1 1
      Assets/CardEffect/BT18/Yellow/Patamon_BT18_033.cs
  34. 4 4
      Assets/CardEffect/BT18/Yellow/Wizardmon_BT18_036.cs
  35. 2 18
      Assets/CardEffect/BT19/Black/DarkKnightmon_BT19_063.cs
  36. 1 1
      Assets/CardEffect/BT19/Black/Machinedramon_BT19_065.cs
  37. 29 26
      Assets/CardEffect/BT19/Black/Monitamon_BT19_055.cs
  38. 1 1
      Assets/CardEffect/BT19/Blue/Puyoyomon_BT19_002.cs
  39. 3 4
      Assets/CardEffect/BT19/Green/QueenBeemon_BT19_053.cs
  40. 5 4
      Assets/CardEffect/BT19/Green/Winr_BT19_084.cs
  41. 0 6
      Assets/CardEffect/BT19/Purple/LordKnightmonXAntibody_BT19_073.cs
  42. 2 2
      Assets/CardEffect/BT19/Purple/MoonMillenniummon_BT19_075.cs
  43. 248 172
      Assets/CardEffect/BT19/Purple/TheWickedGodDescends_BT19_099.cs
  44. 2 2
      Assets/CardEffect/BT19/Yellow/DynasmonXAntibody_BT19_042.cs
  45. 27 19
      Assets/CardEffect/BT19/Yellow/LucemonXAntibody_BT19_043.cs
  46. 22 18
      Assets/CardEffect/BT19/Yellow/SeventhDivineCruz_BT19_094.cs
  47. 22 31
      Assets/CardEffect/BT19/Yellow/WizardmonXAntibody_BT19_036.cs
  48. 2 1
      Assets/CardEffect/BT3/Blue/DesperadeBluster_BT3_100.cs
  49. 1 1
      Assets/CardEffect/BT6/Blue/Gabumon_BT6_019.cs
  50. 1 1
      Assets/CardEffect/BT6/Blue/IshidaYamato_BT6_088.cs
  51. 1 1
      Assets/CardEffect/BT6/Red/Agumon_BT6_007.cs
  52. 1 1
      Assets/CardEffect/BT6/Red/YagamiTaichi_BT6_087.cs
  53. 1 1
      Assets/CardEffect/BT7/Purple/DeadOrAlive_BT7_109.cs
  54. 1 4
      Assets/CardEffect/EX1/Blue/Gomamon_EX1_012.cs
  55. 3 1
      Assets/CardEffect/EX4/Red/Medivaldukemon_EX4_013.cs
  56. 1 1
      Assets/CardEffect/EX5/Green/DufutomonXAntibody_EX5_043.cs
  57. 1 1
      Assets/CardEffect/EX6/Black/BryweLudramon_EX6_044.cs
  58. 6 15
      Assets/CardEffect/EX6/Black/Keramon_EX6_036.cs
  59. 5 2
      Assets/CardEffect/EX6/Black/Kurisarimon_EX6_039.cs
  60. 2 2
      Assets/CardEffect/EX6/Black/RaijiLudomon_EX6_042.cs
  61. 1 5
      Assets/CardEffect/EX6/Purple/Barbamon_EX6_059.cs
  62. 1 1
      Assets/CardEffect/EX6/Purple/Lucemon_Chaos_Mode_EX6_054.cs
  63. 1 1
      Assets/CardEffect/EX6/Purple/Ogudomon_EX6_073.cs
  64. 6 10
      Assets/CardEffect/EX6/White/Mega_Digimon_Assembly_EX6_072.cs
  65. 1 1
      Assets/CardEffect/EX6/White/UltimateChaosmon_EX6_062.cs
  66. 2 9
      Assets/CardEffect/EX7/Black/Gundramon_EX7_048.cs
  67. 48 40
      Assets/CardEffect/LM/Black/BlackScramble_LM_031.cs
  68. 1 0
      Assets/CardEffect/LM/Black/CyberdramonAce_LM_025.cs
  69. 1 6
      Assets/CardEffect/LM/Black/SepiaMemoryBoost_LM_037.cs
  70. 48 53
      Assets/CardEffect/LM/Blue/BlueScramble_LM_028.cs
  71. 1 0
      Assets/CardEffect/LM/Blue/Thetismon_LM_004.cs
  72. 1 6
      Assets/CardEffect/LM/Blue/WisteriaMemoryBoost_LM_034.cs
  73. 1 1
      Assets/CardEffect/LM/Green/Chamblemon_LM_010.cs
  74. 48 53
      Assets/CardEffect/LM/Green/GreenScramble_LM_030.cs
  75. 1 6
      Assets/CardEffect/LM/Green/JadeMemoryBoost_LM_036.cs
  76. 1 6
      Assets/CardEffect/LM/Purple/GrapeMemoryBoost_LM_038.cs
  77. 2 1
      Assets/CardEffect/LM/Purple/MegidramonAce_LM_026.cs
  78. 49 54
      Assets/CardEffect/LM/Purple/PurpleScramble_LM_032.cs
  79. 1 6
      Assets/CardEffect/LM/Red/GarnetMemoryBoost_LM_033.cs
  80. 48 53
      Assets/CardEffect/LM/Red/RedScramble_LM_027.cs
  81. 1 6
      Assets/CardEffect/LM/Yellow/AmberMemoryBoost_LM_035.cs
  82. 2 5
      Assets/CardEffect/LM/Yellow/Quantumon_LM_020.cs
  83. 48 53
      Assets/CardEffect/LM/Yellow/YellowScramble_LM_029.cs
  84. 1 1
      Assets/CardEffect/P/White/FuturePotential_P_156.cs
  85. 5 2
      Assets/CardEffect/P/White/JeriFake_P_158.cs
  86. 2 2
      Assets/CardEffect/RB1/White/AmanokawaHokuto_RB1_035.cs
  87. 1 0
      Assets/CardEffect/ST14/Purple/BelzebmonBlastMode_ST14_10.cs
  88. 36 0
      Assets/Scenes/ContinuousControllerScene.unity
  89. 14 0
      Assets/Scripts/AutoProcessing.cs
  90. 6 1
      Assets/Scripts/CardController.cs
  91. 18 7
      Assets/Scripts/CardEffectCommons.cs
  92. 13 10
      Assets/Scripts/CardEffectCommons/KeyWordEffects/Overclock.cs
  93. 32 24
      Assets/Scripts/CardEffectFactory/KeyWordEffects/BlastDNADigivolution.cs
  94. 2 1
      Assets/Scripts/CardEffectFactory/KeyWordEffects/BlastDigivolution.cs
  95. 1 5
      Assets/Scripts/Permanent.cs
  96. 2 5
      Assets/Scripts/PlayLog.cs
  97. 0 1
      Assets/Scripts/TurnStateMachine.cs
  98. 2 2
      ProjectSettings/ProjectSettings.asset

+ 1 - 1
Assets/CardBaseEntity/BT18/Red/Digimon/EmperorGreymon-BT18-018.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:1f3f6cd4dd988e979e13b7e9681beb35a1d1389ff2d5f3df23d45c2c65785c55
+oid sha256:e1ec8115e778fd61b218153501a948d9c1cced1f65c65cd9578fea021b5e6ad4
 size 1650

+ 1 - 1
Assets/CardBaseEntity/BT18/Red/Digimon/EmperorGreymon-BT18-018_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:30575e26db0e45e97686307b4af87f640afb7d6a3aa2664b3541cee54939ea26
+oid sha256:078e5b86b37c26319d7d6894c829d533b65a6ac846d01de1e507dc626874814a
 size 1656

+ 1 - 1
Assets/CardBaseEntity/BT18/Yellow/Digimon/MagnaGarurumon-BT18-042.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:bbd9dfab4943396bb10448d944f390a9ec222b3db04295002080cb81dd5badac
+oid sha256:6592cda79f0890aa5590d139f210ef3544f259fe70932d2b09ea099be80613c3
 size 1656

+ 1 - 1
Assets/CardBaseEntity/BT18/Yellow/Digimon/MagnaGarurumon-BT18-042_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:e67285afc068ccd4c0275a5644dfa7854d8afaf0d4a6b49311604810d9b52f51
+oid sha256:f3e1b1513562ea3435951e237880737000f549a4e04e9b8a69b00b653529beb3
 size 1662

+ 1 - 1
Assets/CardEffect/BT10/Black/Blustmon_BT10_070.cs

@@ -24,7 +24,7 @@ public class Blustmon_BT10_070 : CEntity_Effect
             {
                 if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
-                    if (card.PermanentOfThisCard().DigivolutionCards.Count == 3)
+                    if (card.PermanentOfThisCard().DigivolutionCards.Count >= 3)
                     {
                         return true;
                     }

+ 1 - 1
Assets/CardEffect/BT11/Black/DGDimensions_BT11_108.cs

@@ -99,7 +99,7 @@ public class DGDimensions_BT11_108 : CEntity_Effect
                 {
                     if (permanent.CanSelectBySkill(activateClass))
                     {
-                        if (permanent.TopCard.GetCostItself <= 6)
+                        if (permanent.TopCard.HasPlayCost && permanent.TopCard.GetCostItself <= 6)
                         {
                             return true;
                         }

+ 1 - 6
Assets/CardEffect/BT17/Red/Agunimon_BT17_011.cs

@@ -15,11 +15,6 @@ namespace DCGO.CardEffects.BT17
             // Takuya Kanbara
             if (timing == EffectTiming.None)
             {
-                bool Condition()
-                {
-                    return card.Owner.HandCards.Contains(card);
-                }
-
                 bool PermanentCondition(Permanent targetPermanent)
                 {
                     return targetPermanent.TopCard.EqualsCardName("Takuya Kanbara") ||
@@ -28,7 +23,7 @@ namespace DCGO.CardEffects.BT17
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
                     permanentCondition: PermanentCondition, digivolutionCost: 2, ignoreDigivolutionRequirement: false,
-                    card: card, condition: Condition));
+                    card: card, condition: null));
             }
 
             // BurningGreymon

+ 1 - 1
Assets/CardEffect/BT17/Red/AncientGuardianDeity_BT17_094.cs

@@ -95,7 +95,7 @@ namespace DCGO.CardEffects.BT17
                             canTargetCondition: CanSelectTrashCardCondition,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
-                            canNoSelect: () => false,
+                            canNoSelect: () => true,
                             selectCardCoroutine: null,
                             afterSelectCardCoroutine: null,
                             message: "Select 1 Digimon card with the Hybrid or Ten Warriors trait to add to your hand.",

+ 3 - 4
Assets/CardEffect/BT17/Red/TaiKamiyaAndMattIshida_BT17_081.cs

@@ -33,12 +33,12 @@ namespace DCGO.CardEffects.BT17
 
                 bool IsGreymonPermanentCondition(Permanent permanent)
                 {
-                    return permanent.IsDigimon && permanent.TopCard.ContainsCardName("Greymon");
+                    return permanent.IsDigimon && permanent.TopCard.HasGreymonName;
                 }
 
                 bool IsGarurumonPermanentCondition(Permanent permanent)
                 {
-                    return permanent.IsDigimon && permanent.TopCard.ContainsCardName("Garurumon");
+                    return permanent.IsDigimon && permanent.TopCard.HasGarurumonName;
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
@@ -61,8 +61,7 @@ namespace DCGO.CardEffects.BT17
                     {
                         if (CardEffectCommons.CanActivateSuspendCostEffect(card))
                         {
-                            return CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsGreymonPermanentCondition) ||
-                                   CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsGarurumonPermanentCondition);
+                           return true;
                         }
                     }
 

+ 68 - 61
Assets/CardEffect/BT18/Black/Machinedramon_BT18_073.cs

@@ -59,15 +59,7 @@ namespace DCGO.CardEffects.BT18
 
                 bool CardCondition(CardSource cardSource)
                 {
-                    if (cardSource == card)
-                    {
-                        if (CardEffectCommons.IsExistOnHand(cardSource))
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return (cardSource == card);
                 }
 
                 bool CanNoSelect(CardSource cardSource)
@@ -90,15 +82,7 @@ namespace DCGO.CardEffects.BT18
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnHand(card))
-                    {
-                        if (CardEffectCommons.HasMatchConditionPermanent(HasCompositeTraitInPlay))
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.HasMatchConditionPermanent(HasCompositeTraitInPlay);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
@@ -155,12 +139,7 @@ namespace DCGO.CardEffects.BT18
                                 {
                                     if (PermanentsCondition(targetPermanents))
                                     {
-                                        int targetCost = 0;
-
-                                        if (CardEffectCommons.HasMatchConditionPermanent(HasCompositeTraitInPlay))
-                                            targetCost += 4;
-
-                                        Cost -= targetCost;
+                                        Cost -= 4;
                                     }
                                 }
                             }
@@ -219,16 +198,13 @@ namespace DCGO.CardEffects.BT18
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (card.Owner.HandCards.Contains(card))
-                    {
-                        ICardEffect activateClass = card.EffectList(EffectTiming.BeforePayCost).Find(cardEffect => cardEffect.EffectName == "Delete 1 of your [Composite] trait digimon to get Play Cost -4");
+                    ICardEffect activateClass = card.EffectList(EffectTiming.BeforePayCost).Find(cardEffect => cardEffect.EffectName == "Delete 1 of your [Composite] trait digimon to get Play Cost -4");
 
-                        if (activateClass != null)
+                    if (activateClass != null)
+                    {
+                        if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, HasCompositeTraitInPlay))
                         {
-                            if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, HasCompositeTraitInPlay))
-                            {
-                                return true;
-                            }
+                            return true;
                         }
                     }
 
@@ -402,7 +378,7 @@ namespace DCGO.CardEffects.BT18
 
                 bool HasKimeramon(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(permanent) &&
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
                            permanent.TopCard.EqualsCardName("Kimeramon");
                 }
 
@@ -596,9 +572,8 @@ namespace DCGO.CardEffects.BT18
 
                 bool CanSelectPermanentCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) && 
-                           permanent.TopCard.EqualsTraits("Composite") &&
-                           permanent.TopCard.EqualsTraits("Wicked God");
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
+                           (permanent.TopCard.EqualsTraits("Composite") || permanent.TopCard.EqualsTraits("Wicked God"));
                 }
 
                 bool PermanentCondition(Permanent permanent)
@@ -627,7 +602,7 @@ namespace DCGO.CardEffects.BT18
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
                         if (GManager.instance.attackProcess.IsAttacking)
                         {
@@ -643,35 +618,67 @@ namespace DCGO.CardEffects.BT18
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(GManager.instance.attackProcess.AttackingPermanent, card))
+                        {
+                            if (GManager.instance.attackProcess.IsAttacking)
+                            {
+                                if (GManager.instance.attackProcess.AttackingPermanent.CanSwitchAttackTarget)
+                                {
+                                    List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
+                        {
+                            new SelectionElement<bool>(message: $"Switch", value : true, spriteIndex: 0),
+                            new SelectionElement<bool>(message: $"Not switch", value : false, spriteIndex: 1),
+                        };
 
-                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+                                    string selectPlayerMessage = "Will you switch the attack target?";
+                                    string notSelectPlayerMessage = "The opponent is selecting whether to switch the attack target.";
 
-                    selectPermanentEffect.SetUp(
-                        selectPlayer: card.Owner,
-                        canTargetCondition: CanSelectPermanentCondition,
-                        canTargetCondition_ByPreSelecetedList: null,
-                        canEndSelectCondition: null,
-                        maxCount: maxCount,
-                        canNoSelect: false,
-                        canEndNotMax: false,
-                        selectPermanentCoroutine: SelectPermanentCoroutine,
-                        afterSelectPermanentCoroutine: null,
-                        mode: SelectPermanentEffect.Mode.Custom,
-                        cardEffect: activateClass);
+                                    GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
 
-                    selectPermanentEffect.SetUpCustomMessage(
-                        "Select 1 Digimon to switch the attack to.",
-                        "The opponent is selecting 1 Digimon to switch the attack to.");
+                                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
 
-                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                                    bool doSwitch = GManager.instance.userSelectionManager.SelectedBoolValue;
 
-                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.attackProcess.SwitchDefender(
-                        activateClass,
-                        false,
-                        permanent));
+
+
+                                    if (doSwitch)
+                                    {
+                                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                        selectPermanentEffect.SetUp(
+                                            selectPlayer: card.Owner,
+                                            canTargetCondition: CanSelectPermanentCondition,
+                                            canTargetCondition_ByPreSelecetedList: null,
+                                            canEndSelectCondition: null,
+                                            maxCount: maxCount,
+                                            canNoSelect: false,
+                                            canEndNotMax: false,
+                                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                                            afterSelectPermanentCoroutine: null,
+                                            mode: SelectPermanentEffect.Mode.Custom,
+                                            cardEffect: activateClass);
+
+                                        selectPermanentEffect.SetUpCustomMessage(
+                                            "Select 1 Digimon to switch the attack to.",
+                                            "The opponent is selecting 1 Digimon to switch the attack to.");
+
+                                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                                        {
+                                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.attackProcess.SwitchDefender(
+                                            activateClass,
+                                            false,
+                                            permanent));
+                                        }
+                                    }
+                                }
+                            }
+                        }
                     }
                 }
             }

+ 4 - 15
Assets/CardEffect/BT18/Black/Snatchmon_BT18_065.cs

@@ -154,18 +154,7 @@ namespace DCGO.CardEffects.BT18
 
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
-                    if (cardSource.HasText("Vemmon"))
-                    {
-                        if (cardSource.IsDigimon)
-                        {
-                            if (cardSource.HasLevel && cardSource.Level == 5)
-                            {
-                                return true;
-                            }
-                        }
-                    }
-
-                    return false;
+                    return (cardSource.IsDigimon && cardSource.HasText("Vemmon"));
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
@@ -199,16 +188,16 @@ namespace DCGO.CardEffects.BT18
                     {
                         if (!permanent.TopCard.EqualsCardName("Vemmon"))
                         {
-                            return false;
+                            return true;
                         }
                     }
 
-                    return true;
+                    return false;
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.HasMatchConditionOwnersPermanent(card, CanSelectPermanentCondition1);
+                    return CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition1) == 0;
                 }
 
                 int GetCount(CardSource cardSource)

+ 6 - 1
Assets/CardEffect/BT18/Black/Vemmon_BT18_060.cs

@@ -17,7 +17,7 @@ namespace DCGO.CardEffects.BT18
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Reveal the top 3 cards of deck", CanUseCondition, card);
-                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -63,6 +63,11 @@ namespace DCGO.CardEffects.BT18
                     return false;
                 }
 
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                }
+
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
                     CardSource tuckedCard = null;

+ 23 - 43
Assets/CardEffect/BT18/Blue/AncientMegatheriummon_BT18_028.cs

@@ -123,30 +123,20 @@ namespace DCGO.CardEffects.BT18
                             targetPermanent: selectedPermanent,
                             trashCount: 2,
                             isFromTop: false,
-                            activateClass: activateClass));
-
-                        if (!selectedPermanent.HasNoDigivolutionCards) continue;
-
-                        CanNotSuspendClass canNotSuspendClass = new CanNotSuspendClass();
-                        canNotSuspendClass.SetUpICardEffect("Can't Suspend", CanUseCanNotSuspendCondition, card);
-                        canNotSuspendClass.SetUpCanNotSuspendClass(PermanentCondition: PermanentCanNotSuspendCondition);
-                        selectedPermanent.UntilOwnerTurnEndEffects.Add(_ => canNotSuspendClass);
-
-                        if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
-                        {
-                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>()
-                                .CreateDebuffEffect(selectedPermanent));
-                        }
+                            activateClass: activateClass));    
+                    }
 
-                        bool CanUseCanNotSuspendCondition(Hashtable hashtableCanNotSuspend)
-                        {
-                            return selectedPermanent.TopCard != null && !selectedPermanent.TopCard.CanNotBeAffected(activateClass);
-                        }
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotSuspendPlayerEffect(
+                        permanentCondition: PermanentCanNotSuspendCondition,
+                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                        activateClass: activateClass,
+                        isOnlyActivePhase: false,
+                        effectName: "Can't Suspend"));
 
-                        bool PermanentCanNotSuspendCondition(Permanent permanentCanNotSuspend)
-                        {
-                            return permanentCanNotSuspend == selectedPermanent;
-                        }
+                    bool PermanentCanNotSuspendCondition(Permanent permanentCanNotSuspend)
+                    {
+                        return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanentCanNotSuspend,card) &&
+                               !permanentCanNotSuspend.HasNoDigivolutionCards;
                     }
                 }
             }
@@ -182,29 +172,19 @@ namespace DCGO.CardEffects.BT18
                             trashCount: 2,
                             isFromTop: false,
                             activateClass: activateClass));
+                    }
 
-                        if (!selectedPermanent.HasNoDigivolutionCards) continue;
-
-                        CanNotSuspendClass canNotSuspendClass = new CanNotSuspendClass();
-                        canNotSuspendClass.SetUpICardEffect("Can't Suspend", CanUseCanNotSuspendCondition, card);
-                        canNotSuspendClass.SetUpCanNotSuspendClass(PermanentCondition: PermanentCanNotSuspendCondition);
-                        selectedPermanent.UntilOwnerTurnEndEffects.Add(_ => canNotSuspendClass);
-
-                        if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
-                        {
-                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>()
-                                .CreateDebuffEffect(selectedPermanent));
-                        }
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotSuspendPlayerEffect(
+                        permanentCondition: PermanentCanNotSuspendCondition,
+                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                        activateClass: activateClass,
+                        isOnlyActivePhase: false,
+                        effectName: "Can't Suspend"));
 
-                        bool CanUseCanNotSuspendCondition(Hashtable hashtableCanNotSuspend)
-                        {
-                            return selectedPermanent.TopCard != null && !selectedPermanent.TopCard.CanNotBeAffected(activateClass);
-                        }
-
-                        bool PermanentCanNotSuspendCondition(Permanent permanentCanNotSuspend)
-                        {
-                            return permanentCanNotSuspend == selectedPermanent;
-                        }
+                    bool PermanentCanNotSuspendCondition(Permanent permanentCanNotSuspend)
+                    {
+                        return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanentCanNotSuspend, card) &&
+                               !permanentCanNotSuspend.HasNoDigivolutionCards;
                     }
                 }
             }

+ 33 - 31
Assets/CardEffect/BT18/Blue/TommyHimi_BT18_089.cs

@@ -94,6 +94,7 @@ namespace DCGO.CardEffects.BT18
                 activateClass.SetUpICardEffect("Trash bottom digivolution card", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDescription());
                 activateClass.SetIsInheritedEffect(true);
+                activateClass.SetHashString("WhenAttacking_BT18-089");
                 cardEffects.Add(activateClass);
 
                 string EffectDescription()
@@ -114,44 +115,45 @@ namespace DCGO.CardEffects.BT18
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnBattleArea(card) &&
-                           CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition);
+                    return CardEffectCommons.IsExistOnBattleArea(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                    selectPermanentEffect.SetUp(
-                        selectPlayer: card.Owner,
-                        canTargetCondition: CanSelectPermanentCondition,
-                        canTargetCondition_ByPreSelecetedList: null,
-                        canEndSelectCondition: null,
-                        maxCount: 1,
-                        canNoSelect: false,
-                        canEndNotMax: false,
-                        selectPermanentCoroutine: SelectPermanentCoroutine,
-                        afterSelectPermanentCoroutine: null,
-                        mode: SelectPermanentEffect.Mode.Custom,
-                        cardEffect: activateClass);
-
-                    selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will trash digivolution cards.",
-                        "The opponent is selecting 1 Digimon that will trash digivolution cards.");
-
-                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                     {
-                        yield return ContinuousController.instance.StartCoroutine(
-                            CardEffectCommons.TrashDigivolutionCardsFromTopOrBottom(
-                                targetPermanent: permanent,
-                                trashCount: 1,
-                                isFromTop: false,
-                                activateClass: activateClass));
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: 1,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will trash digivolution cards.",
+                            "The opponent is selecting 1 Digimon that will trash digivolution cards.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.TrashDigivolutionCardsFromTopOrBottom(
+                                    targetPermanent: permanent,
+                                    trashCount: 1,
+                                    isFromTop: false,
+                                    activateClass: activateClass));
+                        }
                     }
 
-                    if (!CardEffectCommons.HasMatchConditionOpponentsPermanent(card,
-                            permanent => permanent.IsDigimon && !permanent.HasNoDigivolutionCards))
+                    if (!CardEffectCommons.HasMatchConditionOpponentsPermanent(card,permanent => permanent.IsDigimon && !permanent.HasNoDigivolutionCards))
                     {
                         yield return ContinuousController.instance.StartCoroutine(
                             new DrawClass(card.Owner, 1, activateClass).Draw());

+ 62 - 27
Assets/CardEffect/BT18/Green/AncientKazemon_BT18_054.cs

@@ -88,7 +88,6 @@ namespace DCGO.CardEffects.BT18
             #endregion
 
             #region On Play/ When Digivolving Shared
-
             bool CanActivateConditionShared(Hashtable hashtable)
             {
                 return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
@@ -112,6 +111,14 @@ namespace DCGO.CardEffects.BT18
                         "[On Play] Suspend all of your opponent's Digimon with as much or less DP as this Digimon. None of your opponent's Digimon can unsuspend until the end of their turn.";
                 }
 
+                bool SuspendPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
+                           permanent.TopCard.CanNotBeAffected(activateClass) &&
+                           permanent.DP <= card.PermanentOfThisCard().DP &&
+                           permanent.CanSuspend;
+                }
+
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
@@ -119,23 +126,33 @@ namespace DCGO.CardEffects.BT18
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    List<Permanent> tappedPermanents = card.Owner.Enemy.GetBattleAreaDigimons()
-                        .Where(permanent =>
-                            !permanent.TopCard.CanNotBeAffected(activateClass) && 
-                            permanent.DP <= card.PermanentOfThisCard().DP &&
-                            permanent.CanSuspend)
-                        .ToList();
+                    if (CardEffectCommons.HasMatchConditionPermanent(SuspendPermanentCondition))
+                    {
+                        List<Permanent> tappedPermanents = new List<Permanent>();
 
-                    yield return ContinuousController.instance.StartCoroutine(
-                        new SuspendPermanentsClass(tappedPermanents, hashtable).Tap());
+                        foreach (Permanent permanent in card.Owner.Enemy.GetBattleAreaDigimons())
+                        {
+                            if (SuspendPermanentCondition(permanent))
+                            {
+                                tappedPermanents.Add(permanent);
+                            }
+                        }
 
-                    foreach (Permanent selectedPermanent in card.Owner.Enemy.GetBattleAreaDigimons())
+                        yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(tappedPermanents, hashtable).Tap());
+                    }
+
+                    bool PermanentCondition(Permanent permanent)
                     {
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCantUnsuspendUntilOpponentTurnEnd(
-                            targetPermanent: selectedPermanent,
-                            activateClass: activateClass
-                        ));
+                        return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
+                               permanent.TopCard.CanNotBeAffected(activateClass);
                     }
+
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotUnsuspendPlayerEffect(
+                        permanentCondition: PermanentCondition,
+                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                        activateClass: activateClass,
+                        isOnlyActivePhase: false,
+                        effectName:"Can't Unsuspend"));
                 }
             }
 
@@ -157,6 +174,14 @@ namespace DCGO.CardEffects.BT18
                         "[When Digivolving] Suspend all of your opponent's Digimon with as much or less DP as this Digimon. None of your opponent's Digimon can unsuspend until the end of their turn.";
                 }
 
+                bool SuspendPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
+                           permanent.TopCard.CanNotBeAffected(activateClass) &&
+                           permanent.DP <= card.PermanentOfThisCard().DP &&
+                           permanent.CanSuspend;
+                }
+
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
@@ -164,23 +189,33 @@ namespace DCGO.CardEffects.BT18
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    List<Permanent> tappedPermanents = card.Owner.Enemy.GetBattleAreaDigimons()
-                        .Where(permanent =>
-                            !permanent.TopCard.CanNotBeAffected(activateClass) && 
-                            permanent.DP <= card.PermanentOfThisCard().DP &&
-                            permanent.CanSuspend)
-                        .ToList();
+                    if (CardEffectCommons.HasMatchConditionPermanent(SuspendPermanentCondition))
+                    {
+                        List<Permanent> tappedPermanents = new List<Permanent>();
 
-                    yield return ContinuousController.instance.StartCoroutine(
-                        new SuspendPermanentsClass(tappedPermanents, hashtable).Tap());
+                        foreach (Permanent permanent in card.Owner.Enemy.GetBattleAreaDigimons())
+                        {
+                            if (SuspendPermanentCondition(permanent))
+                            {
+                                tappedPermanents.Add(permanent);
+                            }
+                        }
 
-                    foreach (Permanent selectedPermanent in card.Owner.Enemy.GetBattleAreaDigimons())
+                        yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(tappedPermanents, hashtable).Tap());
+                    }
+
+                    bool PermanentCondition(Permanent permanent)
                     {
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCantUnsuspendUntilOpponentTurnEnd(
-                            targetPermanent: selectedPermanent,
-                            activateClass: activateClass
-                        ));
+                        return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
+                               permanent.TopCard.CanNotBeAffected(activateClass);
                     }
+
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotUnsuspendPlayerEffect(
+                        permanentCondition: PermanentCondition,
+                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                        activateClass: activateClass,
+                        isOnlyActivePhase: false,
+                        effectName: "Can't Unsuspend"));
                 }
             }
 

+ 25 - 8
Assets/CardEffect/BT18/Purple/Duskmon_BT18_078.cs

@@ -28,11 +28,6 @@ namespace DCGO.CardEffects.BT18
             // Koichi Kimura
             if (timing == EffectTiming.None)
             {
-                bool Condition()
-                {
-                    return card.Owner.HandCards.Contains(card);
-                }
-
                 bool PermanentCondition(Permanent targetPermanent)
                 {
                     return targetPermanent.TopCard.EqualsCardName("Koichi Kimura");
@@ -40,7 +35,7 @@ namespace DCGO.CardEffects.BT18
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
                     permanentCondition: PermanentCondition, digivolutionCost: 2, ignoreDigivolutionRequirement: false,
-                    card: card, condition: Condition));
+                    card: card, condition: null));
             }
 
             // Velgrmon
@@ -153,10 +148,21 @@ namespace DCGO.CardEffects.BT18
                         CardColor chosenColor = (CardColor)GManager.instance.userSelectionManager.SelectedIntValue;
 
                         ChangeBaseCardColorClass changeBaseCardNameClass = new ChangeBaseCardColorClass();
-                        changeBaseCardNameClass.SetUpICardEffect("Original card color is changed", CanUseChangeColorCondition, card);
+                        changeBaseCardNameClass.SetUpICardEffect($"Original card color is changed: {chosenColor}", CanUseChangeColorCondition, card);
                         changeBaseCardNameClass.SetUpChangeBaseCardColorClass(ChangeBaseCardColors: ChangeBaseCardColors);
                         selectedPermanent.UntilOwnerTurnEndEffects.Add(_ => changeBaseCardNameClass);
 
+                        #region Log
+                        string log = "";
+
+                        log += $"\nChanged Card Color to {chosenColor}:";
+                        log += $"\n{selectedPermanent.TopCard.BaseENGCardNameFromEntity}({selectedPermanent.TopCard.CardID})";
+
+                        log += "\n";
+
+                        PlayLog.OnAddLog?.Invoke(log);
+                        #endregion
+
                         bool CanUseChangeColorCondition(Hashtable hashtableColor)
                         {
                             return selectedPermanent.TopCard != null && !selectedPermanent.TopCard.CanNotBeAffected(activateClass);
@@ -256,10 +262,21 @@ namespace DCGO.CardEffects.BT18
                         CardColor chosenColor = (CardColor)GManager.instance.userSelectionManager.SelectedIntValue;
 
                         ChangeBaseCardColorClass changeBaseCardNameClass = new ChangeBaseCardColorClass();
-                        changeBaseCardNameClass.SetUpICardEffect("Original card color is changed", CanUseChangeColorCondition, card);
+                        changeBaseCardNameClass.SetUpICardEffect($"Original card color is changed: {chosenColor}", CanUseChangeColorCondition, card);
                         changeBaseCardNameClass.SetUpChangeBaseCardColorClass(ChangeBaseCardColors: ChangeBaseCardColors);
                         selectedPermanent.UntilOwnerTurnEndEffects.Add(_ => changeBaseCardNameClass);
 
+                        #region Log
+                        string log = "";
+
+                        log += $"\nChanged Card Color to {chosenColor}:";
+                        log += $"\n{selectedPermanent.TopCard.BaseENGCardNameFromEntity}({selectedPermanent.TopCard.CardID})";
+
+                        log += "\n";
+
+                        PlayLog.OnAddLog?.Invoke(log);
+                        #endregion
+
                         bool CanUseChangeColorCondition(Hashtable hashtableColor)
                         {
                             return selectedPermanent.TopCard != null && !selectedPermanent.TopCard.CanNotBeAffected(activateClass);

+ 2 - 1
Assets/CardEffect/BT18/Purple/LucemonChaosMode_BT18_082.cs

@@ -24,7 +24,7 @@ namespace DCGO.CardEffects.BT18
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition,
-                    digivolutionCost: 6, ignoreDigivolutionRequirement: true, card: card, condition: null));
+                    digivolutionCost: 6, ignoreDigivolutionRequirement: false, card: card, condition: null));
             }
 
             #endregion
@@ -233,6 +233,7 @@ namespace DCGO.CardEffects.BT18
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Trash the bottom card of your security stack to not leave", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDescription());
+                activateClass.SetHashString("Protection_BT18-082");
                 cardEffects.Add(activateClass);
 
                 string EffectDescription()

+ 45 - 7
Assets/CardEffect/BT18/Purple/LucemonSatanMode_BT18_101.cs

@@ -38,6 +38,17 @@ namespace DCGO.CardEffects.BT18
                        (permanent.IsDigimon || permanent.IsTamer);
             }
 
+            bool CanSelectPermanentDigimon(Permanent permanent)
+            {
+                return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+            }
+
+            bool CanSelectPermanentTamer(Permanent permanent)
+            {
+                return CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card) &&
+                       permanent.IsTamer;
+            }
+
             #endregion
 
             #region When Digivolving
@@ -107,7 +118,10 @@ namespace DCGO.CardEffects.BT18
                     IEnumerator SelectCardCoroutine(CardSource cardSource)
                     {
                         selectedCards.Add(cardSource);
-                        played = true;
+
+                        if(CardEffectCommons.CanPlayAsNewPermanent(cardSource,false,activateClass,SelectCardEffect.Root.Trash,true))
+                            played = true;
+
                         yield return null;
                     }
 
@@ -183,13 +197,15 @@ namespace DCGO.CardEffects.BT18
                             cardEffect: activateClass,
                             fromTop: true).DestroySecurity());
                     }
-                    else if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentConditionShared))
+                    else
                     {
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
-                        selectPermanentEffect.SetUp(
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentConditionShared))
+                        {
+                            selectPermanentEffect.SetUp(
                             selectPlayer: card.Owner,
-                            canTargetCondition: CanSelectPermanentConditionShared,
+                            canTargetCondition: CanSelectPermanentDigimon,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             maxCount: 1,
@@ -200,10 +216,32 @@ namespace DCGO.CardEffects.BT18
                             mode: SelectPermanentEffect.Mode.Destroy,
                             cardEffect: activateClass);
 
-                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon or Tamer to delete.",
-                            "The opponent is selecting 1 Digimon or Tamer to delete.");
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to delete.",
+                                "The opponent is selecting 1 Digimon to delete.");
 
-                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        }
+
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentConditionShared))
+                        {
+                            selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentTamer,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: 1,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Destroy,
+                            cardEffect: activateClass);
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Tamer to delete.",
+                                "The opponent is selecting 1 Tamer to delete.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        }
                     }
                 }
             }

+ 10 - 1
Assets/CardEffect/BT18/Purple/Rhihimon_BT18_081.cs

@@ -228,7 +228,16 @@ namespace DCGO.CardEffects.BT18
                                         ignoreDigivolutionRequirementFixedCost: 3,
                                         isHand: true,
                                         activateClass: activateClass,
-                                        successProcess: null));
+                                        successProcess: null,
+                                        failedProcess: DigivolvedFailed()));
+                            }
+
+                            IEnumerator DigivolvedFailed()
+                            {
+                                IDiscardHand discard = new IDiscardHand(card, hashtable);
+
+                                discard.Discard();
+                                yield return null;
                             }
                         }
                     }

+ 1 - 6
Assets/CardEffect/BT18/Purple/Velgrmon_BT18_079.cs

@@ -29,11 +29,6 @@ namespace DCGO.CardEffects.BT18
             // Koichi Kimura
             if (timing == EffectTiming.None)
             {
-                bool Condition()
-                {
-                    return card.Owner.HandCards.Contains(card);
-                }
-
                 bool PermanentCondition(Permanent targetPermanent)
                 {
                     return targetPermanent.TopCard.EqualsCardName("Koichi Kimura");
@@ -41,7 +36,7 @@ namespace DCGO.CardEffects.BT18
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
                     permanentCondition: PermanentCondition, digivolutionCost: 3, ignoreDigivolutionRequirement: false,
-                    card: card, condition: Condition));
+                    card: card, condition: null));
             }
 
             // Duskmon

+ 34 - 17
Assets/CardEffect/BT18/Purple/Zanbamon_BT18_085.cs

@@ -12,19 +12,7 @@ namespace DCGO.CardEffects.BT18
 
             #region Shared
 
-            int OpponentTrashColorCount()
-            {
-                List<CardColor> cardColors = new List<CardColor>();
-
-                foreach (CardSource cardSource in card.Owner.Enemy.TrashCards)
-                {
-                    cardColors.AddRange(cardSource.CardColors);
-                }
-
-                cardColors = cardColors.Distinct().ToList();
-
-                return cardColors.Count;
-            }
+            
 
             #endregion
 
@@ -37,6 +25,20 @@ namespace DCGO.CardEffects.BT18
                     return !CardEffectCommons.IsExistOnField(card);
                 }
 
+                int OpponentTrashColorCount()
+                {
+                    List<CardColor> cardColors = new List<CardColor>();
+
+                    foreach (CardSource cardSource in card.Owner.Enemy.TrashCards)
+                    {
+                        cardColors.AddRange(cardSource.CardColors);
+                    }
+
+                    cardColors = cardColors.Distinct().ToList();
+
+                    return cardColors.Count;
+                }
+
                 bool PermanentCondition(Permanent targetPermanent)
                 {
                     return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(targetPermanent, card);
@@ -67,7 +69,7 @@ namespace DCGO.CardEffects.BT18
 
             #region Your Turn
 
-            /*if (timing == EffectTiming.None)
+            if (timing == EffectTiming.None)
             {
                 bool Condition()
                 {
@@ -75,12 +77,27 @@ namespace DCGO.CardEffects.BT18
                            CardEffectCommons.IsOwnerTurn(card);
                 }
 
-                cardEffects.Add(CardEffectFactory.ChangeSelfSAttackStaticEffect(changeValue: OpponentTrashColorCount() / 2,
+                int OpponentTrashColorCount()
+                {
+                    List<CardColor> cardColors = new List<CardColor>();
+
+                    foreach (CardSource cardSource in card.Owner.Enemy.TrashCards)
+                    {
+                        cardColors.AddRange(cardSource.BaseCardColorsFromEntity);
+                    }
+
+                    cardColors = cardColors.Distinct().ToList();
+
+                    return cardColors.Count / 2;
+                }
+
+
+                cardEffects.Add(CardEffectFactory.ChangeSelfSAttackStaticEffect(changeValue: OpponentTrashColorCount(),
                     isInheritedEffect: false, card: card, condition: Condition));
 
-                cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 2000 * (OpponentTrashColorCount() / 2),
+                cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 2000 * (OpponentTrashColorCount()),
                     isInheritedEffect: false, card: card, condition: Condition));
-            }*/
+            }
 
             #endregion
 

+ 2 - 7
Assets/CardEffect/BT18/Red/EmperorGreymon_BT18_018.cs

@@ -15,11 +15,6 @@ namespace DCGO.CardEffects.BT18
 
             if (timing == EffectTiming.None)
             {
-                bool Condition()
-                {
-                    return card.Owner.HandCards.Contains(card);
-                }
-
                 bool PermanentCondition(Permanent targetPermanent)
                 {
                     return targetPermanent.TopCard.EqualsCardName("Takuya Kanbara") &&
@@ -27,8 +22,8 @@ namespace DCGO.CardEffects.BT18
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
-                    permanentCondition: PermanentCondition, digivolutionCost: 5, ignoreDigivolutionRequirement: false,
-                    card: card, condition: Condition));
+                    permanentCondition: PermanentCondition, digivolutionCost: 5, ignoreDigivolutionRequirement: true,
+                    card: card, condition: null));
             }
 
             #endregion

+ 1 - 1
Assets/CardEffect/BT18/Red/Kimeramon_BT18_015.cs

@@ -247,7 +247,7 @@ namespace DCGO.CardEffects.BT18
 
                 bool HasMachinedramon(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(permanent) &&
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
                            permanent.TopCard.EqualsCardName("Machinedramon");
                 }
 

+ 8 - 17
Assets/CardEffect/BT18/Red/Millenniummon_BT18_019.cs

@@ -136,20 +136,12 @@ namespace DCGO.CardEffects.BT18
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                    {
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    if (card.Owner.Enemy.GetBattleAreaPermanents().Count(CanSelectPermanentCondition) >= 1)
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                     {
                         int maxCount = Math.Min(1, card.Owner.Enemy.GetBattleAreaPermanents().Count(CanSelectPermanentCondition));
 
@@ -170,6 +162,7 @@ namespace DCGO.CardEffects.BT18
 
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                     }
+
                     if (CardEffectCommons.IsJogress(_hashtable))
                     {
                         List<CardSource> selectedCards = new List<CardSource>();
@@ -193,7 +186,7 @@ namespace DCGO.CardEffects.BT18
                                     isShowOpponent: true,
                                     mode: SelectCardEffect.Mode.Custom,
                                     root: SelectCardEffect.Root.Custom,
-                                    customRootCardList: card.Owner.Enemy.TrashCards,
+                                    customRootCardList: card.Owner.Enemy.TrashCards.Filter(level),
                                     canLookReverseCard: true,
                                     selectPlayer: card.Owner,
                                     cardEffect: activateClass);
@@ -223,7 +216,7 @@ namespace DCGO.CardEffects.BT18
                                 selectCardCoroutine: null,
                                 afterSelectCardCoroutine: AfterSelection,
                                 message: "Select order of cards to add to the top your deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
-                                maxCount: 1,
+                                maxCount: selectedCards.Count,
                                 canEndNotMax: false,
                                 isShowOpponent: true,
                                 mode: SelectCardEffect.Mode.Custom,
@@ -369,7 +362,7 @@ namespace DCGO.CardEffects.BT18
                 {
                     if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass, root: SelectCardEffect.Root.Trash))
                     {
-                        if (cardSource.CardNames.Contains("Milleniummon"))
+                        if (cardSource.EqualsCardName("Millenniummon"))
                         {
                             return true;
                         }
@@ -480,10 +473,8 @@ namespace DCGO.CardEffects.BT18
 
                     if (returned)
                     {
-                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardConditionMilleniummon(cardSource)))
+                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardConditionMilleniummon))
                         {
-                            maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardConditionMilleniummon(cardSource)));
-
                             List<CardSource> selectedCards = new List<CardSource>();
 
                             SelectCardEffect selectPlayEffect = GManager.instance.GetComponent<SelectCardEffect>();
@@ -496,7 +487,7 @@ namespace DCGO.CardEffects.BT18
                                         selectCardCoroutine: SelectCardCoroutine,
                                         afterSelectCardCoroutine: null,
                                         message: "Select 1 card to play.",
-                                        maxCount: maxCount,
+                                        maxCount: 1,
                                         canEndNotMax: false,
                                         isShowOpponent: true,
                                         mode: SelectCardEffect.Mode.Custom,

+ 39 - 66
Assets/CardEffect/BT18/Red/WindtoFlameIcetoSword_BT18_095.cs

@@ -16,6 +16,8 @@ namespace DCGO.CardEffects.BT18
 
             if (timing == EffectTiming.OptionSkill)
             {
+                List<string> selectedNames = new List<string>();
+
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect(card.BaseENGCardNameFromEntity, CanUseCondition, card);
                 activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDescription());
@@ -27,6 +29,35 @@ namespace DCGO.CardEffects.BT18
                         "[Main] You may place up to 5 [Hybrid] trait cards with different names from your hand or trash under 1 of your Tamers. Then, 1 of your Tamers with 5 or more cards under it may digivolve into [EmperorGreymon] in the hand or trash, ignoring digivolution requirements and without paying the cost.";
                 }
 
+                bool CanTargetCondition_ByPreSelecetedList(List<CardSource> cardSources, CardSource cardSource)
+                {
+                    List<string> cardNames = GetNamesList(cardSources);
+
+                    foreach (string name in cardNames)
+                    {
+                        if (cardSource.CardNames.Contains(name))
+                            return false;
+                    }
+
+                    return true;
+                }
+
+                List<string> GetNamesList(List<CardSource> cardSources)
+                {
+                    foreach (CardSource cardName in cardSources)
+                    {
+                        foreach (string name in cardName.CardNames)
+                        {
+                            if (!selectedNames.Contains(name))
+                            {
+                                selectedNames.Add(name);
+                            }
+                        }
+                    }
+
+                    return selectedNames;
+                }
+
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.CanTriggerOptionMainEffect(hashtable, card);
@@ -47,9 +78,9 @@ namespace DCGO.CardEffects.BT18
                     return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card) &&
                            permanent.IsTamer && permanent.DigivolutionCards.Count >= 5 &&
                            (card.Owner.HandCards.Where(DigivolveToCardCondition).Any(cardSource =>
-                                cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass)) ||
+                                cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass, ignore:CardEffectCommons.IgnoreRequirement.All)) ||
                             card.Owner.TrashCards.Where(DigivolveToCardCondition).Any(cardSource =>
-                                cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass)));
+                                cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass, SelectCardEffect.Root.Trash, ignore: CardEffectCommons.IgnoreRequirement.All)));
                 }
 
                 bool DigivolveToCardCondition(CardSource cardSource)
@@ -81,8 +112,8 @@ namespace DCGO.CardEffects.BT18
                             cardEffect: activateClass);
 
                         selectPermanentEffect.SetUpCustomMessage(
-                            "Select 1 of your Tamers that will digivolve.",
-                            "The opponent is selecting 1 of their Tamers that will digivolve.");
+                            "Select 1 of your Tamers that will add digivolution cards.",
+                            "The opponent is selecting 1 of their Tamers that will add digivolution cards.");
 
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
@@ -105,7 +136,7 @@ namespace DCGO.CardEffects.BT18
                                     selectPlayer: card.Owner,
                                     canTargetCondition: SelectHybridCardCondition,
                                     canTargetCondition_ByPreSelecetedList: CanTargetCondition_ByPreSelecetedList,
-                                    canEndSelectCondition: CanEndSelectCondition,
+                                    canEndSelectCondition: null,
                                     maxCount: Math.Min(5,
                                         CardEffectCommons.MatchConditionOwnersCardCountInHand(card, SelectHybridCardCondition)),
                                     canNoSelect: true,
@@ -129,7 +160,7 @@ namespace DCGO.CardEffects.BT18
                                 selectCardEffect.SetUp(
                                     canTargetCondition: SelectHybridCardCondition,
                                     canTargetCondition_ByPreSelecetedList: CanTargetCondition_ByPreSelecetedList,
-                                    canEndSelectCondition: CanEndSelectCondition,
+                                    canEndSelectCondition: null,
                                     canNoSelect: () => true,
                                     selectCardCoroutine: null,
                                     afterSelectCardCoroutine: SelectCardCoroutine,
@@ -148,62 +179,6 @@ namespace DCGO.CardEffects.BT18
                                 yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
                             }
 
-                            bool CanTargetCondition_ByPreSelecetedList(List<CardSource> cardSources, CardSource cardSource)
-                            {
-                                List<string> cardNames = new List<string>();
-
-                                foreach (CardSource cardSource1 in cardSources)
-                                {
-                                    if (!cardNames.Any(x => cardSource1.CardNames.Any(y => y == x)))
-                                    {
-                                        cardNames.Add(cardSource1.CardID);
-                                    }
-                                }
-
-                                foreach (CardSource cardSource1 in digivolutionCards)
-                                {
-                                    if (!cardNames.Any(x => cardSource1.CardNames.Any(y => y == x)))
-                                    {
-                                        cardNames.Add(cardSource1.CardID);
-                                    }
-                                }
-
-                                if (cardNames.Any(x => cardSource.CardNames.Any(y => y == x)))
-                                {
-                                    return false;
-                                }
-
-                                return true;
-                            }
-
-                            bool CanEndSelectCondition(List<CardSource> cardSources)
-                            {
-                                List<string> cardNames = new List<string>();
-
-                                foreach (CardSource cardSource1 in cardSources)
-                                {
-                                    if (!cardNames.Any(x => cardSource1.CardNames.Any(y => y == x)))
-                                    {
-                                        cardNames.Add(cardSource1.CardID);
-                                    }
-                                }
-
-                                foreach (CardSource cardSource1 in digivolutionCards)
-                                {
-                                    if (!cardNames.Any(x => cardSource1.CardNames.Any(y => y == x)))
-                                    {
-                                        cardNames.Add(cardSource1.CardID);
-                                    }
-                                }
-
-                                if (cardNames.Count != cardSources.Count + digivolutionCards.Count)
-                                {
-                                    return false;
-                                }
-
-                                return true;
-                            }
-
                             IEnumerator SelectCardCoroutine(List<CardSource> cardSources)
                             {
                                 digivolutionCards.AddRange(cardSources);
@@ -324,8 +299,7 @@ namespace DCGO.CardEffects.BT18
                                     GManager.instance.userSelectionManager.SetBool(canSelectHand);
                                 }
 
-                                yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager
-                                    .WaitForEndSelect());
+                                yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
 
                                 bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
 
@@ -339,8 +313,7 @@ namespace DCGO.CardEffects.BT18
                                         ignoreDigivolutionRequirementFixedCost: 0,
                                         isHand: fromHand,
                                         activateClass: activateClass,
-                                        successProcess: null,
-                                        ignoreRequirements:CardEffectCommons.IgnoreRequirement.All));
+                                        successProcess: null));
                             }
                         }
                     }

+ 4 - 2
Assets/CardEffect/BT18/White/LucemonLarva_BT18_086.cs

@@ -107,7 +107,8 @@ namespace DCGO.CardEffects.BT18
 
                 bool IsLucemonRemoved(Permanent permanent)
                 {
-                    return permanent.TopCard.EqualsCardName("Lucemon: Satan Mode");
+                    return permanent.TopCard.Owner == card.Owner &&
+                           permanent.TopCard.EqualsCardName("Lucemon: Satan Mode");
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
@@ -142,7 +143,8 @@ namespace DCGO.CardEffects.BT18
             {
                 bool PermanentCondition(Permanent permanent)
                 {
-                    return (permanent.DP == 0);
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
+                           (permanent.DP == 0);
                 }
 
                 bool NonWhiteDigimon(Permanent permanent)

+ 1 - 1
Assets/CardEffect/BT18/White/Susanoomon_BT18_102.cs

@@ -47,7 +47,7 @@ namespace DCGO.CardEffects.BT18
 
                 List<CardColor> cardColors = new List<CardColor>();
 
-                foreach (CardSource source in card.PermanentOfThisCard().cardSources)
+                foreach (CardSource source in card.PermanentOfThisCard().DigivolutionCards)
                 {
                     cardColors.AddRange(source.CardColors);
                 }

+ 2 - 2
Assets/CardEffect/BT18/Yellow/Candlemon_BT18_030.cs

@@ -110,8 +110,8 @@ namespace DCGO.CardEffects.BT18
                 {
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
-                        if (card.CardColors.Contains(CardColor.Yellow) && 
-                            (card.CardTraits.Contains("Data") || card.CardTraits.Contains("Witchelny")))
+                        if (card.PermanentOfThisCard().TopCard.CardColors.Contains(CardColor.Yellow) && 
+                            (card.PermanentOfThisCard().TopCard.CardTraits.Contains("Data") || card.PermanentOfThisCard().TopCard.CardTraits.Contains("Witchelny")))
                         {
                             if (card.Owner.SecurityCards.Count >= 1 )
                                 return true;

+ 38 - 7
Assets/CardEffect/BT18/Yellow/DarktoLightThundertoGunfire_BT18_097.cs

@@ -15,6 +15,8 @@ namespace DCGO.CardEffects.BT18
 
             if (timing == EffectTiming.OptionSkill)
             {
+                List<string> selectedNames = new List<string>();
+
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect(card.BaseENGCardNameFromEntity, CanUseCondition, card);
                 activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDescription());
@@ -26,6 +28,35 @@ namespace DCGO.CardEffects.BT18
                         "[Main] You may place up to 5 [Hybrid] trait cards with different names from your hand or trash under 1 of your Tamers. Then, 1 of your Tamers with 5 or more cards under it may digivolve into [MagnaGarurumon] in the hand or trash, ignoring digivolution requirements and without paying the cost.";
                 }
 
+                bool CanTargetCondition_ByPreSelecetedList(List<CardSource> cardSources, CardSource cardSource)
+                {
+                    List<string> cardNames = GetNamesList(cardSources);
+
+                    foreach (string name in cardNames)
+                    {
+                        if (cardSource.CardNames.Contains(name))
+                            return false;
+                    }
+
+                    return true;
+                }
+
+                List<string> GetNamesList(List<CardSource> cardSources)
+                {
+                    foreach (CardSource cardName in cardSources)
+                    {
+                        foreach (string name in cardName.CardNames)
+                        {
+                            if (!selectedNames.Contains(name))
+                            {
+                                selectedNames.Add(name);
+                            }
+                        }
+                    }
+
+                    return selectedNames;
+                }
+
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.CanTriggerOptionMainEffect(hashtable, card);
@@ -46,9 +77,9 @@ namespace DCGO.CardEffects.BT18
                     return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card) &&
                            permanent.IsTamer && permanent.DigivolutionCards.Count >= 5 &&
                            (card.Owner.HandCards.Where(DigivolveToCardCondition).Any(cardSource =>
-                                cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass)) ||
+                                cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass, ignore: CardEffectCommons.IgnoreRequirement.All)) ||
                             card.Owner.TrashCards.Where(DigivolveToCardCondition).Any(cardSource =>
-                                cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass)));
+                                cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass, SelectCardEffect.Root.Trash, ignore: CardEffectCommons.IgnoreRequirement.All)));
                 }
 
                 bool DigivolveToCardCondition(CardSource cardSource)
@@ -80,8 +111,8 @@ namespace DCGO.CardEffects.BT18
                             cardEffect: activateClass);
 
                         selectPermanentEffect.SetUpCustomMessage(
-                            "Select 1 of your Tamers that will digivolve.",
-                            "The opponent is selecting 1 of their Tamers that will digivolve.");
+                            "Select 1 of your Tamers that will add digivolution cards.",
+                            "The opponent is selecting 1 of their Tamers that will add digivolution cards.");
 
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
@@ -103,7 +134,7 @@ namespace DCGO.CardEffects.BT18
                                 selectHandEffect.SetUp(
                                     selectPlayer: card.Owner,
                                     canTargetCondition: SelectHybridCardCondition,
-                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canTargetCondition_ByPreSelecetedList: CanTargetCondition_ByPreSelecetedList,
                                     canEndSelectCondition: null,
                                     maxCount: Math.Min(5,
                                         CardEffectCommons.MatchConditionOwnersCardCountInHand(card, SelectHybridCardCondition)),
@@ -127,7 +158,7 @@ namespace DCGO.CardEffects.BT18
 
                                 selectCardEffect.SetUp(
                                     canTargetCondition: SelectHybridCardCondition,
-                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canTargetCondition_ByPreSelecetedList: CanTargetCondition_ByPreSelecetedList,
                                     canEndSelectCondition: null,
                                     canNoSelect: () => true,
                                     selectCardCoroutine: null,
@@ -276,7 +307,7 @@ namespace DCGO.CardEffects.BT18
                                     CardEffectCommons.DigivolveIntoHandOrTrashCard(
                                         targetPermanent: selectedPermanent,
                                         cardCondition: DigivolveToCardCondition,
-                                        payCost: true,
+                                        payCost: false,
                                         reduceCostTuple: null,
                                         fixedCostTuple: null,
                                         ignoreDigivolutionRequirementFixedCost: 0,

+ 2 - 7
Assets/CardEffect/BT18/Yellow/MagnaGarurumon_BT18_042.cs

@@ -14,11 +14,6 @@ namespace DCGO.CardEffects.BT18
 
             if (timing == EffectTiming.None)
             {
-                bool Condition()
-                {
-                    return card.Owner.HandCards.Contains(card);
-                }
-
                 bool PermanentCondition(Permanent targetPermanent)
                 {
                     return targetPermanent.TopCard.EqualsCardName("Koji Minamoto") &&
@@ -26,8 +21,8 @@ namespace DCGO.CardEffects.BT18
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
-                    permanentCondition: PermanentCondition, digivolutionCost: 5, ignoreDigivolutionRequirement: false,
-                    card: card, condition: Condition));
+                    permanentCondition: PermanentCondition, digivolutionCost: 5, ignoreDigivolutionRequirement: true,
+                    card: card, condition: null));
             }
 
             #endregion

+ 1 - 1
Assets/CardEffect/BT18/Yellow/MetalEtemon_BT18_041.cs

@@ -356,7 +356,7 @@ namespace DCGO.CardEffects.BT18
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    if (CardEffectCommons.CanActivateOnDeletion(card))
                     {
                         if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                         {

+ 7 - 0
Assets/CardEffect/BT18/Yellow/Mistymon_BT18_039.cs

@@ -10,6 +10,13 @@ namespace DCGO.CardEffects.BT18
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
+            #region Barrier
+            if (timing == EffectTiming.WhenPermanentWouldBeDeleted)
+            {
+                cardEffects.Add(CardEffectFactory.BarrierSelfEffect(isInheritedEffect: false, card: card, condition: null));
+            }
+            #endregion
+
             #region On Play
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {

+ 1 - 1
Assets/CardEffect/BT18/Yellow/Patamon_BT18_033.cs

@@ -14,7 +14,7 @@ namespace DCGO.CardEffects.BT18
             if (timing == EffectTiming.OnDeclaration)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Delete your 1 Digimon to play 1 Digimon from hand", CanUseCondition, card);
+                activateClass.SetUpICardEffect("Return 1 Digimon from trash to play 1 Digimon from hand", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
 

+ 4 - 4
Assets/CardEffect/BT18/Yellow/Wizardmon_BT18_036.cs

@@ -70,14 +70,14 @@ namespace DCGO.CardEffects.BT18
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Trash 1 security to stop this Digimon from leaving Battle Area", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
                 activateClass.SetHashString("TrashSecurityToStay_Wizardmon_BT18_036");
                 activateClass.SetIsInheritedEffect(true);
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
                 {
-                    return "[All Turns] When this yellow Digimon with the [Data] or [Witchelny] trait would leave the battle area by an opponent's effect, by trashing your top security card, it doesn't leave.";
+                    return "[All Turns] [Once Per Turn] When this yellow Digimon with the [Data] or [Witchelny] trait would leave the battle area by your opponent's effect, by trashing your top security card, it doesn't leave.";
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
@@ -98,8 +98,8 @@ namespace DCGO.CardEffects.BT18
                 {
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
-                        if (card.CardColors.Contains(CardColor.Yellow) && 
-                            (card.CardTraits.Contains("Data") || card.CardTraits.Contains("Witchelny")))
+                        if (card.PermanentOfThisCard().TopCard.CardColors.Contains(CardColor.Yellow) && 
+                            (card.PermanentOfThisCard().TopCard.CardTraits.Contains("Data") || card.PermanentOfThisCard().TopCard.CardTraits.Contains("Witchelny")))
                         {
                             if (card.Owner.SecurityCards.Count >= 1 )
                                 return true;

+ 2 - 18
Assets/CardEffect/BT19/Black/DarkKnightmon_BT19_063.cs

@@ -134,15 +134,7 @@ namespace DCGO.CardEffects.BT19
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                    {
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
@@ -248,15 +240,7 @@ namespace DCGO.CardEffects.BT19
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                    {
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)

+ 1 - 1
Assets/CardEffect/BT19/Black/Machinedramon_BT19_065.cs

@@ -268,7 +268,7 @@ namespace DCGO.CardEffects.BT19
                         PlayCardClass playCard = new PlayCardClass(
                                 cardSources: new List<CardSource>() { source },
                                 hashtable: CardEffectCommons.CardEffectHashtable(activateClass),
-                                payCost: true,
+                                payCost: false,
                                 targetPermanent: null,
                                 isTapped: false,
                                 root: SelectCardEffect.Root.Trash,

+ 29 - 26
Assets/CardEffect/BT19/Black/Monitamon_BT19_055.cs

@@ -15,7 +15,7 @@ namespace DCGO.CardEffects.BT19
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Reveal the top 3 cards of your deck, add 1, place 1 under a tamer", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -64,7 +64,7 @@ namespace DCGO.CardEffects.BT19
                                 canTargetCondition:SelectKnightmonOrTwilight,
                                 message: "Select 1 card with [Knightmon] in its text or the [Twilight] trait.",
                                 mode: SelectCardEffect.Mode.Custom,
-                                maxCount: tamerCount,
+                                maxCount: 1,
                                 selectCardCoroutine: PlaceUnderTamer),
                        },
                        remainingCardsPlace: RemainingCardsPlace.DeckBottom,
@@ -76,34 +76,37 @@ namespace DCGO.CardEffects.BT19
                         yield return null;
                     }
 
-                    if(CardEffectCommons.HasMatchConditionOwnersPermanent(card, MyTamer))
+                    if(tuckedCard != null)
                     {
-                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                        selectPermanentEffect.SetUp(
-                            selectPlayer: card.Owner,
-                            canTargetCondition: MyTamer,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canEndSelectCondition: null,
-                            maxCount: 1,
-                            canNoSelect: false,
-                            canEndNotMax: false,
-                            selectPermanentCoroutine: SelectTamerCoroutine,
-                            afterSelectPermanentCoroutine: null,
-                            mode: SelectPermanentEffect.Mode.Custom,
-                            cardEffect: activateClass);
-
-                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will trash digivolution cards.", "The opponent is selecting 1 Digimon that will trash digivolution cards.");
-
-                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                        IEnumerator SelectTamerCoroutine(Permanent permanent)
+                        if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, MyTamer))
                         {
-                            Permanent selectedPermanent = permanent;
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: MyTamer,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: 1,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectTamerCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
 
-                            if (selectedPermanent != null)
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Tamer that will add card to sources.", "The opponent is selecting 1 Tamer that will add card to sources.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            IEnumerator SelectTamerCoroutine(Permanent permanent)
                             {
-                                yield return ContinuousController.instance.StartCoroutine(selectedPermanent.AddDigivolutionCardsBottom(new List<CardSource> { tuckedCard }, activateClass));
+                                Permanent selectedPermanent = permanent;
+
+                                if (selectedPermanent != null)
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(selectedPermanent.AddDigivolutionCardsBottom(new List<CardSource> { tuckedCard }, activateClass));
+                                }
                             }
                         }
                     }

+ 1 - 1
Assets/CardEffect/BT19/Blue/Puyoyomon_BT19_002.cs

@@ -72,7 +72,7 @@ namespace DCGO.CardEffects.BT19
                             canEndNotMax: false,
                             selectPermanentCoroutine: null,
                             afterSelectPermanentCoroutine: null,
-                            mode: SelectPermanentEffect.Mode.PutLibraryBottom,
+                            mode: SelectPermanentEffect.Mode.Bounce,
                             cardEffect: activateClass);
 
                         selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to bottom deck.",

+ 3 - 4
Assets/CardEffect/BT19/Green/QueenBeemon_BT19_053.cs

@@ -215,6 +215,7 @@ namespace DCGO.CardEffects.BT19
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Place those Digimon face up as your bottom security cards", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetHashString("AllTurns_BT19-053");
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -238,10 +239,8 @@ namespace DCGO.CardEffects.BT19
                         {
                             if (!CardEffectCommons.IsByBattle(hashtable))
                             {
-                                if (CardEffectCommons.IsByEffect(hashtable, effect => effect.IsSameEffect(activateClass)))
-                                    return false;
-
-                                return true;
+                                if (!CardEffectCommons.IsByEffect(hashtable, effect => effect.HashString.Equals("AllTurns_BT19-053")))
+                                    return true;
                             }
                         }
                     }

+ 5 - 4
Assets/CardEffect/BT19/Green/Winr_BT19_084.cs

@@ -38,13 +38,13 @@ namespace DCGO.CardEffects.BT19
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return isExistOnField(card) &&
-                           HasFaceUpSecurity();
+                    return isExistOnField(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
+                    if(HasFaceUpSecurity())
+                        yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
                 }
             }
 
@@ -90,7 +90,8 @@ namespace DCGO.CardEffects.BT19
 
                 bool IsRoyalBaseDigimon(CardSource cardSource)
                 {
-                    return cardSource.EqualsTraits("Royal Base");
+                    return cardSource.IsDigimon &&
+                           cardSource.EqualsTraits("Royal Base");
                 }
 
                 bool CanUseCondition(Hashtable hashtable)

+ 0 - 6
Assets/CardEffect/BT19/Purple/LordKnightmonXAntibody_BT19_073.cs

@@ -175,12 +175,6 @@ namespace DCGO.CardEffects.BT19
 
                             return null;
                         }
-
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCantUnsuspendUntilOpponentTurnEnd(
-                                    targetPermanent: selectedPermanent,
-                                    activateClass: activateClass
-                                ));
-
                     }
                 }
             }

+ 2 - 2
Assets/CardEffect/BT19/Purple/MoonMillenniummon_BT19_075.cs

@@ -93,7 +93,7 @@ namespace DCGO.CardEffects.BT19
                             yield return null;
                         }
 
-                        if(trashed.Count > 2)
+                        if(trashed.Count >= 2)
                         {
                             if (CardEffectCommons.HasMatchConditionPermanent(IsTamer))
                             {
@@ -182,7 +182,7 @@ namespace DCGO.CardEffects.BT19
                             yield return null;
                         }
 
-                        if (trashed.Count > 2)
+                        if (trashed.Count >= 2)
                         {
                             if (CardEffectCommons.HasMatchConditionPermanent(IsTamer))
                             {

+ 248 - 172
Assets/CardEffect/BT19/Purple/TheWickedGodDescends_BT19_099.cs

@@ -1,8 +1,9 @@
-using System;
+using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
 using UnityEngine;
+using Photon.Pun;
 
 namespace DCGO.CardEffects.BT19
 {
@@ -35,141 +36,143 @@ namespace DCGO.CardEffects.BT19
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOptionMainEffect(hashtable, card) &&
-                           CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, HasCompositeTrait);
+                    return CardEffectCommons.CanTriggerOptionMainEffect(hashtable, card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    #region reduce play cost
-                    ChangeCostClass changeCostClass = new ChangeCostClass();
-                    changeCostClass.SetUpICardEffect($"Play Cost -4", CanUseCondition1, card);
-                    changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
-                    Func<EffectTiming, ICardEffect> getCardEffect = GetCardEffect;
-                    card.Owner.UntilCalculateFixedCostEffect.Add(getCardEffect);
-
-                    ICardEffect GetCardEffect(EffectTiming _timing)
+                    if(CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, HasCompositeTrait))
                     {
-                        if (_timing == EffectTiming.None)
+                        #region reduce play cost
+                        ChangeCostClass changeCostClass = new ChangeCostClass();
+                        changeCostClass.SetUpICardEffect($"Play Cost -4", CanUseCondition1, card);
+                        changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
+                        Func<EffectTiming, ICardEffect> getCardEffect = GetCardEffect;
+                        card.Owner.UntilCalculateFixedCostEffect.Add(getCardEffect);
+
+                        ICardEffect GetCardEffect(EffectTiming _timing)
                         {
-                            return changeCostClass;
-                        }
+                            if (_timing == EffectTiming.None)
+                            {
+                                return changeCostClass;
+                            }
 
-                        return null;
-                    }
+                            return null;
+                        }
 
-                    bool CanUseCondition1(Hashtable hashtable)
-                    {
-                        return true;
-                    }
+                        bool CanUseCondition1(Hashtable hashtable)
+                        {
+                            return true;
+                        }
 
-                    int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
-                    {
-                        if (CardSourceCondition(cardSource))
+                        int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
                         {
-                            if (RootCondition(root))
+                            if (CardSourceCondition(cardSource))
                             {
-                                if (PermanentsCondition(targetPermanents))
+                                if (RootCondition(root))
                                 {
-                                    Cost -= 4;
+                                    if (PermanentsCondition(targetPermanents))
+                                    {
+                                        Cost -= 4;
+                                    }
                                 }
                             }
-                        }
-
-                        return Cost;
-                    }
 
-                    bool PermanentsCondition(List<Permanent> targetPermanents)
-                    {
-                        if (targetPermanents == null)
-                        {
-                            return true;
+                            return Cost;
                         }
 
-                        else
+                        bool PermanentsCondition(List<Permanent> targetPermanents)
                         {
-                            if (targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0)
+                            if (targetPermanents == null)
                             {
                                 return true;
                             }
-                        }
 
-                        return false;
-                    }
+                            else
+                            {
+                                if (targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0)
+                                {
+                                    return true;
+                                }
+                            }
 
-                    bool CardSourceCondition(CardSource cardSource)
-                    {
-                        if (cardSource.HasPlayCost)
+                            return false;
+                        }
+
+                        bool CardSourceCondition(CardSource cardSource)
                         {
-                            if (cardSource.IsDigimon)
-                                return cardSource.ContainsTraits("Composite");
+                            if (cardSource.HasPlayCost)
+                            {
+                                if (cardSource.IsDigimon)
+                                    return cardSource.ContainsTraits("Composite");
+                            }
+
+                            return false;
                         }
 
-                        return false;
-                    }
+                        bool RootCondition(SelectCardEffect.Root root)
+                        {
+                            return true;
+                        }
 
-                    bool RootCondition(SelectCardEffect.Root root)
-                    {
-                        return true;
-                    }
+                        bool isUpDown()
+                        {
+                            return true;
+                        }
+                        #endregion
+
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                        selectCardEffect.SetUp(
+                            canTargetCondition: HasCompositeTrait,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            canNoSelect: () => true,
+                            selectCardCoroutine: null,
+                            afterSelectCardCoroutine: SelectCardCoroutine,
+                            message: "Select 1 [Composite] trait Digimon card to play.",
+                            maxCount: 1,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            mode: SelectCardEffect.Mode.Custom,
+                            root: SelectCardEffect.Root.Trash,
+                            customRootCardList: null,
+                            canLookReverseCard: true,
+                            selectPlayer: card.Owner,
+                            cardEffect: activateClass);
+
+                        selectCardEffect.SetUpCustomMessage(
+                "Select 1 [Composite] trait Digimon card to play.",
+                "The opponent is selecting 1 [Composite] trait Digimon card to play.");
+                        selectCardEffect.SetUpCustomMessage_ShowCard("Play Card");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+
+                        IEnumerator SelectCardCoroutine(List<CardSource> sources)
+                        {
+                            selectedCards = sources;
+                            yield return null;
+                        }
 
-                    bool isUpDown()
-                    {
-                        return true;
-                    }
-                    #endregion
-
-                    List<CardSource> selectedCards = new List<CardSource>();
-
-                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                    selectCardEffect.SetUp(
-                        canTargetCondition: HasCompositeTrait,
-                        canTargetCondition_ByPreSelecetedList: null,
-                        canEndSelectCondition: null,
-                        canNoSelect: () => true,
-                        selectCardCoroutine: null,
-                        afterSelectCardCoroutine: SelectCardCoroutine,
-                        message: "Select 1 [Composite] trait Digimon card to play.",
-                        maxCount: 1,
-                        canEndNotMax: false,
-                        isShowOpponent: true,
-                        mode: SelectCardEffect.Mode.Custom,
-                        root: SelectCardEffect.Root.Trash,
-                        customRootCardList: null,
-                        canLookReverseCard: true,
-                        selectPlayer: card.Owner,
-                        cardEffect: activateClass);
-
-                    selectCardEffect.SetUpCustomMessage(
-            "Select 1 [Composite] trait Digimon card to play.",
-            "The opponent is selecting 1 [Composite] trait Digimon card to play.");
-                    selectCardEffect.SetUpCustomMessage_ShowCard("Play Card");
-
-                    yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
-
-                    IEnumerator SelectCardCoroutine(List<CardSource> sources)
-                    {
-                        selectedCards = sources;
-                        yield return null;
-                    }
+                        #region Place As Source
+                        if (selectedCards.Count > 0)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                                    cardSources: selectedCards,
+                                    activateClass: activateClass,
+                                    payCost: true,
+                                    isTapped: false,
+                                    root: SelectCardEffect.Root.Trash,
+                                    activateETB: true));
+                        }
+                        #endregion
 
-                    #region Place As Source
-                    if (selectedCards.Count > 0)
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
-                                cardSources: selectedCards,
-                                activateClass: activateClass,
-                                payCost: true,
-                                isTapped: false,
-                                root: SelectCardEffect.Root.Trash,
-                                activateETB: true));
+                        #region Remove Cost effect after use
+                        card.Owner.UntilCalculateFixedCostEffect.Remove(getCardEffect);
+                        #endregion
                     }
-                    #endregion
-
-                    #region Remove Cost effect after use
-                    card.Owner.UntilCalculateFixedCostEffect.Remove(getCardEffect);
-                    #endregion
 
                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlaceDelayOptionCards(card: card, cardEffect: activateClass));
                 }
@@ -179,6 +182,8 @@ namespace DCGO.CardEffects.BT19
             #region All Turns - Delay
             if (timing == EffectTiming.WhenRemoveField)
             {
+                int playCostValue = -1;
+
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Play 1 [Wicked God] trait Digimon card from hand or trash", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
@@ -186,7 +191,7 @@ namespace DCGO.CardEffects.BT19
 
                 string EffectDiscription()
                 {
-                    return "[All Turns] When any of your Digimon with [Millenniummon] in its name would leave the battle area, <Delay>.\r\n You may play 1 [Wicked God] trait Digimon card with a play cost 1 greater than that Digimon from your hand or trash without paying the cost.";
+                    return "[All Turns] When any of your Digimon with [Millenniummon] in its name would leave the battle area, <Delay>.\r\n• You may play 1 [Wicked God] trait Digimon card with a play cost 1 greater than that Digimon from your hand or trash without paying the cost.";
                 }
 
                 bool PermanentCondition(Permanent permanent)
@@ -197,18 +202,7 @@ namespace DCGO.CardEffects.BT19
                     }
 
                     return false;
-                }
-
-                bool CanPlayWickedGodCondition(CardSource cardSource)
-                {
-                    if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
-                    {
-                        return cardSource.IsDigimon && 
-                               cardSource.ContainsTraits("Wicked God");
-                    }
-
-                    return false;
-                }                
+                }            
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
@@ -259,55 +253,76 @@ namespace DCGO.CardEffects.BT19
                     if (deleted)
                     {
                         List<Permanent> selectedPermanents = CardEffectCommons.GetPermanentsFromHashtable(_hashtable);
-                        List<CardSource> combinedSources = new List<CardSource>();
-
-                        combinedSources.AddRange(card.Owner.HandCards);
-                        combinedSources.AddRange(card.Owner.TrashCards);
 
-                        bool FilterOutUnselectable(CardSource source)
+                        bool CanPlayWickedGodCondition(CardSource cardSource)
                         {
                             foreach (Permanent permanent in selectedPermanents)
                             {
-                                return permanent.TopCard.GetCostItself + 1 == source.GetCostItself;
-                            }                                
+                                if (PermanentCondition(permanent))
+                                {
+                                    if(permanent.TopCard.GetCostItself + 1 == cardSource.GetCostItself)
+                                    {
+                                        if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
+                                        {
+                                            return cardSource.IsDigimon &&
+                                                   cardSource.ContainsTraits("Wicked God");
+                                        }
+                                    }
+                                }
+                            }                         
 
                             return false;
                         }
 
-                        combinedSources = combinedSources.Filter(FilterOutUnselectable);
-
-                        if (combinedSources.Count > 0)
+                        if (selectedPermanents.Count > 0)
                         {
-                            if (selectedPermanents.Count > 0)
+                            if (card.Owner.HandCards.Count(CanPlayWickedGodCondition) >= 1 || CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanPlayWickedGodCondition))
                             {
-                                List<CardSource> selectedCards = new List<CardSource>();
+                                if (card.Owner.HandCards.Count(CanPlayWickedGodCondition) >= 1 && CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanPlayWickedGodCondition))
+                                {
+                                    if (card.Owner.isYou)
+                                    {
+                                        GManager.instance.commandText.OpenCommandText("From which area do you play a card?");
+
+                                        List<Command_SelectCommand> command_SelectCommands = new List<Command_SelectCommand>()
+                                {
+                                    new Command_SelectCommand($"From hand", () => photonView.RPC("SetFromHand", RpcTarget.All, true), 0),
+                                    new Command_SelectCommand($"From trash", () => photonView.RPC("SetFromHand", RpcTarget.All, false), 1),
+                                };
+
+                                        GManager.instance.selectCommandPanel.SetUpCommandButton(command_SelectCommands);
+                                    }
+
+                                    else
+                                    {
+                                        GManager.instance.commandText.OpenCommandText("The opponent is choosing from which area to play a card.");
+
+                                        #region AIモード
+                                        if (GManager.instance.IsAI)
+                                        {
+                                            SetFromHand(RandomUtility.IsSucceedProbability(0.5f));
+                                        }
+                                        #endregion
+                                    }
+                                }
+
+                                else if (card.Owner.HandCards.Count(CanPlayWickedGodCondition) == 0 && CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanPlayWickedGodCondition))
+                                {
+                                    SetFromHand(false);
+                                }
 
-                                SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                                selectCardEffect.SetUp(
-                                            canTargetCondition: CanPlayWickedGodCondition,
-                                            canTargetCondition_ByPreSelecetedList: null,
-                                            canEndSelectCondition: null,
-                                            canNoSelect: () => false,
-                                            selectCardCoroutine: SelectCardCoroutine,
-                                            afterSelectCardCoroutine: null,
-                                            message: "Select 1 [Wicked God] trait Digimon card to play.",
-                                            maxCount: 1,
-                                            canEndNotMax: false,
-                                            isShowOpponent: true,
-                                            mode: SelectCardEffect.Mode.Custom,
-                                            root: SelectCardEffect.Root.Custom,
-                                            customRootCardList: combinedSources,
-                                            canLookReverseCard: true,
-                                            selectPlayer: card.Owner,
-                                            cardEffect: activateClass);
-
-                                selectCardEffect.SetUpCustomMessage(
-                                    "Select 1 [Wicked God] trait Digimon card to play.",
-                                    "The opponent is selecting 1 [Wicked God] trait Digimon card to play.");
-                                selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
-
-                                yield return StartCoroutine(selectCardEffect.Activate());
+                                else if (card.Owner.HandCards.Count(CanPlayWickedGodCondition) >= 1 && card.Owner.TrashCards.Count(CanPlayWickedGodCondition) == 0)
+                                {
+                                    SetFromHand(true);
+                                }
+
+                                yield return new WaitWhile(() => !endSelect);
+                                endSelect = false;
+
+                                GManager.instance.commandText.CloseCommandText();
+                                yield return new WaitWhile(() => GManager.instance.commandText.gameObject.activeSelf);
+
+                                List<CardSource> selectedCards = new List<CardSource>();
 
                                 IEnumerator SelectCardCoroutine(CardSource cardSource)
                                 {
@@ -316,26 +331,77 @@ namespace DCGO.CardEffects.BT19
                                     yield return null;
                                 }
 
-                                if (CardEffectCommons.IsExistOnHand(selectedCards[0]))
+                                if (fromHand)
                                 {
-                                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
-                                        cardSources: selectedCards,
-                                        activateClass: activateClass,
-                                        payCost: false,
-                                        isTapped: false,
-                                        root: SelectCardEffect.Root.Hand,
-                                        activateETB: true));
+                                    int maxCount = 1;
+
+                                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                                    selectHandEffect.SetUp(
+                                        selectPlayer: card.Owner,
+                                        canTargetCondition: CanPlayWickedGodCondition,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canEndSelectCondition: null,
+                                        maxCount: maxCount,
+                                        canNoSelect: true,
+                                        canEndNotMax: false,
+                                        isShowOpponent: true,
+                                        selectCardCoroutine: SelectCardCoroutine,
+                                        afterSelectCardCoroutine: null,
+                                        mode: SelectHandEffect.Mode.Custom,
+                                        cardEffect: activateClass);
+
+                                    selectHandEffect.SetUpCustomMessage(
+                                        "Select 1 [Wicked God] trait Digimon card to play.",
+                                        "The opponent is selecting 1 [Wicked God] trait Digimon card to play.");
+                                    selectHandEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                                    yield return StartCoroutine(selectHandEffect.Activate());
                                 }
-                                else if (CardEffectCommons.IsExistOnTrash(selectedCards[0]))
+                                else
                                 {
-                                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
-                                        cardSources: selectedCards,
-                                        activateClass: activateClass,
-                                        payCost: false,
-                                        isTapped: false,
+                                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                                    selectCardEffect.SetUp(
+                                        canTargetCondition: CanPlayWickedGodCondition,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canEndSelectCondition: null,
+                                        canNoSelect: () => false,
+                                        selectCardCoroutine: SelectCardCoroutine,
+                                        afterSelectCardCoroutine: null,
+                                        message: "Select 1 [Wicked God] trait Digimon card to play.",
+                                        maxCount: 1,
+                                        canEndNotMax: false,
+                                        isShowOpponent: true,
+                                        mode: SelectCardEffect.Mode.Custom,
                                         root: SelectCardEffect.Root.Trash,
-                                        activateETB: true));
+                                        customRootCardList: null,
+                                        canLookReverseCard: true,
+                                        selectPlayer: card.Owner,
+                                        cardEffect: activateClass);
+
+                                    selectCardEffect.SetUpCustomMessage(
+                                        "Select 1 [Wicked God] trait Digimon card to play.",
+                                        "The opponent is selecting 1 [Wicked God] trait Digimon card to play.");
+                                    selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                                    yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                                }
+
+                                SelectCardEffect.Root root = SelectCardEffect.Root.Hand;
+
+                                if (!fromHand)
+                                {
+                                    root = SelectCardEffect.Root.Trash;
                                 }
+
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                                    cardSources: selectedCards,
+                                    activateClass: activateClass,
+                                    payCost: false,
+                                    isTapped: false,
+                                    root: root,
+                                    activateETB: true));
                             }
                         }
                     }
@@ -352,5 +418,15 @@ namespace DCGO.CardEffects.BT19
 
             return cardEffects;
         }
+
+        bool endSelect = false;
+        bool fromHand = false;
+
+        [PunRPC]
+        public void SetFromHand(bool fromHand)
+        {
+            this.fromHand = fromHand;
+            endSelect = true;
+        }
     }
 }

+ 2 - 2
Assets/CardEffect/BT19/Yellow/DynasmonXAntibody_BT19_042.cs

@@ -41,7 +41,7 @@ namespace DCGO.CardEffects.BT19
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Trash top security card to trash opponents top security and gain +6000 DP", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
-                activateClass.SetHashString("TrashSecurity_DysnasmonXAntibody_BT19_042");
+                activateClass.SetHashString("TrashSecurity_DynasmonXAntibody_BT19_042");
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -66,7 +66,7 @@ namespace DCGO.CardEffects.BT19
                 {
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
-                        if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.EqualsCardName("Dynasmon") || cardSource.Equals("X Antibody")) >= 1)
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.EqualsCardName("Dynasmon") || cardSource.EqualsCardName("X Antibody")) >= 1)
                         {
                             if (card.Owner.SecurityCards.Count >= 1)
                             {

+ 27 - 19
Assets/CardEffect/BT19/Yellow/LucemonXAntibody_BT19_043.cs

@@ -61,7 +61,7 @@ namespace DCGO.CardEffects.BT19
                 {
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
-                        if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.CardNames.Contains("Lucemon")) >= 1)
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.ContainsCardName("Lucemon")) >= 1)
                         {
                             if (card.Owner.SecurityCards.Count >= 1 && card.Owner.Enemy.SecurityCards.Count >= 1)
                                 return true;
@@ -160,36 +160,44 @@ namespace DCGO.CardEffects.BT19
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
-                {                                       
-                    if (!card.Owner.isYou)
+                {   
+                    if(card.Owner.Enemy.SecurityCards.Count > 0)
                     {
-                        GManager.instance.commandText.OpenCommandText("Will you discard the top card of your security?");
+                        if (!card.Owner.isYou)
+                        {
+                            GManager.instance.commandText.OpenCommandText("Will you discard the top card of your security?");
 
-                        List<Command_SelectCommand> command_SelectCommands = new List<Command_SelectCommand>()
+                            List<Command_SelectCommand> command_SelectCommands = new List<Command_SelectCommand>()
                     {
                         new Command_SelectCommand($"Discard", () => photonView.RPC("SetDoDiscard", RpcTarget.All, true), 0),
                         new Command_SelectCommand($"Not Discard", () => photonView.RPC("SetDoDiscard", RpcTarget.All, false), 1),
                     };
 
-                        GManager.instance.selectCommandPanel.SetUpCommandButton(command_SelectCommands);
+                            GManager.instance.selectCommandPanel.SetUpCommandButton(command_SelectCommands);
+                        }
+                        else
+                        {
+                            GManager.instance.commandText.OpenCommandText("The opponent is choosing whether to discard security.");
+
+                            #region AI
+                            if (GManager.instance.IsAI)
+                            {
+                                SetDoDiscard(RandomUtility.IsSucceedProbability(0.5f));
+                            }
+                            #endregion
+                        }
+
+                        yield return new WaitWhile(() => !endSelect);
+                        endSelect = false;
+
+                        GManager.instance.commandText.CloseCommandText();
+                        yield return new WaitWhile(() => GManager.instance.commandText.gameObject.activeSelf);
                     }
                     else
                     {
-                        GManager.instance.commandText.OpenCommandText("The opponent is choosing whether to discard security.");
-
-                        #region AI
-                        if (GManager.instance.IsAI)
-                        {
-                            SetDoDiscard(RandomUtility.IsSucceedProbability(0.5f));
-                        }
-                        #endregion
+                        SetDoDiscard(false);
                     }
                     
-                    yield return new WaitWhile(() => !endSelect);
-                    endSelect = false;
-
-                    GManager.instance.commandText.CloseCommandText();
-                    yield return new WaitWhile(() => GManager.instance.commandText.gameObject.activeSelf);
 
                     if (!doDiscard)
                     {

+ 22 - 18
Assets/CardEffect/BT19/Yellow/SeventhDivineCruz_BT19_094.cs

@@ -65,35 +65,39 @@ namespace DCGO.CardEffects.BT19
 
                         yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect2(cardSources, "Deck Bottom Card", true, true));
 
-                        if (!card.Owner.isYou)
+                        if (card.Owner.Enemy.SecurityCards.Count > 0)
                         {
-                            GManager.instance.commandText.OpenCommandText("Will you discard the top card of your security?");
+                            if (!card.Owner.isYou)
+                            {
+                                GManager.instance.commandText.OpenCommandText("Will you discard the top card of your security?");
 
-                            List<Command_SelectCommand> command_SelectCommands = new List<Command_SelectCommand>()
+                                List<Command_SelectCommand> command_SelectCommands = new List<Command_SelectCommand>()
                     {
                         new Command_SelectCommand($"Discard", () => photonView.RPC("SetDoDiscard", RpcTarget.All, true), 0),
                         new Command_SelectCommand($"Not Discard", () => photonView.RPC("SetDoDiscard", RpcTarget.All, false), 1),
                     };
 
-                            GManager.instance.selectCommandPanel.SetUpCommandButton(command_SelectCommands);
-                        }
-                        else
-                        {
-                            GManager.instance.commandText.OpenCommandText("The opponent is choosing whether to discard security.");
-
-                            #region AI
-                            if (GManager.instance.IsAI)
+                                GManager.instance.selectCommandPanel.SetUpCommandButton(command_SelectCommands);
+                            }
+                            else
                             {
-                                SetDoDiscard(RandomUtility.IsSucceedProbability(0.5f));
+                                GManager.instance.commandText.OpenCommandText("The opponent is choosing whether to discard security.");
+
+                                #region AI
+                                if (GManager.instance.IsAI)
+                                {
+                                    SetDoDiscard(RandomUtility.IsSucceedProbability(0.5f));
+                                }
+                                #endregion
                             }
-                            #endregion
-                        }
 
-                        yield return new WaitWhile(() => !endSelect);
-                        endSelect = false;
+                            yield return new WaitWhile(() => !endSelect);
+                            endSelect = false;
 
-                        GManager.instance.commandText.CloseCommandText();
-                        yield return new WaitWhile(() => GManager.instance.commandText.gameObject.activeSelf);
+                            GManager.instance.commandText.CloseCommandText();
+                            yield return new WaitWhile(() => GManager.instance.commandText.gameObject.activeSelf);
+                        }
+                            
 
                         if (!doDiscard)
                         {

+ 22 - 31
Assets/CardEffect/BT19/Yellow/WizardmonXAntibody_BT19_036.cs

@@ -58,26 +58,21 @@ namespace DCGO.CardEffects.BT19
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                    {
-                        if (card.Owner.SecurityCards.Count >= 1)
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    CardSource topCard = card.Owner.SecurityCards[0];
+                    if (card.Owner.SecurityCards.Count >= 1)
+                    {
+                        CardSource topCard = card.Owner.SecurityCards[0];
 
-                    yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddHandCards(new List<CardSource>() { topCard }, false, activateClass));
+                        yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddHandCards(new List<CardSource>() { topCard }, false, activateClass));
 
-                    yield return ContinuousController.instance.StartCoroutine(new IReduceSecurity(
-                        player: card.Owner,
-                        refSkillInfos: ref ContinuousController.instance.nullSkillInfos).ReduceSecurity());
+                        yield return ContinuousController.instance.StartCoroutine(new IReduceSecurity(
+                            player: card.Owner,
+                            refSkillInfos: ref ContinuousController.instance.nullSkillInfos).ReduceSecurity());
+                    }                        
 
                     if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.EqualsCardName("Wizardmon") || cardSource.EqualsCardName("X Antibody")) >= 1)
                     {
@@ -167,7 +162,7 @@ namespace DCGO.CardEffects.BT19
                     {
                         if (cardSource.CardColors.Contains(CardColor.Yellow) || cardSource.CardColors.Contains(CardColor.Purple))
                         {
-                            if (cardSource.HasPlayCost && cardSource.GetCostItself <= 5)
+                            if (cardSource.HasUseCost && cardSource.GetCostItself <= 5)
                             {
                                 return true;
                             }
@@ -179,28 +174,23 @@ namespace DCGO.CardEffects.BT19
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                    {
-                        if (card.Owner.SecurityCards.Count >= 1)
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    CardSource topCard = card.Owner.SecurityCards[0];
+                    if (card.Owner.SecurityCards.Count >= 1)
+                    {
+                        CardSource topCard = card.Owner.SecurityCards[0];
 
-                    yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddHandCards(new List<CardSource>() { topCard }, false, activateClass));
+                        yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddHandCards(new List<CardSource>() { topCard }, false, activateClass));
 
-                    yield return ContinuousController.instance.StartCoroutine(new IReduceSecurity(
-                        player: card.Owner,
-                        refSkillInfos: ref ContinuousController.instance.nullSkillInfos).ReduceSecurity());
+                        yield return ContinuousController.instance.StartCoroutine(new IReduceSecurity(
+                            player: card.Owner,
+                            refSkillInfos: ref ContinuousController.instance.nullSkillInfos).ReduceSecurity());
+                    }
 
-                    if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.EqualsCardName("Wizardmon") || cardSource.EqualsCardName("XAntibody")) >= 1)
+                    if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.EqualsCardName("Wizardmon") || cardSource.EqualsCardName("X Antibody")) >= 1)
                     {
                         if (card.Owner.CanAddSecurity(activateClass))
                         {
@@ -289,7 +279,8 @@ namespace DCGO.CardEffects.BT19
                 {
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
-                        if (card.CardColors.Contains(CardColor.Yellow) && (card.ContainsTraits("Data") || card.ContainsTraits("Witchelny")))
+                        Permanent thisPermanent = card.PermanentOfThisCard();
+                        if (thisPermanent.TopCard.CardColors.Contains(CardColor.Yellow) && (thisPermanent.TopCard.ContainsTraits("Data") || thisPermanent.TopCard.ContainsTraits("Witchelny")))
                         {
                             if (card.Owner.SecurityCards.Count >= 1)
                                 return true;

+ 2 - 1
Assets/CardEffect/BT3/Blue/DesperadeBluster_BT3_100.cs

@@ -31,7 +31,8 @@ public class DesperadeBluster_BT3_100 : CEntity_Effect
                 {
                     if (!permanent.TopCard.CanNotBeAffected(activateClass))
                     {
-                        return true;
+                        if(permanent.DigivolutionCards.Count == 0)
+                            return true;
                     }
                 }
 

+ 1 - 1
Assets/CardEffect/BT6/Blue/Gabumon_BT6_019.cs

@@ -95,7 +95,7 @@ public class Gabumon_BT6_019 : CEntity_Effect
                 {
                     if (CardEffectCommons.CanUnsuspend(card.PermanentOfThisCard()))
                     {
-                        if (card.PermanentOfThisCard().TopCard.CardNames.Contains("Gabumon-BondofFriendship"))
+                        if (card.PermanentOfThisCard().TopCard.ContainsCardName("Gabumon - Bond of Friendship"))
                         {
                             return true;
                         }

+ 1 - 1
Assets/CardEffect/BT6/Blue/IshidaYamato_BT6_088.cs

@@ -124,7 +124,7 @@ public class IshidaYamato_BT6_088 : CEntity_Effect
 
             bool CanSelectCardCondition(CardSource cardSource)
             {
-                return cardSource.CardNames.Contains("Gabumon-BondofFriendship");
+                return cardSource.EqualsCardName("Gabumon - Bond of Friendship");
             }
 
             bool CanUseCondition(Hashtable hashtable)

+ 1 - 1
Assets/CardEffect/BT6/Red/Agumon_BT6_007.cs

@@ -78,7 +78,7 @@ public class Agumon_BT6_007 : CEntity_Effect
                 {
                     if (CardEffectCommons.IsOwnerTurn(card))
                     {
-                        if (card.PermanentOfThisCard().TopCard.CardNames.Contains("Agumon-BondofBravery"))
+                        if (card.PermanentOfThisCard().TopCard.EqualsCardName("Agumon - Bond of Bravery"))
                         {
                             return true;
                         }

+ 1 - 1
Assets/CardEffect/BT6/Red/YagamiTaichi_BT6_087.cs

@@ -125,7 +125,7 @@ public class YagamiTaichi_BT6_087 : CEntity_Effect
 
             bool CanSelectCardCondition(CardSource cardSource)
             {
-                return cardSource.CardNames.Contains("Agumon-BondofBravery");
+                return cardSource.EqualsCardName("Agumon - Bond of Bravery");
             }
 
             bool CanUseCondition(Hashtable hashtable)

+ 1 - 1
Assets/CardEffect/BT7/Purple/DeadOrAlive_BT7_109.cs

@@ -48,7 +48,7 @@ public class DeadOrAlive_BT7_109 : CEntity_Effect
 
                                     if (card.Owner.TrashCards.Count >= 10)
                                     {
-                                        if (cardSource.CardNames.Contains("Lucemon"))
+                                        if (cardSource.ContainsCardName("Lucemon"))
                                         {
                                             return true;
                                         }

+ 1 - 4
Assets/CardEffect/EX1/Blue/Gomamon_EX1_012.cs

@@ -29,10 +29,7 @@ public class Gomamon_EX1_012 : CEntity_Effect
             {
                 if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
                 {
-                    if (permanent.DigivolutionCards.Count((cardSource) => !cardSource.CanNotTrashFromDigivolutionCards(activateClass)) >= 1)
-                    {
-                        return true;
-                    }
+                    return true;
                 }
 
                 return false;

+ 3 - 1
Assets/CardEffect/EX4/Red/Medivaldukemon_EX4_013.cs

@@ -77,7 +77,7 @@ public class Medivaldukemon_EX4_013 : CEntity_Effect
 
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        Permanent selectedPermanent = card.PermanentOfThisCard();
+                        Permanent selectedPermanent = null;
 
                         ActivateClass activateClass1 = new ActivateClass();
                         activateClass1.SetUpICardEffect("Return the Digimon to hand", CanUseCondition1, card);
@@ -91,6 +91,8 @@ public class Medivaldukemon_EX4_013 : CEntity_Effect
 
                         bool CanActivateCondition1(Hashtable hashtable)
                         {
+                            selectedPermanent = card.PermanentOfThisCard();
+
                             if (selectedPermanent.TopCard != null)
                             {
                                 if (!selectedPermanent.CannotReturnToHand(activateClass1))

+ 1 - 1
Assets/CardEffect/EX5/Green/DufutomonXAntibody_EX5_043.cs

@@ -509,7 +509,7 @@ public class DufutomonXAntibody_EX5_043 : CEntity_Effect
         if (timing == EffectTiming.OnEnterFieldAnyone)
         {
             ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Return 1 Digimo to hand", CanUseCondition, card);
+            activateClass.SetUpICardEffect("Return 1 Digimon to hand", CanUseCondition, card);
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
             activateClass.SetHashString("Bounce_EX5_043");
             cardEffects.Add(activateClass);

+ 1 - 1
Assets/CardEffect/EX6/Black/BryweLudramon_EX6_044.cs

@@ -298,7 +298,7 @@ namespace DCGO.CardEffects.EX6
                                 }
                             }
 
-                            return true;
+                            return false;
                         }
 
                         bool PermanentCondition(Permanent permanent)

+ 6 - 15
Assets/CardEffect/EX6/Black/Keramon_EX6_036.cs

@@ -104,7 +104,10 @@ namespace DCGO.CardEffects.EX6
                     {
                         if (card.Owner.fieldCardFrames.Count((frame) => frame.IsEmptyFrame()) >= 1)
                         {
-                            return true;
+                            if (card.PermanentJustBeforeRemoveField.CardTraitsJustBeforeRemoveField.Contains("Unidentified"))
+                            {
+                                return true;
+                            }
                         }
                     }
 
@@ -112,20 +115,8 @@ namespace DCGO.CardEffects.EX6
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
-                {              
-                    List<Hashtable> deletionHashtables = CardEffectCommons.GetHashtablesFromHashtable(hashtable);
-
-                    if(deletionHashtables.Count > 0)
-                    {
-                        Hashtable hash = deletionHashtables[0];
-                        if (hash.ContainsKey("TopCard") && hash["TopCard"] is CardSource)
-                        {
-                            CardSource source = (CardSource)hash["TopCard"];
-
-                            if(card.ContainsTraits("Unidentified"))
-                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayDiaboromonToken(activateClass));
-                        }
-                    }
+                {
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayDiaboromonToken(activateClass));
                 }
             }
             #endregion

+ 5 - 2
Assets/CardEffect/EX6/Black/Kurisarimon_EX6_039.cs

@@ -329,9 +329,12 @@ namespace DCGO.CardEffects.EX6
                 {
                     if (CardEffectCommons.CanActivateOnDeletion(card))
                     {
-                        if (card.PermanentJustBeforeRemoveField.CardTraitsJustBeforeRemoveField.Contains("Unidentified"))
+                        if (card.Owner.fieldCardFrames.Count((frame) => frame.IsEmptyFrame()) >= 1)
                         {
-                            return true;
+                            if (card.PermanentJustBeforeRemoveField.CardTraitsJustBeforeRemoveField.Contains("Unidentified"))
+                            {
+                                return true;
+                            }
                         }
                     }
                     return false;

+ 2 - 2
Assets/CardEffect/EX6/Black/RaijiLudomon_EX6_042.cs

@@ -300,7 +300,7 @@ namespace DCGO.CardEffects.EX6
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Prevent Deletion", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
                 activateClass.SetHashString("Protection_EX6_042");
                 activateClass.SetIsInheritedEffect(true);
                 cardEffects.Add(activateClass);
@@ -365,7 +365,7 @@ namespace DCGO.CardEffects.EX6
                                     canTargetCondition: HasLegendArmsTrait,
                                     canTargetCondition_ByPreSelecetedList: null,
                                     canEndSelectCondition: null,
-                                    canNoSelect: () => true,
+                                    canNoSelect: () => false,
                                     selectCardCoroutine: SelectCardCoroutine,
                                     afterSelectCardCoroutine: null,
                                     message: "Select cards to discard.",

+ 1 - 5
Assets/CardEffect/EX6/Purple/Barbamon_EX6_059.cs

@@ -228,11 +228,7 @@ namespace DCGO.CardEffects.EX6
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if(CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                    {
-                        return true;
-                    }
-                    return true;
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)

+ 1 - 1
Assets/CardEffect/EX6/Purple/Lucemon_Chaos_Mode_EX6_054.cs

@@ -26,7 +26,7 @@ namespace DCGO.CardEffects.EX6
                     return false;
                 }
 
-                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 6, ignoreDigivolutionRequirement: true, card: card, condition: null));
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 6, ignoreDigivolutionRequirement: false, card: card, condition: null));
             }
             #endregion
 

+ 1 - 1
Assets/CardEffect/EX6/Purple/Ogudomon_EX6_073.cs

@@ -231,7 +231,7 @@ namespace DCGO.CardEffects.EX6
 
                 string EffectDiscription()
                 {
-                    return "[When Digivolving] [When Attacking] You may place up to 7 cards with different names and the [Seven Great Demon Lords] trait from your trash as this Digimon's bottom digivolution cards. If you placed 4 or more cards with this effect, delete 1 of your opponent's Digimon or Tamers.";
+                    return "[When Attacking] You may place up to 7 cards with different names and the [Seven Great Demon Lords] trait from your trash as this Digimon's bottom digivolution cards. If you placed 4 or more cards with this effect, delete 1 of your opponent's Digimon or Tamers.";
                 }
 
                 bool CanUseCondition(Hashtable hashtable)

+ 6 - 10
Assets/CardEffect/EX6/White/Mega_Digimon_Assembly_EX6_072.cs

@@ -71,14 +71,7 @@ namespace DCGO.CardEffects.EX6
 
                 bool HasLevel6HandSource(CardSource cardSource)
                 {
-                    if (cardSource.IsDigimon)
-                    {
-                        if (cardSource.HasLevel && cardSource.Level == 6)
-                        {
-                            return true;
-                        }
-                    }
-                    return false;
+                    return cardSource.IsDigimon;
                 }
 
                 bool HasLevel6Permanent(Permanent permanent)
@@ -111,8 +104,11 @@ namespace DCGO.CardEffects.EX6
 
                             if (elements[i].EvoRootCondition(permanent))
                             {
-                                allowedPermanents.Add(permanent);
-                                added = true;
+                                if(selectedLevel7.CanEvolve(permanent, true))
+                                {
+                                    allowedPermanents.Add(permanent);
+                                    added = true;
+                                }
                             }
                         }
 

+ 1 - 1
Assets/CardEffect/EX6/White/UltimateChaosmon_EX6_062.cs

@@ -16,7 +16,7 @@ namespace DCGO.CardEffects.EX6
             {
                 List<PartitionCondition> partitionConditions = new List<PartitionCondition>();
                 partitionConditions.Add(new PartitionCondition(6, CardColor.Black, CardColor.Yellow));
-                partitionConditions.Add(new PartitionCondition(6, CardColor.Yellow, CardColor.Purple));
+                partitionConditions.Add(new PartitionCondition(6, CardColor.Green, CardColor.Purple));
 
                 cardEffects.Add(CardEffectFactory.PartitionSelfEffect(
                     isInheritedEffect: false,

+ 2 - 9
Assets/CardEffect/EX7/Black/Gundramon_EX7_048.cs

@@ -80,8 +80,6 @@ namespace DCGO.CardEffects.EX7
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    CardSource selectedCard = null;
-
                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
                         revealCount: 6,
                         simplifiedSelectCardConditions:
@@ -100,21 +98,16 @@ namespace DCGO.CardEffects.EX7
                     ));
 
                     IEnumerator SelectCardCoroutine(CardSource cardSource)
-                    {
-                        selectedCard = cardSource;
-                        yield return null;
-                    }
-
-                    if (selectedCard != null)
                     {
                         yield return ContinuousController.instance.StartCoroutine(
                             CardEffectCommons.PlayOptionCards(
-                                cardSources: new List<CardSource>() { selectedCard },
+                                cardSources: new List<CardSource>() { cardSource },
                                 activateClass: activateClass,
                                 payCost: false,
                                 root: SelectCardEffect.Root.Library
                             )
                         );
+                        yield return null;
                     }
                 }
             }

+ 48 - 40
Assets/CardEffect/LM/Black/BlackScramble_LM_031.cs

@@ -36,7 +36,9 @@ namespace DCGO.CardEffects.LM
 
                 bool CanSelectOwnPermanentCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) && card.Owner.HandCards.Where(CanSelectHandCardCondition).Any(cardSource => cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass));
+                    return CanSelectHandCardCondition(permanent.TopCard) &&
+                           CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
+                           card.Owner.HandCards.Where(CanSelectHandCardCondition).Any(cardSource => cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass));
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -95,12 +97,12 @@ namespace DCGO.CardEffects.LM
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Return a black Digimon to top of the deck from trash, then play a black Digimon from trash.", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
                 {
-                    return "[Main] <Delay> Return 1 black Digimon card from your trash to the top of the deck. Then, if you don't have a Digimon, you may play 1 black Digimon card with 2000 DP or less from your trash without paying the cost.";
+                    return "[Start of your Turn] If your opponent has a Digimon, <Delay>.\r\n• Return 1 black Digimon card from your trash to the top of the deck. Then, if you don't have a Digimon, you may play 1 black Digimon card with 2000 DP or less from your trash without paying the cost.";
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)
@@ -132,7 +134,10 @@ namespace DCGO.CardEffects.LM
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanDeclareOptionDelayEffect(card);
+                    return CardEffectCommons.IsOwnerTurn(card) &&
+                           CardEffectCommons.IsExistOnBattleArea(card) &&
+                           card.Owner.Enemy.GetBattleAreaDigimons().Count >= 1 &&
+                           CardEffectCommons.CanDeclareOptionDelayEffect(card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
@@ -173,7 +178,7 @@ namespace DCGO.CardEffects.LM
                             canTargetCondition: (cardSource) => CanSelectCardCondition(cardSource),
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
-                            canNoSelect: () => true,
+                            canNoSelect: () => false,
                             selectCardCoroutine: null,
                             afterSelectCardCoroutine: AfterSelectCardCoroutine,
                             message: "Select a black Digimon to place at the top of the deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
@@ -201,45 +206,48 @@ namespace DCGO.CardEffects.LM
                             }
                         }
 
-                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardCondition1(cardSource)))
+                        if (card.Owner.GetBattleAreaDigimons().Count == 0)
                         {
-                            int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition1(cardSource)));
-
-                            List<CardSource> selectedCards = new List<CardSource>();
-
-                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                            selectCardEffect.SetUp(
-                                        canTargetCondition: CanSelectCardCondition1,
-                                        canTargetCondition_ByPreSelecetedList: null,
-                                        canEndSelectCondition: null,
-                                        canNoSelect: () => true,
-                                        selectCardCoroutine: SelectCardCoroutine,
-                                        afterSelectCardCoroutine: null,
-                                        message: "Select 1 black Digimon with 2000 DP or less to play.",
-                                        maxCount: maxCount,
-                                        canEndNotMax: false,
-                                        isShowOpponent: true,
-                                        mode: SelectCardEffect.Mode.Custom,
-                                        root: SelectCardEffect.Root.Trash,
-                                        customRootCardList: null,
-                                        canLookReverseCard: true,
-                                        selectPlayer: card.Owner,
-                                        cardEffect: activateClass);
-
-                            selectCardEffect.SetUpCustomMessage("Select 1 black Digimon with 2000 DP or less to play.", "The opponent is selecting 1 card to play.");
-                            selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
-
-                            yield return StartCoroutine(selectCardEffect.Activate());
-
-                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardCondition1(cardSource)))
                             {
-                                selectedCards.Add(cardSource);
+                                int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition1(cardSource)));
+
+                                List<CardSource> selectedCards = new List<CardSource>();
+
+                                SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                                selectCardEffect.SetUp(
+                                            canTargetCondition: CanSelectCardCondition1,
+                                            canTargetCondition_ByPreSelecetedList: null,
+                                            canEndSelectCondition: null,
+                                            canNoSelect: () => true,
+                                            selectCardCoroutine: SelectCardCoroutine,
+                                            afterSelectCardCoroutine: null,
+                                            message: "Select 1 black Digimon with 2000 DP or less to play.",
+                                            maxCount: maxCount,
+                                            canEndNotMax: false,
+                                            isShowOpponent: true,
+                                            mode: SelectCardEffect.Mode.Custom,
+                                            root: SelectCardEffect.Root.Trash,
+                                            customRootCardList: null,
+                                            canLookReverseCard: true,
+                                            selectPlayer: card.Owner,
+                                            cardEffect: activateClass);
+
+                                selectCardEffect.SetUpCustomMessage("Select 1 black Digimon with 2000 DP or less to play.", "The opponent is selecting 1 card to play.");
+                                selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                                yield return StartCoroutine(selectCardEffect.Activate());
+
+                                IEnumerator SelectCardCoroutine(CardSource cardSource)
+                                {
+                                    selectedCards.Add(cardSource);
 
-                                yield return null;
-                            }
+                                    yield return null;
+                                }
 
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
+                            }
                         }
                     }                
                 }

+ 1 - 0
Assets/CardEffect/LM/Black/CyberdramonAce_LM_025.cs

@@ -247,6 +247,7 @@ namespace DCGO.CardEffects.LM
                 activateClass.SetUpICardEffect("<De-Digivolve 1> 1 of your opponent's Digimon", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDescription());
                 activateClass.SetIsInheritedEffect(true);
+                activateClass.SetHashString("WhenAttack_LM-025");
                 cardEffects.Add(activateClass);
 
                 string EffectDescription()

+ 1 - 6
Assets/CardEffect/LM/Black/SepiaMemoryBoost_LM_037.cs

@@ -20,12 +20,7 @@ namespace DCGO.CardEffects.LM
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.TopCard.CardColors.Contains(CardColor.Yellow)))
-                    {
-                        return true;
-                    }
-
-                    return false;
+                    return CardEffectCommons.HasMatchConditionPermanent((permanent) => permanent.TopCard.Owner == card.Owner && permanent.TopCard.CardColors.Contains(CardColor.Yellow), true);
                 }
 
                 bool CardCondition(CardSource cardSource)

+ 48 - 53
Assets/CardEffect/LM/Blue/BlueScramble_LM_028.cs

@@ -36,7 +36,9 @@ namespace DCGO.CardEffects.LM
 
                 bool CanSelectOwnPermanentCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) && card.Owner.HandCards.Where(CanSelectHandCardCondition).Any(cardSource => cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass));
+                    return CanSelectHandCardCondition(permanent.TopCard) &&
+                           CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
+                           card.Owner.HandCards.Where(CanSelectHandCardCondition).Any(cardSource => cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass));
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -95,12 +97,12 @@ namespace DCGO.CardEffects.LM
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Return a blue Digimon to top of the deck from trash, then play a blue Digimon from trash.", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
                 {
-                    return "[Main] <Delay> Return 1 blue Digimon card from your trash to the top of the deck. Then, if you don't have a Digimon, you may play 1 blue Digimon card with 2000 DP or less from your trash without paying the cost.";
+                    return "[Start of your Turn] If your opponent has a Digimon, <Delay>.\r\n• Return 1 blue Digimon card from your trash to the top of the deck. Then, if you don't have a Digimon, you may play 1 blue Digimon card with 2000 DP or less from your trash without paying the cost.";
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)
@@ -132,20 +134,10 @@ namespace DCGO.CardEffects.LM
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanDeclareOptionDelayEffect(card);
-                }
-
-                bool CanActivateCondition(Hashtable hashtable)
-                {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        if (card.Owner.Enemy.GetBattleAreaDigimons().Count >= 1)
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsOwnerTurn(card) &&
+                           CardEffectCommons.IsExistOnBattleArea(card) &&
+                           card.Owner.Enemy.GetBattleAreaDigimons().Count >= 1 &&
+                           CardEffectCommons.CanDeclareOptionDelayEffect(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -173,7 +165,7 @@ namespace DCGO.CardEffects.LM
                             canTargetCondition: (cardSource) => CanSelectCardCondition(cardSource),
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
-                            canNoSelect: () => true,
+                            canNoSelect: () => false,
                             selectCardCoroutine: null,
                             afterSelectCardCoroutine: AfterSelectCardCoroutine,
                             message: "Select a blue Digimon to place at the top of the deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
@@ -201,45 +193,48 @@ namespace DCGO.CardEffects.LM
                             }
                         }
 
-                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardCondition1(cardSource)))
+                        if (card.Owner.GetBattleAreaDigimons().Count == 0)
                         {
-                            int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition1(cardSource)));
-
-                            List<CardSource> selectedCards = new List<CardSource>();
-
-                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                            selectCardEffect.SetUp(
-                                        canTargetCondition: CanSelectCardCondition1,
-                                        canTargetCondition_ByPreSelecetedList: null,
-                                        canEndSelectCondition: null,
-                                        canNoSelect: () => true,
-                                        selectCardCoroutine: SelectCardCoroutine,
-                                        afterSelectCardCoroutine: null,
-                                        message: "Select 1 blue Digimon with 2000 DP or less to play.",
-                                        maxCount: maxCount,
-                                        canEndNotMax: false,
-                                        isShowOpponent: true,
-                                        mode: SelectCardEffect.Mode.Custom,
-                                        root: SelectCardEffect.Root.Trash,
-                                        customRootCardList: null,
-                                        canLookReverseCard: true,
-                                        selectPlayer: card.Owner,
-                                        cardEffect: activateClass);
-
-                            selectCardEffect.SetUpCustomMessage("Select 1 blue Digimon with 2000 DP or less to play.", "The opponent is selecting 1 card to play.");
-                            selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
-
-                            yield return StartCoroutine(selectCardEffect.Activate());
-
-                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardCondition1(cardSource)))
                             {
-                                selectedCards.Add(cardSource);
+                                int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition1(cardSource)));
+
+                                List<CardSource> selectedCards = new List<CardSource>();
+
+                                SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                                selectCardEffect.SetUp(
+                                            canTargetCondition: CanSelectCardCondition1,
+                                            canTargetCondition_ByPreSelecetedList: null,
+                                            canEndSelectCondition: null,
+                                            canNoSelect: () => true,
+                                            selectCardCoroutine: SelectCardCoroutine,
+                                            afterSelectCardCoroutine: null,
+                                            message: "Select 1 blue Digimon with 2000 DP or less to play.",
+                                            maxCount: maxCount,
+                                            canEndNotMax: false,
+                                            isShowOpponent: true,
+                                            mode: SelectCardEffect.Mode.Custom,
+                                            root: SelectCardEffect.Root.Trash,
+                                            customRootCardList: null,
+                                            canLookReverseCard: true,
+                                            selectPlayer: card.Owner,
+                                            cardEffect: activateClass);
+
+                                selectCardEffect.SetUpCustomMessage("Select 1 blue Digimon with 2000 DP or less to play.", "The opponent is selecting 1 card to play.");
+                                selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                                yield return StartCoroutine(selectCardEffect.Activate());
+
+                                IEnumerator SelectCardCoroutine(CardSource cardSource)
+                                {
+                                    selectedCards.Add(cardSource);
 
-                                yield return null;
-                            }
+                                    yield return null;
+                                }
 
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
+                            }
                         }
                     }                
                 }

+ 1 - 0
Assets/CardEffect/LM/Blue/Thetismon_LM_004.cs

@@ -233,6 +233,7 @@ namespace DCGO.CardEffects.LM
                 activateClass.SetUpICardEffect("Unsuspend this Digimon", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateAllTurnsCondition, ActivateCoroutine, 1, true, EffectAllTurnsDiscription());
                 activateClass.SetIsInheritedEffect(true);
+                activateClass.SetHashString("Unsuspend_LM-004");
                 cardEffects.Add(activateClass);
 
                 string EffectAllTurnsDiscription()

+ 1 - 6
Assets/CardEffect/LM/Blue/WisteriaMemoryBoost_LM_034.cs

@@ -20,12 +20,7 @@ namespace DCGO.CardEffects.LM
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.TopCard.CardColors.Contains(CardColor.Red)))
-                    {
-                        return true;
-                    }
-
-                    return false;
+                    return CardEffectCommons.HasMatchConditionPermanent((permanent) => permanent.TopCard.Owner == card.Owner && permanent.TopCard.CardColors.Contains(CardColor.Red), true);
                 }
 
                 bool CardCondition(CardSource cardSource)

+ 1 - 1
Assets/CardEffect/LM/Green/Chamblemon_LM_010.cs

@@ -15,7 +15,7 @@ namespace DCGO.CardEffects.LM
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Tamers can't unsuspend", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()

+ 48 - 53
Assets/CardEffect/LM/Green/GreenScramble_LM_030.cs

@@ -36,7 +36,9 @@ namespace DCGO.CardEffects.LM
 
                 bool CanSelectOwnPermanentCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) && card.Owner.HandCards.Where(CanSelectHandCardCondition).Any(cardSource => cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass));
+                    return CanSelectHandCardCondition(permanent.TopCard) &&
+                           CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
+                           card.Owner.HandCards.Where(CanSelectHandCardCondition).Any(cardSource => cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass));
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -95,12 +97,12 @@ namespace DCGO.CardEffects.LM
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Return a green Digimon to top of the deck from trash, then play a green Digimon from trash.", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
                 {
-                    return "[Main] <Delay> Return 1 green Digimon card from your trash to the top of the deck. Then, if you don't have a Digimon, you may play 1 green Digimon card with 2000 DP or less from your trash without paying the cost.";
+                    return "[Start of your Turn] If your opponent has a Digimon, <Delay>.\r\n• Return 1 green Digimon card from your trash to the top of the deck. Then, if you don't have a Digimon, you may play 1 green Digimon card with 2000 DP or less from your trash without paying the cost.";
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)
@@ -132,20 +134,10 @@ namespace DCGO.CardEffects.LM
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanDeclareOptionDelayEffect(card);
-                }
-
-                bool CanActivateCondition(Hashtable hashtable)
-                {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        if (card.Owner.Enemy.GetBattleAreaDigimons().Count >= 1)
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsOwnerTurn(card) &&
+                           CardEffectCommons.IsExistOnBattleArea(card) &&
+                           card.Owner.Enemy.GetBattleAreaDigimons().Count >= 1 &&
+                           CardEffectCommons.CanDeclareOptionDelayEffect(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -173,7 +165,7 @@ namespace DCGO.CardEffects.LM
                             canTargetCondition: (cardSource) => CanSelectCardCondition(cardSource),
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
-                            canNoSelect: () => true,
+                            canNoSelect: () => false,
                             selectCardCoroutine: null,
                             afterSelectCardCoroutine: AfterSelectCardCoroutine,
                             message: "Select a green Digimon to place at the top of the deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
@@ -201,45 +193,48 @@ namespace DCGO.CardEffects.LM
                             }
                         }
 
-                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardCondition1(cardSource)))
+                        if (card.Owner.GetBattleAreaDigimons().Count == 0)
                         {
-                            int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition1(cardSource)));
-
-                            List<CardSource> selectedCards = new List<CardSource>();
-
-                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                            selectCardEffect.SetUp(
-                                        canTargetCondition: CanSelectCardCondition1,
-                                        canTargetCondition_ByPreSelecetedList: null,
-                                        canEndSelectCondition: null,
-                                        canNoSelect: () => true,
-                                        selectCardCoroutine: SelectCardCoroutine,
-                                        afterSelectCardCoroutine: null,
-                                        message: "Select 1 green Digimon with 2000 DP or less to play.",
-                                        maxCount: maxCount,
-                                        canEndNotMax: false,
-                                        isShowOpponent: true,
-                                        mode: SelectCardEffect.Mode.Custom,
-                                        root: SelectCardEffect.Root.Trash,
-                                        customRootCardList: null,
-                                        canLookReverseCard: true,
-                                        selectPlayer: card.Owner,
-                                        cardEffect: activateClass);
-
-                            selectCardEffect.SetUpCustomMessage("Select 1 green Digimon with 2000 DP or less to play.", "The opponent is selecting 1 card to play.");
-                            selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
-
-                            yield return StartCoroutine(selectCardEffect.Activate());
-
-                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardCondition1(cardSource)))
                             {
-                                selectedCards.Add(cardSource);
+                                int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition1(cardSource)));
+
+                                List<CardSource> selectedCards = new List<CardSource>();
+
+                                SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                                selectCardEffect.SetUp(
+                                            canTargetCondition: CanSelectCardCondition1,
+                                            canTargetCondition_ByPreSelecetedList: null,
+                                            canEndSelectCondition: null,
+                                            canNoSelect: () => true,
+                                            selectCardCoroutine: SelectCardCoroutine,
+                                            afterSelectCardCoroutine: null,
+                                            message: "Select 1 green Digimon with 2000 DP or less to play.",
+                                            maxCount: maxCount,
+                                            canEndNotMax: false,
+                                            isShowOpponent: true,
+                                            mode: SelectCardEffect.Mode.Custom,
+                                            root: SelectCardEffect.Root.Trash,
+                                            customRootCardList: null,
+                                            canLookReverseCard: true,
+                                            selectPlayer: card.Owner,
+                                            cardEffect: activateClass);
+
+                                selectCardEffect.SetUpCustomMessage("Select 1 green Digimon with 2000 DP or less to play.", "The opponent is selecting 1 card to play.");
+                                selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                                yield return StartCoroutine(selectCardEffect.Activate());
+
+                                IEnumerator SelectCardCoroutine(CardSource cardSource)
+                                {
+                                    selectedCards.Add(cardSource);
 
-                                yield return null;
-                            }
+                                    yield return null;
+                                }
 
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
+                            }
                         }
                     }                
                 }

+ 1 - 6
Assets/CardEffect/LM/Green/JadeMemoryBoost_LM_036.cs

@@ -20,12 +20,7 @@ namespace DCGO.CardEffects.LM
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.TopCard.CardColors.Contains(CardColor.Blue)))
-                    {
-                        return true;
-                    }
-
-                    return false;
+                    return CardEffectCommons.HasMatchConditionPermanent((permanent) => permanent.TopCard.Owner == card.Owner && permanent.TopCard.CardColors.Contains(CardColor.Blue), true);
                 }
 
                 bool CardCondition(CardSource cardSource)

+ 1 - 6
Assets/CardEffect/LM/Purple/GrapeMemoryBoost_LM_038.cs

@@ -20,12 +20,7 @@ namespace DCGO.CardEffects.LM
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.TopCard.CardColors.Contains(CardColor.Green)))
-                    {
-                        return true;
-                    }
-
-                    return false;
+                    return CardEffectCommons.HasMatchConditionPermanent((permanent) => permanent.TopCard.Owner == card.Owner && permanent.TopCard.CardColors.Contains(CardColor.Green), true);
                 }
 
                 bool CardCondition(CardSource cardSource)

+ 2 - 1
Assets/CardEffect/LM/Purple/MegidramonAce_LM_026.cs

@@ -160,7 +160,8 @@ namespace DCGO.CardEffects.LM
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
-                           CardEffectCommons.CanTriggerWhenRemoveField(hashtable, card);
+                           CardEffectCommons.CanTriggerWhenRemoveField(hashtable, card) &&
+                           !activateClass.IsSameEffect(CardEffectCommons.GetCardEffectFromHashtable(hashtable));
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)

+ 49 - 54
Assets/CardEffect/LM/Purple/PurpleScramble_LM_032.cs

@@ -36,7 +36,9 @@ namespace DCGO.CardEffects.LM
 
                 bool CanSelectOwnPermanentCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) && card.Owner.HandCards.Where(CanSelectHandCardCondition).Any(cardSource => cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass));
+                    return CanSelectHandCardCondition(permanent.TopCard) && 
+                           CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
+                           card.Owner.HandCards.Where(CanSelectHandCardCondition).Any(cardSource => cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass));
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -90,17 +92,17 @@ namespace DCGO.CardEffects.LM
             }
             #endregion
 
-            #region Main Delay
+            #region Start of Turn Delay
             if (timing == EffectTiming.OnStartTurn)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Return a purple Digimon to top of the deck from trash, then play a purple Digimon from trash.", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
                 {
-                    return "[Main] <Delay> Return 1 purple Digimon card from your trash to the top of the deck. Then, if you don't have a Digimon, you may play 1 purple Digimon card with 2000 DP or less from your trash without paying the cost.";
+                    return "[Start of your Turn] If your opponent has a Digimon, <Delay>.\r\n• Return 1 purple Digimon card from your trash to the top of the deck. Then, if you don't have a Digimon, you may play 1 purple Digimon card with 2000 DP or less from your trash without paying the cost.";
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)
@@ -132,20 +134,10 @@ namespace DCGO.CardEffects.LM
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanDeclareOptionDelayEffect(card);
-                }
-
-                bool CanActivateCondition(Hashtable hashtable)
-                {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        if (card.Owner.Enemy.GetBattleAreaDigimons().Count >= 1)
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsOwnerTurn(card) &&
+                           CardEffectCommons.IsExistOnBattleArea(card) &&
+                           card.Owner.Enemy.GetBattleAreaDigimons().Count >= 1 &&
+                           CardEffectCommons.CanDeclareOptionDelayEffect(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -173,7 +165,7 @@ namespace DCGO.CardEffects.LM
                             canTargetCondition: (cardSource) => CanSelectCardCondition(cardSource),
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
-                            canNoSelect: () => true,
+                            canNoSelect: () => false,
                             selectCardCoroutine: null,
                             afterSelectCardCoroutine: AfterSelectCardCoroutine,
                             message: "Select a purple Digimon to place at the top of the deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
@@ -201,45 +193,48 @@ namespace DCGO.CardEffects.LM
                             }
                         }
 
-                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardCondition1(cardSource)))
+                        if(card.Owner.GetBattleAreaDigimons().Count == 0)
                         {
-                            int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition1(cardSource)));
-
-                            List<CardSource> selectedCards = new List<CardSource>();
-
-                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                            selectCardEffect.SetUp(
-                                        canTargetCondition: CanSelectCardCondition1,
-                                        canTargetCondition_ByPreSelecetedList: null,
-                                        canEndSelectCondition: null,
-                                        canNoSelect: () => true,
-                                        selectCardCoroutine: SelectCardCoroutine,
-                                        afterSelectCardCoroutine: null,
-                                        message: "Select 1 purple Digimon with 2000 DP or less to play.",
-                                        maxCount: maxCount,
-                                        canEndNotMax: false,
-                                        isShowOpponent: true,
-                                        mode: SelectCardEffect.Mode.Custom,
-                                        root: SelectCardEffect.Root.Trash,
-                                        customRootCardList: null,
-                                        canLookReverseCard: true,
-                                        selectPlayer: card.Owner,
-                                        cardEffect: activateClass);
-
-                            selectCardEffect.SetUpCustomMessage("Select 1 purple Digimon with 2000 DP or less to play.", "The opponent is selecting 1 card to play.");
-                            selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
-
-                            yield return StartCoroutine(selectCardEffect.Activate());
-
-                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardCondition1(cardSource)))
                             {
-                                selectedCards.Add(cardSource);
+                                int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition1(cardSource)));
+
+                                List<CardSource> selectedCards = new List<CardSource>();
+
+                                SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                                selectCardEffect.SetUp(
+                                            canTargetCondition: CanSelectCardCondition1,
+                                            canTargetCondition_ByPreSelecetedList: null,
+                                            canEndSelectCondition: null,
+                                            canNoSelect: () => true,
+                                            selectCardCoroutine: SelectCardCoroutine,
+                                            afterSelectCardCoroutine: null,
+                                            message: "Select 1 purple Digimon with 2000 DP or less to play.",
+                                            maxCount: maxCount,
+                                            canEndNotMax: false,
+                                            isShowOpponent: true,
+                                            mode: SelectCardEffect.Mode.Custom,
+                                            root: SelectCardEffect.Root.Trash,
+                                            customRootCardList: null,
+                                            canLookReverseCard: true,
+                                            selectPlayer: card.Owner,
+                                            cardEffect: activateClass);
+
+                                selectCardEffect.SetUpCustomMessage("Select 1 purple Digimon with 2000 DP or less to play.", "The opponent is selecting 1 card to play.");
+                                selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                                yield return StartCoroutine(selectCardEffect.Activate());
+
+                                IEnumerator SelectCardCoroutine(CardSource cardSource)
+                                {
+                                    selectedCards.Add(cardSource);
 
-                                yield return null;
-                            }
+                                    yield return null;
+                                }
 
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
+                            }
                         }
                     }            
                 }

+ 1 - 6
Assets/CardEffect/LM/Red/GarnetMemoryBoost_LM_033.cs

@@ -20,12 +20,7 @@ namespace DCGO.CardEffects.LM
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.TopCard.CardColors.Contains(CardColor.Black)))
-                    {
-                        return true;
-                    }
-
-                    return false;
+                    return CardEffectCommons.HasMatchConditionPermanent((permanent) => permanent.TopCard.Owner == card.Owner && permanent.TopCard.CardColors.Contains(CardColor.Black), true);
                 }
 
                 bool CardCondition(CardSource cardSource)

+ 48 - 53
Assets/CardEffect/LM/Red/RedScramble_LM_027.cs

@@ -36,7 +36,9 @@ namespace DCGO.CardEffects.LM
 
                 bool CanSelectOwnPermanentCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) && card.Owner.HandCards.Where(CanSelectHandCardCondition).Any(cardSource => cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass));
+                    return CanSelectHandCardCondition(permanent.TopCard) &&
+                           CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
+                           card.Owner.HandCards.Where(CanSelectHandCardCondition).Any(cardSource => cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass));
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -95,12 +97,12 @@ namespace DCGO.CardEffects.LM
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Return a red Digimon to top of the deck from trash, then play a red Digimon from trash.", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
                 {
-                    return "[Main] <Delay> Return 1 red Digimon card from your trash to the top of the deck. Then, if you don't have a Digimon, you may play 1 red Digimon card with 2000 DP or less from your trash without paying the cost.";
+                    return "[Start of your Turn] If your opponent has a Digimon, <Delay>.\r\n• Return 1 red Digimon card from your trash to the top of the deck. Then, if you don't have a Digimon, you may play 1 red Digimon card with 2000 DP or less from your trash without paying the cost.";
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)
@@ -132,20 +134,10 @@ namespace DCGO.CardEffects.LM
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanDeclareOptionDelayEffect(card);
-                }
-
-                bool CanActivateCondition(Hashtable hashtable)
-                {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        if (card.Owner.Enemy.GetBattleAreaDigimons().Count >= 1)
-                        {
-                           return true;                            
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsOwnerTurn(card) &&
+                           CardEffectCommons.IsExistOnBattleArea(card) &&
+                           card.Owner.Enemy.GetBattleAreaDigimons().Count >= 1 &&
+                           CardEffectCommons.CanDeclareOptionDelayEffect(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -173,7 +165,7 @@ namespace DCGO.CardEffects.LM
                             canTargetCondition: (cardSource) => CanSelectCardCondition(cardSource),
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
-                            canNoSelect: () => true,
+                            canNoSelect: () => false,
                             selectCardCoroutine: null,
                             afterSelectCardCoroutine: AfterSelectCardCoroutine,
                             message: "Select a red Digimon to place at the top of the deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
@@ -201,45 +193,48 @@ namespace DCGO.CardEffects.LM
                             }
                         }
 
-                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardCondition1(cardSource)))
+                        if (card.Owner.GetBattleAreaDigimons().Count == 0)
                         {
-                            int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition1(cardSource)));
-
-                            List<CardSource> selectedCards = new List<CardSource>();
-
-                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                            selectCardEffect.SetUp(
-                                        canTargetCondition: CanSelectCardCondition1,
-                                        canTargetCondition_ByPreSelecetedList: null,
-                                        canEndSelectCondition: null,
-                                        canNoSelect: () => true,
-                                        selectCardCoroutine: SelectCardCoroutine,
-                                        afterSelectCardCoroutine: null,
-                                        message: "Select 1 red Digimon with 2000 DP or less to play.",
-                                        maxCount: maxCount,
-                                        canEndNotMax: false,
-                                        isShowOpponent: true,
-                                        mode: SelectCardEffect.Mode.Custom,
-                                        root: SelectCardEffect.Root.Trash,
-                                        customRootCardList: null,
-                                        canLookReverseCard: true,
-                                        selectPlayer: card.Owner,
-                                        cardEffect: activateClass);
-
-                            selectCardEffect.SetUpCustomMessage("Select 1 red Digimon with 2000 DP or less to play.", "The opponent is selecting 1 card to play.");
-                            selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
-
-                            yield return StartCoroutine(selectCardEffect.Activate());
-
-                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardCondition1(cardSource)))
                             {
-                                selectedCards.Add(cardSource);
+                                int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition1(cardSource)));
+
+                                List<CardSource> selectedCards = new List<CardSource>();
+
+                                SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                                selectCardEffect.SetUp(
+                                            canTargetCondition: CanSelectCardCondition1,
+                                            canTargetCondition_ByPreSelecetedList: null,
+                                            canEndSelectCondition: null,
+                                            canNoSelect: () => true,
+                                            selectCardCoroutine: SelectCardCoroutine,
+                                            afterSelectCardCoroutine: null,
+                                            message: "Select 1 red Digimon with 2000 DP or less to play.",
+                                            maxCount: maxCount,
+                                            canEndNotMax: false,
+                                            isShowOpponent: true,
+                                            mode: SelectCardEffect.Mode.Custom,
+                                            root: SelectCardEffect.Root.Trash,
+                                            customRootCardList: null,
+                                            canLookReverseCard: true,
+                                            selectPlayer: card.Owner,
+                                            cardEffect: activateClass);
+
+                                selectCardEffect.SetUpCustomMessage("Select 1 red Digimon with 2000 DP or less to play.", "The opponent is selecting 1 card to play.");
+                                selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                                yield return StartCoroutine(selectCardEffect.Activate());
+
+                                IEnumerator SelectCardCoroutine(CardSource cardSource)
+                                {
+                                    selectedCards.Add(cardSource);
 
-                                yield return null;
-                            }
+                                    yield return null;
+                                }
 
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
+                            }
                         }
                     }                    
                 }

+ 1 - 6
Assets/CardEffect/LM/Yellow/AmberMemoryBoost_LM_035.cs

@@ -20,12 +20,7 @@ namespace DCGO.CardEffects.LM
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.TopCard.CardColors.Contains(CardColor.Purple)))
-                    {
-                        return true;
-                    }
-
-                    return false;
+                    return CardEffectCommons.HasMatchConditionPermanent((permanent) => permanent.TopCard.Owner == card.Owner && permanent.TopCard.CardColors.Contains(CardColor.Purple), true);
                 }
 
                 bool CardCondition(CardSource cardSource)

+ 2 - 5
Assets/CardEffect/LM/Yellow/Quantumon_LM_020.cs

@@ -251,7 +251,7 @@ namespace DCGO.CardEffects.LM
                         if (revealedCards[0].CardKind.Equals(selectedCategory))
                         {
                             CanNotAffectedClass canNotAffectedClass = new CanNotAffectedClass();
-                            canNotAffectedClass.SetUpICardEffect("Isn't affected by opponent's Digimon's effects", CanUseCondition, card);
+                            canNotAffectedClass.SetUpICardEffect($"Isn't affected by opponent's {selectedCategory}'s effects", CanUseCondition, card);
                             canNotAffectedClass.SetUpCanNotAffectedClass(CardCondition: CardCondition, SkillCondition: SkillCondition);
                             selectedPermanent.UntilOpponentTurnEndEffects.Add((_timing) => canNotAffectedClass);
 
@@ -273,10 +273,7 @@ namespace DCGO.CardEffects.LM
                                 {
                                     if (CardEffectCommons.IsExistOnBattleArea(card))
                                     {
-                                        if (cardSource == card.PermanentOfThisCard().TopCard)
-                                        {
-                                            return true;
-                                        }
+                                        return true;
                                     }
                                 }
 

+ 48 - 53
Assets/CardEffect/LM/Yellow/YellowScramble_LM_029.cs

@@ -36,7 +36,9 @@ namespace DCGO.CardEffects.LM
 
                 bool CanSelectOwnPermanentCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) && card.Owner.HandCards.Where(CanSelectHandCardCondition).Any(cardSource => cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass));
+                    return CanSelectHandCardCondition(permanent.TopCard) &&
+                           CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
+                           card.Owner.HandCards.Where(CanSelectHandCardCondition).Any(cardSource => cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass));
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -95,12 +97,12 @@ namespace DCGO.CardEffects.LM
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Return a yellow Digimon to top of the deck from trash, then play a yellow Digimon from trash.", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
                 {
-                    return "[Main] <Delay> Return 1 yellow Digimon card from your trash to the top of the deck. Then, if you don't have a Digimon, you may play 1 yellow Digimon card with 2000 DP or less from your trash without paying the cost.";
+                    return "[Start of your Turn] If your opponent has a Digimon, <Delay>.\r\n• Return 1 yellow Digimon card from your trash to the top of the deck. Then, if you don't have a Digimon, you may play 1 yellow Digimon card with 2000 DP or less from your trash without paying the cost.";
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)
@@ -132,20 +134,10 @@ namespace DCGO.CardEffects.LM
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanDeclareOptionDelayEffect(card);
-                }
-
-                bool CanActivateCondition(Hashtable hashtable)
-                {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        if (card.Owner.Enemy.GetBattleAreaDigimons().Count >= 1)
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsOwnerTurn(card) &&
+                           CardEffectCommons.IsExistOnBattleArea(card) &&
+                           card.Owner.Enemy.GetBattleAreaDigimons().Count >= 1 &&
+                           CardEffectCommons.CanDeclareOptionDelayEffect(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -173,7 +165,7 @@ namespace DCGO.CardEffects.LM
                             canTargetCondition: (cardSource) => CanSelectCardCondition(cardSource),
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
-                            canNoSelect: () => true,
+                            canNoSelect: () => false,
                             selectCardCoroutine: null,
                             afterSelectCardCoroutine: AfterSelectCardCoroutine,
                             message: "Select a yellow Digimon to place at the top of the deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
@@ -201,45 +193,48 @@ namespace DCGO.CardEffects.LM
                             }
                         }
 
-                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardCondition1(cardSource)))
+                        if (card.Owner.GetBattleAreaDigimons().Count == 0)
                         {
-                            int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition1(cardSource)));
-
-                            List<CardSource> selectedCards = new List<CardSource>();
-
-                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                            selectCardEffect.SetUp(
-                                        canTargetCondition: CanSelectCardCondition1,
-                                        canTargetCondition_ByPreSelecetedList: null,
-                                        canEndSelectCondition: null,
-                                        canNoSelect: () => true,
-                                        selectCardCoroutine: SelectCardCoroutine,
-                                        afterSelectCardCoroutine: null,
-                                        message: "Select 1 yellow Digimon with 2000 DP or less to play.",
-                                        maxCount: maxCount,
-                                        canEndNotMax: false,
-                                        isShowOpponent: true,
-                                        mode: SelectCardEffect.Mode.Custom,
-                                        root: SelectCardEffect.Root.Trash,
-                                        customRootCardList: null,
-                                        canLookReverseCard: true,
-                                        selectPlayer: card.Owner,
-                                        cardEffect: activateClass);
-
-                            selectCardEffect.SetUpCustomMessage("Select 1 yellow Digimon with 2000 DP or less to play.", "The opponent is selecting 1 card to play.");
-                            selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
-
-                            yield return StartCoroutine(selectCardEffect.Activate());
-
-                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardCondition1(cardSource)))
                             {
-                                selectedCards.Add(cardSource);
+                                int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition1(cardSource)));
+
+                                List<CardSource> selectedCards = new List<CardSource>();
+
+                                SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                                selectCardEffect.SetUp(
+                                            canTargetCondition: CanSelectCardCondition1,
+                                            canTargetCondition_ByPreSelecetedList: null,
+                                            canEndSelectCondition: null,
+                                            canNoSelect: () => true,
+                                            selectCardCoroutine: SelectCardCoroutine,
+                                            afterSelectCardCoroutine: null,
+                                            message: "Select 1 yellow Digimon with 2000 DP or less to play.",
+                                            maxCount: maxCount,
+                                            canEndNotMax: false,
+                                            isShowOpponent: true,
+                                            mode: SelectCardEffect.Mode.Custom,
+                                            root: SelectCardEffect.Root.Trash,
+                                            customRootCardList: null,
+                                            canLookReverseCard: true,
+                                            selectPlayer: card.Owner,
+                                            cardEffect: activateClass);
+
+                                selectCardEffect.SetUpCustomMessage("Select 1 yellow Digimon with 2000 DP or less to play.", "The opponent is selecting 1 card to play.");
+                                selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                                yield return StartCoroutine(selectCardEffect.Activate());
+
+                                IEnumerator SelectCardCoroutine(CardSource cardSource)
+                                {
+                                    selectedCards.Add(cardSource);
 
-                                yield return null;
-                            }
+                                    yield return null;
+                                }
 
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
+                            }
                         }
                     }            
                 }

+ 1 - 1
Assets/CardEffect/P/White/FuturePotential_P_156.cs

@@ -49,7 +49,7 @@ namespace DCGO.CardEffects.P
 
                 bool HasTamer(Permanent permanent)
                 {
-                    if (CardEffectCommons.IsOwnerPermanent(permanent, card))
+                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
                         return permanent.IsTamer;
 
                     return false;

+ 5 - 2
Assets/CardEffect/P/White/JeriFake_P_158.cs

@@ -102,8 +102,11 @@ namespace DCGO.CardEffects.P
                 {
                     if (cardSource.EqualsTraits("D-Reaper"))
                     {
-                        if(cardSource.GetCostItself <= getMaxCost())
-                            return true;
+                        if (cardSource.IsDigimon)
+                        {
+                            if (cardSource.GetCostItself <= getMaxCost())
+                                return true;
+                        }
                     }
 
                     return false;

+ 2 - 2
Assets/CardEffect/RB1/White/AmanokawaHokuto_RB1_035.cs

@@ -112,12 +112,12 @@ public class AmanokawaHokuto_RB1_035 : CEntity_Effect
 
                 if (permanents != null)
                 {
-                    if (permanents.Some(permanent => permanent.LevelJustAfterPlayed >= 4))
+                    if (permanents.Some(permanent => permanent.Level >= 4))
                     {
                         yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
                     }
 
-                    if (permanents.Some(permanent => permanent.LevelJustAfterPlayed == 3))
+                    if (permanents.Some(permanent => permanent.Level == 3))
                     {
                         yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
                     }

+ 1 - 0
Assets/CardEffect/ST14/Purple/BelzebmonBlastMode_ST14_10.cs

@@ -17,6 +17,7 @@ public class BelzebmonBlastMode_ST14_10 : CEntity_Effect
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Delete 1 Digimon", CanUseCondition, card);
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            activateClass.SetIsDigimonEffect(true);
             cardEffects.Add(activateClass);
 
             string EffectDiscription()

+ 36 - 0
Assets/Scenes/ContinuousControllerScene.unity

@@ -438,24 +438,42 @@ MonoBehaviour:
   IgnoreUpdate: 1
   CardList:
   - {fileID: 11400000, guid: 797e895533810e44e8f0a000ab9d0b2a, type: 2}
+  - {fileID: 11400000, guid: f00ba80e8f234d841ac335861c08c0c7, type: 2}
+  - {fileID: 11400000, guid: 0227e21c58cd4d9429b6bd17983ab9a0, type: 2}
+  - {fileID: 11400000, guid: caec41bf474be064ebce103e6babc790, type: 2}
   - {fileID: 11400000, guid: 2e31511712ff38c4ab97413369570ac5, type: 2}
   - {fileID: 11400000, guid: efd8013bccec0504582b40409d0936af, type: 2}
   - {fileID: 11400000, guid: 04033b6c32c9c1744a005b1c8847c046, type: 2}
   - {fileID: 11400000, guid: 8e13193af77b3bb4bb680949966ab3c9, type: 2}
   - {fileID: 11400000, guid: f3a737b2e0548a14b83499c15c443cca, type: 2}
+  - {fileID: 11400000, guid: cda52dac859e4d241a9cc128fed7ee41, type: 2}
+  - {fileID: 11400000, guid: ba407dfac24e3af488cb4ccb5f98899b, type: 2}
+  - {fileID: 11400000, guid: f537a61143573a44c99f6b18f264ef85, type: 2}
   - {fileID: 11400000, guid: 09ea0fcb3c3bbc24e8464a578fcb1d55, type: 2}
   - {fileID: 11400000, guid: da57c33b8bf198e43a444fd2efd8fd2f, type: 2}
+  - {fileID: 11400000, guid: d8fad20ccf815fb4b9168d5ed4d6c4b7, type: 2}
+  - {fileID: 11400000, guid: d5988012b122f3249a8f8454c8d87772, type: 2}
+  - {fileID: 11400000, guid: 25657de408048d44a8eb7b820623d88f, type: 2}
   - {fileID: 11400000, guid: 4b60e22b7d3ddf24b9e63dfa9f2fa24e, type: 2}
   - {fileID: 11400000, guid: 511deccd969439d4cabb28c63da75465, type: 2}
   - {fileID: 11400000, guid: 6e6eb3bd39e64cf40a7159fcc3f84bd1, type: 2}
   - {fileID: 11400000, guid: b43a495a5e613284c864222f56bb344e, type: 2}
   - {fileID: 11400000, guid: e1d3e08b95ada0249bc3e7411aa7aa3d, type: 2}
   - {fileID: 11400000, guid: 5d49d01b8a7938b4d88defb81bcb0f79, type: 2}
+  - {fileID: 11400000, guid: d04e26fc093dd2240a515e33ac6d7a5e, type: 2}
+  - {fileID: 11400000, guid: 163eb83da0583d14d97493152d5f8bdb, type: 2}
+  - {fileID: 11400000, guid: 4f33aca68e8ee0d4492a55173e9abf06, type: 2}
   - {fileID: 11400000, guid: 944cddba1fe15bb42a8f05a8ae124c71, type: 2}
   - {fileID: 11400000, guid: 766f0227913bd314baeb5c8291c7e6fa, type: 2}
+  - {fileID: 11400000, guid: 8a56d48945c2392409e13a2833b248b5, type: 2}
+  - {fileID: 11400000, guid: eccbb99a3a95c4046b5a62e2d55a7a41, type: 2}
+  - {fileID: 11400000, guid: 6c456c43fe619f140ac9748dbc5e03a9, type: 2}
   - {fileID: 11400000, guid: 0af8820f0cb9d8f4cbb864ef0de9e318, type: 2}
   - {fileID: 11400000, guid: 550db500f9df74546a01dabd7a335b7e, type: 2}
   - {fileID: 11400000, guid: 0d527c58e69886e4e814876b68158415, type: 2}
+  - {fileID: 11400000, guid: 4896d486bd8f83044989407e670357a3, type: 2}
+  - {fileID: 11400000, guid: da9668fcd6fbaa840a776f7485c94449, type: 2}
+  - {fileID: 11400000, guid: 797dda43c25650946911d1b4c8699a2b, type: 2}
   - {fileID: 11400000, guid: 384cbeced540f9242907b9e15cd9cbf5, type: 2}
   - {fileID: 11400000, guid: d6547a94a914caf4087d9e08b3de4bfa, type: 2}
   - {fileID: 11400000, guid: 0444a8387db4be74bb1b52f69f91ad83, type: 2}
@@ -8738,6 +8756,24 @@ MonoBehaviour:
   - {fileID: 11400000, guid: 0444a8387db4be74bb1b52f69f91ad83, type: 2}
   - {fileID: 11400000, guid: 01d96d18d59e85c459fd44e9d243c60a, type: 2}
   - {fileID: 11400000, guid: 35ae0cc381dd1294f9c42450c2a39889, type: 2}
+  - {fileID: 11400000, guid: f00ba80e8f234d841ac335861c08c0c7, type: 2}
+  - {fileID: 11400000, guid: cda52dac859e4d241a9cc128fed7ee41, type: 2}
+  - {fileID: 11400000, guid: d8fad20ccf815fb4b9168d5ed4d6c4b7, type: 2}
+  - {fileID: 11400000, guid: d04e26fc093dd2240a515e33ac6d7a5e, type: 2}
+  - {fileID: 11400000, guid: 8a56d48945c2392409e13a2833b248b5, type: 2}
+  - {fileID: 11400000, guid: 4896d486bd8f83044989407e670357a3, type: 2}
+  - {fileID: 11400000, guid: 0227e21c58cd4d9429b6bd17983ab9a0, type: 2}
+  - {fileID: 11400000, guid: ba407dfac24e3af488cb4ccb5f98899b, type: 2}
+  - {fileID: 11400000, guid: d5988012b122f3249a8f8454c8d87772, type: 2}
+  - {fileID: 11400000, guid: 163eb83da0583d14d97493152d5f8bdb, type: 2}
+  - {fileID: 11400000, guid: eccbb99a3a95c4046b5a62e2d55a7a41, type: 2}
+  - {fileID: 11400000, guid: da9668fcd6fbaa840a776f7485c94449, type: 2}
+  - {fileID: 11400000, guid: caec41bf474be064ebce103e6babc790, type: 2}
+  - {fileID: 11400000, guid: f537a61143573a44c99f6b18f264ef85, type: 2}
+  - {fileID: 11400000, guid: 25657de408048d44a8eb7b820623d88f, type: 2}
+  - {fileID: 11400000, guid: 4f33aca68e8ee0d4492a55173e9abf06, type: 2}
+  - {fileID: 11400000, guid: 6c456c43fe619f140ac9748dbc5e03a9, type: 2}
+  - {fileID: 11400000, guid: 797dda43c25650946911d1b4c8699a2b, type: 2}
   - {fileID: 11400000, guid: 03f5e14579a633043a99437490dfef8d, type: 2}
   - {fileID: 11400000, guid: f722aa20dbee0824b9b2638096816697, type: 2}
   - {fileID: 11400000, guid: e085fbfb0bc42744f9eb98b5afffaac0, type: 2}

+ 14 - 0
Assets/Scripts/AutoProcessing.cs

@@ -200,6 +200,9 @@ public class AutoProcessing : MonoBehaviourPunCallbacks
             //DP不足処理
             yield return ContinuousController.instance.StartCoroutine(DigimonLackDPProcess());
 
+            //Battle as Tamer
+            yield return ContinuousController.instance.StartCoroutine(BattleWithoutDigimon());
+
             IsRuleProcessing = false;
         }
     }
@@ -308,6 +311,17 @@ public class AutoProcessing : MonoBehaviourPunCallbacks
     }
     #endregion
 
+    #region Battle Concerning Tamer
+    IEnumerator BattleWithoutDigimon()
+    {
+        if(GManager.instance.attackProcess.AttackingPermanent == null)
+            yield break;
+
+        if(!GManager.instance.attackProcess.AttackingPermanent.IsDigimon)
+            GManager.instance.attackProcess.IsEndAttack = true;
+    }
+    #endregion
+
     #endregion
 
     #endregion

+ 6 - 1
Assets/Scripts/CardController.cs

@@ -1141,7 +1141,10 @@ public class PlayPermanentClass
 
                         else
                         {
-                            PlayLog.OnAddLog?.Invoke($"\nPlay on field:\n{card.BaseENGCardNameFromEntity}({card.CardID})\n");
+                            if(card.IsToken)
+                                PlayLog.OnAddLog?.Invoke($"\nPlay on field:\n{card.BaseENGCardNameFromEntity} token\n");
+                            else
+                                PlayLog.OnAddLog?.Invoke($"\nPlay on field:\n{card.BaseENGCardNameFromEntity}({card.CardID})\n");
 
                             permanent = new Permanent(new List<CardSource>() { card }) { IsSuspended = _isTapped };
 
@@ -2475,6 +2478,8 @@ public class IPlacePermanentToDigivolutionCards
                             yield return ContinuousController.instance.StartCoroutine(getDigivolutionPermanent.AddDigivolutionCardsBottom(digivolutionCards, _cardEffect, _skipEffectAndActivateSkill));
                         }
 
+                        cardSource.cEntity_EffectController.InitUseCountThisTurn();
+
                         addedDigivolutionCards.Add(cardSource);
 
                         Placed = true;

+ 18 - 7
Assets/Scripts/CardEffectCommons.cs

@@ -4,7 +4,6 @@ using System;
 using System.Linq;
 using UnityEngine;
 using UnityEditor;
-
 public partial class CardEffectCommons
 { 
     #region Digivolution Requirements
@@ -406,7 +405,8 @@ public partial class CardEffectCommons
         IEnumerator successProcess,
         //bool ignoreLevel = false,
         bool ignoreSelection = false,
-        IgnoreRequirement ignoreRequirements = IgnoreRequirement.None)
+        IgnoreRequirement ignoreRequirements = IgnoreRequirement.None,
+        IEnumerator failedProcess = null)
     {
         if (targetPermanent == null) yield break;
         if (targetPermanent.TopCard == null) yield break;
@@ -419,6 +419,8 @@ public partial class CardEffectCommons
 
         int fixedCost = -1;
 
+        bool successful = false;
+
         if (fixedCostTuple != null)
         {
             fixedCost = fixedCostTuple.Value.fixedCost;
@@ -667,7 +669,8 @@ public partial class CardEffectCommons
             }
             else
             {
-                selectedCards.Add(activateClass.EffectSourceCard);
+                if(ignoreSelection)
+                    selectedCards.Add(activateClass.EffectSourceCard);
             }
         }
 
@@ -707,12 +710,20 @@ public partial class CardEffectCommons
 
             if (IsDigivolvedByTheEffect(targetPermanent, selectedCards[0], activateClass))
             {
-                if (successProcess != null)
-                {
-                    yield return ContinuousController.instance.StartCoroutine(successProcess);
-                }
+                successful = true;
             }
         }
+
+        if (successful)
+        {
+            if (successProcess != null)
+                yield return ContinuousController.instance.StartCoroutine(successProcess);
+        }
+        else
+        {
+            if (failedProcess != null)
+                yield return ContinuousController.instance.StartCoroutine(failedProcess);
+        }
     }
     #endregion
 

+ 13 - 10
Assets/Scripts/CardEffectCommons/KeyWordEffects/Overclock.cs

@@ -76,20 +76,23 @@ public partial class CardEffectCommons
                 {
                     Permanent attacker = cardSource.PermanentOfThisCard();
 
-                    if (attacker.CanAttack(activateClass, withoutTap: true))
+                    if(attacker != null)
                     {
-                        SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
+                        if (attacker.CanAttack(activateClass, withoutTap: true))
+                        {
+                            SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
 
-                        selectAttackEffect.SetUp(
-                            attacker: attacker,
-                            canAttackPlayerCondition: () => true,
-                            defenderCondition: _ => false,
-                            cardEffect: activateClass);
+                            selectAttackEffect.SetUp(
+                                attacker: attacker,
+                                canAttackPlayerCondition: () => true,
+                                defenderCondition: _ => false,
+                                cardEffect: activateClass);
 
-                        selectAttackEffect.SetWithoutTap();
-                        selectAttackEffect.SetCanNotSelectNotAttack();
+                            selectAttackEffect.SetWithoutTap();
+                            selectAttackEffect.SetCanNotSelectNotAttack();
 
-                        yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
+                            yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
+                        }
                     }
                 }
             }

+ 32 - 24
Assets/Scripts/CardEffectFactory/KeyWordEffects/BlastDNADigivolution.cs

@@ -29,22 +29,10 @@ public partial class CardEffectFactory
         if (card.Owner.GetBattleAreaPermanents().Count == 0) return null;
         if (card.Owner.HandCards.Count < 2) return null;
 
-        List<Permanent> fieldPermanents = card.Owner.GetBattleAreaDigimons();
+        List<Permanent> fieldPermanents = new List<Permanent>();
         List<Permanent> permanentSources = new List<Permanent>();
         List<CardSource> handSources = new List<CardSource>();
 
-        foreach (BlastDNACondition DNACondition in blastDNAConditions)
-        {
-            DNACondition.Permanents = fieldPermanents.Filter(permanent => permanent.TopCard.EqualsCardName(DNACondition.Name));
-            DNACondition.CardSources = card.Owner.HandCards.Filter(cardSource => cardSource.EqualsCardName(DNACondition.Name));
-
-            permanentSources.AddRange(DNACondition.Permanents);
-            handSources.AddRange(DNACondition.CardSources);
-        }
-
-        FilterDNAPermanents();
-        FilterDNAHandSources();
-
         void FilterDNAPermanents()
         {
             if (blastDNAConditions[0].Permanents.Count >= 1 && blastDNAConditions[0].CardSources.Count == 0)
@@ -65,6 +53,20 @@ public partial class CardEffectFactory
 
         bool HasValidDNATargets()
         {
+            fieldPermanents = card.Owner.GetBattleAreaDigimons();
+
+            foreach (BlastDNACondition DNACondition in blastDNAConditions)
+            {
+                DNACondition.Permanents = fieldPermanents.Filter(permanent => permanent.TopCard.EqualsCardName(DNACondition.Name));
+                DNACondition.CardSources = card.Owner.HandCards.Filter(cardSource => cardSource.EqualsCardName(DNACondition.Name));
+
+                permanentSources.AddRange(DNACondition.Permanents);
+                handSources.AddRange(DNACondition.CardSources);
+            }
+
+            FilterDNAPermanents();
+            FilterDNAHandSources();
+
             if (blastDNAConditions[0].Permanents.Count(permanent => !permanent.TopCard.CanNotEvolve(permanent)) > 0 && blastDNAConditions[1].CardSources.Count > 0)
                 return true;
 
@@ -193,18 +195,13 @@ public partial class CardEffectFactory
                 selectedCardSource = cardSource;
 
                 Permanent playedPermanent;
-                int frameID = -1; 
+                int frameID = -1;
+
+                FieldCardFrame preferredFrame = selectedCardSource.PreferredFrame();
 
-                foreach (FieldCardFrame fieldCardFrame in selectedCardSource.Owner.fieldCardFrames)
+                if (preferredFrame != null)
                 {
-                    if (card.CanPlayCardTargetFrame(fieldCardFrame, false, null))
-                    {
-                        if (fieldCardFrame.IsEmptyFrame())
-                        {
-                            frameID = fieldCardFrame.FrameID;
-                            break;
-                        }
-                    }
+                    frameID = preferredFrame.FrameID;
                 }
 
                 if (0 <= frameID && frameID < card.Owner.fieldCardFrames.Count)
@@ -214,7 +211,18 @@ public partial class CardEffectFactory
                     yield return ContinuousController.instance.StartCoroutine(CardObjectController.CreateNewPermanent(playedPermanent, frameID));
                 }
 
-                int[] JogressEvoRootsFrameIDs = { selectedPermanent.PermanentFrame.FrameID, selectedCardSource.PermanentOfThisCard().PermanentFrame.FrameID };
+                int[] JogressEvoRootsFrameIDs = { 0, 0 };
+
+                if (selectedPermanent.TopCard.EqualsCardName(blastDNAConditions[0].Name))
+                {
+                    JogressEvoRootsFrameIDs[0] = selectedPermanent.PermanentFrame.FrameID;
+                    JogressEvoRootsFrameIDs[1] = selectedCardSource.PermanentOfThisCard().PermanentFrame.FrameID;
+                }
+                else
+                {
+                    JogressEvoRootsFrameIDs[0] = selectedCardSource.PermanentOfThisCard().PermanentFrame.FrameID;
+                    JogressEvoRootsFrameIDs[1] = selectedPermanent.PermanentFrame.FrameID;
+                }
 
                 if (card.CanPlayJogress(true))
                 {

+ 2 - 1
Assets/Scripts/CardEffectFactory/KeyWordEffects/BlastDigivolution.cs

@@ -24,7 +24,8 @@ public partial class CardEffectFactory
             {
                 if (card.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass))
                 {
-                    return true;
+                    if(!permanent.TopCard.CanNotBeAffected(activateClass))
+                        return true;
                 }
             }
 

+ 1 - 5
Assets/Scripts/Permanent.cs

@@ -1497,14 +1497,10 @@ public class Permanent
                 }
 
                 if (!IsDigimon)
-                {
                     return false;
-                }
 
-                if (DP <= 0)
-                {
+                if (TopCard.IsDigiEgg && DP <= 0)
                     return false;
-                }
 
                 if (GManager.instance.turnStateMachine.gameContext.TurnPlayer.fieldCardFrames.Count((frame) => frame.IsEmptyFrame() && frame.IsBattleAreaFrame()) == 0)
                 {

+ 2 - 5
Assets/Scripts/PlayLog.cs

@@ -112,8 +112,6 @@ public class PlayLog : MonoBehaviour
 
         _logList = new List<string>();
 
-        Debug.Log("INIT LOG");
-
         OnAddLog += AddLogString;
         OnLinkPressed += ShowCard;
     }
@@ -125,7 +123,6 @@ public class PlayLog : MonoBehaviour
 
     void AddLogStringCoroutine(string log)
     {
-        Debug.Log("ADD LOG STRING");
         _logList.Add(AddLink(log));
 
         while (GetLogString().Length >= _maxLogCharacterLength)
@@ -153,8 +150,8 @@ public class PlayLog : MonoBehaviour
             startIndex[i] += 1;
 
             string str = log.Substring(startIndex[i], endIndex[i] - startIndex[i]);
-
-            if(!subStrings.Contains(str))
+            Debug.Log(str);
+            if(!subStrings.Contains(str) && !String.IsNullOrEmpty(str))
                 subStrings.Add(str);
         }
 

+ 0 - 1
Assets/Scripts/TurnStateMachine.cs

@@ -722,7 +722,6 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
                     }
                 }
                 #endregion
-
                 #region 移動できる場合
                 else if (!gameContext.TurnPlayer.CanHatch || gameContext.TurnPlayer.CanMove)
                 {

+ 2 - 2
ProjectSettings/ProjectSettings.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:4c51bdfb4e0015e6ba11c3f497751d45fba8db504bfe5210800f95875fad8d90
-size 20166
+oid sha256:b0d83eec00099a3f0099d3250c087c25e4c192aaf729952a53f20c7efa249551
+size 20167